diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2b82d1de..1a55fdb1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,12 +15,10 @@ jobs: - name: Compile run: yarn && yarn build - - publish: - needs: [ compile ] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + + test: runs-on: ubuntu-latest - + steps: - name: Checkout repo uses: actions/checkout@v3 @@ -28,15 +26,32 @@ jobs: - name: Set up node uses: actions/setup-node@v3 + - name: Compile + run: yarn && yarn test + + publish: + needs: [ compile, test ] + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Set up node + uses: actions/setup-node@v3 - name: Install dependencies run: yarn install - - name: Build run: yarn build - name: Publish to npm run: | npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} - npm publish --access public + if [[ ${GITHUB_REF} == *alpha* ]]; then + npm publish --access public --tag alpha + elif [[ ${GITHUB_REF} == *beta* ]]; then + npm publish --access public --tag beta + else + npm publish --access public + fi env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1498321f7..72271e049 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,3 @@ node_modules .DS_Store -/dist -/Client.d.ts -/Client.js -/environments.d.ts -/environments.js -/index.d.ts -/index.js -/api -/core -/errors -/serialization \ No newline at end of file +/dist \ No newline at end of file diff --git a/.npmignore b/.npmignore index e62938dd0..6db0876c4 100644 --- a/.npmignore +++ b/.npmignore @@ -1,5 +1,6 @@ node_modules src +tests .gitignore .github .fernignore diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 000000000..35d6e65bf --- /dev/null +++ b/jest.config.js @@ -0,0 +1,5 @@ +/** @type {import('jest').Config} */ +module.exports = { + preset: "ts-jest", + testEnvironment: "node", +}; diff --git a/package.json b/package.json index b9e4a6de2..7e00b8545 100644 --- a/package.json +++ b/package.json @@ -1,28 +1,43 @@ { "name": "@mergeapi/merge-node-client", - "version": "1.0.12", + "version": "1.1.0", "private": false, "repository": "https://github.com/merge-api/merge-node-client", "main": "./index.js", "types": "./index.d.ts", "scripts": { - "format": "prettier --write 'src/**/*.ts'", + "format": "prettier . --write --ignore-unknown", "build": "tsc", - "prepack": "cp -rv dist/. ." + "prepack": "cp -rv dist/. .", + "test": "jest" }, "dependencies": { "url-join": "4.0.1", - "form-data": "4.0.0", + "form-data": "^4.0.0", + "formdata-node": "^6.0.3", "node-fetch": "2.7.0", "qs": "6.11.2", + "readable-stream": "^4.5.2", "js-base64": "3.7.2" }, "devDependencies": { "@types/url-join": "4.0.1", "@types/qs": "6.9.8", "@types/node-fetch": "2.6.9", + "@types/readable-stream": "^4.0.15", + "webpack": "^5.94.0", + "ts-loader": "^9.3.1", + "jest": "29.7.0", + "@types/jest": "29.5.5", + "ts-jest": "29.1.1", + "jest-environment-jsdom": "29.7.0", "@types/node": "17.0.33", "prettier": "2.7.1", "typescript": "4.6.4" + }, + "browser": { + "fs": false, + "os": false, + "path": false } -} \ No newline at end of file +} diff --git a/reference.md b/reference.md new file mode 100644 index 000000000..a89fbe614 --- /dev/null +++ b/reference.md @@ -0,0 +1,28734 @@ +# Reference + +## Ats AccountDetails + +
client.ats.accountDetails.retrieve() -> Merge.AccountDetails +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details for a linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.accountDetails.retrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `AccountDetails.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats AccountToken + +
client.ats.accountToken.retrieve(publicToken) -> Merge.AccountToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the account token for the end user with the provided public token. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.accountToken.retrieve("public_token"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**publicToken:** `string` + +
+
+ +
+
+ +**requestOptions:** `AccountToken.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Activities + +
client.ats.activities.list({ ...params }) -> Merge.PaginatedActivityList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Activity` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.activities.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.ActivitiesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Activities.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.activities.create({ ...params }) -> Merge.ActivityResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Activity` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.activities.create({ + model: {}, + remoteUserId: "remote_user_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.ActivityEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Activities.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.activities.retrieve(id, { ...params }) -> Merge.Activity +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Activity` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.activities.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.ActivitiesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Activities.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.activities.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Activity` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.activities.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Activities.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Applications + +
client.ats.applications.list({ ...params }) -> Merge.PaginatedApplicationList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Application` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.applications.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.ApplicationsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Applications.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.applications.create({ ...params }) -> Merge.ApplicationResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Application` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.applications.create({ + model: {}, + remoteUserId: "remote_user_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.ApplicationEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Applications.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.applications.retrieve(id, { ...params }) -> Merge.Application +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Application` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.applications.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.ApplicationsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Applications.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.applications.changeStageCreate(id, { ...params }) -> Merge.ApplicationResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates the `current_stage` field of an `Application` object + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.applications.changeStageCreate("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.UpdateApplicationStageRequest` + +
+
+ +
+
+ +**requestOptions:** `Applications.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.applications.metaPostRetrieve({ ...params }) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Application` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.applications.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.ApplicationsMetaPostRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Applications.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats AsyncPassthrough + +
client.ats.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Asynchronously pull data from an endpoint not currently supported by Merge. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.asyncPassthrough.create({ + method: "GET", + path: "/scooters", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves data from earlier async-passthrough POST request + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.asyncPassthrough.retrieve("async_passthrough_receipt_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**asyncPassthroughReceiptId:** `string` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Attachments + +
client.ats.attachments.list({ ...params }) -> Merge.PaginatedAttachmentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Attachment` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.attachments.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.AttachmentsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Attachments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.attachments.create({ ...params }) -> Merge.AttachmentResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Attachment` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.attachments.create({ + model: {}, + remoteUserId: "remote_user_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.AttachmentEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Attachments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.attachments.retrieve(id, { ...params }) -> Merge.Attachment +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Attachment` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.attachments.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.AttachmentsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Attachments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.attachments.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Attachment` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.attachments.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Attachments.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats AuditTrail + +
client.ats.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a list of audit trail events. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.auditTrail.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.AuditTrailListRequest` + +
+
+ +
+
+ +**requestOptions:** `AuditTrail.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats AvailableActions + +
client.ats.availableActions.retrieve() -> Merge.AvailableActions +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of models and actions available for an account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.availableActions.retrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `AvailableActions.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Candidates + +
client.ats.candidates.list({ ...params }) -> Merge.PaginatedCandidateList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Candidate` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.candidates.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.CandidatesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Candidates.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.candidates.create({ ...params }) -> Merge.CandidateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Candidate` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.candidates.create({ + model: {}, + remoteUserId: "remote_user_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.CandidateEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Candidates.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.candidates.retrieve(id, { ...params }) -> Merge.Candidate +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Candidate` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.candidates.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.CandidatesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Candidates.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.candidates.partialUpdate(id, { ...params }) -> Merge.CandidateResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates a `Candidate` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.candidates.partialUpdate("id", { + model: {}, + remoteUserId: "remote_user_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.PatchedCandidateEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Candidates.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.candidates.ignoreCreate(modelId, { ...params }) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.candidates.ignoreCreate("model_id", { + reason: "GENERAL_CUSTOMER_REQUEST", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**modelId:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.IgnoreCommonModelRequest` + +
+
+ +
+
+ +**requestOptions:** `Candidates.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.candidates.metaPatchRetrieve(id) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Candidate` PATCHs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.candidates.metaPatchRetrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Candidates.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.candidates.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Candidate` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.candidates.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Candidates.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Scopes + +
client.ats.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.scopes.defaultScopesRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.scopes.linkedAccountScopesRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.scopes.linkedAccountScopesCreate({ + commonModels: [ + { + modelName: "Employee", + modelPermissions: { + READ: { + isEnabled: true, + }, + WRITE: { + isEnabled: false, + }, + }, + }, + { + modelName: "Benefit", + modelPermissions: { + WRITE: { + isEnabled: false, + }, + }, + }, + ], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.LinkedAccountCommonModelScopeDeserializerRequest` + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats DeleteAccount + +
client.ats.deleteAccount.delete() -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.deleteAccount.delete(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `DeleteAccount.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Departments + +
client.ats.departments.list({ ...params }) -> Merge.PaginatedDepartmentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Department` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.departments.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.DepartmentsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Departments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.departments.retrieve(id, { ...params }) -> Merge.Department +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Department` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.departments.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.DepartmentsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Departments.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Eeocs + +
client.ats.eeocs.list({ ...params }) -> Merge.PaginatedEeocList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `EEOC` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.eeocs.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.EeocsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Eeocs.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.eeocs.retrieve(id, { ...params }) -> Merge.Eeoc +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `EEOC` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.eeocs.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.EeocsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Eeocs.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats FieldMapping + +
client.ats.fieldMapping.fieldMappingsRetrieve() -> Merge.FieldMappingApiInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.fieldMapping.fieldMappingsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.fieldMapping.fieldMappingsCreate({ + targetFieldName: "example_target_field_name", + targetFieldDescription: "this is a example description of the target field", + remoteFieldTraversalPath: ["example_remote_field"], + remoteMethod: "GET", + remoteUrlPath: "/example-url-path", + commonModelName: "ExampleCommonModel", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.CreateFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.fieldMapping.fieldMappingsDestroy("field_mapping_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.PatchedEditFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.fieldMapping.remoteFieldsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.RemoteFieldsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.fieldMapping.targetFieldsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats GenerateKey + +
client.ats.generateKey.create({ ...params }) -> Merge.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a remote key. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.generateKey.create({ + name: "Remote Deployment Key 1", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.GenerateRemoteKeyRequest` + +
+
+ +
+
+ +**requestOptions:** `GenerateKey.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Interviews + +
client.ats.interviews.list({ ...params }) -> Merge.PaginatedScheduledInterviewList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `ScheduledInterview` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.interviews.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.InterviewsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Interviews.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.interviews.create({ ...params }) -> Merge.ScheduledInterviewResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `ScheduledInterview` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.interviews.create({ + model: {}, + remoteUserId: "remote_user_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.ScheduledInterviewEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Interviews.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.interviews.retrieve(id, { ...params }) -> Merge.ScheduledInterview +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `ScheduledInterview` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.interviews.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.InterviewsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Interviews.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.interviews.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `ScheduledInterview` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.interviews.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Interviews.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Issues + +
client.ats.issues.list({ ...params }) -> Merge.PaginatedIssueList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets all issues for Organization. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.issues.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.IssuesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.issues.retrieve(id) -> Merge.Issue +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a specific issue. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.issues.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats JobInterviewStages + +
client.ats.jobInterviewStages.list({ ...params }) -> Merge.PaginatedJobInterviewStageList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `JobInterviewStage` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.jobInterviewStages.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.JobInterviewStagesListRequest` + +
+
+ +
+
+ +**requestOptions:** `JobInterviewStages.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.jobInterviewStages.retrieve(id, { ...params }) -> Merge.JobInterviewStage +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `JobInterviewStage` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.jobInterviewStages.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.JobInterviewStagesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `JobInterviewStages.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats JobPostings + +
client.ats.jobPostings.list({ ...params }) -> Merge.PaginatedJobPostingList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `JobPosting` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.jobPostings.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.JobPostingsListRequest` + +
+
+ +
+
+ +**requestOptions:** `JobPostings.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.jobPostings.retrieve(id, { ...params }) -> Merge.JobPosting +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `JobPosting` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.jobPostings.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.JobPostingsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `JobPostings.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Jobs + +
client.ats.jobs.list({ ...params }) -> Merge.PaginatedJobList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Job` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.jobs.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.JobsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Jobs.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.jobs.retrieve(id, { ...params }) -> Merge.Job +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Job` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.jobs.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.JobsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Jobs.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.jobs.screeningQuestionsList(jobId, { ...params }) -> Merge.PaginatedScreeningQuestionList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `ScreeningQuestion` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.jobs.screeningQuestionsList("job_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**jobId:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.JobsScreeningQuestionsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Jobs.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats LinkToken + +
client.ats.linkToken.create({ ...params }) -> Merge.LinkToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a link token to be used when linking a new end user. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.EndUserDetailsRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkToken.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats LinkedAccounts + +
client.ats.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List linked accounts for your organization. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.linkedAccounts.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.LinkedAccountsListRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkedAccounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Offers + +
client.ats.offers.list({ ...params }) -> Merge.PaginatedOfferList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Offer` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.offers.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.OffersListRequest` + +
+
+ +
+
+ +**requestOptions:** `Offers.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.offers.retrieve(id, { ...params }) -> Merge.Offer +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Offer` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.offers.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.OffersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Offers.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Offices + +
client.ats.offices.list({ ...params }) -> Merge.PaginatedOfficeList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Office` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.offices.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.OfficesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Offices.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.offices.retrieve(id, { ...params }) -> Merge.Office +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Office` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.offices.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.OfficesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Offices.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Passthrough + +
client.ats.passthrough.create({ ...params }) -> Merge.RemoteResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Pull data from an endpoint not currently supported by Merge. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.passthrough.create({ + method: "GET", + path: "/scooters", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `Passthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats RegenerateKey + +
client.ats.regenerateKey.create({ ...params }) -> Merge.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Exchange remote keys. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.regenerateKey.create({ + name: "Remote Deployment Key 1", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.RemoteKeyForRegenerationRequest` + +
+
+ +
+
+ +**requestOptions:** `RegenerateKey.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats RejectReasons + +
client.ats.rejectReasons.list({ ...params }) -> Merge.PaginatedRejectReasonList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RejectReason` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.rejectReasons.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.RejectReasonsListRequest` + +
+
+ +
+
+ +**requestOptions:** `RejectReasons.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.rejectReasons.retrieve(id, { ...params }) -> Merge.RejectReason +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `RejectReason` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.rejectReasons.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.RejectReasonsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `RejectReasons.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Scorecards + +
client.ats.scorecards.list({ ...params }) -> Merge.PaginatedScorecardList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Scorecard` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.scorecards.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.ScorecardsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Scorecards.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.scorecards.retrieve(id, { ...params }) -> Merge.Scorecard +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Scorecard` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.scorecards.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.ScorecardsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Scorecards.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats SyncStatus + +
client.ats.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.syncStatus.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.SyncStatusListRequest` + +
+
+ +
+
+ +**requestOptions:** `SyncStatus.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats ForceResync + +
client.ats.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.forceResync.syncStatusResyncCreate(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `ForceResync.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Tags + +
client.ats.tags.list({ ...params }) -> Merge.PaginatedTagList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Tag` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.tags.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.TagsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Tags.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats Users + +
client.ats.users.list({ ...params }) -> Merge.PaginatedRemoteUserList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteUser` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.users.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.UsersListRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.users.retrieve(id, { ...params }) -> Merge.RemoteUser +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `RemoteUser` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.users.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.UsersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ats WebhookReceivers + +
client.ats.webhookReceivers.list() -> Merge.WebhookReceiver[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `WebhookReceiver` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.webhookReceivers.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `WebhookReceivers.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ats.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `WebhookReceiver` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ats.webhookReceivers.create({ + event: "event", + isActive: true, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ats.WebhookReceiverRequest` + +
+
+ +
+
+ +**requestOptions:** `WebhookReceivers.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage AccountDetails + +
client.filestorage.accountDetails.retrieve() -> Merge.AccountDetails +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details for a linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.accountDetails.retrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `AccountDetails.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage AccountToken + +
client.filestorage.accountToken.retrieve(publicToken) -> Merge.AccountToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the account token for the end user with the provided public token. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.accountToken.retrieve("public_token"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**publicToken:** `string` + +
+
+ +
+
+ +**requestOptions:** `AccountToken.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage AsyncPassthrough + +
client.filestorage.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Asynchronously pull data from an endpoint not currently supported by Merge. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.asyncPassthrough.create({ + method: "GET", + path: "/scooters", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves data from earlier async-passthrough POST request + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**asyncPassthroughReceiptId:** `string` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage AuditTrail + +
client.filestorage.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a list of audit trail events. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.auditTrail.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.AuditTrailListRequest` + +
+
+ +
+
+ +**requestOptions:** `AuditTrail.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage AvailableActions + +
client.filestorage.availableActions.retrieve() -> Merge.AvailableActions +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of models and actions available for an account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.availableActions.retrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `AvailableActions.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage Scopes + +
client.filestorage.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.scopes.defaultScopesRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.scopes.linkedAccountScopesRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.scopes.linkedAccountScopesCreate({ + commonModels: [ + { + modelName: "Employee", + modelPermissions: { + READ: { + isEnabled: true, + }, + WRITE: { + isEnabled: false, + }, + }, + }, + { + modelName: "Benefit", + modelPermissions: { + WRITE: { + isEnabled: false, + }, + }, + }, + ], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.LinkedAccountCommonModelScopeDeserializerRequest` + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage DeleteAccount + +
client.filestorage.deleteAccount.delete() -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.deleteAccount.delete(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `DeleteAccount.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage Drives + +
client.filestorage.drives.list({ ...params }) -> Merge.PaginatedDriveList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Drive` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.drives.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.DrivesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Drives.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.drives.retrieve(id, { ...params }) -> Merge.Drive +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Drive` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.drives.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.filestorage.DrivesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Drives.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage FieldMapping + +
client.filestorage.fieldMapping.fieldMappingsRetrieve() -> Merge.FieldMappingApiInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.fieldMapping.fieldMappingsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.fieldMapping.fieldMappingsCreate({ + targetFieldName: "example_target_field_name", + targetFieldDescription: "this is a example description of the target field", + remoteFieldTraversalPath: ["example_remote_field"], + remoteMethod: "GET", + remoteUrlPath: "/example-url-path", + commonModelName: "ExampleCommonModel", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.CreateFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**request:** `Merge.filestorage.PatchedEditFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.fieldMapping.remoteFieldsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.RemoteFieldsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.fieldMapping.targetFieldsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage Files + +
client.filestorage.files.list({ ...params }) -> Merge.PaginatedFileList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `File` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.files.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.FilesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.files.create({ ...params }) -> Merge.FileStorageFileResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `File` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.files.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.FileStorageFileEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.files.retrieve(id, { ...params }) -> Merge.File_ +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `File` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.files.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.filestorage.FilesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.files.downloadRetrieve(id, { ...params }) -> stream.Readable +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the `File` content with the given `id` as a stream of bytes. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.files.downloadRetrieve("string", { + mimeType: "string", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.filestorage.FilesDownloadRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.files.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `FileStorageFile` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.files.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage Folders + +
client.filestorage.folders.list({ ...params }) -> Merge.PaginatedFolderList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Folder` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.folders.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.FoldersListRequest` + +
+
+ +
+
+ +**requestOptions:** `Folders.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.folders.create({ ...params }) -> Merge.FileStorageFolderResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Folder` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.folders.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.FileStorageFolderEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Folders.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.folders.retrieve(id, { ...params }) -> Merge.Folder +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Folder` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.folders.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.filestorage.FoldersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Folders.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.folders.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `FileStorageFolder` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.folders.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Folders.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage GenerateKey + +
client.filestorage.generateKey.create({ ...params }) -> Merge.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a remote key. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.generateKey.create({ + name: "Remote Deployment Key 1", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.GenerateRemoteKeyRequest` + +
+
+ +
+
+ +**requestOptions:** `GenerateKey.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage Groups + +
client.filestorage.groups.list({ ...params }) -> Merge.PaginatedGroupList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Group` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.groups.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.GroupsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Groups.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.groups.retrieve(id, { ...params }) -> Merge.Group +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Group` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.groups.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.filestorage.GroupsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Groups.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage Issues + +
client.filestorage.issues.list({ ...params }) -> Merge.PaginatedIssueList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets all issues for Organization. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.issues.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.IssuesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.issues.retrieve(id) -> Merge.Issue +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a specific issue. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.issues.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage LinkToken + +
client.filestorage.linkToken.create({ ...params }) -> Merge.LinkToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a link token to be used when linking a new end user. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.EndUserDetailsRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkToken.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage LinkedAccounts + +
client.filestorage.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List linked accounts for your organization. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.linkedAccounts.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.LinkedAccountsListRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkedAccounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage Passthrough + +
client.filestorage.passthrough.create({ ...params }) -> Merge.RemoteResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Pull data from an endpoint not currently supported by Merge. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.passthrough.create({ + method: "GET", + path: "/scooters", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `Passthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage RegenerateKey + +
client.filestorage.regenerateKey.create({ ...params }) -> Merge.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Exchange remote keys. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.regenerateKey.create({ + name: "Remote Deployment Key 1", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.RemoteKeyForRegenerationRequest` + +
+
+ +
+
+ +**requestOptions:** `RegenerateKey.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage SyncStatus + +
client.filestorage.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.syncStatus.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.SyncStatusListRequest` + +
+
+ +
+
+ +**requestOptions:** `SyncStatus.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage ForceResync + +
client.filestorage.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.forceResync.syncStatusResyncCreate(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `ForceResync.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage Users + +
client.filestorage.users.list({ ...params }) -> Merge.PaginatedUserList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `User` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.users.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.UsersListRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.users.retrieve(id, { ...params }) -> Merge.User +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `User` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.users.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.filestorage.UsersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Filestorage WebhookReceivers + +
client.filestorage.webhookReceivers.list() -> Merge.WebhookReceiver[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `WebhookReceiver` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.webhookReceivers.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `WebhookReceivers.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.filestorage.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `WebhookReceiver` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.filestorage.webhookReceivers.create({ + event: "event", + isActive: true, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.filestorage.WebhookReceiverRequest` + +
+
+ +
+
+ +**requestOptions:** `WebhookReceivers.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm AccountDetails + +
client.crm.accountDetails.retrieve() -> Merge.AccountDetails +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details for a linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.accountDetails.retrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `AccountDetails.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm AccountToken + +
client.crm.accountToken.retrieve(publicToken) -> Merge.AccountToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the account token for the end user with the provided public token. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.accountToken.retrieve("public_token"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**publicToken:** `string` + +
+
+ +
+
+ +**requestOptions:** `AccountToken.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Accounts + +
client.crm.accounts.list({ ...params }) -> Merge.PaginatedAccountList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Account` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.accounts.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.AccountsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.accounts.create({ ...params }) -> Merge.CrmAccountResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Account` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.accounts.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.CrmAccountEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.accounts.retrieve(id, { ...params }) -> Merge.Account +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Account` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.accounts.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.AccountsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.accounts.partialUpdate(id, { ...params }) -> Merge.CrmAccountResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates an `Account` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.accounts.partialUpdate("id", { + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.PatchedCrmAccountEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.accounts.metaPatchRetrieve(id) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `CRMAccount` PATCHs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.accounts.metaPatchRetrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.accounts.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `CRMAccount` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.accounts.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.accounts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.accounts.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.AccountsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm AsyncPassthrough + +
client.crm.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Asynchronously pull data from an endpoint not currently supported by Merge. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.asyncPassthrough.create({ + method: "GET", + path: "/scooters", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves data from earlier async-passthrough POST request + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**asyncPassthroughReceiptId:** `string` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm AuditTrail + +
client.crm.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a list of audit trail events. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.auditTrail.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.AuditTrailListRequest` + +
+
+ +
+
+ +**requestOptions:** `AuditTrail.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm AvailableActions + +
client.crm.availableActions.retrieve() -> Merge.AvailableActions +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of models and actions available for an account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.availableActions.retrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `AvailableActions.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Contacts + +
client.crm.contacts.list({ ...params }) -> Merge.PaginatedContactList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Contact` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.contacts.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.ContactsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.contacts.create({ ...params }) -> Merge.CrmContactResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Contact` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.contacts.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.CrmContactEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.contacts.retrieve(id, { ...params }) -> Merge.Contact +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Contact` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.contacts.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.ContactsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.contacts.partialUpdate(id, { ...params }) -> Merge.CrmContactResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates a `Contact` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.contacts.partialUpdate("id", { + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.PatchedCrmContactEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.contacts.ignoreCreate(modelId, { ...params }) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.contacts.ignoreCreate("model_id", { + reason: "GENERAL_CUSTOMER_REQUEST", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**modelId:** `string` + +
+
+ +
+
+ +**request:** `Merge.IgnoreCommonModelRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.contacts.metaPatchRetrieve(id) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `CRMContact` PATCHs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.contacts.metaPatchRetrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.contacts.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `CRMContact` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.contacts.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.contacts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.contacts.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.ContactsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm CustomObjectClasses + +
client.crm.customObjectClasses.list({ ...params }) -> Merge.PaginatedCustomObjectClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `CustomObjectClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.customObjectClasses.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjectClasses.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.customObjectClasses.retrieve(id, { ...params }) -> Merge.CustomObjectClass +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `CustomObjectClass` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.customObjectClasses.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjectClasses.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm AssociationTypes + +
client.crm.associationTypes.customObjectClassesAssociationTypesList(customObjectClassId, { ...params }) -> Merge.PaginatedAssociationTypeList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `AssociationType` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customObjectClassId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesAssociationTypesListRequest` + +
+
+ +
+
+ +**requestOptions:** `AssociationTypes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.associationTypes.customObjectClassesAssociationTypesCreate(customObjectClassId, { ...params }) -> Merge.CrmAssociationTypeResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `AssociationType` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.associationTypes.customObjectClassesAssociationTypesCreate("custom_object_class_id", { + model: { + sourceObjectClass: { + id: "id", + originType: "CUSTOM_OBJECT", + }, + targetObjectClasses: [ + { + id: "id", + originType: "CUSTOM_OBJECT", + }, + ], + remoteKeyName: "remote_key_name", + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customObjectClassId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CrmAssociationTypeEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `AssociationTypes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve(customObjectClassId, id, { ...params }) -> Merge.AssociationType +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `AssociationType` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("custom_object_class_id", "id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customObjectClassId:** `string` + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesAssociationTypesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `AssociationTypes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve(customObjectClassId) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `CRMAssociationType` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve("custom_object_class_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customObjectClassId:** `string` + +
+
+ +
+
+ +**requestOptions:** `AssociationTypes.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm CustomObjects + +
client.crm.customObjects.customObjectClassesCustomObjectsList(customObjectClassId, { ...params }) -> Merge.PaginatedCustomObjectList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `CustomObject` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customObjectClassId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesCustomObjectsListRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjects.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.customObjects.customObjectClassesCustomObjectsCreate(customObjectClassId, { ...params }) -> Merge.CrmCustomObjectResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `CustomObject` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_object_class_id", { + model: { + fields: { + test_field: "hello", + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customObjectClassId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CrmCustomObjectEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjects.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.customObjects.customObjectClassesCustomObjectsRetrieve(customObjectClassId, id, { ...params }) -> Merge.CustomObject +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `CustomObject` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_object_class_id", "id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customObjectClassId:** `string` + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesCustomObjectsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjects.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(customObjectClassId) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `CRMCustomObject` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve("custom_object_class_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customObjectClassId:** `string` + +
+
+ +
+
+ +**requestOptions:** `CustomObjects.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjects.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Associations + +
client.crm.associations.customObjectClassesCustomObjectsAssociationsList(customObjectClassId, objectId, { ...params }) -> Merge.PaginatedAssociationList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Association` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("custom_object_class_id", "object_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customObjectClassId:** `string` + +
+
+ +
+
+ +**objectId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesCustomObjectsAssociationsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Associations.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate(associationTypeId, sourceClassId, sourceObjectId, targetClassId, targetObjectId, { ...params }) -> Merge.Association +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate( + "association_type_id", + "source_class_id", + "source_object_id", + "target_class_id", + "target_object_id" +); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**associationTypeId:** `string` + +
+
+ +
+
+ +**sourceClassId:** `string` + +
+
+ +
+
+ +**sourceObjectId:** `string` + +
+
+ +
+
+ +**targetClassId:** `string` + +
+
+ +
+
+ +**targetObjectId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesCustomObjectsAssociationsUpdateRequest` + +
+
+ +
+
+ +**requestOptions:** `Associations.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Scopes + +
client.crm.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.scopes.defaultScopesRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.scopes.linkedAccountScopesRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.scopes.linkedAccountScopesCreate({ + commonModels: [ + { + modelName: "Employee", + modelPermissions: { + READ: { + isEnabled: true, + }, + WRITE: { + isEnabled: false, + }, + }, + }, + { + modelName: "Benefit", + modelPermissions: { + WRITE: { + isEnabled: false, + }, + }, + }, + ], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.LinkedAccountCommonModelScopeDeserializerRequest` + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm DeleteAccount + +
client.crm.deleteAccount.delete() -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.deleteAccount.delete(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `DeleteAccount.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm EngagementTypes + +
client.crm.engagementTypes.list({ ...params }) -> Merge.PaginatedEngagementTypeList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `EngagementType` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagementTypes.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementTypesListRequest` + +
+
+ +
+
+ +**requestOptions:** `EngagementTypes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagementTypes.retrieve(id, { ...params }) -> Merge.EngagementType +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `EngagementType` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagementTypes.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementTypesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `EngagementTypes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagementTypes.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagementTypes.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementTypesRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `EngagementTypes.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Engagements + +
client.crm.engagements.list({ ...params }) -> Merge.PaginatedEngagementList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Engagement` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagements.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagements.create({ ...params }) -> Merge.EngagementResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Engagement` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagements.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagements.retrieve(id, { ...params }) -> Merge.Engagement +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Engagement` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagements.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagements.partialUpdate(id, { ...params }) -> Merge.EngagementResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates an `Engagement` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagements.partialUpdate("id", { + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.PatchedEngagementEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagements.metaPatchRetrieve(id) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Engagement` PATCHs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagements.metaPatchRetrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagements.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Engagement` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagements.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagements.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagements.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm FieldMapping + +
client.crm.fieldMapping.fieldMappingsRetrieve() -> Merge.FieldMappingApiInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.fieldMapping.fieldMappingsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.fieldMapping.fieldMappingsCreate({ + targetFieldName: "example_target_field_name", + targetFieldDescription: "this is a example description of the target field", + remoteFieldTraversalPath: ["example_remote_field"], + remoteMethod: "GET", + remoteUrlPath: "/example-url-path", + commonModelName: "ExampleCommonModel", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.CreateFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.PatchedEditFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.fieldMapping.remoteFieldsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.RemoteFieldsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.fieldMapping.targetFieldsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm GenerateKey + +
client.crm.generateKey.create({ ...params }) -> Merge.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a remote key. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.generateKey.create({ + name: "Remote Deployment Key 1", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.GenerateRemoteKeyRequest` + +
+
+ +
+
+ +**requestOptions:** `GenerateKey.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Issues + +
client.crm.issues.list({ ...params }) -> Merge.PaginatedIssueList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets all issues for Organization. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.issues.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.IssuesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.issues.retrieve(id) -> Merge.Issue +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a specific issue. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.issues.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Leads + +
client.crm.leads.list({ ...params }) -> Merge.PaginatedLeadList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Lead` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.leads.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.LeadsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Leads.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.leads.create({ ...params }) -> Merge.LeadResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Lead` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.leads.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.LeadEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Leads.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.leads.retrieve(id, { ...params }) -> Merge.Lead +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Lead` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.leads.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.LeadsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Leads.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.leads.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Lead` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.leads.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Leads.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.leads.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.leads.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.LeadsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Leads.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm LinkToken + +
client.crm.linkToken.create({ ...params }) -> Merge.LinkToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a link token to be used when linking a new end user. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.EndUserDetailsRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkToken.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm LinkedAccounts + +
client.crm.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List linked accounts for your organization. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.linkedAccounts.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.LinkedAccountsListRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkedAccounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Notes + +
client.crm.notes.list({ ...params }) -> Merge.PaginatedNoteList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Note` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.notes.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.NotesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Notes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.notes.create({ ...params }) -> Merge.NoteResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Note` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.notes.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.NoteEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Notes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.notes.retrieve(id, { ...params }) -> Merge.Note +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Note` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.notes.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.NotesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Notes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.notes.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Note` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.notes.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Notes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.notes.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.notes.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.NotesRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Notes.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Opportunities + +
client.crm.opportunities.list({ ...params }) -> Merge.PaginatedOpportunityList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Opportunity` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.opportunities.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.OpportunitiesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Opportunities.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.opportunities.create({ ...params }) -> Merge.OpportunityResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Opportunity` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.opportunities.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.OpportunityEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Opportunities.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.opportunities.retrieve(id, { ...params }) -> Merge.Opportunity +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Opportunity` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.opportunities.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.OpportunitiesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Opportunities.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.opportunities.partialUpdate(id, { ...params }) -> Merge.OpportunityResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates an `Opportunity` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.opportunities.partialUpdate("id", { + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.PatchedOpportunityEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Opportunities.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.opportunities.metaPatchRetrieve(id) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Opportunity` PATCHs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.opportunities.metaPatchRetrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Opportunities.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.opportunities.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Opportunity` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.opportunities.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Opportunities.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.opportunities.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.opportunities.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.OpportunitiesRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Opportunities.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Passthrough + +
client.crm.passthrough.create({ ...params }) -> Merge.RemoteResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Pull data from an endpoint not currently supported by Merge. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.passthrough.create({ + method: "GET", + path: "/scooters", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `Passthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm RegenerateKey + +
client.crm.regenerateKey.create({ ...params }) -> Merge.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Exchange remote keys. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.regenerateKey.create({ + name: "Remote Deployment Key 1", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.RemoteKeyForRegenerationRequest` + +
+
+ +
+
+ +**requestOptions:** `RegenerateKey.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Stages + +
client.crm.stages.list({ ...params }) -> Merge.PaginatedStageList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Stage` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.stages.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.StagesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Stages.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.stages.retrieve(id, { ...params }) -> Merge.Stage +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Stage` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.stages.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.StagesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Stages.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.stages.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.stages.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.StagesRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Stages.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm SyncStatus + +
client.crm.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.syncStatus.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.SyncStatusListRequest` + +
+
+ +
+
+ +**requestOptions:** `SyncStatus.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm ForceResync + +
client.crm.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.forceResync.syncStatusResyncCreate(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `ForceResync.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Tasks + +
client.crm.tasks.list({ ...params }) -> Merge.PaginatedTaskList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Task` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.tasks.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.TasksListRequest` + +
+
+ +
+
+ +**requestOptions:** `Tasks.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.tasks.create({ ...params }) -> Merge.TaskResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Task` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.tasks.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.TaskEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Tasks.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.tasks.retrieve(id, { ...params }) -> Merge.Task +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Task` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.tasks.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.TasksRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Tasks.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.tasks.partialUpdate(id, { ...params }) -> Merge.TaskResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates a `Task` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.tasks.partialUpdate("id", { + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.PatchedTaskEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Tasks.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.tasks.metaPatchRetrieve(id) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Task` PATCHs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.tasks.metaPatchRetrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Tasks.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.tasks.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Task` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.tasks.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Tasks.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.tasks.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.tasks.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.TasksRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Tasks.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Users + +
client.crm.users.list({ ...params }) -> Merge.PaginatedUserList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `User` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.users.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.UsersListRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.users.retrieve(id, { ...params }) -> Merge.User +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `User` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.users.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.UsersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.users.ignoreCreate(modelId, { ...params }) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.users.ignoreCreate("model_id", { + reason: "GENERAL_CUSTOMER_REQUEST", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**modelId:** `string` + +
+
+ +
+
+ +**request:** `Merge.IgnoreCommonModelRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.users.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.users.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.UsersRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm WebhookReceivers + +
client.crm.webhookReceivers.list() -> Merge.WebhookReceiver[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `WebhookReceiver` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.webhookReceivers.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `WebhookReceivers.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `WebhookReceiver` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.webhookReceivers.create({ + event: "event", + isActive: true, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.WebhookReceiverRequest` + +
+
+ +
+
+ +**requestOptions:** `WebhookReceivers.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing AccountDetails + +
client.ticketing.accountDetails.retrieve() -> Merge.AccountDetails +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details for a linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.accountDetails.retrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `AccountDetails.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing AccountToken + +
client.ticketing.accountToken.retrieve(publicToken) -> Merge.AccountToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the account token for the end user with the provided public token. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.accountToken.retrieve("public_token"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**publicToken:** `string` + +
+
+ +
+
+ +**requestOptions:** `AccountToken.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing Accounts + +
client.ticketing.accounts.list({ ...params }) -> Merge.PaginatedAccountList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Account` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.accounts.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.AccountsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.accounts.retrieve(id, { ...params }) -> Merge.Account +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Account` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.accounts.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.AccountsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing AsyncPassthrough + +
client.ticketing.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Asynchronously pull data from an endpoint not currently supported by Merge. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.asyncPassthrough.create({ + method: "GET", + path: "/scooters", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves data from earlier async-passthrough POST request + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.asyncPassthrough.retrieve("async_passthrough_receipt_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**asyncPassthroughReceiptId:** `string` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing Attachments + +
client.ticketing.attachments.list({ ...params }) -> Merge.PaginatedAttachmentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Attachment` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.attachments.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.AttachmentsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Attachments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.attachments.create({ ...params }) -> Merge.TicketingAttachmentResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Attachment` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.attachments.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.TicketingAttachmentEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Attachments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.attachments.retrieve(id, { ...params }) -> Merge.Attachment +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Attachment` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.attachments.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.AttachmentsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Attachments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.attachments.downloadRetrieve(id, { ...params }) -> stream.Readable +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the `File` content with the given `id` as a stream of bytes. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.attachments.downloadRetrieve("string", { + mimeType: "string", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.AttachmentsDownloadRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Attachments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.attachments.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `TicketingAttachment` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.attachments.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Attachments.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing AuditTrail + +
client.ticketing.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a list of audit trail events. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.auditTrail.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.AuditTrailListRequest` + +
+
+ +
+
+ +**requestOptions:** `AuditTrail.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing AvailableActions + +
client.ticketing.availableActions.retrieve() -> Merge.AvailableActions +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of models and actions available for an account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.availableActions.retrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `AvailableActions.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing Collections + +
client.ticketing.collections.list({ ...params }) -> Merge.PaginatedCollectionList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Collection` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.collections.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.CollectionsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Collections.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.collections.retrieve(id, { ...params }) -> Merge.Collection +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Collection` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.collections.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.CollectionsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Collections.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.collections.usersList(parentId, { ...params }) -> Merge.PaginatedUserList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `User` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.collections.usersList("parent_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**parentId:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.CollectionsUsersListRequest` + +
+
+ +
+
+ +**requestOptions:** `Collections.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing Comments + +
client.ticketing.comments.list({ ...params }) -> Merge.PaginatedCommentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Comment` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.comments.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.CommentsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Comments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.comments.create({ ...params }) -> Merge.CommentResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Comment` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.comments.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.CommentEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Comments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.comments.retrieve(id, { ...params }) -> Merge.Comment +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Comment` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.comments.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.CommentsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Comments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.comments.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Comment` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.comments.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Comments.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing Contacts + +
client.ticketing.contacts.list({ ...params }) -> Merge.PaginatedContactList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Contact` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.contacts.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.ContactsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.contacts.create({ ...params }) -> Merge.TicketingContactResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Contact` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.contacts.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.TicketingContactEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.contacts.retrieve(id, { ...params }) -> Merge.Contact +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Contact` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.contacts.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.ContactsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.contacts.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `TicketingContact` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.contacts.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing Scopes + +
client.ticketing.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.scopes.defaultScopesRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.scopes.linkedAccountScopesRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.scopes.linkedAccountScopesCreate({ + commonModels: [ + { + modelName: "Employee", + modelPermissions: { + READ: { + isEnabled: true, + }, + WRITE: { + isEnabled: false, + }, + }, + }, + { + modelName: "Benefit", + modelPermissions: { + WRITE: { + isEnabled: false, + }, + }, + }, + ], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.LinkedAccountCommonModelScopeDeserializerRequest` + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing DeleteAccount + +
client.ticketing.deleteAccount.delete() -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.deleteAccount.delete(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `DeleteAccount.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing FieldMapping + +
client.ticketing.fieldMapping.fieldMappingsRetrieve() -> Merge.FieldMappingApiInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.fieldMapping.fieldMappingsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.fieldMapping.fieldMappingsCreate({ + targetFieldName: "example_target_field_name", + targetFieldDescription: "this is a example description of the target field", + remoteFieldTraversalPath: ["example_remote_field"], + remoteMethod: "GET", + remoteUrlPath: "/example-url-path", + commonModelName: "ExampleCommonModel", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.CreateFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.fieldMapping.fieldMappingsDestroy("field_mapping_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.PatchedEditFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.fieldMapping.remoteFieldsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.RemoteFieldsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.fieldMapping.targetFieldsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing GenerateKey + +
client.ticketing.generateKey.create({ ...params }) -> Merge.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a remote key. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.generateKey.create({ + name: "Remote Deployment Key 1", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.GenerateRemoteKeyRequest` + +
+
+ +
+
+ +**requestOptions:** `GenerateKey.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing Issues + +
client.ticketing.issues.list({ ...params }) -> Merge.PaginatedIssueList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets all issues for Organization. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.issues.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.IssuesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.issues.retrieve(id) -> Merge.Issue +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a specific issue. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.issues.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing LinkToken + +
client.ticketing.linkToken.create({ ...params }) -> Merge.LinkToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a link token to be used when linking a new end user. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.EndUserDetailsRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkToken.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing LinkedAccounts + +
client.ticketing.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List linked accounts for your organization. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.linkedAccounts.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.LinkedAccountsListRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkedAccounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing Passthrough + +
client.ticketing.passthrough.create({ ...params }) -> Merge.RemoteResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Pull data from an endpoint not currently supported by Merge. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.passthrough.create({ + method: "GET", + path: "/scooters", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `Passthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing Projects + +
client.ticketing.projects.list({ ...params }) -> Merge.PaginatedProjectList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Project` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.projects.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.ProjectsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Projects.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.projects.retrieve(id, { ...params }) -> Merge.Project +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Project` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.projects.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.ProjectsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Projects.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.projects.usersList(parentId, { ...params }) -> Merge.PaginatedUserList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `User` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.projects.usersList("parent_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**parentId:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.ProjectsUsersListRequest` + +
+
+ +
+
+ +**requestOptions:** `Projects.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing RegenerateKey + +
client.ticketing.regenerateKey.create({ ...params }) -> Merge.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Exchange remote keys. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.regenerateKey.create({ + name: "Remote Deployment Key 1", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.RemoteKeyForRegenerationRequest` + +
+
+ +
+
+ +**requestOptions:** `RegenerateKey.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing Roles + +
client.ticketing.roles.list({ ...params }) -> Merge.PaginatedRoleList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Role` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.roles.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.RolesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Roles.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.roles.retrieve(id, { ...params }) -> Merge.Role +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Role` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.roles.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.RolesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Roles.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing SyncStatus + +
client.ticketing.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.syncStatus.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.SyncStatusListRequest` + +
+
+ +
+
+ +**requestOptions:** `SyncStatus.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing ForceResync + +
client.ticketing.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.forceResync.syncStatusResyncCreate(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `ForceResync.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing Tags + +
client.ticketing.tags.list({ ...params }) -> Merge.PaginatedTagList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Tag` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.tags.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.TagsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Tags.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.tags.retrieve(id, { ...params }) -> Merge.Tag +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Tag` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.tags.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.TagsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Tags.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing Teams + +
client.ticketing.teams.list({ ...params }) -> Merge.PaginatedTeamList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Team` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.teams.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.TeamsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Teams.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.teams.retrieve(id, { ...params }) -> Merge.Team +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Team` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.teams.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.TeamsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Teams.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing Tickets + +
client.ticketing.tickets.list({ ...params }) -> Merge.PaginatedTicketList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Ticket` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.tickets.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.TicketsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Tickets.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.tickets.create({ ...params }) -> Merge.TicketResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Ticket` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.tickets.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.TicketEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Tickets.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.tickets.retrieve(id, { ...params }) -> Merge.Ticket +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Ticket` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.tickets.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.TicketsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Tickets.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.tickets.partialUpdate(id, { ...params }) -> Merge.TicketResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates a `Ticket` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.tickets.partialUpdate("id", { + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.PatchedTicketEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Tickets.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.tickets.collaboratorsList(parentId, { ...params }) -> Merge.PaginatedUserList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `User` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.tickets.collaboratorsList("parent_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**parentId:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.TicketsCollaboratorsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Tickets.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.tickets.metaPatchRetrieve(id) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Ticket` PATCHs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.tickets.metaPatchRetrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Tickets.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.tickets.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Ticket` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.tickets.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Tickets.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.tickets.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.tickets.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.TicketsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Tickets.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing Users + +
client.ticketing.users.list({ ...params }) -> Merge.PaginatedUserList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `User` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.users.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.UsersListRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.users.retrieve(id, { ...params }) -> Merge.User +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `User` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.users.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ticketing.UsersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Ticketing WebhookReceivers + +
client.ticketing.webhookReceivers.list() -> Merge.WebhookReceiver[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `WebhookReceiver` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.webhookReceivers.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `WebhookReceivers.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.ticketing.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `WebhookReceiver` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.ticketing.webhookReceivers.create({ + event: "event", + isActive: true, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.ticketing.WebhookReceiverRequest` + +
+
+ +
+
+ +**requestOptions:** `WebhookReceivers.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris AccountDetails + +
client.hris.accountDetails.retrieve() -> Merge.AccountDetails +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details for a linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.accountDetails.retrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `AccountDetails.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris AccountToken + +
client.hris.accountToken.retrieve(publicToken) -> Merge.AccountToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the account token for the end user with the provided public token. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.accountToken.retrieve("public_token"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**publicToken:** `string` + +
+
+ +
+
+ +**requestOptions:** `AccountToken.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris AsyncPassthrough + +
client.hris.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Asynchronously pull data from an endpoint not currently supported by Merge. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.asyncPassthrough.create({ + method: "GET", + path: "/scooters", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves data from earlier async-passthrough POST request + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.asyncPassthrough.retrieve("async_passthrough_receipt_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**asyncPassthroughReceiptId:** `string` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris AuditTrail + +
client.hris.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a list of audit trail events. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.auditTrail.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.AuditTrailListRequest` + +
+
+ +
+
+ +**requestOptions:** `AuditTrail.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris AvailableActions + +
client.hris.availableActions.retrieve() -> Merge.AvailableActions +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of models and actions available for an account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.availableActions.retrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `AvailableActions.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris BankInfo + +
client.hris.bankInfo.list({ ...params }) -> Merge.PaginatedBankInfoList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `BankInfo` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.bankInfo.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.BankInfoListRequest` + +
+
+ +
+
+ +**requestOptions:** `BankInfo.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.bankInfo.retrieve(id, { ...params }) -> Merge.BankInfo +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `BankInfo` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.bankInfo.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.BankInfoRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `BankInfo.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris Benefits + +
client.hris.benefits.list({ ...params }) -> Merge.PaginatedBenefitList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Benefit` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.benefits.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.BenefitsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Benefits.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.benefits.retrieve(id, { ...params }) -> Merge.Benefit +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Benefit` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.benefits.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.BenefitsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Benefits.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris Companies + +
client.hris.companies.list({ ...params }) -> Merge.PaginatedCompanyList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Company` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.companies.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.CompaniesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Companies.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.companies.retrieve(id, { ...params }) -> Merge.Company +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Company` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.companies.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.CompaniesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Companies.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris Scopes + +
client.hris.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.scopes.defaultScopesRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.scopes.linkedAccountScopesRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.scopes.linkedAccountScopesCreate({ + commonModels: [ + { + modelName: "Employee", + modelPermissions: { + READ: { + isEnabled: true, + }, + WRITE: { + isEnabled: false, + }, + }, + }, + { + modelName: "Benefit", + modelPermissions: { + WRITE: { + isEnabled: false, + }, + }, + }, + ], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.LinkedAccountCommonModelScopeDeserializerRequest` + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris DeleteAccount + +
client.hris.deleteAccount.delete() -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.deleteAccount.delete(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `DeleteAccount.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris Dependents + +
client.hris.dependents.list({ ...params }) -> Merge.PaginatedDependentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Dependent` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.dependents.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.DependentsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Dependents.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.dependents.retrieve(id, { ...params }) -> Merge.Dependent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Dependent` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.dependents.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.DependentsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Dependents.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris EmployeePayrollRuns + +
client.hris.employeePayrollRuns.list({ ...params }) -> Merge.PaginatedEmployeePayrollRunList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `EmployeePayrollRun` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.employeePayrollRuns.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.EmployeePayrollRunsListRequest` + +
+
+ +
+
+ +**requestOptions:** `EmployeePayrollRuns.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.employeePayrollRuns.retrieve(id, { ...params }) -> Merge.EmployeePayrollRun +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `EmployeePayrollRun` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.employeePayrollRuns.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.EmployeePayrollRunsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `EmployeePayrollRuns.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris Employees + +
client.hris.employees.list({ ...params }) -> Merge.PaginatedEmployeeList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Employee` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.employees.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.EmployeesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Employees.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.employees.create({ ...params }) -> Merge.EmployeeResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Employee` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.employees.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.EmployeeEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Employees.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.employees.retrieve(id, { ...params }) -> Merge.Employee +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Employee` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.employees.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.EmployeesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Employees.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.employees.ignoreCreate(modelId, { ...params }) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.employees.ignoreCreate("model_id", { + reason: "GENERAL_CUSTOMER_REQUEST", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**modelId:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.IgnoreCommonModelRequest` + +
+
+ +
+
+ +**requestOptions:** `Employees.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.employees.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Employee` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.employees.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Employees.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris EmployerBenefits + +
client.hris.employerBenefits.list({ ...params }) -> Merge.PaginatedEmployerBenefitList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `EmployerBenefit` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.employerBenefits.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.EmployerBenefitsListRequest` + +
+
+ +
+
+ +**requestOptions:** `EmployerBenefits.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.employerBenefits.retrieve(id, { ...params }) -> Merge.EmployerBenefit +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `EmployerBenefit` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.employerBenefits.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.EmployerBenefitsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `EmployerBenefits.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris Employments + +
client.hris.employments.list({ ...params }) -> Merge.PaginatedEmploymentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Employment` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.employments.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.EmploymentsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Employments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.employments.retrieve(id, { ...params }) -> Merge.Employment +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Employment` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.employments.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.EmploymentsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Employments.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris FieldMapping + +
client.hris.fieldMapping.fieldMappingsRetrieve() -> Merge.FieldMappingApiInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.fieldMapping.fieldMappingsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.fieldMapping.fieldMappingsCreate({ + targetFieldName: "example_target_field_name", + targetFieldDescription: "this is a example description of the target field", + remoteFieldTraversalPath: ["example_remote_field"], + remoteMethod: "GET", + remoteUrlPath: "/example-url-path", + commonModelName: "ExampleCommonModel", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.CreateFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.fieldMapping.fieldMappingsDestroy("field_mapping_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.PatchedEditFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.fieldMapping.remoteFieldsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.RemoteFieldsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.fieldMapping.targetFieldsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris GenerateKey + +
client.hris.generateKey.create({ ...params }) -> Merge.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a remote key. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.generateKey.create({ + name: "Remote Deployment Key 1", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.GenerateRemoteKeyRequest` + +
+
+ +
+
+ +**requestOptions:** `GenerateKey.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris Groups + +
client.hris.groups.list({ ...params }) -> Merge.PaginatedGroupList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Group` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.groups.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.GroupsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Groups.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.groups.retrieve(id, { ...params }) -> Merge.Group +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Group` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.groups.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.GroupsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Groups.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris Issues + +
client.hris.issues.list({ ...params }) -> Merge.PaginatedIssueList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets all issues for Organization. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.issues.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.IssuesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.issues.retrieve(id) -> Merge.Issue +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a specific issue. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.issues.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris LinkToken + +
client.hris.linkToken.create({ ...params }) -> Merge.LinkToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a link token to be used when linking a new end user. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.EndUserDetailsRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkToken.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris LinkedAccounts + +
client.hris.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List linked accounts for your organization. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.linkedAccounts.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.LinkedAccountsListRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkedAccounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris Locations + +
client.hris.locations.list({ ...params }) -> Merge.PaginatedLocationList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Location` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.locations.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.LocationsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Locations.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.locations.retrieve(id, { ...params }) -> Merge.Location +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Location` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.locations.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.LocationsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Locations.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris Passthrough + +
client.hris.passthrough.create({ ...params }) -> Merge.RemoteResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Pull data from an endpoint not currently supported by Merge. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.passthrough.create({ + method: "GET", + path: "/scooters", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `Passthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris PayGroups + +
client.hris.payGroups.list({ ...params }) -> Merge.PaginatedPayGroupList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `PayGroup` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.payGroups.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.PayGroupsListRequest` + +
+
+ +
+
+ +**requestOptions:** `PayGroups.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.payGroups.retrieve(id, { ...params }) -> Merge.PayGroup +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `PayGroup` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.payGroups.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.PayGroupsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `PayGroups.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris PayrollRuns + +
client.hris.payrollRuns.list({ ...params }) -> Merge.PaginatedPayrollRunList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `PayrollRun` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.payrollRuns.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.PayrollRunsListRequest` + +
+
+ +
+
+ +**requestOptions:** `PayrollRuns.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.payrollRuns.retrieve(id, { ...params }) -> Merge.PayrollRun +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `PayrollRun` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.payrollRuns.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.PayrollRunsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `PayrollRuns.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris RegenerateKey + +
client.hris.regenerateKey.create({ ...params }) -> Merge.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Exchange remote keys. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.regenerateKey.create({ + name: "Remote Deployment Key 1", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.RemoteKeyForRegenerationRequest` + +
+
+ +
+
+ +**requestOptions:** `RegenerateKey.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris SyncStatus + +
client.hris.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.syncStatus.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.SyncStatusListRequest` + +
+
+ +
+
+ +**requestOptions:** `SyncStatus.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris ForceResync + +
client.hris.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.forceResync.syncStatusResyncCreate(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `ForceResync.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris Teams + +
client.hris.teams.list({ ...params }) -> Merge.PaginatedTeamList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Team` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.teams.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.TeamsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Teams.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.teams.retrieve(id, { ...params }) -> Merge.Team +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Team` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.teams.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.TeamsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Teams.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris TimeOff + +
client.hris.timeOff.list({ ...params }) -> Merge.PaginatedTimeOffList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `TimeOff` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.timeOff.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.TimeOffListRequest` + +
+
+ +
+
+ +**requestOptions:** `TimeOff.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.timeOff.create({ ...params }) -> Merge.TimeOffResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `TimeOff` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.timeOff.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.TimeOffEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `TimeOff.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.timeOff.retrieve(id, { ...params }) -> Merge.TimeOff +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `TimeOff` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.timeOff.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.TimeOffRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `TimeOff.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.timeOff.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `TimeOff` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.timeOff.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `TimeOff.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris TimeOffBalances + +
client.hris.timeOffBalances.list({ ...params }) -> Merge.PaginatedTimeOffBalanceList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `TimeOffBalance` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.timeOffBalances.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.TimeOffBalancesListRequest` + +
+
+ +
+
+ +**requestOptions:** `TimeOffBalances.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.timeOffBalances.retrieve(id, { ...params }) -> Merge.TimeOffBalance +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `TimeOffBalance` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.timeOffBalances.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.TimeOffBalancesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `TimeOffBalances.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris TimesheetEntries + +
client.hris.timesheetEntries.list({ ...params }) -> Merge.PaginatedTimesheetEntryList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `TimesheetEntry` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.timesheetEntries.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.TimesheetEntriesListRequest` + +
+
+ +
+
+ +**requestOptions:** `TimesheetEntries.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.timesheetEntries.create({ ...params }) -> Merge.TimesheetEntryResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `TimesheetEntry` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.timesheetEntries.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.TimesheetEntryEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `TimesheetEntries.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.timesheetEntries.retrieve(id, { ...params }) -> Merge.TimesheetEntry +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `TimesheetEntry` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.timesheetEntries.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.TimesheetEntriesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `TimesheetEntries.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.timesheetEntries.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `TimesheetEntry` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.timesheetEntries.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `TimesheetEntries.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Hris WebhookReceivers + +
client.hris.webhookReceivers.list() -> Merge.WebhookReceiver[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `WebhookReceiver` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.webhookReceivers.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `WebhookReceivers.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.hris.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `WebhookReceiver` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.hris.webhookReceivers.create({ + event: "event", + isActive: true, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.hris.WebhookReceiverRequest` + +
+
+ +
+
+ +**requestOptions:** `WebhookReceivers.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting AccountDetails + +
client.accounting.accountDetails.retrieve() -> Merge.AccountDetails +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details for a linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.accountDetails.retrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `AccountDetails.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting AccountToken + +
client.accounting.accountToken.retrieve(publicToken) -> Merge.AccountToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the account token for the end user with the provided public token. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.accountToken.retrieve("public_token"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**publicToken:** `string` + +
+
+ +
+
+ +**requestOptions:** `AccountToken.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting AccountingPeriods + +
client.accounting.accountingPeriods.list({ ...params }) -> Merge.PaginatedAccountingPeriodList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `AccountingPeriod` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.accountingPeriods.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.AccountingPeriodsListRequest` + +
+
+ +
+
+ +**requestOptions:** `AccountingPeriods.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.accountingPeriods.retrieve(id, { ...params }) -> Merge.AccountingPeriod +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `AccountingPeriod` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.accountingPeriods.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.AccountingPeriodsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `AccountingPeriods.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting Accounts + +
client.accounting.accounts.list({ ...params }) -> Merge.PaginatedAccountList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Account` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.accounts.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.AccountsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.accounts.create({ ...params }) -> Merge.AccountResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Account` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.accounts.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.AccountEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.accounts.retrieve(id, { ...params }) -> Merge.Account +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Account` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.accounts.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.AccountsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.accounts.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Account` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.accounts.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting Addresses + +
client.accounting.addresses.retrieve(id, { ...params }) -> Merge.Address +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Address` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.addresses.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.AddressesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Addresses.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting AsyncPassthrough + +
client.accounting.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Asynchronously pull data from an endpoint not currently supported by Merge. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.asyncPassthrough.create({ + method: "GET", + path: "/scooters", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves data from earlier async-passthrough POST request + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.asyncPassthrough.retrieve("async_passthrough_receipt_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**asyncPassthroughReceiptId:** `string` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting Attachments + +
client.accounting.attachments.list({ ...params }) -> Merge.PaginatedAccountingAttachmentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `AccountingAttachment` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.attachments.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.AttachmentsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Attachments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.attachments.create({ ...params }) -> Merge.AccountingAttachmentResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `AccountingAttachment` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.attachments.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.AccountingAttachmentEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Attachments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.attachments.retrieve(id, { ...params }) -> Merge.AccountingAttachment +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `AccountingAttachment` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.attachments.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.AttachmentsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Attachments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.attachments.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `AccountingAttachment` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.attachments.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Attachments.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting AuditTrail + +
client.accounting.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a list of audit trail events. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.auditTrail.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.AuditTrailListRequest` + +
+
+ +
+
+ +**requestOptions:** `AuditTrail.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting AvailableActions + +
client.accounting.availableActions.retrieve() -> Merge.AvailableActions +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of models and actions available for an account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.availableActions.retrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `AvailableActions.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting BalanceSheets + +
client.accounting.balanceSheets.list({ ...params }) -> Merge.PaginatedBalanceSheetList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `BalanceSheet` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.balanceSheets.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.BalanceSheetsListRequest` + +
+
+ +
+
+ +**requestOptions:** `BalanceSheets.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.balanceSheets.retrieve(id, { ...params }) -> Merge.BalanceSheet +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `BalanceSheet` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.balanceSheets.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.BalanceSheetsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `BalanceSheets.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting CashFlowStatements + +
client.accounting.cashFlowStatements.list({ ...params }) -> Merge.PaginatedCashFlowStatementList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `CashFlowStatement` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.cashFlowStatements.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.CashFlowStatementsListRequest` + +
+
+ +
+
+ +**requestOptions:** `CashFlowStatements.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.cashFlowStatements.retrieve(id, { ...params }) -> Merge.CashFlowStatement +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `CashFlowStatement` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.cashFlowStatements.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.CashFlowStatementsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `CashFlowStatements.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting CompanyInfo + +
client.accounting.companyInfo.list({ ...params }) -> Merge.PaginatedCompanyInfoList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `CompanyInfo` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.companyInfo.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.CompanyInfoListRequest` + +
+
+ +
+
+ +**requestOptions:** `CompanyInfo.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.companyInfo.retrieve(id, { ...params }) -> Merge.CompanyInfo +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `CompanyInfo` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.companyInfo.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.CompanyInfoRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `CompanyInfo.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting Contacts + +
client.accounting.contacts.list({ ...params }) -> Merge.PaginatedContactList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Contact` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.contacts.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.ContactsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.contacts.create({ ...params }) -> Merge.ContactResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Contact` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.contacts.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.ContactEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.contacts.retrieve(id, { ...params }) -> Merge.Contact +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Contact` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.contacts.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.ContactsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.contacts.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Contact` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.contacts.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.contacts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.contacts.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.ContactsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting CreditNotes + +
client.accounting.creditNotes.list({ ...params }) -> Merge.PaginatedCreditNoteList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `CreditNote` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.creditNotes.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.CreditNotesListRequest` + +
+
+ +
+
+ +**requestOptions:** `CreditNotes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.creditNotes.retrieve(id, { ...params }) -> Merge.CreditNote +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `CreditNote` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.creditNotes.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.CreditNotesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `CreditNotes.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting Scopes + +
client.accounting.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.scopes.defaultScopesRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.scopes.linkedAccountScopesRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.scopes.linkedAccountScopesCreate({ + commonModels: [ + { + modelName: "Employee", + modelPermissions: { + READ: { + isEnabled: true, + }, + WRITE: { + isEnabled: false, + }, + }, + }, + { + modelName: "Benefit", + modelPermissions: { + WRITE: { + isEnabled: false, + }, + }, + }, + ], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.LinkedAccountCommonModelScopeDeserializerRequest` + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting DeleteAccount + +
client.accounting.deleteAccount.delete() -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.deleteAccount.delete(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `DeleteAccount.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting Expenses + +
client.accounting.expenses.list({ ...params }) -> Merge.PaginatedExpenseList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Expense` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.expenses.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.ExpensesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Expenses.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.expenses.create({ ...params }) -> Merge.ExpenseResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Expense` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.expenses.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.ExpenseEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Expenses.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.expenses.retrieve(id, { ...params }) -> Merge.Expense +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Expense` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.expenses.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.ExpensesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Expenses.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.expenses.linesRemoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.expenses.linesRemoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.ExpensesLinesRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Expenses.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.expenses.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Expense` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.expenses.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Expenses.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.expenses.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.expenses.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.ExpensesRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Expenses.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting FieldMapping + +
client.accounting.fieldMapping.fieldMappingsRetrieve() -> Merge.FieldMappingApiInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.fieldMapping.fieldMappingsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.fieldMapping.fieldMappingsCreate({ + targetFieldName: "example_target_field_name", + targetFieldDescription: "this is a example description of the target field", + remoteFieldTraversalPath: ["example_remote_field"], + remoteMethod: "GET", + remoteUrlPath: "/example-url-path", + commonModelName: "ExampleCommonModel", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.CreateFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.fieldMapping.fieldMappingsDestroy("field_mapping_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.PatchedEditFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.fieldMapping.remoteFieldsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.RemoteFieldsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.fieldMapping.targetFieldsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting GenerateKey + +
client.accounting.generateKey.create({ ...params }) -> Merge.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a remote key. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.generateKey.create({ + name: "Remote Deployment Key 1", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.GenerateRemoteKeyRequest` + +
+
+ +
+
+ +**requestOptions:** `GenerateKey.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting IncomeStatements + +
client.accounting.incomeStatements.list({ ...params }) -> Merge.PaginatedIncomeStatementList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `IncomeStatement` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.incomeStatements.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.IncomeStatementsListRequest` + +
+
+ +
+
+ +**requestOptions:** `IncomeStatements.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.incomeStatements.retrieve(id, { ...params }) -> Merge.IncomeStatement +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `IncomeStatement` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.incomeStatements.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.IncomeStatementsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `IncomeStatements.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting Invoices + +
client.accounting.invoices.list({ ...params }) -> Merge.PaginatedInvoiceList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Invoice` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.invoices.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.InvoicesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Invoices.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.invoices.create({ ...params }) -> Merge.InvoiceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Invoice` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.invoices.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.InvoiceEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Invoices.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.invoices.retrieve(id, { ...params }) -> Merge.Invoice +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Invoice` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.invoices.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.InvoicesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Invoices.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.invoices.partialUpdate(id, { ...params }) -> Merge.InvoiceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates an `Invoice` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.invoices.partialUpdate("id", { + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.PatchedInvoiceEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Invoices.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.invoices.lineItemsRemoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.invoices.lineItemsRemoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.InvoicesLineItemsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Invoices.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.invoices.metaPatchRetrieve(id) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Invoice` PATCHs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.invoices.metaPatchRetrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Invoices.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.invoices.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Invoice` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.invoices.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Invoices.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.invoices.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.invoices.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.InvoicesRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Invoices.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting Issues + +
client.accounting.issues.list({ ...params }) -> Merge.PaginatedIssueList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets all issues for Organization. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.issues.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.IssuesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.issues.retrieve(id) -> Merge.Issue +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a specific issue. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.issues.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting Items + +
client.accounting.items.list({ ...params }) -> Merge.PaginatedItemList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Item` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.items.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.ItemsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Items.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.items.retrieve(id, { ...params }) -> Merge.Item +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Item` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.items.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.ItemsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Items.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting JournalEntries + +
client.accounting.journalEntries.list({ ...params }) -> Merge.PaginatedJournalEntryList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `JournalEntry` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.journalEntries.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.JournalEntriesListRequest` + +
+
+ +
+
+ +**requestOptions:** `JournalEntries.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.journalEntries.create({ ...params }) -> Merge.JournalEntryResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `JournalEntry` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.journalEntries.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.JournalEntryEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `JournalEntries.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.journalEntries.retrieve(id, { ...params }) -> Merge.JournalEntry +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `JournalEntry` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.journalEntries.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.JournalEntriesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `JournalEntries.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.journalEntries.linesRemoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.journalEntries.linesRemoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.JournalEntriesLinesRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `JournalEntries.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.journalEntries.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `JournalEntry` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.journalEntries.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `JournalEntries.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.journalEntries.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.journalEntries.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.JournalEntriesRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `JournalEntries.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting LinkToken + +
client.accounting.linkToken.create({ ...params }) -> Merge.LinkToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a link token to be used when linking a new end user. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.EndUserDetailsRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkToken.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting LinkedAccounts + +
client.accounting.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List linked accounts for your organization. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.linkedAccounts.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.LinkedAccountsListRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkedAccounts.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting Passthrough + +
client.accounting.passthrough.create({ ...params }) -> Merge.RemoteResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Pull data from an endpoint not currently supported by Merge. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.passthrough.create({ + method: "GET", + path: "/scooters", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `Passthrough.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting Payments + +
client.accounting.payments.list({ ...params }) -> Merge.PaginatedPaymentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Payment` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.payments.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.PaymentsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Payments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.payments.create({ ...params }) -> Merge.PaymentResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Payment` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.payments.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.PaymentEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Payments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.payments.retrieve(id, { ...params }) -> Merge.Payment +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Payment` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.payments.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.PaymentsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Payments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.payments.partialUpdate(id, { ...params }) -> Merge.PaymentResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates a `Payment` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.payments.partialUpdate("id", { + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.PatchedPaymentEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Payments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.payments.lineItemsRemoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.payments.lineItemsRemoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.PaymentsLineItemsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Payments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.payments.metaPatchRetrieve(id) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Payment` PATCHs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.payments.metaPatchRetrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Payments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.payments.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Payment` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.payments.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Payments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.payments.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.payments.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.PaymentsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Payments.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting PhoneNumbers + +
client.accounting.phoneNumbers.retrieve(id, { ...params }) -> Merge.AccountingPhoneNumber +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `AccountingPhoneNumber` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.phoneNumbers.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.PhoneNumbersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `PhoneNumbers.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting PurchaseOrders + +
client.accounting.purchaseOrders.list({ ...params }) -> Merge.PaginatedPurchaseOrderList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `PurchaseOrder` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.purchaseOrders.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.PurchaseOrdersListRequest` + +
+
+ +
+
+ +**requestOptions:** `PurchaseOrders.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.purchaseOrders.create({ ...params }) -> Merge.PurchaseOrderResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `PurchaseOrder` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.purchaseOrders.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.PurchaseOrderEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `PurchaseOrders.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.purchaseOrders.retrieve(id, { ...params }) -> Merge.PurchaseOrder +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `PurchaseOrder` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.purchaseOrders.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.PurchaseOrdersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `PurchaseOrders.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.purchaseOrders.lineItemsRemoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.purchaseOrders.lineItemsRemoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.PurchaseOrdersLineItemsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `PurchaseOrders.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.purchaseOrders.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `PurchaseOrder` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.purchaseOrders.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `PurchaseOrders.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.purchaseOrders.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.purchaseOrders.remoteFieldClassesList(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.PurchaseOrdersRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `PurchaseOrders.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting RegenerateKey + +
client.accounting.regenerateKey.create({ ...params }) -> Merge.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Exchange remote keys. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.regenerateKey.create({ + name: "Remote Deployment Key 1", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.RemoteKeyForRegenerationRequest` + +
+
+ +
+
+ +**requestOptions:** `RegenerateKey.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting SyncStatus + +
client.accounting.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.syncStatus.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.SyncStatusListRequest` + +
+
+ +
+
+ +**requestOptions:** `SyncStatus.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting ForceResync + +
client.accounting.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.forceResync.syncStatusResyncCreate(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `ForceResync.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting TaxRates + +
client.accounting.taxRates.list({ ...params }) -> Merge.PaginatedTaxRateList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `TaxRate` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.taxRates.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.TaxRatesListRequest` + +
+
+ +
+
+ +**requestOptions:** `TaxRates.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.taxRates.retrieve(id, { ...params }) -> Merge.TaxRate +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `TaxRate` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.taxRates.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.TaxRatesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `TaxRates.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting TrackingCategories + +
client.accounting.trackingCategories.list({ ...params }) -> Merge.PaginatedTrackingCategoryList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `TrackingCategory` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.trackingCategories.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.TrackingCategoriesListRequest` + +
+
+ +
+
+ +**requestOptions:** `TrackingCategories.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.trackingCategories.retrieve(id, { ...params }) -> Merge.TrackingCategory +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `TrackingCategory` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.trackingCategories.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.TrackingCategoriesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `TrackingCategories.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting Transactions + +
client.accounting.transactions.list({ ...params }) -> Merge.PaginatedTransactionList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Transaction` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.transactions.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.TransactionsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Transactions.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.transactions.retrieve(id, { ...params }) -> Merge.Transaction +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Transaction` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.transactions.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.TransactionsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Transactions.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting VendorCredits + +
client.accounting.vendorCredits.list({ ...params }) -> Merge.PaginatedVendorCreditList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `VendorCredit` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.vendorCredits.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.VendorCreditsListRequest` + +
+
+ +
+
+ +**requestOptions:** `VendorCredits.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.vendorCredits.retrieve(id, { ...params }) -> Merge.VendorCredit +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `VendorCredit` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.vendorCredits.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.accounting.VendorCreditsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `VendorCredits.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Accounting WebhookReceivers + +
client.accounting.webhookReceivers.list() -> Merge.WebhookReceiver[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `WebhookReceiver` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.webhookReceivers.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `WebhookReceivers.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.accounting.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `WebhookReceiver` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounting.webhookReceivers.create({ + event: "event", + isActive: true, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.accounting.WebhookReceiverRequest` + +
+
+ +
+
+ +**requestOptions:** `WebhookReceivers.RequestOptions` + +
+
+
+
+ +
+
+
diff --git a/src/Client.ts b/src/Client.ts index f66caa1b0..a6eb15189 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -4,52 +4,55 @@ import * as environments from "./environments"; import * as core from "./core"; -import { Filestorage } from "./api/resources/filestorage/client/Client"; import { Ats } from "./api/resources/ats/client/Client"; +import { Filestorage } from "./api/resources/filestorage/client/Client"; import { Crm } from "./api/resources/crm/client/Client"; -import { Hris } from "./api/resources/hris/client/Client"; import { Ticketing } from "./api/resources/ticketing/client/Client"; +import { Hris } from "./api/resources/hris/client/Client"; import { Accounting } from "./api/resources/accounting/client/Client"; export declare namespace MergeClient { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } export class MergeClient { constructor(protected readonly _options: MergeClient.Options) {} - protected _filestorage: Filestorage | undefined; - - public get filestorage(): Filestorage { - return (this._filestorage ??= new Filestorage(this._options)); - } - protected _ats: Ats | undefined; public get ats(): Ats { return (this._ats ??= new Ats(this._options)); } - protected _crm: Crm | undefined; + protected _filestorage: Filestorage | undefined; - public get crm(): Crm { - return (this._crm ??= new Crm(this._options)); + public get filestorage(): Filestorage { + return (this._filestorage ??= new Filestorage(this._options)); } - protected _hris: Hris | undefined; + protected _crm: Crm | undefined; - public get hris(): Hris { - return (this._hris ??= new Hris(this._options)); + public get crm(): Crm { + return (this._crm ??= new Crm(this._options)); } protected _ticketing: Ticketing | undefined; @@ -58,6 +61,12 @@ export class MergeClient { return (this._ticketing ??= new Ticketing(this._options)); } + protected _hris: Hris | undefined; + + public get hris(): Hris { + return (this._hris ??= new Hris(this._options)); + } + protected _accounting: Accounting | undefined; public get accounting(): Accounting { diff --git a/src/api/resources/accounting/client/Client.ts b/src/api/resources/accounting/client/Client.ts index 5622a138d..0574b9563 100644 --- a/src/api/resources/accounting/client/Client.ts +++ b/src/api/resources/accounting/client/Client.ts @@ -47,13 +47,22 @@ export declare namespace Accounting { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } diff --git a/src/api/resources/accounting/resources/accountDetails/client/Client.ts b/src/api/resources/accounting/resources/accountDetails/client/Client.ts index 2223abf41..180cc5571 100644 --- a/src/api/resources/accounting/resources/accountDetails/client/Client.ts +++ b/src/api/resources/accounting/resources/accountDetails/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AccountDetails { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class AccountDetails { /** * Get details for a linked account. * + * @param {AccountDetails.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.accountDetails.retrieve() + * await client.accounting.accountDetails.retrieve() */ public async retrieve(requestOptions?: AccountDetails.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class AccountDetails { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.AccountDetails.parseOrThrow(_response.body, { + return serializers.accounting.AccountDetails.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class AccountDetails { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/account-details."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -85,7 +102,7 @@ export class AccountDetails { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/accountToken/client/Client.ts b/src/api/resources/accounting/resources/accountToken/client/Client.ts index 8bc18c94b..39281ad20 100644 --- a/src/api/resources/accounting/resources/accountToken/client/Client.ts +++ b/src/api/resources/accounting/resources/accountToken/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AccountToken { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class AccountToken { /** * Returns the account token for the end user with the provided public token. * + * @param {string} publicToken + * @param {AccountToken.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.accountToken.retrieve("public_token") + * await client.accounting.accountToken.retrieve("public_token") */ public async retrieve( publicToken: string, @@ -39,7 +51,7 @@ export class AccountToken { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/account-token/${publicToken}` + `accounting/v1/account-token/${encodeURIComponent(publicToken)}` ), method: "GET", headers: { @@ -50,14 +62,20 @@ export class AccountToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.AccountToken.parseOrThrow(_response.body, { + return serializers.accounting.AccountToken.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -80,7 +98,9 @@ export class AccountToken { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/account-token/{public_token}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -88,7 +108,7 @@ export class AccountToken { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/accountingPeriods/client/Client.ts b/src/api/resources/accounting/resources/accountingPeriods/client/Client.ts index 538fc9105..c56daa09c 100644 --- a/src/api/resources/accounting/resources/accountingPeriods/client/Client.ts +++ b/src/api/resources/accounting/resources/accountingPeriods/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AccountingPeriods { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,15 +38,18 @@ export class AccountingPeriods { /** * Returns a list of `AccountingPeriod` objects. * + * @param {Merge.accounting.AccountingPeriodsListRequest} request + * @param {AccountingPeriods.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.accountingPeriods.list({}) + * await client.accounting.accountingPeriods.list() */ public async list( request: Merge.accounting.AccountingPeriodsListRequest = {}, requestOptions?: AccountingPeriods.RequestOptions ): Promise { const { cursor, includeDeletedData, includeRemoteData, includeShellData, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -72,15 +84,21 @@ export class AccountingPeriods { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedAccountingPeriodList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedAccountingPeriodList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -103,7 +121,9 @@ export class AccountingPeriods { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/accounting-periods." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -114,8 +134,12 @@ export class AccountingPeriods { /** * Returns an `AccountingPeriod` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.AccountingPeriodsRetrieveRequest} request + * @param {AccountingPeriods.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.accountingPeriods.retrieve("id", {}) + * await client.accounting.accountingPeriods.retrieve("id") */ public async retrieve( id: string, @@ -123,7 +147,7 @@ export class AccountingPeriods { requestOptions?: AccountingPeriods.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -131,7 +155,7 @@ export class AccountingPeriods { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/accounting-periods/${id}` + `accounting/v1/accounting-periods/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -142,15 +166,21 @@ export class AccountingPeriods { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.AccountingPeriod.parseOrThrow(_response.body, { + return serializers.accounting.AccountingPeriod.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -173,7 +203,9 @@ export class AccountingPeriods { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/accounting-periods/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -181,7 +213,7 @@ export class AccountingPeriods { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/accountingPeriods/client/requests/index.ts b/src/api/resources/accounting/resources/accountingPeriods/client/requests/index.ts index 51f2babae..37d63ca33 100644 --- a/src/api/resources/accounting/resources/accountingPeriods/client/requests/index.ts +++ b/src/api/resources/accounting/resources/accountingPeriods/client/requests/index.ts @@ -1,2 +1,2 @@ -export { AccountingPeriodsListRequest } from "./AccountingPeriodsListRequest"; -export { AccountingPeriodsRetrieveRequest } from "./AccountingPeriodsRetrieveRequest"; +export { type AccountingPeriodsListRequest } from "./AccountingPeriodsListRequest"; +export { type AccountingPeriodsRetrieveRequest } from "./AccountingPeriodsRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/accounts/client/Client.ts b/src/api/resources/accounting/resources/accounts/client/Client.ts index f96e8f91b..55c3115d0 100644 --- a/src/api/resources/accounting/resources/accounts/client/Client.ts +++ b/src/api/resources/accounting/resources/accounts/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Accounts { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Accounts { /** * Returns a list of `Account` objects. * + * @param {Merge.accounting.AccountsListRequest} request + * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.accounts.list({}) + * await client.accounting.accounts.list() */ public async list( request: Merge.accounting.AccountsListRequest = {}, @@ -52,7 +64,7 @@ export class Accounts { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -123,15 +135,21 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedAccountList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedAccountList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Accounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/accounts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,8 +183,11 @@ export class Accounts { /** * Creates an `Account` object with the given values. * + * @param {Merge.accounting.AccountEndpointRequest} request + * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.accounts.create({ + * await client.accounting.accounts.create({ * model: {} * }) */ @@ -175,7 +196,7 @@ export class Accounts { requestOptions?: Accounts.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -198,18 +219,22 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.accounting.AccountEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.accounting.AccountEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.AccountResponse.parseOrThrow(_response.body, { + return serializers.accounting.AccountResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -232,7 +257,7 @@ export class Accounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /accounting/v1/accounts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -243,8 +268,12 @@ export class Accounts { /** * Returns an `Account` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.AccountsRetrieveRequest} request + * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.accounts.retrieve("id", {}) + * await client.accounting.accounts.retrieve("id") */ public async retrieve( id: string, @@ -252,7 +281,7 @@ export class Accounts { requestOptions?: Accounts.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -272,7 +301,7 @@ export class Accounts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/accounts/${id}` + `accounting/v1/accounts/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -283,15 +312,21 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.Account.parseOrThrow(_response.body, { + return serializers.accounting.Account.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -314,7 +349,7 @@ export class Accounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/accounts/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -325,8 +360,10 @@ export class Accounts { /** * Returns metadata for `Account` POSTs. * + * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.accounts.metaPostRetrieve() + * await client.accounting.accounts.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Accounts.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -343,14 +380,20 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -373,7 +416,9 @@ export class Accounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/accounts/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -381,7 +426,7 @@ export class Accounts { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/accounts/client/requests/AccountEndpointRequest.ts b/src/api/resources/accounting/resources/accounts/client/requests/AccountEndpointRequest.ts index ba18bacf9..fa6cd6e9d 100644 --- a/src/api/resources/accounting/resources/accounts/client/requests/AccountEndpointRequest.ts +++ b/src/api/resources/accounting/resources/accounts/client/requests/AccountEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/accounts/client/requests/AccountsListRequest.ts b/src/api/resources/accounting/resources/accounts/client/requests/AccountsListRequest.ts index c2b923f5b..109176de7 100644 --- a/src/api/resources/accounting/resources/accounts/client/requests/AccountsListRequest.ts +++ b/src/api/resources/accounting/resources/accounts/client/requests/AccountsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/accounts/client/requests/AccountsRetrieveRequest.ts b/src/api/resources/accounting/resources/accounts/client/requests/AccountsRetrieveRequest.ts index 0521c1f59..a57620b48 100644 --- a/src/api/resources/accounting/resources/accounts/client/requests/AccountsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/accounts/client/requests/AccountsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/accounts/client/requests/index.ts b/src/api/resources/accounting/resources/accounts/client/requests/index.ts index adca0303a..447e5a665 100644 --- a/src/api/resources/accounting/resources/accounts/client/requests/index.ts +++ b/src/api/resources/accounting/resources/accounts/client/requests/index.ts @@ -1,3 +1,3 @@ -export { AccountsListRequest } from "./AccountsListRequest"; -export { AccountEndpointRequest } from "./AccountEndpointRequest"; -export { AccountsRetrieveRequest } from "./AccountsRetrieveRequest"; +export { type AccountsListRequest } from "./AccountsListRequest"; +export { type AccountEndpointRequest } from "./AccountEndpointRequest"; +export { type AccountsRetrieveRequest } from "./AccountsRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/addresses/client/Client.ts b/src/api/resources/accounting/resources/addresses/client/Client.ts index e99e2bd2c..a1e7f7aac 100644 --- a/src/api/resources/accounting/resources/addresses/client/Client.ts +++ b/src/api/resources/accounting/resources/addresses/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Addresses { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,12 @@ export class Addresses { /** * Returns an `Address` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.AddressesRetrieveRequest} request + * @param {Addresses.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.addresses.retrieve("id", {}) + * await client.accounting.addresses.retrieve("id") */ public async retrieve( id: string, @@ -38,7 +51,7 @@ export class Addresses { requestOptions?: Addresses.RequestOptions ): Promise { const { includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -54,7 +67,7 @@ export class Addresses { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/addresses/${id}` + `accounting/v1/addresses/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -65,15 +78,21 @@ export class Addresses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.Address.parseOrThrow(_response.body, { + return serializers.accounting.Address.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -96,7 +115,7 @@ export class Addresses { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/addresses/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -104,7 +123,7 @@ export class Addresses { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/addresses/client/requests/index.ts b/src/api/resources/accounting/resources/addresses/client/requests/index.ts index ff7eae4c9..a25ee5207 100644 --- a/src/api/resources/accounting/resources/addresses/client/requests/index.ts +++ b/src/api/resources/accounting/resources/addresses/client/requests/index.ts @@ -1 +1 @@ -export { AddressesRetrieveRequest } from "./AddressesRetrieveRequest"; +export { type AddressesRetrieveRequest } from "./AddressesRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/asyncPassthrough/client/Client.ts b/src/api/resources/accounting/resources/asyncPassthrough/client/Client.ts index 9810d0897..68014351b 100644 --- a/src/api/resources/accounting/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/accounting/resources/asyncPassthrough/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace AsyncPassthrough { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,9 +38,12 @@ export class AsyncPassthrough { /** * Asynchronously pull data from an endpoint not currently supported by Merge. * + * @param {Merge.accounting.DataPassthroughRequest} request + * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.asyncPassthrough.create({ - * method: Merge.accounting.MethodEnum.Get, + * await client.accounting.asyncPassthrough.create({ + * method: "GET", * path: "/scooters" * }) */ @@ -53,17 +65,23 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.accounting.DataPassthroughRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.accounting.DataPassthroughRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.AsyncPassthroughReciept.parseOrThrow(_response.body, { + return serializers.accounting.AsyncPassthroughReciept.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +104,9 @@ export class AsyncPassthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /accounting/v1/async-passthrough." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -96,6 +116,12 @@ export class AsyncPassthrough { /** * Retrieves data from earlier async-passthrough POST request + * + * @param {string} asyncPassthroughReceiptId + * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.accounting.asyncPassthrough.retrieve("async_passthrough_receipt_id") */ public async retrieve( asyncPassthroughReceiptId: string, @@ -104,7 +130,7 @@ export class AsyncPassthrough { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/async-passthrough/${asyncPassthroughReceiptId}` + `accounting/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}` ), method: "GET", headers: { @@ -115,14 +141,20 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { + return serializers.accounting.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +177,9 @@ export class AsyncPassthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/async-passthrough/{async_passthrough_receipt_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -153,7 +187,7 @@ export class AsyncPassthrough { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/api/resources/accounting/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts index 96f35a000..f5d6617ce 100644 --- a/src/api/resources/accounting/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts +++ b/src/api/resources/accounting/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; export type AsyncPassthroughRetrieveResponse = Merge.accounting.RemoteResponse | string; diff --git a/src/api/resources/accounting/resources/attachments/client/Client.ts b/src/api/resources/accounting/resources/attachments/client/Client.ts index 3ded1a31a..fb8c523e9 100644 --- a/src/api/resources/accounting/resources/attachments/client/Client.ts +++ b/src/api/resources/accounting/resources/attachments/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Attachments { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Attachments { /** * Returns a list of `AccountingAttachment` objects. * + * @param {Merge.accounting.AttachmentsListRequest} request + * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.attachments.list({}) + * await client.accounting.attachments.list() */ public async list( request: Merge.accounting.AttachmentsListRequest = {}, @@ -49,7 +61,7 @@ export class Attachments { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -108,15 +120,21 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedAccountingAttachmentList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedAccountingAttachmentList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -139,7 +157,7 @@ export class Attachments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/attachments."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -150,8 +168,11 @@ export class Attachments { /** * Creates an `AccountingAttachment` object with the given values. * + * @param {Merge.accounting.AccountingAttachmentEndpointRequest} request + * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.attachments.create({ + * await client.accounting.attachments.create({ * model: {} * }) */ @@ -160,7 +181,7 @@ export class Attachments { requestOptions?: Attachments.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -183,18 +204,24 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.accounting.AccountingAttachmentEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.accounting.AccountingAttachmentEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.AccountingAttachmentResponse.parseOrThrow(_response.body, { + return serializers.accounting.AccountingAttachmentResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -217,7 +244,7 @@ export class Attachments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /accounting/v1/attachments."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -228,8 +255,12 @@ export class Attachments { /** * Returns an `AccountingAttachment` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.AttachmentsRetrieveRequest} request + * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.attachments.retrieve("id", {}) + * await client.accounting.attachments.retrieve("id") */ public async retrieve( id: string, @@ -237,7 +268,7 @@ export class Attachments { requestOptions?: Attachments.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -245,7 +276,7 @@ export class Attachments { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/attachments/${id}` + `accounting/v1/attachments/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -256,15 +287,21 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.AccountingAttachment.parseOrThrow(_response.body, { + return serializers.accounting.AccountingAttachment.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -287,7 +324,9 @@ export class Attachments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/attachments/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -298,8 +337,10 @@ export class Attachments { /** * Returns metadata for `AccountingAttachment` POSTs. * + * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.attachments.metaPostRetrieve() + * await client.accounting.attachments.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Attachments.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -316,14 +357,20 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -346,7 +393,9 @@ export class Attachments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/attachments/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -354,7 +403,7 @@ export class Attachments { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/attachments/client/requests/AccountingAttachmentEndpointRequest.ts b/src/api/resources/accounting/resources/attachments/client/requests/AccountingAttachmentEndpointRequest.ts index 685d0ebdb..5b706b836 100644 --- a/src/api/resources/accounting/resources/attachments/client/requests/AccountingAttachmentEndpointRequest.ts +++ b/src/api/resources/accounting/resources/attachments/client/requests/AccountingAttachmentEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/attachments/client/requests/index.ts b/src/api/resources/accounting/resources/attachments/client/requests/index.ts index c81d9ed55..51c069000 100644 --- a/src/api/resources/accounting/resources/attachments/client/requests/index.ts +++ b/src/api/resources/accounting/resources/attachments/client/requests/index.ts @@ -1,3 +1,3 @@ -export { AttachmentsListRequest } from "./AttachmentsListRequest"; -export { AccountingAttachmentEndpointRequest } from "./AccountingAttachmentEndpointRequest"; -export { AttachmentsRetrieveRequest } from "./AttachmentsRetrieveRequest"; +export { type AttachmentsListRequest } from "./AttachmentsListRequest"; +export { type AccountingAttachmentEndpointRequest } from "./AccountingAttachmentEndpointRequest"; +export { type AttachmentsRetrieveRequest } from "./AttachmentsRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/auditTrail/client/Client.ts b/src/api/resources/accounting/resources/auditTrail/client/Client.ts index 8d1f496a6..f2386b418 100644 --- a/src/api/resources/accounting/resources/auditTrail/client/Client.ts +++ b/src/api/resources/accounting/resources/auditTrail/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AuditTrail { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,15 +38,18 @@ export class AuditTrail { /** * Gets a list of audit trail events. * + * @param {Merge.accounting.AuditTrailListRequest} request + * @param {AuditTrail.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.auditTrail.list({}) + * await client.accounting.auditTrail.list() */ public async list( request: Merge.accounting.AuditTrailListRequest = {}, requestOptions?: AuditTrail.RequestOptions ): Promise { const { cursor, endDate, eventType, pageSize, startDate, userEmail } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -76,15 +88,21 @@ export class AuditTrail { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedAuditLogEventList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedAuditLogEventList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -107,7 +125,7 @@ export class AuditTrail { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/audit-trail."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -115,7 +133,7 @@ export class AuditTrail { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/auditTrail/client/requests/index.ts b/src/api/resources/accounting/resources/auditTrail/client/requests/index.ts index ddce9e786..2c0762c28 100644 --- a/src/api/resources/accounting/resources/auditTrail/client/requests/index.ts +++ b/src/api/resources/accounting/resources/auditTrail/client/requests/index.ts @@ -1 +1 @@ -export { AuditTrailListRequest } from "./AuditTrailListRequest"; +export { type AuditTrailListRequest } from "./AuditTrailListRequest"; diff --git a/src/api/resources/accounting/resources/availableActions/client/Client.ts b/src/api/resources/accounting/resources/availableActions/client/Client.ts index 3b867efd1..8e487b157 100644 --- a/src/api/resources/accounting/resources/availableActions/client/Client.ts +++ b/src/api/resources/accounting/resources/availableActions/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AvailableActions { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class AvailableActions { /** * Returns a list of models and actions available for an account. * + * @param {AvailableActions.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.availableActions.retrieve() + * await client.accounting.availableActions.retrieve() */ public async retrieve( requestOptions?: AvailableActions.RequestOptions @@ -49,14 +60,20 @@ export class AvailableActions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.AvailableActions.parseOrThrow(_response.body, { + return serializers.accounting.AvailableActions.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +96,9 @@ export class AvailableActions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/available-actions." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -87,7 +106,7 @@ export class AvailableActions { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/balanceSheets/client/Client.ts b/src/api/resources/accounting/resources/balanceSheets/client/Client.ts index 7fddd4e6d..f0390e675 100644 --- a/src/api/resources/accounting/resources/balanceSheets/client/Client.ts +++ b/src/api/resources/accounting/resources/balanceSheets/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace BalanceSheets { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class BalanceSheets { /** * Returns a list of `BalanceSheet` objects. * + * @param {Merge.accounting.BalanceSheetsListRequest} request + * @param {BalanceSheets.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.balanceSheets.list({}) + * await client.accounting.balanceSheets.list() */ public async list( request: Merge.accounting.BalanceSheetsListRequest = {}, @@ -50,7 +62,7 @@ export class BalanceSheets { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -113,15 +125,21 @@ export class BalanceSheets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedBalanceSheetList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedBalanceSheetList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -144,7 +162,7 @@ export class BalanceSheets { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/balance-sheets."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -155,8 +173,12 @@ export class BalanceSheets { /** * Returns a `BalanceSheet` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.BalanceSheetsRetrieveRequest} request + * @param {BalanceSheets.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.balanceSheets.retrieve("id", {}) + * await client.accounting.balanceSheets.retrieve("id") */ public async retrieve( id: string, @@ -164,7 +186,7 @@ export class BalanceSheets { requestOptions?: BalanceSheets.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -176,7 +198,7 @@ export class BalanceSheets { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/balance-sheets/${id}` + `accounting/v1/balance-sheets/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -187,15 +209,21 @@ export class BalanceSheets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.BalanceSheet.parseOrThrow(_response.body, { + return serializers.accounting.BalanceSheet.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -218,7 +246,9 @@ export class BalanceSheets { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/balance-sheets/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -226,7 +256,7 @@ export class BalanceSheets { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/balanceSheets/client/requests/index.ts b/src/api/resources/accounting/resources/balanceSheets/client/requests/index.ts index 225f90d94..e6cae1ae7 100644 --- a/src/api/resources/accounting/resources/balanceSheets/client/requests/index.ts +++ b/src/api/resources/accounting/resources/balanceSheets/client/requests/index.ts @@ -1,2 +1,2 @@ -export { BalanceSheetsListRequest } from "./BalanceSheetsListRequest"; -export { BalanceSheetsRetrieveRequest } from "./BalanceSheetsRetrieveRequest"; +export { type BalanceSheetsListRequest } from "./BalanceSheetsListRequest"; +export { type BalanceSheetsRetrieveRequest } from "./BalanceSheetsRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/cashFlowStatements/client/Client.ts b/src/api/resources/accounting/resources/cashFlowStatements/client/Client.ts index 356b43aa0..78c3efe22 100644 --- a/src/api/resources/accounting/resources/cashFlowStatements/client/Client.ts +++ b/src/api/resources/accounting/resources/cashFlowStatements/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace CashFlowStatements { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class CashFlowStatements { /** * Returns a list of `CashFlowStatement` objects. * + * @param {Merge.accounting.CashFlowStatementsListRequest} request + * @param {CashFlowStatements.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.cashFlowStatements.list({}) + * await client.accounting.cashFlowStatements.list() */ public async list( request: Merge.accounting.CashFlowStatementsListRequest = {}, @@ -50,7 +62,7 @@ export class CashFlowStatements { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -113,15 +125,21 @@ export class CashFlowStatements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedCashFlowStatementList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedCashFlowStatementList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -144,7 +162,9 @@ export class CashFlowStatements { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/cash-flow-statements." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -155,8 +175,12 @@ export class CashFlowStatements { /** * Returns a `CashFlowStatement` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.CashFlowStatementsRetrieveRequest} request + * @param {CashFlowStatements.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.cashFlowStatements.retrieve("id", {}) + * await client.accounting.cashFlowStatements.retrieve("id") */ public async retrieve( id: string, @@ -164,7 +188,7 @@ export class CashFlowStatements { requestOptions?: CashFlowStatements.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -176,7 +200,7 @@ export class CashFlowStatements { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/cash-flow-statements/${id}` + `accounting/v1/cash-flow-statements/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -187,15 +211,21 @@ export class CashFlowStatements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.CashFlowStatement.parseOrThrow(_response.body, { + return serializers.accounting.CashFlowStatement.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -218,7 +248,9 @@ export class CashFlowStatements { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/cash-flow-statements/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -226,7 +258,7 @@ export class CashFlowStatements { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/cashFlowStatements/client/requests/index.ts b/src/api/resources/accounting/resources/cashFlowStatements/client/requests/index.ts index b94e5785b..4a17c2c4b 100644 --- a/src/api/resources/accounting/resources/cashFlowStatements/client/requests/index.ts +++ b/src/api/resources/accounting/resources/cashFlowStatements/client/requests/index.ts @@ -1,2 +1,2 @@ -export { CashFlowStatementsListRequest } from "./CashFlowStatementsListRequest"; -export { CashFlowStatementsRetrieveRequest } from "./CashFlowStatementsRetrieveRequest"; +export { type CashFlowStatementsListRequest } from "./CashFlowStatementsListRequest"; +export { type CashFlowStatementsRetrieveRequest } from "./CashFlowStatementsRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/companyInfo/client/Client.ts b/src/api/resources/accounting/resources/companyInfo/client/Client.ts index fe4a62059..53d594bb0 100644 --- a/src/api/resources/accounting/resources/companyInfo/client/Client.ts +++ b/src/api/resources/accounting/resources/companyInfo/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace CompanyInfo { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class CompanyInfo { /** * Returns a list of `CompanyInfo` objects. * + * @param {Merge.accounting.CompanyInfoListRequest} request + * @param {CompanyInfo.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.companyInfo.list({}) + * await client.accounting.companyInfo.list() */ public async list( request: Merge.accounting.CompanyInfoListRequest = {}, @@ -49,7 +61,7 @@ export class CompanyInfo { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,15 +120,21 @@ export class CompanyInfo { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedCompanyInfoList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedCompanyInfoList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -139,7 +157,7 @@ export class CompanyInfo { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/company-info."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -150,8 +168,12 @@ export class CompanyInfo { /** * Returns a `CompanyInfo` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.CompanyInfoRetrieveRequest} request + * @param {CompanyInfo.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.companyInfo.retrieve("id", {}) + * await client.accounting.companyInfo.retrieve("id") */ public async retrieve( id: string, @@ -159,7 +181,7 @@ export class CompanyInfo { requestOptions?: CompanyInfo.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -171,7 +193,7 @@ export class CompanyInfo { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/company-info/${id}` + `accounting/v1/company-info/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -182,15 +204,21 @@ export class CompanyInfo { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.CompanyInfo.parseOrThrow(_response.body, { + return serializers.accounting.CompanyInfo.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +241,9 @@ export class CompanyInfo { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/company-info/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -221,7 +251,7 @@ export class CompanyInfo { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoListRequest.ts b/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoListRequest.ts index e8a41d9e5..4aa5007d0 100644 --- a/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoListRequest.ts +++ b/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoRetrieveRequest.ts b/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoRetrieveRequest.ts index 474c09155..49603e7cc 100644 --- a/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/companyInfo/client/requests/CompanyInfoRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/companyInfo/client/requests/index.ts b/src/api/resources/accounting/resources/companyInfo/client/requests/index.ts index 7f5ada766..5ef809e57 100644 --- a/src/api/resources/accounting/resources/companyInfo/client/requests/index.ts +++ b/src/api/resources/accounting/resources/companyInfo/client/requests/index.ts @@ -1,2 +1,2 @@ -export { CompanyInfoListRequest } from "./CompanyInfoListRequest"; -export { CompanyInfoRetrieveRequest } from "./CompanyInfoRetrieveRequest"; +export { type CompanyInfoListRequest } from "./CompanyInfoListRequest"; +export { type CompanyInfoRetrieveRequest } from "./CompanyInfoRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/contacts/client/Client.ts b/src/api/resources/accounting/resources/contacts/client/Client.ts index 220283ce9..80db65658 100644 --- a/src/api/resources/accounting/resources/contacts/client/Client.ts +++ b/src/api/resources/accounting/resources/contacts/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Contacts { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Contacts { /** * Returns a list of `Contact` objects. * + * @param {Merge.accounting.ContactsListRequest} request + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.contacts.list({}) + * await client.accounting.contacts.list() */ public async list( request: Merge.accounting.ContactsListRequest = {}, @@ -55,7 +67,7 @@ export class Contacts { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -138,15 +150,21 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedContactList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedContactList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -169,7 +187,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/contacts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -180,8 +198,11 @@ export class Contacts { /** * Creates a `Contact` object with the given values. * + * @param {Merge.accounting.ContactEndpointRequest} request + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.contacts.create({ + * await client.accounting.contacts.create({ * model: {} * }) */ @@ -190,7 +211,7 @@ export class Contacts { requestOptions?: Contacts.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -213,18 +234,22 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.accounting.ContactEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.accounting.ContactEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.ContactResponse.parseOrThrow(_response.body, { + return serializers.accounting.ContactResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -247,7 +272,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /accounting/v1/contacts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -258,8 +283,12 @@ export class Contacts { /** * Returns a `Contact` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.ContactsRetrieveRequest} request + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.contacts.retrieve("id", {}) + * await client.accounting.contacts.retrieve("id") */ public async retrieve( id: string, @@ -267,7 +296,7 @@ export class Contacts { requestOptions?: Contacts.RequestOptions ): Promise { const { expand, includeRemoteData, includeRemoteFields, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -291,7 +320,7 @@ export class Contacts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/contacts/${id}` + `accounting/v1/contacts/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -302,15 +331,21 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.Contact.parseOrThrow(_response.body, { + return serializers.accounting.Contact.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -333,7 +368,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/contacts/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -344,8 +379,10 @@ export class Contacts { /** * Returns metadata for `Contact` POSTs. * + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.contacts.metaPostRetrieve() + * await client.accounting.contacts.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Contacts.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -362,14 +399,20 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -392,7 +435,9 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/contacts/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -403,8 +448,11 @@ export class Contacts { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.accounting.ContactsRemoteFieldClassesListRequest} request + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.contacts.remoteFieldClassesList({}) + * await client.accounting.contacts.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.accounting.ContactsRemoteFieldClassesListRequest = {}, @@ -412,7 +460,7 @@ export class Contacts { ): Promise { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -451,15 +499,21 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -482,7 +536,9 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/contacts/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -490,7 +546,7 @@ export class Contacts { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/contacts/client/requests/ContactEndpointRequest.ts b/src/api/resources/accounting/resources/contacts/client/requests/ContactEndpointRequest.ts index eba7b1e3c..130bb61d7 100644 --- a/src/api/resources/accounting/resources/contacts/client/requests/ContactEndpointRequest.ts +++ b/src/api/resources/accounting/resources/contacts/client/requests/ContactEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/contacts/client/requests/ContactsListRequest.ts b/src/api/resources/accounting/resources/contacts/client/requests/ContactsListRequest.ts index 99de8f4ee..45554bece 100644 --- a/src/api/resources/accounting/resources/contacts/client/requests/ContactsListRequest.ts +++ b/src/api/resources/accounting/resources/contacts/client/requests/ContactsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/contacts/client/requests/ContactsRetrieveRequest.ts b/src/api/resources/accounting/resources/contacts/client/requests/ContactsRetrieveRequest.ts index cb37c046a..257eb5479 100644 --- a/src/api/resources/accounting/resources/contacts/client/requests/ContactsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/contacts/client/requests/ContactsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/contacts/client/requests/index.ts b/src/api/resources/accounting/resources/contacts/client/requests/index.ts index d21badab7..33ecbec66 100644 --- a/src/api/resources/accounting/resources/contacts/client/requests/index.ts +++ b/src/api/resources/accounting/resources/contacts/client/requests/index.ts @@ -1,4 +1,4 @@ -export { ContactsListRequest } from "./ContactsListRequest"; -export { ContactEndpointRequest } from "./ContactEndpointRequest"; -export { ContactsRetrieveRequest } from "./ContactsRetrieveRequest"; -export { ContactsRemoteFieldClassesListRequest } from "./ContactsRemoteFieldClassesListRequest"; +export { type ContactsListRequest } from "./ContactsListRequest"; +export { type ContactEndpointRequest } from "./ContactEndpointRequest"; +export { type ContactsRetrieveRequest } from "./ContactsRetrieveRequest"; +export { type ContactsRemoteFieldClassesListRequest } from "./ContactsRemoteFieldClassesListRequest"; diff --git a/src/api/resources/accounting/resources/creditNotes/client/Client.ts b/src/api/resources/accounting/resources/creditNotes/client/Client.ts index 299442607..e69825c96 100644 --- a/src/api/resources/accounting/resources/creditNotes/client/Client.ts +++ b/src/api/resources/accounting/resources/creditNotes/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace CreditNotes { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class CreditNotes { /** * Returns a list of `CreditNote` objects. * + * @param {Merge.accounting.CreditNotesListRequest} request + * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.creditNotes.list({}) + * await client.accounting.creditNotes.list() */ public async list( request: Merge.accounting.CreditNotesListRequest = {}, @@ -54,7 +66,7 @@ export class CreditNotes { transactionDateAfter, transactionDateBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -133,15 +145,21 @@ export class CreditNotes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedCreditNoteList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedCreditNoteList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -164,7 +182,7 @@ export class CreditNotes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/credit-notes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -175,8 +193,12 @@ export class CreditNotes { /** * Returns a `CreditNote` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.CreditNotesRetrieveRequest} request + * @param {CreditNotes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.creditNotes.retrieve("id", {}) + * await client.accounting.creditNotes.retrieve("id") */ public async retrieve( id: string, @@ -184,7 +206,7 @@ export class CreditNotes { requestOptions?: CreditNotes.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -204,7 +226,7 @@ export class CreditNotes { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/credit-notes/${id}` + `accounting/v1/credit-notes/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -215,15 +237,21 @@ export class CreditNotes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.CreditNote.parseOrThrow(_response.body, { + return serializers.accounting.CreditNote.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -246,7 +274,9 @@ export class CreditNotes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/credit-notes/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -254,7 +284,7 @@ export class CreditNotes { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesListRequest.ts b/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesListRequest.ts index 4b1d3310e..57456f2ac 100644 --- a/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesListRequest.ts +++ b/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesRetrieveRequest.ts b/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesRetrieveRequest.ts index faf431feb..4fcddcf5d 100644 --- a/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/creditNotes/client/requests/CreditNotesRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/creditNotes/client/requests/index.ts b/src/api/resources/accounting/resources/creditNotes/client/requests/index.ts index b7f86b0da..349f24e30 100644 --- a/src/api/resources/accounting/resources/creditNotes/client/requests/index.ts +++ b/src/api/resources/accounting/resources/creditNotes/client/requests/index.ts @@ -1,2 +1,2 @@ -export { CreditNotesListRequest } from "./CreditNotesListRequest"; -export { CreditNotesRetrieveRequest } from "./CreditNotesRetrieveRequest"; +export { type CreditNotesListRequest } from "./CreditNotesListRequest"; +export { type CreditNotesRetrieveRequest } from "./CreditNotesRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/deleteAccount/client/Client.ts b/src/api/resources/accounting/resources/deleteAccount/client/Client.ts index d83d118dc..71cc8e1e2 100644 --- a/src/api/resources/accounting/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/accounting/resources/deleteAccount/client/Client.ts @@ -5,19 +5,28 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace DeleteAccount { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -27,8 +36,10 @@ export class DeleteAccount { /** * Delete a linked account. * + * @param {DeleteAccount.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.deleteAccount.delete() + * await client.accounting.deleteAccount.delete() */ public async delete(requestOptions?: DeleteAccount.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -45,11 +56,17 @@ export class DeleteAccount { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -69,7 +86,7 @@ export class DeleteAccount { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /accounting/v1/delete-account."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -77,7 +94,7 @@ export class DeleteAccount { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/expenses/client/Client.ts b/src/api/resources/accounting/resources/expenses/client/Client.ts index 6a0bccbec..692ff4c72 100644 --- a/src/api/resources/accounting/resources/expenses/client/Client.ts +++ b/src/api/resources/accounting/resources/expenses/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Expenses { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Expenses { /** * Returns a list of `Expense` objects. * + * @param {Merge.accounting.ExpensesListRequest} request + * @param {Expenses.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.expenses.list({}) + * await client.accounting.expenses.list() */ public async list( request: Merge.accounting.ExpensesListRequest = {}, @@ -53,7 +65,7 @@ export class Expenses { transactionDateAfter, transactionDateBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -128,15 +140,21 @@ export class Expenses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedExpenseList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedExpenseList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -159,7 +177,7 @@ export class Expenses { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/expenses."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -170,8 +188,11 @@ export class Expenses { /** * Creates an `Expense` object with the given values. * + * @param {Merge.accounting.ExpenseEndpointRequest} request + * @param {Expenses.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.expenses.create({ + * await client.accounting.expenses.create({ * model: {} * }) */ @@ -180,7 +201,7 @@ export class Expenses { requestOptions?: Expenses.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -203,18 +224,22 @@ export class Expenses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.accounting.ExpenseEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.accounting.ExpenseEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.ExpenseResponse.parseOrThrow(_response.body, { + return serializers.accounting.ExpenseResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -237,7 +262,7 @@ export class Expenses { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /accounting/v1/expenses."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -248,8 +273,12 @@ export class Expenses { /** * Returns an `Expense` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.ExpensesRetrieveRequest} request + * @param {Expenses.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.expenses.retrieve("id", {}) + * await client.accounting.expenses.retrieve("id") */ public async retrieve( id: string, @@ -257,7 +286,7 @@ export class Expenses { requestOptions?: Expenses.RequestOptions ): Promise { const { expand, includeRemoteData, includeRemoteFields } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -273,7 +302,7 @@ export class Expenses { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/expenses/${id}` + `accounting/v1/expenses/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -284,15 +313,21 @@ export class Expenses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.Expense.parseOrThrow(_response.body, { + return serializers.accounting.Expense.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -315,7 +350,7 @@ export class Expenses { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/expenses/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -326,8 +361,11 @@ export class Expenses { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.accounting.ExpensesLinesRemoteFieldClassesListRequest} request + * @param {Expenses.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.expenses.linesRemoteFieldClassesList({}) + * await client.accounting.expenses.linesRemoteFieldClassesList() */ public async linesRemoteFieldClassesList( request: Merge.accounting.ExpensesLinesRemoteFieldClassesListRequest = {}, @@ -335,7 +373,7 @@ export class Expenses { ): Promise { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -374,15 +412,21 @@ export class Expenses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -405,7 +449,9 @@ export class Expenses { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/expenses/lines/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -416,8 +462,10 @@ export class Expenses { /** * Returns metadata for `Expense` POSTs. * + * @param {Expenses.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.expenses.metaPostRetrieve() + * await client.accounting.expenses.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Expenses.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -434,14 +482,20 @@ export class Expenses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -464,7 +518,9 @@ export class Expenses { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/expenses/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -475,8 +531,11 @@ export class Expenses { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.accounting.ExpensesRemoteFieldClassesListRequest} request + * @param {Expenses.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.expenses.remoteFieldClassesList({}) + * await client.accounting.expenses.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.accounting.ExpensesRemoteFieldClassesListRequest = {}, @@ -484,7 +543,7 @@ export class Expenses { ): Promise { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -523,15 +582,21 @@ export class Expenses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -554,7 +619,9 @@ export class Expenses { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/expenses/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -562,7 +629,7 @@ export class Expenses { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/expenses/client/requests/ExpenseEndpointRequest.ts b/src/api/resources/accounting/resources/expenses/client/requests/ExpenseEndpointRequest.ts index c3c733c49..026f23a62 100644 --- a/src/api/resources/accounting/resources/expenses/client/requests/ExpenseEndpointRequest.ts +++ b/src/api/resources/accounting/resources/expenses/client/requests/ExpenseEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/expenses/client/requests/ExpensesListRequest.ts b/src/api/resources/accounting/resources/expenses/client/requests/ExpensesListRequest.ts index f28c0b0ce..2084272bd 100644 --- a/src/api/resources/accounting/resources/expenses/client/requests/ExpensesListRequest.ts +++ b/src/api/resources/accounting/resources/expenses/client/requests/ExpensesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/expenses/client/requests/ExpensesRetrieveRequest.ts b/src/api/resources/accounting/resources/expenses/client/requests/ExpensesRetrieveRequest.ts index 613b4b1d9..aef07eb0e 100644 --- a/src/api/resources/accounting/resources/expenses/client/requests/ExpensesRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/expenses/client/requests/ExpensesRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/expenses/client/requests/index.ts b/src/api/resources/accounting/resources/expenses/client/requests/index.ts index 537ad4e87..fb7909348 100644 --- a/src/api/resources/accounting/resources/expenses/client/requests/index.ts +++ b/src/api/resources/accounting/resources/expenses/client/requests/index.ts @@ -1,5 +1,5 @@ -export { ExpensesListRequest } from "./ExpensesListRequest"; -export { ExpenseEndpointRequest } from "./ExpenseEndpointRequest"; -export { ExpensesRetrieveRequest } from "./ExpensesRetrieveRequest"; -export { ExpensesLinesRemoteFieldClassesListRequest } from "./ExpensesLinesRemoteFieldClassesListRequest"; -export { ExpensesRemoteFieldClassesListRequest } from "./ExpensesRemoteFieldClassesListRequest"; +export { type ExpensesListRequest } from "./ExpensesListRequest"; +export { type ExpenseEndpointRequest } from "./ExpenseEndpointRequest"; +export { type ExpensesRetrieveRequest } from "./ExpensesRetrieveRequest"; +export { type ExpensesLinesRemoteFieldClassesListRequest } from "./ExpensesLinesRemoteFieldClassesListRequest"; +export { type ExpensesRemoteFieldClassesListRequest } from "./ExpensesRemoteFieldClassesListRequest"; diff --git a/src/api/resources/accounting/resources/fieldMapping/client/Client.ts b/src/api/resources/accounting/resources/fieldMapping/client/Client.ts index 017699a2d..a1e25591a 100644 --- a/src/api/resources/accounting/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/accounting/resources/fieldMapping/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace FieldMapping { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class FieldMapping { /** * Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). * + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.fieldMapping.fieldMappingsRetrieve() + * await client.accounting.fieldMapping.fieldMappingsRetrieve() */ public async fieldMappingsRetrieve( requestOptions?: FieldMapping.RequestOptions @@ -49,14 +60,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { + return serializers.accounting.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +96,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/field-mappings."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -90,8 +107,11 @@ export class FieldMapping { /** * Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {Merge.accounting.CreateFieldMappingRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.fieldMapping.fieldMappingsCreate({ + * await client.accounting.fieldMapping.fieldMappingsCreate({ * targetFieldName: "example_target_field_name", * targetFieldDescription: "this is a example description of the target field", * remoteFieldTraversalPath: ["example_remote_field"], @@ -118,17 +138,23 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.accounting.CreateFieldMappingRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.accounting.CreateFieldMappingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.accounting.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -151,7 +177,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /accounting/v1/field-mappings."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -162,8 +188,11 @@ export class FieldMapping { /** * Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {string} fieldMappingId + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.fieldMapping.fieldMappingsDestroy("field_mapping_id") + * await client.accounting.fieldMapping.fieldMappingsDestroy("field_mapping_id") */ public async fieldMappingsDestroy( fieldMappingId: string, @@ -172,7 +201,7 @@ export class FieldMapping { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/field-mappings/${fieldMappingId}` + `accounting/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` ), method: "DELETE", headers: { @@ -183,14 +212,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.accounting.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +248,9 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling DELETE /accounting/v1/field-mappings/{field_mapping_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -224,8 +261,12 @@ export class FieldMapping { /** * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {string} fieldMappingId + * @param {Merge.accounting.PatchedEditFieldMappingRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id", {}) + * await client.accounting.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id") */ public async fieldMappingsPartialUpdate( fieldMappingId: string, @@ -235,7 +276,7 @@ export class FieldMapping { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/field-mappings/${fieldMappingId}` + `accounting/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` ), method: "PATCH", headers: { @@ -246,17 +287,23 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.accounting.PatchedEditFieldMappingRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.accounting.PatchedEditFieldMappingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.accounting.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -279,7 +326,9 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling PATCH /accounting/v1/field-mappings/{field_mapping_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -290,15 +339,18 @@ export class FieldMapping { /** * Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). * + * @param {Merge.accounting.RemoteFieldsRetrieveRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.fieldMapping.remoteFieldsRetrieve({}) + * await client.accounting.fieldMapping.remoteFieldsRetrieve() */ public async remoteFieldsRetrieve( request: Merge.accounting.RemoteFieldsRetrieveRequest = {}, requestOptions?: FieldMapping.RequestOptions ): Promise { const { commonModels, includeExampleValues } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (commonModels != null) { _queryParams["common_models"] = commonModels; } @@ -321,15 +373,21 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.RemoteFieldApiResponse.parseOrThrow(_response.body, { + return serializers.accounting.RemoteFieldApiResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -352,7 +410,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/remote-fields."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -363,8 +421,10 @@ export class FieldMapping { /** * Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). * + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.fieldMapping.targetFieldsRetrieve() + * await client.accounting.fieldMapping.targetFieldsRetrieve() */ public async targetFieldsRetrieve( requestOptions?: FieldMapping.RequestOptions @@ -383,14 +443,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { + return serializers.accounting.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -413,7 +479,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/target-fields."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -421,7 +487,7 @@ export class FieldMapping { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/fieldMapping/client/requests/index.ts b/src/api/resources/accounting/resources/fieldMapping/client/requests/index.ts index cb93982a7..450f54c2b 100644 --- a/src/api/resources/accounting/resources/fieldMapping/client/requests/index.ts +++ b/src/api/resources/accounting/resources/fieldMapping/client/requests/index.ts @@ -1,3 +1,3 @@ -export { CreateFieldMappingRequest } from "./CreateFieldMappingRequest"; -export { PatchedEditFieldMappingRequest } from "./PatchedEditFieldMappingRequest"; -export { RemoteFieldsRetrieveRequest } from "./RemoteFieldsRetrieveRequest"; +export { type CreateFieldMappingRequest } from "./CreateFieldMappingRequest"; +export { type PatchedEditFieldMappingRequest } from "./PatchedEditFieldMappingRequest"; +export { type RemoteFieldsRetrieveRequest } from "./RemoteFieldsRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/forceResync/client/Client.ts b/src/api/resources/accounting/resources/forceResync/client/Client.ts index bf342c3c2..37c5d8dd0 100644 --- a/src/api/resources/accounting/resources/forceResync/client/Client.ts +++ b/src/api/resources/accounting/resources/forceResync/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace ForceResync { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class ForceResync { /** * Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. * + * @param {ForceResync.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.forceResync.syncStatusResyncCreate() + * await client.accounting.forceResync.syncStatusResyncCreate() */ public async syncStatusResyncCreate( requestOptions?: ForceResync.RequestOptions @@ -49,23 +60,26 @@ export class ForceResync { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.forceResync.syncStatusResyncCreate.Response.parseOrThrow( - _response.body, - { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - } - ); + return serializers.accounting.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); } if (_response.error.reason === "status-code") { @@ -82,7 +96,9 @@ export class ForceResync { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /accounting/v1/sync-status/resync." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -90,7 +106,7 @@ export class ForceResync { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/generateKey/client/Client.ts b/src/api/resources/accounting/resources/generateKey/client/Client.ts index ed8a7cf10..87525f4b8 100644 --- a/src/api/resources/accounting/resources/generateKey/client/Client.ts +++ b/src/api/resources/accounting/resources/generateKey/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace GenerateKey { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class GenerateKey { /** * Create a remote key. * + * @param {Merge.accounting.GenerateRemoteKeyRequest} request + * @param {GenerateKey.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.generateKey.create({ + * await client.accounting.generateKey.create({ * name: "Remote Deployment Key 1" * }) */ @@ -52,17 +64,23 @@ export class GenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.accounting.GenerateRemoteKeyRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.accounting.GenerateRemoteKeyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.RemoteKey.parseOrThrow(_response.body, { + return serializers.accounting.RemoteKey.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +103,7 @@ export class GenerateKey { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /accounting/v1/generate-key."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -93,7 +111,7 @@ export class GenerateKey { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/generateKey/client/requests/index.ts b/src/api/resources/accounting/resources/generateKey/client/requests/index.ts index 0df6e7c8b..d8255223c 100644 --- a/src/api/resources/accounting/resources/generateKey/client/requests/index.ts +++ b/src/api/resources/accounting/resources/generateKey/client/requests/index.ts @@ -1 +1 @@ -export { GenerateRemoteKeyRequest } from "./GenerateRemoteKeyRequest"; +export { type GenerateRemoteKeyRequest } from "./GenerateRemoteKeyRequest"; diff --git a/src/api/resources/accounting/resources/incomeStatements/client/Client.ts b/src/api/resources/accounting/resources/incomeStatements/client/Client.ts index d3e3293a4..afec28d9b 100644 --- a/src/api/resources/accounting/resources/incomeStatements/client/Client.ts +++ b/src/api/resources/accounting/resources/incomeStatements/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace IncomeStatements { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class IncomeStatements { /** * Returns a list of `IncomeStatement` objects. * + * @param {Merge.accounting.IncomeStatementsListRequest} request + * @param {IncomeStatements.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.incomeStatements.list({}) + * await client.accounting.incomeStatements.list() */ public async list( request: Merge.accounting.IncomeStatementsListRequest = {}, @@ -50,7 +62,7 @@ export class IncomeStatements { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -113,15 +125,21 @@ export class IncomeStatements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedIncomeStatementList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedIncomeStatementList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -144,7 +162,9 @@ export class IncomeStatements { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/income-statements." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -155,8 +175,12 @@ export class IncomeStatements { /** * Returns an `IncomeStatement` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.IncomeStatementsRetrieveRequest} request + * @param {IncomeStatements.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.incomeStatements.retrieve("id", {}) + * await client.accounting.incomeStatements.retrieve("id") */ public async retrieve( id: string, @@ -164,7 +188,7 @@ export class IncomeStatements { requestOptions?: IncomeStatements.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -176,7 +200,7 @@ export class IncomeStatements { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/income-statements/${id}` + `accounting/v1/income-statements/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -187,15 +211,21 @@ export class IncomeStatements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.IncomeStatement.parseOrThrow(_response.body, { + return serializers.accounting.IncomeStatement.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -218,7 +248,9 @@ export class IncomeStatements { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/income-statements/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -226,7 +258,7 @@ export class IncomeStatements { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/incomeStatements/client/requests/index.ts b/src/api/resources/accounting/resources/incomeStatements/client/requests/index.ts index 763b753f6..5854e7695 100644 --- a/src/api/resources/accounting/resources/incomeStatements/client/requests/index.ts +++ b/src/api/resources/accounting/resources/incomeStatements/client/requests/index.ts @@ -1,2 +1,2 @@ -export { IncomeStatementsListRequest } from "./IncomeStatementsListRequest"; -export { IncomeStatementsRetrieveRequest } from "./IncomeStatementsRetrieveRequest"; +export { type IncomeStatementsListRequest } from "./IncomeStatementsListRequest"; +export { type IncomeStatementsRetrieveRequest } from "./IncomeStatementsRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/invoices/client/Client.ts b/src/api/resources/accounting/resources/invoices/client/Client.ts index 9e4827b1a..5ae519c3b 100644 --- a/src/api/resources/accounting/resources/invoices/client/Client.ts +++ b/src/api/resources/accounting/resources/invoices/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Invoices { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Invoices { /** * Returns a list of `Invoice` objects. * + * @param {Merge.accounting.InvoicesListRequest} request + * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.invoices.list({}) + * await client.accounting.invoices.list() */ public async list( request: Merge.accounting.InvoicesListRequest = {}, @@ -57,7 +69,7 @@ export class Invoices { showEnumOrigins, type: type_, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -148,15 +160,21 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedInvoiceList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedInvoiceList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -179,7 +197,7 @@ export class Invoices { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/invoices."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -190,8 +208,11 @@ export class Invoices { /** * Creates an `Invoice` object with the given values. * + * @param {Merge.accounting.InvoiceEndpointRequest} request + * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.invoices.create({ + * await client.accounting.invoices.create({ * model: {} * }) */ @@ -200,7 +221,7 @@ export class Invoices { requestOptions?: Invoices.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -223,18 +244,22 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.accounting.InvoiceEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.accounting.InvoiceEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.InvoiceResponse.parseOrThrow(_response.body, { + return serializers.accounting.InvoiceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -257,7 +282,7 @@ export class Invoices { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /accounting/v1/invoices."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -268,8 +293,12 @@ export class Invoices { /** * Returns an `Invoice` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.InvoicesRetrieveRequest} request + * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.invoices.retrieve("id", {}) + * await client.accounting.invoices.retrieve("id") */ public async retrieve( id: string, @@ -277,7 +306,7 @@ export class Invoices { requestOptions?: Invoices.RequestOptions ): Promise { const { expand, includeRemoteData, includeRemoteFields, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -301,7 +330,7 @@ export class Invoices { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/invoices/${id}` + `accounting/v1/invoices/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -312,15 +341,21 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.Invoice.parseOrThrow(_response.body, { + return serializers.accounting.Invoice.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -343,7 +378,7 @@ export class Invoices { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/invoices/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -354,8 +389,12 @@ export class Invoices { /** * Updates an `Invoice` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.PatchedInvoiceEndpointRequest} request + * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.invoices.partialUpdate("id", { + * await client.accounting.invoices.partialUpdate("id", { * model: {} * }) */ @@ -365,7 +404,7 @@ export class Invoices { requestOptions?: Invoices.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -377,7 +416,7 @@ export class Invoices { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/invoices/${id}` + `accounting/v1/invoices/${encodeURIComponent(id)}` ), method: "PATCH", headers: { @@ -388,18 +427,24 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.accounting.PatchedInvoiceEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.accounting.PatchedInvoiceEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.InvoiceResponse.parseOrThrow(_response.body, { + return serializers.accounting.InvoiceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -422,7 +467,7 @@ export class Invoices { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling PATCH /accounting/v1/invoices/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -433,8 +478,11 @@ export class Invoices { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.accounting.InvoicesLineItemsRemoteFieldClassesListRequest} request + * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.invoices.lineItemsRemoteFieldClassesList({}) + * await client.accounting.invoices.lineItemsRemoteFieldClassesList() */ public async lineItemsRemoteFieldClassesList( request: Merge.accounting.InvoicesLineItemsRemoteFieldClassesListRequest = {}, @@ -442,7 +490,7 @@ export class Invoices { ): Promise { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -481,15 +529,21 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -512,7 +566,9 @@ export class Invoices { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/invoices/line-items/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -523,8 +579,11 @@ export class Invoices { /** * Returns metadata for `Invoice` PATCHs. * + * @param {string} id + * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.invoices.metaPatchRetrieve("id") + * await client.accounting.invoices.metaPatchRetrieve("id") */ public async metaPatchRetrieve( id: string, @@ -533,7 +592,7 @@ export class Invoices { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/invoices/meta/patch/${id}` + `accounting/v1/invoices/meta/patch/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -544,14 +603,20 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -574,7 +639,9 @@ export class Invoices { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/invoices/meta/patch/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -585,8 +652,10 @@ export class Invoices { /** * Returns metadata for `Invoice` POSTs. * + * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.invoices.metaPostRetrieve() + * await client.accounting.invoices.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Invoices.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -603,14 +672,20 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -633,7 +708,9 @@ export class Invoices { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/invoices/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -644,8 +721,11 @@ export class Invoices { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.accounting.InvoicesRemoteFieldClassesListRequest} request + * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.invoices.remoteFieldClassesList({}) + * await client.accounting.invoices.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.accounting.InvoicesRemoteFieldClassesListRequest = {}, @@ -653,7 +733,7 @@ export class Invoices { ): Promise { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -692,15 +772,21 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -723,7 +809,9 @@ export class Invoices { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/invoices/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -731,7 +819,7 @@ export class Invoices { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/invoices/client/requests/InvoiceEndpointRequest.ts b/src/api/resources/accounting/resources/invoices/client/requests/InvoiceEndpointRequest.ts index f766a4a23..120195e41 100644 --- a/src/api/resources/accounting/resources/invoices/client/requests/InvoiceEndpointRequest.ts +++ b/src/api/resources/accounting/resources/invoices/client/requests/InvoiceEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/invoices/client/requests/InvoicesListRequest.ts b/src/api/resources/accounting/resources/invoices/client/requests/InvoicesListRequest.ts index b2689e755..129b37ace 100644 --- a/src/api/resources/accounting/resources/invoices/client/requests/InvoicesListRequest.ts +++ b/src/api/resources/accounting/resources/invoices/client/requests/InvoicesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/invoices/client/requests/InvoicesRetrieveRequest.ts b/src/api/resources/accounting/resources/invoices/client/requests/InvoicesRetrieveRequest.ts index 53ad5f7b1..166b5ac45 100644 --- a/src/api/resources/accounting/resources/invoices/client/requests/InvoicesRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/invoices/client/requests/InvoicesRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/invoices/client/requests/PatchedInvoiceEndpointRequest.ts b/src/api/resources/accounting/resources/invoices/client/requests/PatchedInvoiceEndpointRequest.ts index fd5881307..f1491a807 100644 --- a/src/api/resources/accounting/resources/invoices/client/requests/PatchedInvoiceEndpointRequest.ts +++ b/src/api/resources/accounting/resources/invoices/client/requests/PatchedInvoiceEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/invoices/client/requests/index.ts b/src/api/resources/accounting/resources/invoices/client/requests/index.ts index c1bb1b463..6fa67fe7e 100644 --- a/src/api/resources/accounting/resources/invoices/client/requests/index.ts +++ b/src/api/resources/accounting/resources/invoices/client/requests/index.ts @@ -1,6 +1,6 @@ -export { InvoicesListRequest } from "./InvoicesListRequest"; -export { InvoiceEndpointRequest } from "./InvoiceEndpointRequest"; -export { InvoicesRetrieveRequest } from "./InvoicesRetrieveRequest"; -export { PatchedInvoiceEndpointRequest } from "./PatchedInvoiceEndpointRequest"; -export { InvoicesLineItemsRemoteFieldClassesListRequest } from "./InvoicesLineItemsRemoteFieldClassesListRequest"; -export { InvoicesRemoteFieldClassesListRequest } from "./InvoicesRemoteFieldClassesListRequest"; +export { type InvoicesListRequest } from "./InvoicesListRequest"; +export { type InvoiceEndpointRequest } from "./InvoiceEndpointRequest"; +export { type InvoicesRetrieveRequest } from "./InvoicesRetrieveRequest"; +export { type PatchedInvoiceEndpointRequest } from "./PatchedInvoiceEndpointRequest"; +export { type InvoicesLineItemsRemoteFieldClassesListRequest } from "./InvoicesLineItemsRemoteFieldClassesListRequest"; +export { type InvoicesRemoteFieldClassesListRequest } from "./InvoicesRemoteFieldClassesListRequest"; diff --git a/src/api/resources/accounting/resources/issues/client/Client.ts b/src/api/resources/accounting/resources/issues/client/Client.ts index bbeeb91f7..e691cc806 100644 --- a/src/api/resources/accounting/resources/issues/client/Client.ts +++ b/src/api/resources/accounting/resources/issues/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Issues { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Issues { /** * Gets all issues for Organization. * + * @param {Merge.accounting.IssuesListRequest} request + * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.issues.list({}) + * await client.accounting.issues.list() */ public async list( request: Merge.accounting.IssuesListRequest = {}, @@ -52,7 +64,7 @@ export class Issues { startDate, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountToken != null) { _queryParams["account_token"] = accountToken; } @@ -123,15 +135,21 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedIssueList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedIssueList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Issues { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/issues."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,14 +183,17 @@ export class Issues { /** * Get a specific issue. * + * @param {string} id + * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.issues.retrieve("id") + * await client.accounting.issues.retrieve("id") */ public async retrieve(id: string, requestOptions?: Issues.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/issues/${id}` + `accounting/v1/issues/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -183,14 +204,20 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.Issue.parseOrThrow(_response.body, { + return serializers.accounting.Issue.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +240,7 @@ export class Issues { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/issues/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -221,7 +248,7 @@ export class Issues { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/issues/client/requests/IssuesListRequest.ts b/src/api/resources/accounting/resources/issues/client/requests/IssuesListRequest.ts index 44ca4b28c..9e5fac64b 100644 --- a/src/api/resources/accounting/resources/issues/client/requests/IssuesListRequest.ts +++ b/src/api/resources/accounting/resources/issues/client/requests/IssuesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/issues/client/requests/index.ts b/src/api/resources/accounting/resources/issues/client/requests/index.ts index 278763f77..ad215d907 100644 --- a/src/api/resources/accounting/resources/issues/client/requests/index.ts +++ b/src/api/resources/accounting/resources/issues/client/requests/index.ts @@ -1 +1 @@ -export { IssuesListRequest } from "./IssuesListRequest"; +export { type IssuesListRequest } from "./IssuesListRequest"; diff --git a/src/api/resources/accounting/resources/items/client/Client.ts b/src/api/resources/accounting/resources/items/client/Client.ts index 9dd3c1bb6..c3ab84211 100644 --- a/src/api/resources/accounting/resources/items/client/Client.ts +++ b/src/api/resources/accounting/resources/items/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Items { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Items { /** * Returns a list of `Item` objects. * + * @param {Merge.accounting.ItemsListRequest} request + * @param {Items.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.items.list({}) + * await client.accounting.items.list() */ public async list( request: Merge.accounting.ItemsListRequest = {}, @@ -52,7 +64,7 @@ export class Items { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -123,15 +135,21 @@ export class Items { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedItemList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedItemList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Items { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/items."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,8 +183,12 @@ export class Items { /** * Returns an `Item` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.ItemsRetrieveRequest} request + * @param {Items.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.items.retrieve("id", {}) + * await client.accounting.items.retrieve("id") */ public async retrieve( id: string, @@ -174,7 +196,7 @@ export class Items { requestOptions?: Items.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -194,7 +216,7 @@ export class Items { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/items/${id}` + `accounting/v1/items/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -205,15 +227,21 @@ export class Items { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.Item.parseOrThrow(_response.body, { + return serializers.accounting.Item.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -236,7 +264,7 @@ export class Items { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/items/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -244,7 +272,7 @@ export class Items { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/items/client/requests/ItemsListRequest.ts b/src/api/resources/accounting/resources/items/client/requests/ItemsListRequest.ts index 4d3942e87..7fd7861b8 100644 --- a/src/api/resources/accounting/resources/items/client/requests/ItemsListRequest.ts +++ b/src/api/resources/accounting/resources/items/client/requests/ItemsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/items/client/requests/ItemsRetrieveRequest.ts b/src/api/resources/accounting/resources/items/client/requests/ItemsRetrieveRequest.ts index ab8859956..4d3b6c2c7 100644 --- a/src/api/resources/accounting/resources/items/client/requests/ItemsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/items/client/requests/ItemsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/items/client/requests/index.ts b/src/api/resources/accounting/resources/items/client/requests/index.ts index 0ff0cec94..4be5a72cf 100644 --- a/src/api/resources/accounting/resources/items/client/requests/index.ts +++ b/src/api/resources/accounting/resources/items/client/requests/index.ts @@ -1,2 +1,2 @@ -export { ItemsListRequest } from "./ItemsListRequest"; -export { ItemsRetrieveRequest } from "./ItemsRetrieveRequest"; +export { type ItemsListRequest } from "./ItemsListRequest"; +export { type ItemsRetrieveRequest } from "./ItemsRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/journalEntries/client/Client.ts b/src/api/resources/accounting/resources/journalEntries/client/Client.ts index f4803a901..63d31f195 100644 --- a/src/api/resources/accounting/resources/journalEntries/client/Client.ts +++ b/src/api/resources/accounting/resources/journalEntries/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace JournalEntries { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class JournalEntries { /** * Returns a list of `JournalEntry` objects. * + * @param {Merge.accounting.JournalEntriesListRequest} request + * @param {JournalEntries.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.journalEntries.list({}) + * await client.accounting.journalEntries.list() */ public async list( request: Merge.accounting.JournalEntriesListRequest = {}, @@ -53,7 +65,7 @@ export class JournalEntries { transactionDateAfter, transactionDateBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -128,15 +140,21 @@ export class JournalEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedJournalEntryList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedJournalEntryList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -159,7 +177,7 @@ export class JournalEntries { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/journal-entries."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -170,8 +188,11 @@ export class JournalEntries { /** * Creates a `JournalEntry` object with the given values. * + * @param {Merge.accounting.JournalEntryEndpointRequest} request + * @param {JournalEntries.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.journalEntries.create({ + * await client.accounting.journalEntries.create({ * model: {} * }) */ @@ -180,7 +201,7 @@ export class JournalEntries { requestOptions?: JournalEntries.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -203,18 +224,24 @@ export class JournalEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.accounting.JournalEntryEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.accounting.JournalEntryEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.JournalEntryResponse.parseOrThrow(_response.body, { + return serializers.accounting.JournalEntryResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -237,7 +264,9 @@ export class JournalEntries { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /accounting/v1/journal-entries." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -248,8 +277,12 @@ export class JournalEntries { /** * Returns a `JournalEntry` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.JournalEntriesRetrieveRequest} request + * @param {JournalEntries.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.journalEntries.retrieve("id", {}) + * await client.accounting.journalEntries.retrieve("id") */ public async retrieve( id: string, @@ -257,7 +290,7 @@ export class JournalEntries { requestOptions?: JournalEntries.RequestOptions ): Promise { const { expand, includeRemoteData, includeRemoteFields } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -273,7 +306,7 @@ export class JournalEntries { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/journal-entries/${id}` + `accounting/v1/journal-entries/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -284,15 +317,21 @@ export class JournalEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.JournalEntry.parseOrThrow(_response.body, { + return serializers.accounting.JournalEntry.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -315,7 +354,9 @@ export class JournalEntries { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/journal-entries/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -326,8 +367,11 @@ export class JournalEntries { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.accounting.JournalEntriesLinesRemoteFieldClassesListRequest} request + * @param {JournalEntries.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.journalEntries.linesRemoteFieldClassesList({}) + * await client.accounting.journalEntries.linesRemoteFieldClassesList() */ public async linesRemoteFieldClassesList( request: Merge.accounting.JournalEntriesLinesRemoteFieldClassesListRequest = {}, @@ -335,7 +379,7 @@ export class JournalEntries { ): Promise { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -374,15 +418,21 @@ export class JournalEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -405,7 +455,9 @@ export class JournalEntries { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/journal-entries/lines/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -416,8 +468,10 @@ export class JournalEntries { /** * Returns metadata for `JournalEntry` POSTs. * + * @param {JournalEntries.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.journalEntries.metaPostRetrieve() + * await client.accounting.journalEntries.metaPostRetrieve() */ public async metaPostRetrieve( requestOptions?: JournalEntries.RequestOptions @@ -436,14 +490,20 @@ export class JournalEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -466,7 +526,9 @@ export class JournalEntries { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/journal-entries/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -477,8 +539,11 @@ export class JournalEntries { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.accounting.JournalEntriesRemoteFieldClassesListRequest} request + * @param {JournalEntries.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.journalEntries.remoteFieldClassesList({}) + * await client.accounting.journalEntries.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.accounting.JournalEntriesRemoteFieldClassesListRequest = {}, @@ -486,7 +551,7 @@ export class JournalEntries { ): Promise { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -525,15 +590,21 @@ export class JournalEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -556,7 +627,9 @@ export class JournalEntries { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/journal-entries/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -564,7 +637,7 @@ export class JournalEntries { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesListRequest.ts b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesListRequest.ts index 7d733e2b8..c577e1840 100644 --- a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesListRequest.ts +++ b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesRetrieveRequest.ts b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesRetrieveRequest.ts index 2a7e4f5f5..d1a7a1ac5 100644 --- a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntriesRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntryEndpointRequest.ts b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntryEndpointRequest.ts index 9dc33c611..4a3d2c852 100644 --- a/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntryEndpointRequest.ts +++ b/src/api/resources/accounting/resources/journalEntries/client/requests/JournalEntryEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/journalEntries/client/requests/index.ts b/src/api/resources/accounting/resources/journalEntries/client/requests/index.ts index a89153d2c..720c64294 100644 --- a/src/api/resources/accounting/resources/journalEntries/client/requests/index.ts +++ b/src/api/resources/accounting/resources/journalEntries/client/requests/index.ts @@ -1,5 +1,5 @@ -export { JournalEntriesListRequest } from "./JournalEntriesListRequest"; -export { JournalEntryEndpointRequest } from "./JournalEntryEndpointRequest"; -export { JournalEntriesRetrieveRequest } from "./JournalEntriesRetrieveRequest"; -export { JournalEntriesLinesRemoteFieldClassesListRequest } from "./JournalEntriesLinesRemoteFieldClassesListRequest"; -export { JournalEntriesRemoteFieldClassesListRequest } from "./JournalEntriesRemoteFieldClassesListRequest"; +export { type JournalEntriesListRequest } from "./JournalEntriesListRequest"; +export { type JournalEntryEndpointRequest } from "./JournalEntryEndpointRequest"; +export { type JournalEntriesRetrieveRequest } from "./JournalEntriesRetrieveRequest"; +export { type JournalEntriesLinesRemoteFieldClassesListRequest } from "./JournalEntriesLinesRemoteFieldClassesListRequest"; +export { type JournalEntriesRemoteFieldClassesListRequest } from "./JournalEntriesRemoteFieldClassesListRequest"; diff --git a/src/api/resources/accounting/resources/linkToken/client/Client.ts b/src/api/resources/accounting/resources/linkToken/client/Client.ts index d5523f31e..5ca72fa7b 100644 --- a/src/api/resources/accounting/resources/linkToken/client/Client.ts +++ b/src/api/resources/accounting/resources/linkToken/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace LinkToken { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,12 +38,15 @@ export class LinkToken { /** * Creates a link token to be used when linking a new end user. * + * @param {Merge.accounting.EndUserDetailsRequest} request + * @param {LinkToken.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.linkToken.create({ + * await client.accounting.linkToken.create({ * endUserEmailAddress: "example@gmail.com", * endUserOrganizationName: "Test Organization", * endUserOriginId: "12345", - * categories: [Merge.accounting.CategoriesEnum.Hris, Merge.accounting.CategoriesEnum.Ats] + * categories: ["hris", "ats"] * }) */ public async create( @@ -55,17 +67,23 @@ export class LinkToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.accounting.EndUserDetailsRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.accounting.EndUserDetailsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.LinkToken.parseOrThrow(_response.body, { + return serializers.accounting.LinkToken.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -88,7 +106,7 @@ export class LinkToken { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /accounting/v1/link-token."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -96,7 +114,7 @@ export class LinkToken { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/linkToken/client/requests/EndUserDetailsRequest.ts b/src/api/resources/accounting/resources/linkToken/client/requests/EndUserDetailsRequest.ts index c1e0d001b..fef299e9b 100644 --- a/src/api/resources/accounting/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/api/resources/accounting/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example @@ -10,7 +10,7 @@ import * as Merge from "../../../../../.."; * endUserEmailAddress: "example@gmail.com", * endUserOrganizationName: "Test Organization", * endUserOriginId: "12345", - * categories: [Merge.accounting.CategoriesEnum.Hris, Merge.accounting.CategoriesEnum.Ats] + * categories: ["hris", "ats"] * } */ export interface EndUserDetailsRequest { diff --git a/src/api/resources/accounting/resources/linkToken/client/requests/index.ts b/src/api/resources/accounting/resources/linkToken/client/requests/index.ts index d94b44a3e..de1b7e67d 100644 --- a/src/api/resources/accounting/resources/linkToken/client/requests/index.ts +++ b/src/api/resources/accounting/resources/linkToken/client/requests/index.ts @@ -1 +1 @@ -export { EndUserDetailsRequest } from "./EndUserDetailsRequest"; +export { type EndUserDetailsRequest } from "./EndUserDetailsRequest"; diff --git a/src/api/resources/accounting/resources/linkedAccounts/client/Client.ts b/src/api/resources/accounting/resources/linkedAccounts/client/Client.ts index 80455c53e..979a5d526 100644 --- a/src/api/resources/accounting/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/accounting/resources/linkedAccounts/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace LinkedAccounts { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class LinkedAccounts { /** * List linked accounts for your organization. * + * @param {Merge.accounting.LinkedAccountsListRequest} request + * @param {LinkedAccounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.linkedAccounts.list({}) + * await client.accounting.linkedAccounts.list() */ public async list( request: Merge.accounting.LinkedAccountsListRequest = {}, @@ -51,7 +63,7 @@ export class LinkedAccounts { pageSize, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (category != null) { _queryParams["category"] = category; } @@ -118,15 +130,21 @@ export class LinkedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -149,7 +167,7 @@ export class LinkedAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/linked-accounts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -157,7 +175,7 @@ export class LinkedAccounts { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts b/src/api/resources/accounting/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts index 6d368f9ac..c3536fff2 100644 --- a/src/api/resources/accounting/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts +++ b/src/api/resources/accounting/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/linkedAccounts/client/requests/index.ts b/src/api/resources/accounting/resources/linkedAccounts/client/requests/index.ts index ef755b09f..d28d7a17d 100644 --- a/src/api/resources/accounting/resources/linkedAccounts/client/requests/index.ts +++ b/src/api/resources/accounting/resources/linkedAccounts/client/requests/index.ts @@ -1 +1 @@ -export { LinkedAccountsListRequest } from "./LinkedAccountsListRequest"; +export { type LinkedAccountsListRequest } from "./LinkedAccountsListRequest"; diff --git a/src/api/resources/accounting/resources/passthrough/client/Client.ts b/src/api/resources/accounting/resources/passthrough/client/Client.ts index 7050e59ed..e33b807ec 100644 --- a/src/api/resources/accounting/resources/passthrough/client/Client.ts +++ b/src/api/resources/accounting/resources/passthrough/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace Passthrough { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,9 +38,12 @@ export class Passthrough { /** * Pull data from an endpoint not currently supported by Merge. * + * @param {Merge.accounting.DataPassthroughRequest} request + * @param {Passthrough.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.passthrough.create({ - * method: Merge.accounting.MethodEnum.Get, + * await client.accounting.passthrough.create({ + * method: "GET", * path: "/scooters" * }) */ @@ -53,17 +65,23 @@ export class Passthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.accounting.DataPassthroughRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.accounting.DataPassthroughRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.RemoteResponse.parseOrThrow(_response.body, { + return serializers.accounting.RemoteResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +104,7 @@ export class Passthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /accounting/v1/passthrough."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -94,7 +112,7 @@ export class Passthrough { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/payments/client/Client.ts b/src/api/resources/accounting/resources/payments/client/Client.ts index d850e0985..c9d1066ad 100644 --- a/src/api/resources/accounting/resources/payments/client/Client.ts +++ b/src/api/resources/accounting/resources/payments/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Payments { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Payments { /** * Returns a list of `Payment` objects. * + * @param {Merge.accounting.PaymentsListRequest} request + * @param {Payments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.payments.list({}) + * await client.accounting.payments.list() */ public async list( request: Merge.accounting.PaymentsListRequest = {}, @@ -55,7 +67,7 @@ export class Payments { transactionDateAfter, transactionDateBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountId != null) { _queryParams["account_id"] = accountId; } @@ -138,15 +150,21 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedPaymentList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedPaymentList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -169,7 +187,7 @@ export class Payments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/payments."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -180,8 +198,11 @@ export class Payments { /** * Creates a `Payment` object with the given values. * + * @param {Merge.accounting.PaymentEndpointRequest} request + * @param {Payments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.payments.create({ + * await client.accounting.payments.create({ * model: {} * }) */ @@ -190,7 +211,7 @@ export class Payments { requestOptions?: Payments.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -213,18 +234,22 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.accounting.PaymentEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.accounting.PaymentEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaymentResponse.parseOrThrow(_response.body, { + return serializers.accounting.PaymentResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -247,7 +272,7 @@ export class Payments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /accounting/v1/payments."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -258,8 +283,12 @@ export class Payments { /** * Returns a `Payment` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.PaymentsRetrieveRequest} request + * @param {Payments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.payments.retrieve("id", {}) + * await client.accounting.payments.retrieve("id") */ public async retrieve( id: string, @@ -267,7 +296,7 @@ export class Payments { requestOptions?: Payments.RequestOptions ): Promise { const { expand, includeRemoteData, includeRemoteFields } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -283,7 +312,7 @@ export class Payments { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/payments/${id}` + `accounting/v1/payments/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -294,15 +323,21 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.Payment.parseOrThrow(_response.body, { + return serializers.accounting.Payment.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -325,7 +360,7 @@ export class Payments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/payments/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -336,8 +371,12 @@ export class Payments { /** * Updates a `Payment` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.PatchedPaymentEndpointRequest} request + * @param {Payments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.payments.partialUpdate("id", { + * await client.accounting.payments.partialUpdate("id", { * model: {} * }) */ @@ -347,7 +386,7 @@ export class Payments { requestOptions?: Payments.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -359,7 +398,7 @@ export class Payments { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/payments/${id}` + `accounting/v1/payments/${encodeURIComponent(id)}` ), method: "PATCH", headers: { @@ -370,18 +409,24 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.accounting.PatchedPaymentEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.accounting.PatchedPaymentEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaymentResponse.parseOrThrow(_response.body, { + return serializers.accounting.PaymentResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -404,7 +449,7 @@ export class Payments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling PATCH /accounting/v1/payments/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -415,8 +460,11 @@ export class Payments { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.accounting.PaymentsLineItemsRemoteFieldClassesListRequest} request + * @param {Payments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.payments.lineItemsRemoteFieldClassesList({}) + * await client.accounting.payments.lineItemsRemoteFieldClassesList() */ public async lineItemsRemoteFieldClassesList( request: Merge.accounting.PaymentsLineItemsRemoteFieldClassesListRequest = {}, @@ -424,7 +472,7 @@ export class Payments { ): Promise { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -463,15 +511,21 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -494,7 +548,9 @@ export class Payments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/payments/line-items/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -505,8 +561,11 @@ export class Payments { /** * Returns metadata for `Payment` PATCHs. * + * @param {string} id + * @param {Payments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.payments.metaPatchRetrieve("id") + * await client.accounting.payments.metaPatchRetrieve("id") */ public async metaPatchRetrieve( id: string, @@ -515,7 +574,7 @@ export class Payments { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/payments/meta/patch/${id}` + `accounting/v1/payments/meta/patch/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -526,14 +585,20 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -556,7 +621,9 @@ export class Payments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/payments/meta/patch/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -567,8 +634,10 @@ export class Payments { /** * Returns metadata for `Payment` POSTs. * + * @param {Payments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.payments.metaPostRetrieve() + * await client.accounting.payments.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Payments.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -585,14 +654,20 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -615,7 +690,9 @@ export class Payments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/payments/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -626,8 +703,11 @@ export class Payments { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.accounting.PaymentsRemoteFieldClassesListRequest} request + * @param {Payments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.payments.remoteFieldClassesList({}) + * await client.accounting.payments.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.accounting.PaymentsRemoteFieldClassesListRequest = {}, @@ -635,7 +715,7 @@ export class Payments { ): Promise { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -674,15 +754,21 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -705,7 +791,9 @@ export class Payments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/payments/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -713,7 +801,7 @@ export class Payments { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/payments/client/requests/PatchedPaymentEndpointRequest.ts b/src/api/resources/accounting/resources/payments/client/requests/PatchedPaymentEndpointRequest.ts index 7d1eb2f75..3f9271fb3 100644 --- a/src/api/resources/accounting/resources/payments/client/requests/PatchedPaymentEndpointRequest.ts +++ b/src/api/resources/accounting/resources/payments/client/requests/PatchedPaymentEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/payments/client/requests/PaymentEndpointRequest.ts b/src/api/resources/accounting/resources/payments/client/requests/PaymentEndpointRequest.ts index 1a19f972b..f03249a63 100644 --- a/src/api/resources/accounting/resources/payments/client/requests/PaymentEndpointRequest.ts +++ b/src/api/resources/accounting/resources/payments/client/requests/PaymentEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/payments/client/requests/PaymentsListRequest.ts b/src/api/resources/accounting/resources/payments/client/requests/PaymentsListRequest.ts index c364ea5aa..6035b1958 100644 --- a/src/api/resources/accounting/resources/payments/client/requests/PaymentsListRequest.ts +++ b/src/api/resources/accounting/resources/payments/client/requests/PaymentsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/payments/client/requests/PaymentsRetrieveRequest.ts b/src/api/resources/accounting/resources/payments/client/requests/PaymentsRetrieveRequest.ts index d13ae517c..8237d8a78 100644 --- a/src/api/resources/accounting/resources/payments/client/requests/PaymentsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/payments/client/requests/PaymentsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/payments/client/requests/index.ts b/src/api/resources/accounting/resources/payments/client/requests/index.ts index 947c664cc..355c846aa 100644 --- a/src/api/resources/accounting/resources/payments/client/requests/index.ts +++ b/src/api/resources/accounting/resources/payments/client/requests/index.ts @@ -1,6 +1,6 @@ -export { PaymentsListRequest } from "./PaymentsListRequest"; -export { PaymentEndpointRequest } from "./PaymentEndpointRequest"; -export { PaymentsRetrieveRequest } from "./PaymentsRetrieveRequest"; -export { PatchedPaymentEndpointRequest } from "./PatchedPaymentEndpointRequest"; -export { PaymentsLineItemsRemoteFieldClassesListRequest } from "./PaymentsLineItemsRemoteFieldClassesListRequest"; -export { PaymentsRemoteFieldClassesListRequest } from "./PaymentsRemoteFieldClassesListRequest"; +export { type PaymentsListRequest } from "./PaymentsListRequest"; +export { type PaymentEndpointRequest } from "./PaymentEndpointRequest"; +export { type PaymentsRetrieveRequest } from "./PaymentsRetrieveRequest"; +export { type PatchedPaymentEndpointRequest } from "./PatchedPaymentEndpointRequest"; +export { type PaymentsLineItemsRemoteFieldClassesListRequest } from "./PaymentsLineItemsRemoteFieldClassesListRequest"; +export { type PaymentsRemoteFieldClassesListRequest } from "./PaymentsRemoteFieldClassesListRequest"; diff --git a/src/api/resources/accounting/resources/phoneNumbers/client/Client.ts b/src/api/resources/accounting/resources/phoneNumbers/client/Client.ts index 4aa8a1c6e..a6fc57e3b 100644 --- a/src/api/resources/accounting/resources/phoneNumbers/client/Client.ts +++ b/src/api/resources/accounting/resources/phoneNumbers/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace PhoneNumbers { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,12 @@ export class PhoneNumbers { /** * Returns an `AccountingPhoneNumber` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.PhoneNumbersRetrieveRequest} request + * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.phoneNumbers.retrieve("id", {}) + * await client.accounting.phoneNumbers.retrieve("id") */ public async retrieve( id: string, @@ -38,7 +51,7 @@ export class PhoneNumbers { requestOptions?: PhoneNumbers.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -46,7 +59,7 @@ export class PhoneNumbers { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/phone-numbers/${id}` + `accounting/v1/phone-numbers/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -57,15 +70,21 @@ export class PhoneNumbers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.AccountingPhoneNumber.parseOrThrow(_response.body, { + return serializers.accounting.AccountingPhoneNumber.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -88,7 +107,9 @@ export class PhoneNumbers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/phone-numbers/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -96,7 +117,7 @@ export class PhoneNumbers { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/phoneNumbers/client/requests/index.ts b/src/api/resources/accounting/resources/phoneNumbers/client/requests/index.ts index 6558a9577..17c281fc9 100644 --- a/src/api/resources/accounting/resources/phoneNumbers/client/requests/index.ts +++ b/src/api/resources/accounting/resources/phoneNumbers/client/requests/index.ts @@ -1 +1 @@ -export { PhoneNumbersRetrieveRequest } from "./PhoneNumbersRetrieveRequest"; +export { type PhoneNumbersRetrieveRequest } from "./PhoneNumbersRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/purchaseOrders/client/Client.ts b/src/api/resources/accounting/resources/purchaseOrders/client/Client.ts index 121d8cc38..0f909d350 100644 --- a/src/api/resources/accounting/resources/purchaseOrders/client/Client.ts +++ b/src/api/resources/accounting/resources/purchaseOrders/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace PurchaseOrders { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class PurchaseOrders { /** * Returns a list of `PurchaseOrder` objects. * + * @param {Merge.accounting.PurchaseOrdersListRequest} request + * @param {PurchaseOrders.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.purchaseOrders.list({}) + * await client.accounting.purchaseOrders.list() */ public async list( request: Merge.accounting.PurchaseOrdersListRequest = {}, @@ -55,7 +67,7 @@ export class PurchaseOrders { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -138,15 +150,21 @@ export class PurchaseOrders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedPurchaseOrderList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedPurchaseOrderList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -169,7 +187,7 @@ export class PurchaseOrders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/purchase-orders."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -180,8 +198,11 @@ export class PurchaseOrders { /** * Creates a `PurchaseOrder` object with the given values. * + * @param {Merge.accounting.PurchaseOrderEndpointRequest} request + * @param {PurchaseOrders.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.purchaseOrders.create({ + * await client.accounting.purchaseOrders.create({ * model: {} * }) */ @@ -190,7 +211,7 @@ export class PurchaseOrders { requestOptions?: PurchaseOrders.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -213,18 +234,24 @@ export class PurchaseOrders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.accounting.PurchaseOrderEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.accounting.PurchaseOrderEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PurchaseOrderResponse.parseOrThrow(_response.body, { + return serializers.accounting.PurchaseOrderResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -247,7 +274,9 @@ export class PurchaseOrders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /accounting/v1/purchase-orders." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -258,8 +287,12 @@ export class PurchaseOrders { /** * Returns a `PurchaseOrder` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.PurchaseOrdersRetrieveRequest} request + * @param {PurchaseOrders.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.purchaseOrders.retrieve("id", {}) + * await client.accounting.purchaseOrders.retrieve("id") */ public async retrieve( id: string, @@ -267,7 +300,7 @@ export class PurchaseOrders { requestOptions?: PurchaseOrders.RequestOptions ): Promise { const { expand, includeRemoteData, includeRemoteFields, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -291,7 +324,7 @@ export class PurchaseOrders { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/purchase-orders/${id}` + `accounting/v1/purchase-orders/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -302,15 +335,21 @@ export class PurchaseOrders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PurchaseOrder.parseOrThrow(_response.body, { + return serializers.accounting.PurchaseOrder.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -333,7 +372,9 @@ export class PurchaseOrders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/purchase-orders/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -344,8 +385,11 @@ export class PurchaseOrders { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.accounting.PurchaseOrdersLineItemsRemoteFieldClassesListRequest} request + * @param {PurchaseOrders.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.purchaseOrders.lineItemsRemoteFieldClassesList({}) + * await client.accounting.purchaseOrders.lineItemsRemoteFieldClassesList() */ public async lineItemsRemoteFieldClassesList( request: Merge.accounting.PurchaseOrdersLineItemsRemoteFieldClassesListRequest = {}, @@ -353,7 +397,7 @@ export class PurchaseOrders { ): Promise { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -392,15 +436,21 @@ export class PurchaseOrders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -423,7 +473,9 @@ export class PurchaseOrders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/purchase-orders/line-items/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -434,8 +486,10 @@ export class PurchaseOrders { /** * Returns metadata for `PurchaseOrder` POSTs. * + * @param {PurchaseOrders.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.purchaseOrders.metaPostRetrieve() + * await client.accounting.purchaseOrders.metaPostRetrieve() */ public async metaPostRetrieve( requestOptions?: PurchaseOrders.RequestOptions @@ -454,14 +508,20 @@ export class PurchaseOrders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -484,7 +544,9 @@ export class PurchaseOrders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/purchase-orders/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -495,8 +557,11 @@ export class PurchaseOrders { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.accounting.PurchaseOrdersRemoteFieldClassesListRequest} request + * @param {PurchaseOrders.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.purchaseOrders.remoteFieldClassesList({}) + * await client.accounting.purchaseOrders.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.accounting.PurchaseOrdersRemoteFieldClassesListRequest = {}, @@ -504,7 +569,7 @@ export class PurchaseOrders { ): Promise { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -543,15 +608,21 @@ export class PurchaseOrders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -574,7 +645,9 @@ export class PurchaseOrders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/purchase-orders/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -582,7 +655,7 @@ export class PurchaseOrders { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrderEndpointRequest.ts b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrderEndpointRequest.ts index b093da506..02f77ddcd 100644 --- a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrderEndpointRequest.ts +++ b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrderEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersListRequest.ts b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersListRequest.ts index 690445d25..7660bcf5f 100644 --- a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersListRequest.ts +++ b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersRetrieveRequest.ts b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersRetrieveRequest.ts index 3042c3b63..93595a8bd 100644 --- a/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrdersRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/purchaseOrders/client/requests/index.ts b/src/api/resources/accounting/resources/purchaseOrders/client/requests/index.ts index 2c51d1445..1b9ffe590 100644 --- a/src/api/resources/accounting/resources/purchaseOrders/client/requests/index.ts +++ b/src/api/resources/accounting/resources/purchaseOrders/client/requests/index.ts @@ -1,5 +1,5 @@ -export { PurchaseOrdersListRequest } from "./PurchaseOrdersListRequest"; -export { PurchaseOrderEndpointRequest } from "./PurchaseOrderEndpointRequest"; -export { PurchaseOrdersRetrieveRequest } from "./PurchaseOrdersRetrieveRequest"; -export { PurchaseOrdersLineItemsRemoteFieldClassesListRequest } from "./PurchaseOrdersLineItemsRemoteFieldClassesListRequest"; -export { PurchaseOrdersRemoteFieldClassesListRequest } from "./PurchaseOrdersRemoteFieldClassesListRequest"; +export { type PurchaseOrdersListRequest } from "./PurchaseOrdersListRequest"; +export { type PurchaseOrderEndpointRequest } from "./PurchaseOrderEndpointRequest"; +export { type PurchaseOrdersRetrieveRequest } from "./PurchaseOrdersRetrieveRequest"; +export { type PurchaseOrdersLineItemsRemoteFieldClassesListRequest } from "./PurchaseOrdersLineItemsRemoteFieldClassesListRequest"; +export { type PurchaseOrdersRemoteFieldClassesListRequest } from "./PurchaseOrdersRemoteFieldClassesListRequest"; diff --git a/src/api/resources/accounting/resources/regenerateKey/client/Client.ts b/src/api/resources/accounting/resources/regenerateKey/client/Client.ts index 93ed77bd4..6e48e4a9d 100644 --- a/src/api/resources/accounting/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/accounting/resources/regenerateKey/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace RegenerateKey { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class RegenerateKey { /** * Exchange remote keys. * + * @param {Merge.accounting.RemoteKeyForRegenerationRequest} request + * @param {RegenerateKey.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.regenerateKey.create({ + * await client.accounting.regenerateKey.create({ * name: "Remote Deployment Key 1" * }) */ @@ -52,17 +64,23 @@ export class RegenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.accounting.RemoteKeyForRegenerationRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.accounting.RemoteKeyForRegenerationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.RemoteKey.parseOrThrow(_response.body, { + return serializers.accounting.RemoteKey.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +103,7 @@ export class RegenerateKey { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /accounting/v1/regenerate-key."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -93,7 +111,7 @@ export class RegenerateKey { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/regenerateKey/client/requests/index.ts b/src/api/resources/accounting/resources/regenerateKey/client/requests/index.ts index 2987ef933..09bb5dbd0 100644 --- a/src/api/resources/accounting/resources/regenerateKey/client/requests/index.ts +++ b/src/api/resources/accounting/resources/regenerateKey/client/requests/index.ts @@ -1 +1 @@ -export { RemoteKeyForRegenerationRequest } from "./RemoteKeyForRegenerationRequest"; +export { type RemoteKeyForRegenerationRequest } from "./RemoteKeyForRegenerationRequest"; diff --git a/src/api/resources/accounting/resources/scopes/client/Client.ts b/src/api/resources/accounting/resources/scopes/client/Client.ts index 5b72668c3..03080642f 100644 --- a/src/api/resources/accounting/resources/scopes/client/Client.ts +++ b/src/api/resources/accounting/resources/scopes/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Scopes { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class Scopes { /** * Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). * + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.scopes.defaultScopesRetrieve() + * await client.accounting.scopes.defaultScopesRetrieve() */ public async defaultScopesRetrieve( requestOptions?: Scopes.RequestOptions @@ -49,14 +60,20 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.accounting.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +96,7 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/default-scopes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -90,8 +107,10 @@ export class Scopes { /** * Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). * + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.scopes.linkedAccountScopesRetrieve() + * await client.accounting.scopes.linkedAccountScopesRetrieve() */ public async linkedAccountScopesRetrieve( requestOptions?: Scopes.RequestOptions @@ -110,14 +129,20 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.accounting.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -140,7 +165,9 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/linked-account-scopes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -151,8 +178,11 @@ export class Scopes { /** * Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) * + * @param {Merge.accounting.LinkedAccountCommonModelScopeDeserializerRequest} request + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.scopes.linkedAccountScopesCreate({ + * await client.accounting.scopes.linkedAccountScopesCreate({ * commonModels: [{ * modelName: "Employee", * modelPermissions: { @@ -191,17 +221,23 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.accounting.LinkedAccountCommonModelScopeDeserializerRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.accounting.LinkedAccountCommonModelScopeDeserializerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.accounting.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -224,7 +260,9 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /accounting/v1/linked-account-scopes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -232,7 +270,7 @@ export class Scopes { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts b/src/api/resources/accounting/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts index 783fa3ea9..b33681d3d 100644 --- a/src/api/resources/accounting/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/api/resources/accounting/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/scopes/client/requests/index.ts b/src/api/resources/accounting/resources/scopes/client/requests/index.ts index 28d8d7974..d193f008e 100644 --- a/src/api/resources/accounting/resources/scopes/client/requests/index.ts +++ b/src/api/resources/accounting/resources/scopes/client/requests/index.ts @@ -1 +1 @@ -export { LinkedAccountCommonModelScopeDeserializerRequest } from "./LinkedAccountCommonModelScopeDeserializerRequest"; +export { type LinkedAccountCommonModelScopeDeserializerRequest } from "./LinkedAccountCommonModelScopeDeserializerRequest"; diff --git a/src/api/resources/accounting/resources/syncStatus/client/Client.ts b/src/api/resources/accounting/resources/syncStatus/client/Client.ts index 3188e0e6b..7f7930aac 100644 --- a/src/api/resources/accounting/resources/syncStatus/client/Client.ts +++ b/src/api/resources/accounting/resources/syncStatus/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace SyncStatus { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,15 +38,18 @@ export class SyncStatus { /** * Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). * + * @param {Merge.accounting.SyncStatusListRequest} request + * @param {SyncStatus.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.syncStatus.list({}) + * await client.accounting.syncStatus.list() */ public async list( request: Merge.accounting.SyncStatusListRequest = {}, requestOptions?: SyncStatus.RequestOptions ): Promise { const { cursor, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -60,15 +72,21 @@ export class SyncStatus { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedSyncStatusList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedSyncStatusList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -91,7 +109,7 @@ export class SyncStatus { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/sync-status."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -99,7 +117,7 @@ export class SyncStatus { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/syncStatus/client/requests/index.ts b/src/api/resources/accounting/resources/syncStatus/client/requests/index.ts index 58e9548fe..ef4f7c855 100644 --- a/src/api/resources/accounting/resources/syncStatus/client/requests/index.ts +++ b/src/api/resources/accounting/resources/syncStatus/client/requests/index.ts @@ -1 +1 @@ -export { SyncStatusListRequest } from "./SyncStatusListRequest"; +export { type SyncStatusListRequest } from "./SyncStatusListRequest"; diff --git a/src/api/resources/accounting/resources/taxRates/client/Client.ts b/src/api/resources/accounting/resources/taxRates/client/Client.ts index b8f80ec46..11dbfebaf 100644 --- a/src/api/resources/accounting/resources/taxRates/client/Client.ts +++ b/src/api/resources/accounting/resources/taxRates/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace TaxRates { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class TaxRates { /** * Returns a list of `TaxRate` objects. * + * @param {Merge.accounting.TaxRatesListRequest} request + * @param {TaxRates.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.taxRates.list({}) + * await client.accounting.taxRates.list() */ public async list( request: Merge.accounting.TaxRatesListRequest = {}, @@ -50,7 +62,7 @@ export class TaxRates { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -113,15 +125,21 @@ export class TaxRates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedTaxRateList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedTaxRateList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -144,7 +162,7 @@ export class TaxRates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/tax-rates."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -155,8 +173,12 @@ export class TaxRates { /** * Returns a `TaxRate` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.TaxRatesRetrieveRequest} request + * @param {TaxRates.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.taxRates.retrieve("id", {}) + * await client.accounting.taxRates.retrieve("id") */ public async retrieve( id: string, @@ -164,7 +186,7 @@ export class TaxRates { requestOptions?: TaxRates.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -176,7 +198,7 @@ export class TaxRates { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/tax-rates/${id}` + `accounting/v1/tax-rates/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -187,15 +209,21 @@ export class TaxRates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.TaxRate.parseOrThrow(_response.body, { + return serializers.accounting.TaxRate.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -218,7 +246,7 @@ export class TaxRates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/tax-rates/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -226,7 +254,7 @@ export class TaxRates { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/taxRates/client/requests/index.ts b/src/api/resources/accounting/resources/taxRates/client/requests/index.ts index f3ec720bb..7803f8ba7 100644 --- a/src/api/resources/accounting/resources/taxRates/client/requests/index.ts +++ b/src/api/resources/accounting/resources/taxRates/client/requests/index.ts @@ -1,2 +1,2 @@ -export { TaxRatesListRequest } from "./TaxRatesListRequest"; -export { TaxRatesRetrieveRequest } from "./TaxRatesRetrieveRequest"; +export { type TaxRatesListRequest } from "./TaxRatesListRequest"; +export { type TaxRatesRetrieveRequest } from "./TaxRatesRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/trackingCategories/client/Client.ts b/src/api/resources/accounting/resources/trackingCategories/client/Client.ts index 26c402dfb..e0d1d0954 100644 --- a/src/api/resources/accounting/resources/trackingCategories/client/Client.ts +++ b/src/api/resources/accounting/resources/trackingCategories/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace TrackingCategories { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class TrackingCategories { /** * Returns a list of `TrackingCategory` objects. * + * @param {Merge.accounting.TrackingCategoriesListRequest} request + * @param {TrackingCategories.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.trackingCategories.list({}) + * await client.accounting.trackingCategories.list() */ public async list( request: Merge.accounting.TrackingCategoriesListRequest = {}, @@ -52,7 +64,7 @@ export class TrackingCategories { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -123,15 +135,21 @@ export class TrackingCategories { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedTrackingCategoryList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedTrackingCategoryList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,9 @@ export class TrackingCategories { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/tracking-categories." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,8 +185,12 @@ export class TrackingCategories { /** * Returns a `TrackingCategory` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.TrackingCategoriesRetrieveRequest} request + * @param {TrackingCategories.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.trackingCategories.retrieve("id", {}) + * await client.accounting.trackingCategories.retrieve("id") */ public async retrieve( id: string, @@ -174,7 +198,7 @@ export class TrackingCategories { requestOptions?: TrackingCategories.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -194,7 +218,7 @@ export class TrackingCategories { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/tracking-categories/${id}` + `accounting/v1/tracking-categories/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -205,15 +229,21 @@ export class TrackingCategories { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.TrackingCategory.parseOrThrow(_response.body, { + return serializers.accounting.TrackingCategory.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -236,7 +266,9 @@ export class TrackingCategories { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/tracking-categories/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -244,7 +276,7 @@ export class TrackingCategories { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/trackingCategories/client/requests/index.ts b/src/api/resources/accounting/resources/trackingCategories/client/requests/index.ts index 76137dd95..808c733e9 100644 --- a/src/api/resources/accounting/resources/trackingCategories/client/requests/index.ts +++ b/src/api/resources/accounting/resources/trackingCategories/client/requests/index.ts @@ -1,2 +1,2 @@ -export { TrackingCategoriesListRequest } from "./TrackingCategoriesListRequest"; -export { TrackingCategoriesRetrieveRequest } from "./TrackingCategoriesRetrieveRequest"; +export { type TrackingCategoriesListRequest } from "./TrackingCategoriesListRequest"; +export { type TrackingCategoriesRetrieveRequest } from "./TrackingCategoriesRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/transactions/client/Client.ts b/src/api/resources/accounting/resources/transactions/client/Client.ts index 9f8580edb..d55ca1951 100644 --- a/src/api/resources/accounting/resources/transactions/client/Client.ts +++ b/src/api/resources/accounting/resources/transactions/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Transactions { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Transactions { /** * Returns a list of `Transaction` objects. * + * @param {Merge.accounting.TransactionsListRequest} request + * @param {Transactions.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.transactions.list({}) + * await client.accounting.transactions.list() */ public async list( request: Merge.accounting.TransactionsListRequest = {}, @@ -52,7 +64,7 @@ export class Transactions { transactionDateAfter, transactionDateBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -123,15 +135,21 @@ export class Transactions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedTransactionList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedTransactionList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Transactions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/transactions."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,8 +183,12 @@ export class Transactions { /** * Returns a `Transaction` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.TransactionsRetrieveRequest} request + * @param {Transactions.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.transactions.retrieve("id", {}) + * await client.accounting.transactions.retrieve("id") */ public async retrieve( id: string, @@ -174,7 +196,7 @@ export class Transactions { requestOptions?: Transactions.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -186,7 +208,7 @@ export class Transactions { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/transactions/${id}` + `accounting/v1/transactions/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -197,15 +219,21 @@ export class Transactions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.Transaction.parseOrThrow(_response.body, { + return serializers.accounting.Transaction.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -228,7 +256,9 @@ export class Transactions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/transactions/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -236,7 +266,7 @@ export class Transactions { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/transactions/client/requests/TransactionsListRequest.ts b/src/api/resources/accounting/resources/transactions/client/requests/TransactionsListRequest.ts index d79500761..fbc4d06c1 100644 --- a/src/api/resources/accounting/resources/transactions/client/requests/TransactionsListRequest.ts +++ b/src/api/resources/accounting/resources/transactions/client/requests/TransactionsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/transactions/client/requests/TransactionsRetrieveRequest.ts b/src/api/resources/accounting/resources/transactions/client/requests/TransactionsRetrieveRequest.ts index bf838dad7..677a804e4 100644 --- a/src/api/resources/accounting/resources/transactions/client/requests/TransactionsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/transactions/client/requests/TransactionsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/transactions/client/requests/index.ts b/src/api/resources/accounting/resources/transactions/client/requests/index.ts index 7126df9e9..2f4058b77 100644 --- a/src/api/resources/accounting/resources/transactions/client/requests/index.ts +++ b/src/api/resources/accounting/resources/transactions/client/requests/index.ts @@ -1,2 +1,2 @@ -export { TransactionsListRequest } from "./TransactionsListRequest"; -export { TransactionsRetrieveRequest } from "./TransactionsRetrieveRequest"; +export { type TransactionsListRequest } from "./TransactionsListRequest"; +export { type TransactionsRetrieveRequest } from "./TransactionsRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/vendorCredits/client/Client.ts b/src/api/resources/accounting/resources/vendorCredits/client/Client.ts index 337f1f40a..907a8c4a5 100644 --- a/src/api/resources/accounting/resources/vendorCredits/client/Client.ts +++ b/src/api/resources/accounting/resources/vendorCredits/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace VendorCredits { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class VendorCredits { /** * Returns a list of `VendorCredit` objects. * + * @param {Merge.accounting.VendorCreditsListRequest} request + * @param {VendorCredits.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.vendorCredits.list({}) + * await client.accounting.vendorCredits.list() */ public async list( request: Merge.accounting.VendorCreditsListRequest = {}, @@ -52,7 +64,7 @@ export class VendorCredits { transactionDateAfter, transactionDateBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -123,15 +135,21 @@ export class VendorCredits { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.PaginatedVendorCreditList.parseOrThrow(_response.body, { + return serializers.accounting.PaginatedVendorCreditList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class VendorCredits { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/vendor-credits."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,8 +183,12 @@ export class VendorCredits { /** * Returns a `VendorCredit` object with the given `id`. * + * @param {string} id + * @param {Merge.accounting.VendorCreditsRetrieveRequest} request + * @param {VendorCredits.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.vendorCredits.retrieve("id", {}) + * await client.accounting.vendorCredits.retrieve("id") */ public async retrieve( id: string, @@ -174,7 +196,7 @@ export class VendorCredits { requestOptions?: VendorCredits.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -186,7 +208,7 @@ export class VendorCredits { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/vendor-credits/${id}` + `accounting/v1/vendor-credits/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -197,15 +219,21 @@ export class VendorCredits { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.VendorCredit.parseOrThrow(_response.body, { + return serializers.accounting.VendorCredit.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -228,7 +256,9 @@ export class VendorCredits { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/vendor-credits/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -236,7 +266,7 @@ export class VendorCredits { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsListRequest.ts b/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsListRequest.ts index bc8004724..eeeae98fa 100644 --- a/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsListRequest.ts +++ b/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsRetrieveRequest.ts b/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsRetrieveRequest.ts index ca07b4039..c7e4dd38e 100644 --- a/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsRetrieveRequest.ts +++ b/src/api/resources/accounting/resources/vendorCredits/client/requests/VendorCreditsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/accounting/resources/vendorCredits/client/requests/index.ts b/src/api/resources/accounting/resources/vendorCredits/client/requests/index.ts index 4057c561f..a81569b89 100644 --- a/src/api/resources/accounting/resources/vendorCredits/client/requests/index.ts +++ b/src/api/resources/accounting/resources/vendorCredits/client/requests/index.ts @@ -1,2 +1,2 @@ -export { VendorCreditsListRequest } from "./VendorCreditsListRequest"; -export { VendorCreditsRetrieveRequest } from "./VendorCreditsRetrieveRequest"; +export { type VendorCreditsListRequest } from "./VendorCreditsListRequest"; +export { type VendorCreditsRetrieveRequest } from "./VendorCreditsRetrieveRequest"; diff --git a/src/api/resources/accounting/resources/webhookReceivers/client/Client.ts b/src/api/resources/accounting/resources/webhookReceivers/client/Client.ts index f573f10d5..71e64c6e3 100644 --- a/src/api/resources/accounting/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/accounting/resources/webhookReceivers/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace WebhookReceivers { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class WebhookReceivers { /** * Returns a list of `WebhookReceiver` objects. * + * @param {WebhookReceivers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.webhookReceivers.list() + * await client.accounting.webhookReceivers.list() */ public async list(requestOptions?: WebhookReceivers.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.webhookReceivers.list.Response.parseOrThrow(_response.body, { + return serializers.accounting.webhookReceivers.list.Response.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,9 @@ export class WebhookReceivers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /accounting/v1/webhook-receivers." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -88,8 +107,11 @@ export class WebhookReceivers { /** * Creates a `WebhookReceiver` object with the given values. * + * @param {Merge.accounting.WebhookReceiverRequest} request + * @param {WebhookReceivers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.accounting.webhookReceivers.create({ + * await client.accounting.webhookReceivers.create({ * event: "event", * isActive: true * }) @@ -112,17 +134,23 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.accounting.WebhookReceiverRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.accounting.WebhookReceiverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.accounting.WebhookReceiver.parseOrThrow(_response.body, { + return serializers.accounting.WebhookReceiver.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +173,9 @@ export class WebhookReceivers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /accounting/v1/webhook-receivers." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -153,7 +183,7 @@ export class WebhookReceivers { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/accounting/resources/webhookReceivers/client/requests/index.ts b/src/api/resources/accounting/resources/webhookReceivers/client/requests/index.ts index 29f534250..1df76ea53 100644 --- a/src/api/resources/accounting/resources/webhookReceivers/client/requests/index.ts +++ b/src/api/resources/accounting/resources/webhookReceivers/client/requests/index.ts @@ -1 +1 @@ -export { WebhookReceiverRequest } from "./WebhookReceiverRequest"; +export { type WebhookReceiverRequest } from "./WebhookReceiverRequest"; diff --git a/src/api/resources/accounting/types/Account.ts b/src/api/resources/accounting/types/Account.ts index 292389a2e..61027b1b0 100644 --- a/src/api/resources/accounting/types/Account.ts +++ b/src/api/resources/accounting/types/Account.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Account Object diff --git a/src/api/resources/accounting/types/AccountClassification.ts b/src/api/resources/accounting/types/AccountClassification.ts index 8de8e9883..41856f7b0 100644 --- a/src/api/resources/accounting/types/AccountClassification.ts +++ b/src/api/resources/accounting/types/AccountClassification.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account's broadest grouping. diff --git a/src/api/resources/accounting/types/AccountCurrency.ts b/src/api/resources/accounting/types/AccountCurrency.ts index c5388cbe9..2766362bc 100644 --- a/src/api/resources/accounting/types/AccountCurrency.ts +++ b/src/api/resources/accounting/types/AccountCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account's currency. diff --git a/src/api/resources/accounting/types/AccountDetails.ts b/src/api/resources/accounting/types/AccountDetails.ts index f25fdd15b..5f0fde537 100644 --- a/src/api/resources/accounting/types/AccountDetails.ts +++ b/src/api/resources/accounting/types/AccountDetails.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountDetails { id?: string; diff --git a/src/api/resources/accounting/types/AccountDetailsAndActions.ts b/src/api/resources/accounting/types/AccountDetailsAndActions.ts index c9b5144eb..47464a6f1 100644 --- a/src/api/resources/accounting/types/AccountDetailsAndActions.ts +++ b/src/api/resources/accounting/types/AccountDetailsAndActions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The LinkedAccount Object diff --git a/src/api/resources/accounting/types/AccountDetailsAndActionsIntegration.ts b/src/api/resources/accounting/types/AccountDetailsAndActionsIntegration.ts index d3a0fac64..46ca80737 100644 --- a/src/api/resources/accounting/types/AccountDetailsAndActionsIntegration.ts +++ b/src/api/resources/accounting/types/AccountDetailsAndActionsIntegration.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountDetailsAndActionsIntegration { name: string; diff --git a/src/api/resources/accounting/types/AccountIntegration.ts b/src/api/resources/accounting/types/AccountIntegration.ts index 65a848961..c52723fce 100644 --- a/src/api/resources/accounting/types/AccountIntegration.ts +++ b/src/api/resources/accounting/types/AccountIntegration.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountIntegration { /** Company name. */ diff --git a/src/api/resources/accounting/types/AccountRequest.ts b/src/api/resources/accounting/types/AccountRequest.ts index 4f6fea3e5..379c402e6 100644 --- a/src/api/resources/accounting/types/AccountRequest.ts +++ b/src/api/resources/accounting/types/AccountRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Account Object diff --git a/src/api/resources/accounting/types/AccountRequestClassification.ts b/src/api/resources/accounting/types/AccountRequestClassification.ts index 5e5dc0912..78a526e24 100644 --- a/src/api/resources/accounting/types/AccountRequestClassification.ts +++ b/src/api/resources/accounting/types/AccountRequestClassification.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account's broadest grouping. diff --git a/src/api/resources/accounting/types/AccountRequestCurrency.ts b/src/api/resources/accounting/types/AccountRequestCurrency.ts index 36f8c90a1..ff6a0a4ca 100644 --- a/src/api/resources/accounting/types/AccountRequestCurrency.ts +++ b/src/api/resources/accounting/types/AccountRequestCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account's currency. diff --git a/src/api/resources/accounting/types/AccountRequestStatus.ts b/src/api/resources/accounting/types/AccountRequestStatus.ts index f0ee3b7c3..940c65ecf 100644 --- a/src/api/resources/accounting/types/AccountRequestStatus.ts +++ b/src/api/resources/accounting/types/AccountRequestStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account's status. diff --git a/src/api/resources/accounting/types/AccountResponse.ts b/src/api/resources/accounting/types/AccountResponse.ts index 74d4fba7a..a8f2b62d0 100644 --- a/src/api/resources/accounting/types/AccountResponse.ts +++ b/src/api/resources/accounting/types/AccountResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountResponse { model: Merge.accounting.Account; diff --git a/src/api/resources/accounting/types/AccountStatus.ts b/src/api/resources/accounting/types/AccountStatus.ts index 21e5daebb..b214d1bf6 100644 --- a/src/api/resources/accounting/types/AccountStatus.ts +++ b/src/api/resources/accounting/types/AccountStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account's status. diff --git a/src/api/resources/accounting/types/AccountToken.ts b/src/api/resources/accounting/types/AccountToken.ts index 3147c85a0..7d07d9416 100644 --- a/src/api/resources/accounting/types/AccountToken.ts +++ b/src/api/resources/accounting/types/AccountToken.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountToken { accountToken: string; diff --git a/src/api/resources/accounting/types/AccountingAttachment.ts b/src/api/resources/accounting/types/AccountingAttachment.ts index 9bbd14b8b..7a3427579 100644 --- a/src/api/resources/accounting/types/AccountingAttachment.ts +++ b/src/api/resources/accounting/types/AccountingAttachment.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Accounting Attachment Object diff --git a/src/api/resources/accounting/types/AccountingAttachmentResponse.ts b/src/api/resources/accounting/types/AccountingAttachmentResponse.ts index 399d29401..a76a3f63a 100644 --- a/src/api/resources/accounting/types/AccountingAttachmentResponse.ts +++ b/src/api/resources/accounting/types/AccountingAttachmentResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountingAttachmentResponse { model: Merge.accounting.AccountingAttachment; diff --git a/src/api/resources/accounting/types/AccountingPeriod.ts b/src/api/resources/accounting/types/AccountingPeriod.ts index 510464222..4ca3afd90 100644 --- a/src/api/resources/accounting/types/AccountingPeriod.ts +++ b/src/api/resources/accounting/types/AccountingPeriod.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The AccountingPeriod Object diff --git a/src/api/resources/accounting/types/AccountingPeriodStatus.ts b/src/api/resources/accounting/types/AccountingPeriodStatus.ts index b44996aec..f29c06556 100644 --- a/src/api/resources/accounting/types/AccountingPeriodStatus.ts +++ b/src/api/resources/accounting/types/AccountingPeriodStatus.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type AccountingPeriodStatus = Merge.accounting.AccountingPeriodStatusEnum | string; diff --git a/src/api/resources/accounting/types/Address.ts b/src/api/resources/accounting/types/Address.ts index 80063b836..a2109a462 100644 --- a/src/api/resources/accounting/types/Address.ts +++ b/src/api/resources/accounting/types/Address.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Address Object diff --git a/src/api/resources/accounting/types/AddressCountry.ts b/src/api/resources/accounting/types/AddressCountry.ts index a7c358152..3a7c81555 100644 --- a/src/api/resources/accounting/types/AddressCountry.ts +++ b/src/api/resources/accounting/types/AddressCountry.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The address's country. diff --git a/src/api/resources/accounting/types/AddressRequest.ts b/src/api/resources/accounting/types/AddressRequest.ts index 34ec8ad1d..5825a5032 100644 --- a/src/api/resources/accounting/types/AddressRequest.ts +++ b/src/api/resources/accounting/types/AddressRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Address Object diff --git a/src/api/resources/accounting/types/AddressRequestCountry.ts b/src/api/resources/accounting/types/AddressRequestCountry.ts index 5ad668712..aa33d30e9 100644 --- a/src/api/resources/accounting/types/AddressRequestCountry.ts +++ b/src/api/resources/accounting/types/AddressRequestCountry.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The address's country. diff --git a/src/api/resources/accounting/types/AddressRequestType.ts b/src/api/resources/accounting/types/AddressRequestType.ts index 52b824437..27325d47c 100644 --- a/src/api/resources/accounting/types/AddressRequestType.ts +++ b/src/api/resources/accounting/types/AddressRequestType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The address type. diff --git a/src/api/resources/accounting/types/AddressType.ts b/src/api/resources/accounting/types/AddressType.ts index c1ad97f22..eb826068c 100644 --- a/src/api/resources/accounting/types/AddressType.ts +++ b/src/api/resources/accounting/types/AddressType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The address type. diff --git a/src/api/resources/accounting/types/AuditLogEvent.ts b/src/api/resources/accounting/types/AuditLogEvent.ts index bb537ffe6..b4ae9a8c9 100644 --- a/src/api/resources/accounting/types/AuditLogEvent.ts +++ b/src/api/resources/accounting/types/AuditLogEvent.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AuditLogEvent { id?: string; diff --git a/src/api/resources/accounting/types/AuditLogEventEventType.ts b/src/api/resources/accounting/types/AuditLogEventEventType.ts index b21e4505d..05c0c9c03 100644 --- a/src/api/resources/accounting/types/AuditLogEventEventType.ts +++ b/src/api/resources/accounting/types/AuditLogEventEventType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Designates the type of event that occurred. diff --git a/src/api/resources/accounting/types/AuditLogEventRole.ts b/src/api/resources/accounting/types/AuditLogEventRole.ts index 2fa47e936..405b73324 100644 --- a/src/api/resources/accounting/types/AuditLogEventRole.ts +++ b/src/api/resources/accounting/types/AuditLogEventRole.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. diff --git a/src/api/resources/accounting/types/AvailableActions.ts b/src/api/resources/accounting/types/AvailableActions.ts index 83503baf6..c6bf7b339 100644 --- a/src/api/resources/accounting/types/AvailableActions.ts +++ b/src/api/resources/accounting/types/AvailableActions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The AvailableActions Object diff --git a/src/api/resources/accounting/types/BalanceSheet.ts b/src/api/resources/accounting/types/BalanceSheet.ts index 730d0a0be..41003e632 100644 --- a/src/api/resources/accounting/types/BalanceSheet.ts +++ b/src/api/resources/accounting/types/BalanceSheet.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The BalanceSheet Object diff --git a/src/api/resources/accounting/types/BalanceSheetCompany.ts b/src/api/resources/accounting/types/BalanceSheetCompany.ts index 86fd80b04..f0664342f 100644 --- a/src/api/resources/accounting/types/BalanceSheetCompany.ts +++ b/src/api/resources/accounting/types/BalanceSheetCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * `Company` object for the given `BalanceSheet` object. diff --git a/src/api/resources/accounting/types/BalanceSheetCurrency.ts b/src/api/resources/accounting/types/BalanceSheetCurrency.ts index e65f8e144..45cbed993 100644 --- a/src/api/resources/accounting/types/BalanceSheetCurrency.ts +++ b/src/api/resources/accounting/types/BalanceSheetCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The balance sheet's currency. diff --git a/src/api/resources/accounting/types/CashFlowStatement.ts b/src/api/resources/accounting/types/CashFlowStatement.ts index d5c7bcdb6..cd52b306b 100644 --- a/src/api/resources/accounting/types/CashFlowStatement.ts +++ b/src/api/resources/accounting/types/CashFlowStatement.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The CashFlowStatement Object diff --git a/src/api/resources/accounting/types/CashFlowStatementCompany.ts b/src/api/resources/accounting/types/CashFlowStatementCompany.ts index f620786d6..160c38e24 100644 --- a/src/api/resources/accounting/types/CashFlowStatementCompany.ts +++ b/src/api/resources/accounting/types/CashFlowStatementCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the cash flow statement belongs to. diff --git a/src/api/resources/accounting/types/CashFlowStatementCurrency.ts b/src/api/resources/accounting/types/CashFlowStatementCurrency.ts index e552a14a6..61600481a 100644 --- a/src/api/resources/accounting/types/CashFlowStatementCurrency.ts +++ b/src/api/resources/accounting/types/CashFlowStatementCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The cash flow statement's currency. diff --git a/src/api/resources/accounting/types/CommonModelScopeApi.ts b/src/api/resources/accounting/types/CommonModelScopeApi.ts index 61612ebe1..d5238fac3 100644 --- a/src/api/resources/accounting/types/CommonModelScopeApi.ts +++ b/src/api/resources/accounting/types/CommonModelScopeApi.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CommonModelScopeApi { /** The common models you want to update the scopes for */ diff --git a/src/api/resources/accounting/types/CommonModelScopesBodyRequest.ts b/src/api/resources/accounting/types/CommonModelScopesBodyRequest.ts index 88dad1076..e038159fe 100644 --- a/src/api/resources/accounting/types/CommonModelScopesBodyRequest.ts +++ b/src/api/resources/accounting/types/CommonModelScopesBodyRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CommonModelScopesBodyRequest { modelId: string; diff --git a/src/api/resources/accounting/types/CompanyInfo.ts b/src/api/resources/accounting/types/CompanyInfo.ts index 29f75e2e9..ff849834c 100644 --- a/src/api/resources/accounting/types/CompanyInfo.ts +++ b/src/api/resources/accounting/types/CompanyInfo.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The CompanyInfo Object diff --git a/src/api/resources/accounting/types/CompanyInfoCurrency.ts b/src/api/resources/accounting/types/CompanyInfoCurrency.ts index 16940f508..1c14101c8 100644 --- a/src/api/resources/accounting/types/CompanyInfoCurrency.ts +++ b/src/api/resources/accounting/types/CompanyInfoCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The currency set in the company's accounting platform. diff --git a/src/api/resources/accounting/types/Contact.ts b/src/api/resources/accounting/types/Contact.ts index 08c9db451..dcad4dcb6 100644 --- a/src/api/resources/accounting/types/Contact.ts +++ b/src/api/resources/accounting/types/Contact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Contact Object diff --git a/src/api/resources/accounting/types/ContactAddressesItem.ts b/src/api/resources/accounting/types/ContactAddressesItem.ts index 578f8f350..82ccb6035 100644 --- a/src/api/resources/accounting/types/ContactAddressesItem.ts +++ b/src/api/resources/accounting/types/ContactAddressesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type ContactAddressesItem = string | Merge.accounting.Address; diff --git a/src/api/resources/accounting/types/ContactRequest.ts b/src/api/resources/accounting/types/ContactRequest.ts index 104152c2d..38cb536c8 100644 --- a/src/api/resources/accounting/types/ContactRequest.ts +++ b/src/api/resources/accounting/types/ContactRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Contact Object diff --git a/src/api/resources/accounting/types/ContactRequestAddressesItem.ts b/src/api/resources/accounting/types/ContactRequestAddressesItem.ts index 69224ed3d..d69ed666f 100644 --- a/src/api/resources/accounting/types/ContactRequestAddressesItem.ts +++ b/src/api/resources/accounting/types/ContactRequestAddressesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type ContactRequestAddressesItem = string | Merge.accounting.Address; diff --git a/src/api/resources/accounting/types/ContactRequestStatus.ts b/src/api/resources/accounting/types/ContactRequestStatus.ts index f744de403..6742e3b48 100644 --- a/src/api/resources/accounting/types/ContactRequestStatus.ts +++ b/src/api/resources/accounting/types/ContactRequestStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The contact's status diff --git a/src/api/resources/accounting/types/ContactResponse.ts b/src/api/resources/accounting/types/ContactResponse.ts index 1c9239879..e3e8ce37c 100644 --- a/src/api/resources/accounting/types/ContactResponse.ts +++ b/src/api/resources/accounting/types/ContactResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ContactResponse { model: Merge.accounting.Contact; diff --git a/src/api/resources/accounting/types/ContactStatus.ts b/src/api/resources/accounting/types/ContactStatus.ts index 5b3502b1a..1ecbb50ce 100644 --- a/src/api/resources/accounting/types/ContactStatus.ts +++ b/src/api/resources/accounting/types/ContactStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The contact's status diff --git a/src/api/resources/accounting/types/CreditNote.ts b/src/api/resources/accounting/types/CreditNote.ts index 68aa560b9..0b98cfccd 100644 --- a/src/api/resources/accounting/types/CreditNote.ts +++ b/src/api/resources/accounting/types/CreditNote.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The CreditNote Object diff --git a/src/api/resources/accounting/types/CreditNoteAccountingPeriod.ts b/src/api/resources/accounting/types/CreditNoteAccountingPeriod.ts index f77ef2c0e..38acff34d 100644 --- a/src/api/resources/accounting/types/CreditNoteAccountingPeriod.ts +++ b/src/api/resources/accounting/types/CreditNoteAccountingPeriod.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The accounting period that the CreditNote was generated in. diff --git a/src/api/resources/accounting/types/CreditNoteAppliedPaymentsItem.ts b/src/api/resources/accounting/types/CreditNoteAppliedPaymentsItem.ts index 12765c887..830e4b027 100644 --- a/src/api/resources/accounting/types/CreditNoteAppliedPaymentsItem.ts +++ b/src/api/resources/accounting/types/CreditNoteAppliedPaymentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type CreditNoteAppliedPaymentsItem = string | Merge.accounting.PaymentLineItem; diff --git a/src/api/resources/accounting/types/CreditNoteCompany.ts b/src/api/resources/accounting/types/CreditNoteCompany.ts index 1c370b5ad..b2a6bed41 100644 --- a/src/api/resources/accounting/types/CreditNoteCompany.ts +++ b/src/api/resources/accounting/types/CreditNoteCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the credit note belongs to. diff --git a/src/api/resources/accounting/types/CreditNoteContact.ts b/src/api/resources/accounting/types/CreditNoteContact.ts index ab8792957..f3c1163a5 100644 --- a/src/api/resources/accounting/types/CreditNoteContact.ts +++ b/src/api/resources/accounting/types/CreditNoteContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The credit note's contact. diff --git a/src/api/resources/accounting/types/CreditNoteCurrency.ts b/src/api/resources/accounting/types/CreditNoteCurrency.ts index f3a7865e4..61f74cc0d 100644 --- a/src/api/resources/accounting/types/CreditNoteCurrency.ts +++ b/src/api/resources/accounting/types/CreditNoteCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The credit note's currency. diff --git a/src/api/resources/accounting/types/CreditNoteLineItem.ts b/src/api/resources/accounting/types/CreditNoteLineItem.ts index 190e6d080..18cade257 100644 --- a/src/api/resources/accounting/types/CreditNoteLineItem.ts +++ b/src/api/resources/accounting/types/CreditNoteLineItem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CreditNoteLineItem { id?: string; diff --git a/src/api/resources/accounting/types/CreditNoteLineItemCompany.ts b/src/api/resources/accounting/types/CreditNoteLineItemCompany.ts index 81dab157f..a3e78f246 100644 --- a/src/api/resources/accounting/types/CreditNoteLineItemCompany.ts +++ b/src/api/resources/accounting/types/CreditNoteLineItemCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the credit note belongs to. diff --git a/src/api/resources/accounting/types/CreditNoteLineItemItem.ts b/src/api/resources/accounting/types/CreditNoteLineItemItem.ts index f054651c8..9090dc23f 100644 --- a/src/api/resources/accounting/types/CreditNoteLineItemItem.ts +++ b/src/api/resources/accounting/types/CreditNoteLineItemItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type CreditNoteLineItemItem = string | Merge.accounting.Item; diff --git a/src/api/resources/accounting/types/CreditNotePaymentsItem.ts b/src/api/resources/accounting/types/CreditNotePaymentsItem.ts index 8a2dceefb..ee3214b5b 100644 --- a/src/api/resources/accounting/types/CreditNotePaymentsItem.ts +++ b/src/api/resources/accounting/types/CreditNotePaymentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type CreditNotePaymentsItem = string | Merge.accounting.Payment; diff --git a/src/api/resources/accounting/types/CreditNoteStatus.ts b/src/api/resources/accounting/types/CreditNoteStatus.ts index b42051ac9..50f2b3fea 100644 --- a/src/api/resources/accounting/types/CreditNoteStatus.ts +++ b/src/api/resources/accounting/types/CreditNoteStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The credit note's status. diff --git a/src/api/resources/accounting/types/CreditNoteTrackingCategoriesItem.ts b/src/api/resources/accounting/types/CreditNoteTrackingCategoriesItem.ts index 4d59f18f3..f7c503616 100644 --- a/src/api/resources/accounting/types/CreditNoteTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/CreditNoteTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type CreditNoteTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/DataPassthroughRequest.ts b/src/api/resources/accounting/types/DataPassthroughRequest.ts index 5cdf06e47..6acbb6272 100644 --- a/src/api/resources/accounting/types/DataPassthroughRequest.ts +++ b/src/api/resources/accounting/types/DataPassthroughRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The DataPassthrough Object diff --git a/src/api/resources/accounting/types/DebugModeLog.ts b/src/api/resources/accounting/types/DebugModeLog.ts index 0e2350a95..c19bafb14 100644 --- a/src/api/resources/accounting/types/DebugModeLog.ts +++ b/src/api/resources/accounting/types/DebugModeLog.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface DebugModeLog { logId: string; diff --git a/src/api/resources/accounting/types/ErrorValidationProblem.ts b/src/api/resources/accounting/types/ErrorValidationProblem.ts index 7706db23b..a2aa76daa 100644 --- a/src/api/resources/accounting/types/ErrorValidationProblem.ts +++ b/src/api/resources/accounting/types/ErrorValidationProblem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ErrorValidationProblem { source?: Merge.accounting.ValidationProblemSource; diff --git a/src/api/resources/accounting/types/Expense.ts b/src/api/resources/accounting/types/Expense.ts index f9e06fcb9..258f555dd 100644 --- a/src/api/resources/accounting/types/Expense.ts +++ b/src/api/resources/accounting/types/Expense.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Expense Object diff --git a/src/api/resources/accounting/types/ExpenseAccount.ts b/src/api/resources/accounting/types/ExpenseAccount.ts index 54d9fb9a1..01bb3b629 100644 --- a/src/api/resources/accounting/types/ExpenseAccount.ts +++ b/src/api/resources/accounting/types/ExpenseAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The expense's payment account. diff --git a/src/api/resources/accounting/types/ExpenseAccountingPeriod.ts b/src/api/resources/accounting/types/ExpenseAccountingPeriod.ts index 6c701dfab..1a0551e33 100644 --- a/src/api/resources/accounting/types/ExpenseAccountingPeriod.ts +++ b/src/api/resources/accounting/types/ExpenseAccountingPeriod.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The accounting period that the Expense was generated in. diff --git a/src/api/resources/accounting/types/ExpenseCompany.ts b/src/api/resources/accounting/types/ExpenseCompany.ts index d72b3c273..39d81d1da 100644 --- a/src/api/resources/accounting/types/ExpenseCompany.ts +++ b/src/api/resources/accounting/types/ExpenseCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the expense belongs to. diff --git a/src/api/resources/accounting/types/ExpenseContact.ts b/src/api/resources/accounting/types/ExpenseContact.ts index 26c031143..bbe2e9289 100644 --- a/src/api/resources/accounting/types/ExpenseContact.ts +++ b/src/api/resources/accounting/types/ExpenseContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The expense's contact. diff --git a/src/api/resources/accounting/types/ExpenseCurrency.ts b/src/api/resources/accounting/types/ExpenseCurrency.ts index 9dd147bab..8bf13117e 100644 --- a/src/api/resources/accounting/types/ExpenseCurrency.ts +++ b/src/api/resources/accounting/types/ExpenseCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The expense's currency. diff --git a/src/api/resources/accounting/types/ExpenseLine.ts b/src/api/resources/accounting/types/ExpenseLine.ts index a920f631b..542bb7336 100644 --- a/src/api/resources/accounting/types/ExpenseLine.ts +++ b/src/api/resources/accounting/types/ExpenseLine.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The ExpenseLine Object diff --git a/src/api/resources/accounting/types/ExpenseLineAccount.ts b/src/api/resources/accounting/types/ExpenseLineAccount.ts index d7445016b..7eacd6f94 100644 --- a/src/api/resources/accounting/types/ExpenseLineAccount.ts +++ b/src/api/resources/accounting/types/ExpenseLineAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The expense's payment account. diff --git a/src/api/resources/accounting/types/ExpenseLineContact.ts b/src/api/resources/accounting/types/ExpenseLineContact.ts index 68567bcb7..644111116 100644 --- a/src/api/resources/accounting/types/ExpenseLineContact.ts +++ b/src/api/resources/accounting/types/ExpenseLineContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The expense's contact. diff --git a/src/api/resources/accounting/types/ExpenseLineCurrency.ts b/src/api/resources/accounting/types/ExpenseLineCurrency.ts index 06429e844..5006bd2e5 100644 --- a/src/api/resources/accounting/types/ExpenseLineCurrency.ts +++ b/src/api/resources/accounting/types/ExpenseLineCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The expense line item's currency. diff --git a/src/api/resources/accounting/types/ExpenseLineItem.ts b/src/api/resources/accounting/types/ExpenseLineItem.ts index 60cef96d2..7ff280a8b 100644 --- a/src/api/resources/accounting/types/ExpenseLineItem.ts +++ b/src/api/resources/accounting/types/ExpenseLineItem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The line's item. diff --git a/src/api/resources/accounting/types/ExpenseLineRequest.ts b/src/api/resources/accounting/types/ExpenseLineRequest.ts index f25620845..9f45fa2d4 100644 --- a/src/api/resources/accounting/types/ExpenseLineRequest.ts +++ b/src/api/resources/accounting/types/ExpenseLineRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The ExpenseLine Object diff --git a/src/api/resources/accounting/types/ExpenseLineRequestAccount.ts b/src/api/resources/accounting/types/ExpenseLineRequestAccount.ts index 82fbb90db..c18412f51 100644 --- a/src/api/resources/accounting/types/ExpenseLineRequestAccount.ts +++ b/src/api/resources/accounting/types/ExpenseLineRequestAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The expense's payment account. diff --git a/src/api/resources/accounting/types/ExpenseLineRequestContact.ts b/src/api/resources/accounting/types/ExpenseLineRequestContact.ts index 6b0852aaa..04d6a78d6 100644 --- a/src/api/resources/accounting/types/ExpenseLineRequestContact.ts +++ b/src/api/resources/accounting/types/ExpenseLineRequestContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The expense's contact. diff --git a/src/api/resources/accounting/types/ExpenseLineRequestCurrency.ts b/src/api/resources/accounting/types/ExpenseLineRequestCurrency.ts index e5509d89b..084ac3880 100644 --- a/src/api/resources/accounting/types/ExpenseLineRequestCurrency.ts +++ b/src/api/resources/accounting/types/ExpenseLineRequestCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The expense line item's currency. diff --git a/src/api/resources/accounting/types/ExpenseLineRequestItem.ts b/src/api/resources/accounting/types/ExpenseLineRequestItem.ts index 2cbc28a44..9d448ff0a 100644 --- a/src/api/resources/accounting/types/ExpenseLineRequestItem.ts +++ b/src/api/resources/accounting/types/ExpenseLineRequestItem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The line's item. diff --git a/src/api/resources/accounting/types/ExpenseLineRequestTrackingCategoriesItem.ts b/src/api/resources/accounting/types/ExpenseLineRequestTrackingCategoriesItem.ts index 44da0967d..8a1dd3bc2 100644 --- a/src/api/resources/accounting/types/ExpenseLineRequestTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/ExpenseLineRequestTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type ExpenseLineRequestTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/ExpenseLineRequestTrackingCategory.ts b/src/api/resources/accounting/types/ExpenseLineRequestTrackingCategory.ts index 4412884e5..bb718dfeb 100644 --- a/src/api/resources/accounting/types/ExpenseLineRequestTrackingCategory.ts +++ b/src/api/resources/accounting/types/ExpenseLineRequestTrackingCategory.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type ExpenseLineRequestTrackingCategory = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/ExpenseLineTrackingCategoriesItem.ts b/src/api/resources/accounting/types/ExpenseLineTrackingCategoriesItem.ts index d59591833..8eb1cba6c 100644 --- a/src/api/resources/accounting/types/ExpenseLineTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/ExpenseLineTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type ExpenseLineTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/ExpenseLineTrackingCategory.ts b/src/api/resources/accounting/types/ExpenseLineTrackingCategory.ts index ee844b607..3a2cfec4b 100644 --- a/src/api/resources/accounting/types/ExpenseLineTrackingCategory.ts +++ b/src/api/resources/accounting/types/ExpenseLineTrackingCategory.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type ExpenseLineTrackingCategory = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/ExpenseRequest.ts b/src/api/resources/accounting/types/ExpenseRequest.ts index 2fecadbf8..9b8f98d97 100644 --- a/src/api/resources/accounting/types/ExpenseRequest.ts +++ b/src/api/resources/accounting/types/ExpenseRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Expense Object diff --git a/src/api/resources/accounting/types/ExpenseRequestAccount.ts b/src/api/resources/accounting/types/ExpenseRequestAccount.ts index c4f785b67..5fca7205a 100644 --- a/src/api/resources/accounting/types/ExpenseRequestAccount.ts +++ b/src/api/resources/accounting/types/ExpenseRequestAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The expense's payment account. diff --git a/src/api/resources/accounting/types/ExpenseRequestAccountingPeriod.ts b/src/api/resources/accounting/types/ExpenseRequestAccountingPeriod.ts index 8c92e4640..3a4abca0f 100644 --- a/src/api/resources/accounting/types/ExpenseRequestAccountingPeriod.ts +++ b/src/api/resources/accounting/types/ExpenseRequestAccountingPeriod.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The accounting period that the Expense was generated in. diff --git a/src/api/resources/accounting/types/ExpenseRequestCompany.ts b/src/api/resources/accounting/types/ExpenseRequestCompany.ts index 1044499d4..1b463ec65 100644 --- a/src/api/resources/accounting/types/ExpenseRequestCompany.ts +++ b/src/api/resources/accounting/types/ExpenseRequestCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the expense belongs to. diff --git a/src/api/resources/accounting/types/ExpenseRequestContact.ts b/src/api/resources/accounting/types/ExpenseRequestContact.ts index 04bb20d79..bc9b67018 100644 --- a/src/api/resources/accounting/types/ExpenseRequestContact.ts +++ b/src/api/resources/accounting/types/ExpenseRequestContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The expense's contact. diff --git a/src/api/resources/accounting/types/ExpenseRequestCurrency.ts b/src/api/resources/accounting/types/ExpenseRequestCurrency.ts index a6544c8b8..4c35486e2 100644 --- a/src/api/resources/accounting/types/ExpenseRequestCurrency.ts +++ b/src/api/resources/accounting/types/ExpenseRequestCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The expense's currency. diff --git a/src/api/resources/accounting/types/ExpenseRequestTrackingCategoriesItem.ts b/src/api/resources/accounting/types/ExpenseRequestTrackingCategoriesItem.ts index 861583cf7..fd45f6525 100644 --- a/src/api/resources/accounting/types/ExpenseRequestTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/ExpenseRequestTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type ExpenseRequestTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/ExpenseResponse.ts b/src/api/resources/accounting/types/ExpenseResponse.ts index 760c809c4..1b8a666d8 100644 --- a/src/api/resources/accounting/types/ExpenseResponse.ts +++ b/src/api/resources/accounting/types/ExpenseResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ExpenseResponse { model: Merge.accounting.Expense; diff --git a/src/api/resources/accounting/types/ExpenseTrackingCategoriesItem.ts b/src/api/resources/accounting/types/ExpenseTrackingCategoriesItem.ts index f87c7880c..63ab30822 100644 --- a/src/api/resources/accounting/types/ExpenseTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/ExpenseTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type ExpenseTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/ExternalTargetFieldApiResponse.ts b/src/api/resources/accounting/types/ExternalTargetFieldApiResponse.ts index a14bbb5e1..2cd2a29ec 100644 --- a/src/api/resources/accounting/types/ExternalTargetFieldApiResponse.ts +++ b/src/api/resources/accounting/types/ExternalTargetFieldApiResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ExternalTargetFieldApiResponse { account?: Merge.accounting.ExternalTargetFieldApi[]; diff --git a/src/api/resources/accounting/types/FieldMappingApiInstance.ts b/src/api/resources/accounting/types/FieldMappingApiInstance.ts index 910f35728..d728b17a0 100644 --- a/src/api/resources/accounting/types/FieldMappingApiInstance.ts +++ b/src/api/resources/accounting/types/FieldMappingApiInstance.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstance { id?: string; diff --git a/src/api/resources/accounting/types/FieldMappingApiInstanceRemoteField.ts b/src/api/resources/accounting/types/FieldMappingApiInstanceRemoteField.ts index 9747d6ec8..aa8bb9038 100644 --- a/src/api/resources/accounting/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/api/resources/accounting/types/FieldMappingApiInstanceRemoteField.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstanceRemoteField { remoteKeyName: string; diff --git a/src/api/resources/accounting/types/FieldMappingApiInstanceResponse.ts b/src/api/resources/accounting/types/FieldMappingApiInstanceResponse.ts index 2fd9d964d..ef916fe24 100644 --- a/src/api/resources/accounting/types/FieldMappingApiInstanceResponse.ts +++ b/src/api/resources/accounting/types/FieldMappingApiInstanceResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstanceResponse { account?: Merge.accounting.FieldMappingApiInstance[]; diff --git a/src/api/resources/accounting/types/FieldMappingInstanceResponse.ts b/src/api/resources/accounting/types/FieldMappingInstanceResponse.ts index 1f83f0554..2ed38696f 100644 --- a/src/api/resources/accounting/types/FieldMappingInstanceResponse.ts +++ b/src/api/resources/accounting/types/FieldMappingInstanceResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingInstanceResponse { model: Merge.accounting.FieldMappingApiInstance; diff --git a/src/api/resources/accounting/types/IncomeStatement.ts b/src/api/resources/accounting/types/IncomeStatement.ts index c97fc66d1..db3963be6 100644 --- a/src/api/resources/accounting/types/IncomeStatement.ts +++ b/src/api/resources/accounting/types/IncomeStatement.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The IncomeStatement Object diff --git a/src/api/resources/accounting/types/IncomeStatementCompany.ts b/src/api/resources/accounting/types/IncomeStatementCompany.ts index 5aa5ae37d..4989ad01b 100644 --- a/src/api/resources/accounting/types/IncomeStatementCompany.ts +++ b/src/api/resources/accounting/types/IncomeStatementCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the income statement belongs to. diff --git a/src/api/resources/accounting/types/IncomeStatementCurrency.ts b/src/api/resources/accounting/types/IncomeStatementCurrency.ts index 1b3a53d87..e8b378d97 100644 --- a/src/api/resources/accounting/types/IncomeStatementCurrency.ts +++ b/src/api/resources/accounting/types/IncomeStatementCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The income statement's currency. diff --git a/src/api/resources/accounting/types/IndividualCommonModelScopeDeserializer.ts b/src/api/resources/accounting/types/IndividualCommonModelScopeDeserializer.ts index 123a4fa38..6635c9d2a 100644 --- a/src/api/resources/accounting/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/api/resources/accounting/types/IndividualCommonModelScopeDeserializer.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface IndividualCommonModelScopeDeserializer { modelName: string; diff --git a/src/api/resources/accounting/types/IndividualCommonModelScopeDeserializerRequest.ts b/src/api/resources/accounting/types/IndividualCommonModelScopeDeserializerRequest.ts index 25900c17a..6b0f14973 100644 --- a/src/api/resources/accounting/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/api/resources/accounting/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface IndividualCommonModelScopeDeserializerRequest { modelName: string; diff --git a/src/api/resources/accounting/types/Invoice.ts b/src/api/resources/accounting/types/Invoice.ts index adbdb399f..ca68a5802 100644 --- a/src/api/resources/accounting/types/Invoice.ts +++ b/src/api/resources/accounting/types/Invoice.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Invoice Object diff --git a/src/api/resources/accounting/types/InvoiceAccountingPeriod.ts b/src/api/resources/accounting/types/InvoiceAccountingPeriod.ts index 2c94a7b1f..7501c0631 100644 --- a/src/api/resources/accounting/types/InvoiceAccountingPeriod.ts +++ b/src/api/resources/accounting/types/InvoiceAccountingPeriod.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The accounting period that the Invoice was generated in. diff --git a/src/api/resources/accounting/types/InvoiceAppliedPaymentsItem.ts b/src/api/resources/accounting/types/InvoiceAppliedPaymentsItem.ts index 262feba29..b95ffcc05 100644 --- a/src/api/resources/accounting/types/InvoiceAppliedPaymentsItem.ts +++ b/src/api/resources/accounting/types/InvoiceAppliedPaymentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoiceAppliedPaymentsItem = string | Merge.accounting.PaymentLineItem; diff --git a/src/api/resources/accounting/types/InvoiceCompany.ts b/src/api/resources/accounting/types/InvoiceCompany.ts index dbdc94ea2..c733b313b 100644 --- a/src/api/resources/accounting/types/InvoiceCompany.ts +++ b/src/api/resources/accounting/types/InvoiceCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the invoice belongs to. diff --git a/src/api/resources/accounting/types/InvoiceContact.ts b/src/api/resources/accounting/types/InvoiceContact.ts index cf08440de..5e061f455 100644 --- a/src/api/resources/accounting/types/InvoiceContact.ts +++ b/src/api/resources/accounting/types/InvoiceContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The invoice's contact. diff --git a/src/api/resources/accounting/types/InvoiceCurrency.ts b/src/api/resources/accounting/types/InvoiceCurrency.ts index f369c3b0d..9b878506f 100644 --- a/src/api/resources/accounting/types/InvoiceCurrency.ts +++ b/src/api/resources/accounting/types/InvoiceCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The invoice's currency. diff --git a/src/api/resources/accounting/types/InvoiceLineItem.ts b/src/api/resources/accounting/types/InvoiceLineItem.ts index 93828c172..84b919ce9 100644 --- a/src/api/resources/accounting/types/InvoiceLineItem.ts +++ b/src/api/resources/accounting/types/InvoiceLineItem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The InvoiceLineItem Object diff --git a/src/api/resources/accounting/types/InvoiceLineItemAccount.ts b/src/api/resources/accounting/types/InvoiceLineItemAccount.ts index 403b5a2b8..90e143ce4 100644 --- a/src/api/resources/accounting/types/InvoiceLineItemAccount.ts +++ b/src/api/resources/accounting/types/InvoiceLineItemAccount.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoiceLineItemAccount = string | Merge.accounting.Account; diff --git a/src/api/resources/accounting/types/InvoiceLineItemCurrency.ts b/src/api/resources/accounting/types/InvoiceLineItemCurrency.ts index 39f9306f6..5b2bbb6fd 100644 --- a/src/api/resources/accounting/types/InvoiceLineItemCurrency.ts +++ b/src/api/resources/accounting/types/InvoiceLineItemCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The line item's currency. diff --git a/src/api/resources/accounting/types/InvoiceLineItemItem.ts b/src/api/resources/accounting/types/InvoiceLineItemItem.ts index fb6c41e28..c03a31ceb 100644 --- a/src/api/resources/accounting/types/InvoiceLineItemItem.ts +++ b/src/api/resources/accounting/types/InvoiceLineItemItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoiceLineItemItem = string | Merge.accounting.Item; diff --git a/src/api/resources/accounting/types/InvoiceLineItemRequest.ts b/src/api/resources/accounting/types/InvoiceLineItemRequest.ts index 701a60fa4..12491cc2e 100644 --- a/src/api/resources/accounting/types/InvoiceLineItemRequest.ts +++ b/src/api/resources/accounting/types/InvoiceLineItemRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The InvoiceLineItem Object diff --git a/src/api/resources/accounting/types/InvoiceLineItemRequestAccount.ts b/src/api/resources/accounting/types/InvoiceLineItemRequestAccount.ts index 5a9b2909c..47cb279df 100644 --- a/src/api/resources/accounting/types/InvoiceLineItemRequestAccount.ts +++ b/src/api/resources/accounting/types/InvoiceLineItemRequestAccount.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoiceLineItemRequestAccount = string | Merge.accounting.Account; diff --git a/src/api/resources/accounting/types/InvoiceLineItemRequestCurrency.ts b/src/api/resources/accounting/types/InvoiceLineItemRequestCurrency.ts index 1ad6b4f16..a7e9a606c 100644 --- a/src/api/resources/accounting/types/InvoiceLineItemRequestCurrency.ts +++ b/src/api/resources/accounting/types/InvoiceLineItemRequestCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The line item's currency. diff --git a/src/api/resources/accounting/types/InvoiceLineItemRequestItem.ts b/src/api/resources/accounting/types/InvoiceLineItemRequestItem.ts index 9e78afe53..c6eb571ed 100644 --- a/src/api/resources/accounting/types/InvoiceLineItemRequestItem.ts +++ b/src/api/resources/accounting/types/InvoiceLineItemRequestItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoiceLineItemRequestItem = string | Merge.accounting.Item; diff --git a/src/api/resources/accounting/types/InvoiceLineItemRequestTrackingCategoriesItem.ts b/src/api/resources/accounting/types/InvoiceLineItemRequestTrackingCategoriesItem.ts index c34e02b82..3ba333170 100644 --- a/src/api/resources/accounting/types/InvoiceLineItemRequestTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/InvoiceLineItemRequestTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoiceLineItemRequestTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/InvoiceLineItemRequestTrackingCategory.ts b/src/api/resources/accounting/types/InvoiceLineItemRequestTrackingCategory.ts index 65c2b7bff..2cf849b40 100644 --- a/src/api/resources/accounting/types/InvoiceLineItemRequestTrackingCategory.ts +++ b/src/api/resources/accounting/types/InvoiceLineItemRequestTrackingCategory.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoiceLineItemRequestTrackingCategory = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/InvoiceLineItemTrackingCategoriesItem.ts b/src/api/resources/accounting/types/InvoiceLineItemTrackingCategoriesItem.ts index 740ea7c41..8d72fef57 100644 --- a/src/api/resources/accounting/types/InvoiceLineItemTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/InvoiceLineItemTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoiceLineItemTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/InvoiceLineItemTrackingCategory.ts b/src/api/resources/accounting/types/InvoiceLineItemTrackingCategory.ts index 188e0866a..4bae63165 100644 --- a/src/api/resources/accounting/types/InvoiceLineItemTrackingCategory.ts +++ b/src/api/resources/accounting/types/InvoiceLineItemTrackingCategory.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoiceLineItemTrackingCategory = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/InvoicePaymentsItem.ts b/src/api/resources/accounting/types/InvoicePaymentsItem.ts index e6ef29116..e681ea51f 100644 --- a/src/api/resources/accounting/types/InvoicePaymentsItem.ts +++ b/src/api/resources/accounting/types/InvoicePaymentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoicePaymentsItem = string | Merge.accounting.Payment; diff --git a/src/api/resources/accounting/types/InvoicePurchaseOrdersItem.ts b/src/api/resources/accounting/types/InvoicePurchaseOrdersItem.ts index 443ce635c..ae5321b19 100644 --- a/src/api/resources/accounting/types/InvoicePurchaseOrdersItem.ts +++ b/src/api/resources/accounting/types/InvoicePurchaseOrdersItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoicePurchaseOrdersItem = string | Merge.accounting.PurchaseOrder; diff --git a/src/api/resources/accounting/types/InvoiceRequest.ts b/src/api/resources/accounting/types/InvoiceRequest.ts index ba8d509af..1fb5c944a 100644 --- a/src/api/resources/accounting/types/InvoiceRequest.ts +++ b/src/api/resources/accounting/types/InvoiceRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Invoice Object diff --git a/src/api/resources/accounting/types/InvoiceRequestCompany.ts b/src/api/resources/accounting/types/InvoiceRequestCompany.ts index 846749208..a484ff4bb 100644 --- a/src/api/resources/accounting/types/InvoiceRequestCompany.ts +++ b/src/api/resources/accounting/types/InvoiceRequestCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the invoice belongs to. diff --git a/src/api/resources/accounting/types/InvoiceRequestContact.ts b/src/api/resources/accounting/types/InvoiceRequestContact.ts index 9d2b91616..fdb53bcd4 100644 --- a/src/api/resources/accounting/types/InvoiceRequestContact.ts +++ b/src/api/resources/accounting/types/InvoiceRequestContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The invoice's contact. diff --git a/src/api/resources/accounting/types/InvoiceRequestCurrency.ts b/src/api/resources/accounting/types/InvoiceRequestCurrency.ts index b16dfde64..094049883 100644 --- a/src/api/resources/accounting/types/InvoiceRequestCurrency.ts +++ b/src/api/resources/accounting/types/InvoiceRequestCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The invoice's currency. diff --git a/src/api/resources/accounting/types/InvoiceRequestPaymentsItem.ts b/src/api/resources/accounting/types/InvoiceRequestPaymentsItem.ts index 9fa276847..7b3dc7fc7 100644 --- a/src/api/resources/accounting/types/InvoiceRequestPaymentsItem.ts +++ b/src/api/resources/accounting/types/InvoiceRequestPaymentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoiceRequestPaymentsItem = string | Merge.accounting.Payment; diff --git a/src/api/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.ts b/src/api/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.ts index 41bbe2d8b..0804c7a9b 100644 --- a/src/api/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.ts +++ b/src/api/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoiceRequestPurchaseOrdersItem = string | Merge.accounting.PurchaseOrder; diff --git a/src/api/resources/accounting/types/InvoiceRequestStatus.ts b/src/api/resources/accounting/types/InvoiceRequestStatus.ts index 148b323a3..62f1ddb0f 100644 --- a/src/api/resources/accounting/types/InvoiceRequestStatus.ts +++ b/src/api/resources/accounting/types/InvoiceRequestStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The status of the invoice. diff --git a/src/api/resources/accounting/types/InvoiceRequestTrackingCategoriesItem.ts b/src/api/resources/accounting/types/InvoiceRequestTrackingCategoriesItem.ts index 1a6c91f43..c421fe042 100644 --- a/src/api/resources/accounting/types/InvoiceRequestTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/InvoiceRequestTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoiceRequestTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/InvoiceRequestType.ts b/src/api/resources/accounting/types/InvoiceRequestType.ts index 06741f3d4..9ae10b236 100644 --- a/src/api/resources/accounting/types/InvoiceRequestType.ts +++ b/src/api/resources/accounting/types/InvoiceRequestType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Whether the invoice is an accounts receivable or accounts payable. If `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is `ACCOUNTS_RECEIVABLE`, it is an invoice. diff --git a/src/api/resources/accounting/types/InvoiceResponse.ts b/src/api/resources/accounting/types/InvoiceResponse.ts index fa6d88241..26452dcf6 100644 --- a/src/api/resources/accounting/types/InvoiceResponse.ts +++ b/src/api/resources/accounting/types/InvoiceResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface InvoiceResponse { model: Merge.accounting.Invoice; diff --git a/src/api/resources/accounting/types/InvoiceStatus.ts b/src/api/resources/accounting/types/InvoiceStatus.ts index 47901bbae..8ab14c37d 100644 --- a/src/api/resources/accounting/types/InvoiceStatus.ts +++ b/src/api/resources/accounting/types/InvoiceStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The status of the invoice. diff --git a/src/api/resources/accounting/types/InvoiceTrackingCategoriesItem.ts b/src/api/resources/accounting/types/InvoiceTrackingCategoriesItem.ts index fc5a2921c..6985ede16 100644 --- a/src/api/resources/accounting/types/InvoiceTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/InvoiceTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type InvoiceTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/InvoiceType.ts b/src/api/resources/accounting/types/InvoiceType.ts index 29a35bdce..8700e277d 100644 --- a/src/api/resources/accounting/types/InvoiceType.ts +++ b/src/api/resources/accounting/types/InvoiceType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Whether the invoice is an accounts receivable or accounts payable. If `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is `ACCOUNTS_RECEIVABLE`, it is an invoice. diff --git a/src/api/resources/accounting/types/Issue.ts b/src/api/resources/accounting/types/Issue.ts index 51e84fc3c..f3b69b909 100644 --- a/src/api/resources/accounting/types/Issue.ts +++ b/src/api/resources/accounting/types/Issue.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface Issue { id?: string; diff --git a/src/api/resources/accounting/types/IssueStatus.ts b/src/api/resources/accounting/types/IssueStatus.ts index a0ec99ca1..46c3b1662 100644 --- a/src/api/resources/accounting/types/IssueStatus.ts +++ b/src/api/resources/accounting/types/IssueStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Status of the issue. Options: ('ONGOING', 'RESOLVED') diff --git a/src/api/resources/accounting/types/Item.ts b/src/api/resources/accounting/types/Item.ts index 1363cf305..eb8ec1e93 100644 --- a/src/api/resources/accounting/types/Item.ts +++ b/src/api/resources/accounting/types/Item.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Item Object diff --git a/src/api/resources/accounting/types/ItemCompany.ts b/src/api/resources/accounting/types/ItemCompany.ts index 16635e2b5..05a842831 100644 --- a/src/api/resources/accounting/types/ItemCompany.ts +++ b/src/api/resources/accounting/types/ItemCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the item belongs to. diff --git a/src/api/resources/accounting/types/ItemPurchaseAccount.ts b/src/api/resources/accounting/types/ItemPurchaseAccount.ts index 0256c521a..37bc28a86 100644 --- a/src/api/resources/accounting/types/ItemPurchaseAccount.ts +++ b/src/api/resources/accounting/types/ItemPurchaseAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * References the default account used to record a purchase of the item. diff --git a/src/api/resources/accounting/types/ItemPurchaseTaxRate.ts b/src/api/resources/accounting/types/ItemPurchaseTaxRate.ts index b9550e013..4ebf19eca 100644 --- a/src/api/resources/accounting/types/ItemPurchaseTaxRate.ts +++ b/src/api/resources/accounting/types/ItemPurchaseTaxRate.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The default purchase tax rate for this item. diff --git a/src/api/resources/accounting/types/ItemSalesAccount.ts b/src/api/resources/accounting/types/ItemSalesAccount.ts index 1c1ed01d7..034bc1454 100644 --- a/src/api/resources/accounting/types/ItemSalesAccount.ts +++ b/src/api/resources/accounting/types/ItemSalesAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * References the default account used to record a sale. diff --git a/src/api/resources/accounting/types/ItemSalesTaxRate.ts b/src/api/resources/accounting/types/ItemSalesTaxRate.ts index 849427c09..9457825f2 100644 --- a/src/api/resources/accounting/types/ItemSalesTaxRate.ts +++ b/src/api/resources/accounting/types/ItemSalesTaxRate.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The default sales tax rate for this item. diff --git a/src/api/resources/accounting/types/ItemSchema.ts b/src/api/resources/accounting/types/ItemSchema.ts index d93715c87..e46b7671f 100644 --- a/src/api/resources/accounting/types/ItemSchema.ts +++ b/src/api/resources/accounting/types/ItemSchema.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ItemSchema { itemType?: Merge.accounting.ItemTypeEnum; diff --git a/src/api/resources/accounting/types/ItemStatus.ts b/src/api/resources/accounting/types/ItemStatus.ts index 44dac272a..465507d1e 100644 --- a/src/api/resources/accounting/types/ItemStatus.ts +++ b/src/api/resources/accounting/types/ItemStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The item's status. diff --git a/src/api/resources/accounting/types/JournalEntry.ts b/src/api/resources/accounting/types/JournalEntry.ts index d7c394c9d..fa391b467 100644 --- a/src/api/resources/accounting/types/JournalEntry.ts +++ b/src/api/resources/accounting/types/JournalEntry.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The JournalEntry Object diff --git a/src/api/resources/accounting/types/JournalEntryAccountingPeriod.ts b/src/api/resources/accounting/types/JournalEntryAccountingPeriod.ts index fcaa69e53..4c35125d6 100644 --- a/src/api/resources/accounting/types/JournalEntryAccountingPeriod.ts +++ b/src/api/resources/accounting/types/JournalEntryAccountingPeriod.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The accounting period that the JournalEntry was generated in. diff --git a/src/api/resources/accounting/types/JournalEntryAppliedPaymentsItem.ts b/src/api/resources/accounting/types/JournalEntryAppliedPaymentsItem.ts index ed0f53346..0ac9f6a09 100644 --- a/src/api/resources/accounting/types/JournalEntryAppliedPaymentsItem.ts +++ b/src/api/resources/accounting/types/JournalEntryAppliedPaymentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JournalEntryAppliedPaymentsItem = string | Merge.accounting.PaymentLineItem; diff --git a/src/api/resources/accounting/types/JournalEntryCompany.ts b/src/api/resources/accounting/types/JournalEntryCompany.ts index bf945fe80..9d083a84d 100644 --- a/src/api/resources/accounting/types/JournalEntryCompany.ts +++ b/src/api/resources/accounting/types/JournalEntryCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the journal entry belongs to. diff --git a/src/api/resources/accounting/types/JournalEntryCurrency.ts b/src/api/resources/accounting/types/JournalEntryCurrency.ts index 21be43323..cf1414d8b 100644 --- a/src/api/resources/accounting/types/JournalEntryCurrency.ts +++ b/src/api/resources/accounting/types/JournalEntryCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The journal's currency. diff --git a/src/api/resources/accounting/types/JournalEntryPaymentsItem.ts b/src/api/resources/accounting/types/JournalEntryPaymentsItem.ts index eb74ad6ab..46db764a6 100644 --- a/src/api/resources/accounting/types/JournalEntryPaymentsItem.ts +++ b/src/api/resources/accounting/types/JournalEntryPaymentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JournalEntryPaymentsItem = string | Merge.accounting.Payment; diff --git a/src/api/resources/accounting/types/JournalEntryPostingStatus.ts b/src/api/resources/accounting/types/JournalEntryPostingStatus.ts index 835acc2ed..b59811486 100644 --- a/src/api/resources/accounting/types/JournalEntryPostingStatus.ts +++ b/src/api/resources/accounting/types/JournalEntryPostingStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The journal's posting status. diff --git a/src/api/resources/accounting/types/JournalEntryRequest.ts b/src/api/resources/accounting/types/JournalEntryRequest.ts index 8beedd375..05b3b338a 100644 --- a/src/api/resources/accounting/types/JournalEntryRequest.ts +++ b/src/api/resources/accounting/types/JournalEntryRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The JournalEntry Object diff --git a/src/api/resources/accounting/types/JournalEntryRequestCompany.ts b/src/api/resources/accounting/types/JournalEntryRequestCompany.ts index deeea6670..159373035 100644 --- a/src/api/resources/accounting/types/JournalEntryRequestCompany.ts +++ b/src/api/resources/accounting/types/JournalEntryRequestCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the journal entry belongs to. diff --git a/src/api/resources/accounting/types/JournalEntryRequestCurrency.ts b/src/api/resources/accounting/types/JournalEntryRequestCurrency.ts index 0186f2677..23f0b6fab 100644 --- a/src/api/resources/accounting/types/JournalEntryRequestCurrency.ts +++ b/src/api/resources/accounting/types/JournalEntryRequestCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The journal's currency. diff --git a/src/api/resources/accounting/types/JournalEntryRequestPaymentsItem.ts b/src/api/resources/accounting/types/JournalEntryRequestPaymentsItem.ts index 7d8bfb204..fd99f0904 100644 --- a/src/api/resources/accounting/types/JournalEntryRequestPaymentsItem.ts +++ b/src/api/resources/accounting/types/JournalEntryRequestPaymentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JournalEntryRequestPaymentsItem = string | Merge.accounting.Payment; diff --git a/src/api/resources/accounting/types/JournalEntryRequestPostingStatus.ts b/src/api/resources/accounting/types/JournalEntryRequestPostingStatus.ts index bd150736a..c0f7c571e 100644 --- a/src/api/resources/accounting/types/JournalEntryRequestPostingStatus.ts +++ b/src/api/resources/accounting/types/JournalEntryRequestPostingStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The journal's posting status. diff --git a/src/api/resources/accounting/types/JournalEntryRequestTrackingCategoriesItem.ts b/src/api/resources/accounting/types/JournalEntryRequestTrackingCategoriesItem.ts index d792d1f38..140281d0d 100644 --- a/src/api/resources/accounting/types/JournalEntryRequestTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/JournalEntryRequestTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JournalEntryRequestTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/JournalEntryResponse.ts b/src/api/resources/accounting/types/JournalEntryResponse.ts index 6c1d0e0fa..b10e31245 100644 --- a/src/api/resources/accounting/types/JournalEntryResponse.ts +++ b/src/api/resources/accounting/types/JournalEntryResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface JournalEntryResponse { model: Merge.accounting.JournalEntry; diff --git a/src/api/resources/accounting/types/JournalEntryTrackingCategoriesItem.ts b/src/api/resources/accounting/types/JournalEntryTrackingCategoriesItem.ts index e22edaeaa..0ca210561 100644 --- a/src/api/resources/accounting/types/JournalEntryTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/JournalEntryTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JournalEntryTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/JournalLine.ts b/src/api/resources/accounting/types/JournalLine.ts index ce641355f..db912209a 100644 --- a/src/api/resources/accounting/types/JournalLine.ts +++ b/src/api/resources/accounting/types/JournalLine.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The JournalLine Object diff --git a/src/api/resources/accounting/types/JournalLineAccount.ts b/src/api/resources/accounting/types/JournalLineAccount.ts index f9aa84d74..d322ec104 100644 --- a/src/api/resources/accounting/types/JournalLineAccount.ts +++ b/src/api/resources/accounting/types/JournalLineAccount.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JournalLineAccount = string | Merge.accounting.Account; diff --git a/src/api/resources/accounting/types/JournalLineCurrency.ts b/src/api/resources/accounting/types/JournalLineCurrency.ts index 0bddf483d..e9bfbae46 100644 --- a/src/api/resources/accounting/types/JournalLineCurrency.ts +++ b/src/api/resources/accounting/types/JournalLineCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The journal line item's currency. diff --git a/src/api/resources/accounting/types/JournalLineRequest.ts b/src/api/resources/accounting/types/JournalLineRequest.ts index 5c4a45dce..8f668fc49 100644 --- a/src/api/resources/accounting/types/JournalLineRequest.ts +++ b/src/api/resources/accounting/types/JournalLineRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The JournalLine Object diff --git a/src/api/resources/accounting/types/JournalLineRequestAccount.ts b/src/api/resources/accounting/types/JournalLineRequestAccount.ts index 2eaadc0de..cacb5a853 100644 --- a/src/api/resources/accounting/types/JournalLineRequestAccount.ts +++ b/src/api/resources/accounting/types/JournalLineRequestAccount.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JournalLineRequestAccount = string | Merge.accounting.Account; diff --git a/src/api/resources/accounting/types/JournalLineRequestCurrency.ts b/src/api/resources/accounting/types/JournalLineRequestCurrency.ts index 006c184fa..f73f7b18d 100644 --- a/src/api/resources/accounting/types/JournalLineRequestCurrency.ts +++ b/src/api/resources/accounting/types/JournalLineRequestCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The journal line item's currency. diff --git a/src/api/resources/accounting/types/JournalLineRequestTrackingCategoriesItem.ts b/src/api/resources/accounting/types/JournalLineRequestTrackingCategoriesItem.ts index f642236dc..0edb6c590 100644 --- a/src/api/resources/accounting/types/JournalLineRequestTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/JournalLineRequestTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JournalLineRequestTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/JournalLineRequestTrackingCategory.ts b/src/api/resources/accounting/types/JournalLineRequestTrackingCategory.ts index 8cf029a5c..4cd53f7fc 100644 --- a/src/api/resources/accounting/types/JournalLineRequestTrackingCategory.ts +++ b/src/api/resources/accounting/types/JournalLineRequestTrackingCategory.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JournalLineRequestTrackingCategory = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/JournalLineTrackingCategoriesItem.ts b/src/api/resources/accounting/types/JournalLineTrackingCategoriesItem.ts index 61a52b449..46b6bc26b 100644 --- a/src/api/resources/accounting/types/JournalLineTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/JournalLineTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JournalLineTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/JournalLineTrackingCategory.ts b/src/api/resources/accounting/types/JournalLineTrackingCategory.ts index af99e05af..a1563d197 100644 --- a/src/api/resources/accounting/types/JournalLineTrackingCategory.ts +++ b/src/api/resources/accounting/types/JournalLineTrackingCategory.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JournalLineTrackingCategory = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/MetaResponse.ts b/src/api/resources/accounting/types/MetaResponse.ts index 6f93486b5..2f7d3213b 100644 --- a/src/api/resources/accounting/types/MetaResponse.ts +++ b/src/api/resources/accounting/types/MetaResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface MetaResponse { requestSchema: Record; diff --git a/src/api/resources/accounting/types/MultipartFormFieldRequest.ts b/src/api/resources/accounting/types/MultipartFormFieldRequest.ts index bf1d4155e..10eefc647 100644 --- a/src/api/resources/accounting/types/MultipartFormFieldRequest.ts +++ b/src/api/resources/accounting/types/MultipartFormFieldRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The MultipartFormField Object diff --git a/src/api/resources/accounting/types/MultipartFormFieldRequestEncoding.ts b/src/api/resources/accounting/types/MultipartFormFieldRequestEncoding.ts index 7ff8d1268..31327bda2 100644 --- a/src/api/resources/accounting/types/MultipartFormFieldRequestEncoding.ts +++ b/src/api/resources/accounting/types/MultipartFormFieldRequestEncoding.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The encoding of the value of `data`. Defaults to `RAW` if not defined. diff --git a/src/api/resources/accounting/types/PaginatedAccountDetailsAndActionsList.ts b/src/api/resources/accounting/types/PaginatedAccountDetailsAndActionsList.ts index d495640cd..aefc83059 100644 --- a/src/api/resources/accounting/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/api/resources/accounting/types/PaginatedAccountDetailsAndActionsList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAccountDetailsAndActionsList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedAccountList.ts b/src/api/resources/accounting/types/PaginatedAccountList.ts index a2833efff..d18f0be48 100644 --- a/src/api/resources/accounting/types/PaginatedAccountList.ts +++ b/src/api/resources/accounting/types/PaginatedAccountList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAccountList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedAccountingAttachmentList.ts b/src/api/resources/accounting/types/PaginatedAccountingAttachmentList.ts index 043c751fc..ac14e5930 100644 --- a/src/api/resources/accounting/types/PaginatedAccountingAttachmentList.ts +++ b/src/api/resources/accounting/types/PaginatedAccountingAttachmentList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAccountingAttachmentList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedAccountingPeriodList.ts b/src/api/resources/accounting/types/PaginatedAccountingPeriodList.ts index 1edbecbb1..cf3bd4929 100644 --- a/src/api/resources/accounting/types/PaginatedAccountingPeriodList.ts +++ b/src/api/resources/accounting/types/PaginatedAccountingPeriodList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAccountingPeriodList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedAuditLogEventList.ts b/src/api/resources/accounting/types/PaginatedAuditLogEventList.ts index 8b02b4db5..89371ad31 100644 --- a/src/api/resources/accounting/types/PaginatedAuditLogEventList.ts +++ b/src/api/resources/accounting/types/PaginatedAuditLogEventList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAuditLogEventList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedBalanceSheetList.ts b/src/api/resources/accounting/types/PaginatedBalanceSheetList.ts index cedcd235c..847da821d 100644 --- a/src/api/resources/accounting/types/PaginatedBalanceSheetList.ts +++ b/src/api/resources/accounting/types/PaginatedBalanceSheetList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedBalanceSheetList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedCashFlowStatementList.ts b/src/api/resources/accounting/types/PaginatedCashFlowStatementList.ts index 0d79d34c4..e376d038c 100644 --- a/src/api/resources/accounting/types/PaginatedCashFlowStatementList.ts +++ b/src/api/resources/accounting/types/PaginatedCashFlowStatementList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedCashFlowStatementList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedCompanyInfoList.ts b/src/api/resources/accounting/types/PaginatedCompanyInfoList.ts index b883a754d..97a21a98c 100644 --- a/src/api/resources/accounting/types/PaginatedCompanyInfoList.ts +++ b/src/api/resources/accounting/types/PaginatedCompanyInfoList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedCompanyInfoList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedContactList.ts b/src/api/resources/accounting/types/PaginatedContactList.ts index acde0cdc4..8c5d40fa8 100644 --- a/src/api/resources/accounting/types/PaginatedContactList.ts +++ b/src/api/resources/accounting/types/PaginatedContactList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedContactList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedCreditNoteList.ts b/src/api/resources/accounting/types/PaginatedCreditNoteList.ts index 0839a132f..7d4fe5bcc 100644 --- a/src/api/resources/accounting/types/PaginatedCreditNoteList.ts +++ b/src/api/resources/accounting/types/PaginatedCreditNoteList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedCreditNoteList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedExpenseList.ts b/src/api/resources/accounting/types/PaginatedExpenseList.ts index 1bdeda3a5..e23353b24 100644 --- a/src/api/resources/accounting/types/PaginatedExpenseList.ts +++ b/src/api/resources/accounting/types/PaginatedExpenseList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedExpenseList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedIncomeStatementList.ts b/src/api/resources/accounting/types/PaginatedIncomeStatementList.ts index 876a98f69..79c47681b 100644 --- a/src/api/resources/accounting/types/PaginatedIncomeStatementList.ts +++ b/src/api/resources/accounting/types/PaginatedIncomeStatementList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedIncomeStatementList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedInvoiceList.ts b/src/api/resources/accounting/types/PaginatedInvoiceList.ts index 483374de2..56daffc13 100644 --- a/src/api/resources/accounting/types/PaginatedInvoiceList.ts +++ b/src/api/resources/accounting/types/PaginatedInvoiceList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedInvoiceList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedIssueList.ts b/src/api/resources/accounting/types/PaginatedIssueList.ts index 12c6c3127..6665dc227 100644 --- a/src/api/resources/accounting/types/PaginatedIssueList.ts +++ b/src/api/resources/accounting/types/PaginatedIssueList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedIssueList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedItemList.ts b/src/api/resources/accounting/types/PaginatedItemList.ts index 078d2551d..150cdd908 100644 --- a/src/api/resources/accounting/types/PaginatedItemList.ts +++ b/src/api/resources/accounting/types/PaginatedItemList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedItemList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedJournalEntryList.ts b/src/api/resources/accounting/types/PaginatedJournalEntryList.ts index df77c18fe..7dd8a679b 100644 --- a/src/api/resources/accounting/types/PaginatedJournalEntryList.ts +++ b/src/api/resources/accounting/types/PaginatedJournalEntryList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedJournalEntryList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedPaymentList.ts b/src/api/resources/accounting/types/PaginatedPaymentList.ts index b89ee400f..baefdc7e2 100644 --- a/src/api/resources/accounting/types/PaginatedPaymentList.ts +++ b/src/api/resources/accounting/types/PaginatedPaymentList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedPaymentList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedPurchaseOrderList.ts b/src/api/resources/accounting/types/PaginatedPurchaseOrderList.ts index d14c69f85..4e859bbfa 100644 --- a/src/api/resources/accounting/types/PaginatedPurchaseOrderList.ts +++ b/src/api/resources/accounting/types/PaginatedPurchaseOrderList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedPurchaseOrderList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedRemoteFieldClassList.ts b/src/api/resources/accounting/types/PaginatedRemoteFieldClassList.ts index 0554ab319..134676c08 100644 --- a/src/api/resources/accounting/types/PaginatedRemoteFieldClassList.ts +++ b/src/api/resources/accounting/types/PaginatedRemoteFieldClassList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedRemoteFieldClassList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedSyncStatusList.ts b/src/api/resources/accounting/types/PaginatedSyncStatusList.ts index a4e45748b..9c8c6ec27 100644 --- a/src/api/resources/accounting/types/PaginatedSyncStatusList.ts +++ b/src/api/resources/accounting/types/PaginatedSyncStatusList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedSyncStatusList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedTaxRateList.ts b/src/api/resources/accounting/types/PaginatedTaxRateList.ts index 6b67e5d26..d364c8d3e 100644 --- a/src/api/resources/accounting/types/PaginatedTaxRateList.ts +++ b/src/api/resources/accounting/types/PaginatedTaxRateList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedTaxRateList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedTrackingCategoryList.ts b/src/api/resources/accounting/types/PaginatedTrackingCategoryList.ts index 667f4a1f2..56ff6cf49 100644 --- a/src/api/resources/accounting/types/PaginatedTrackingCategoryList.ts +++ b/src/api/resources/accounting/types/PaginatedTrackingCategoryList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedTrackingCategoryList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedTransactionList.ts b/src/api/resources/accounting/types/PaginatedTransactionList.ts index 09447f2fd..c8c800528 100644 --- a/src/api/resources/accounting/types/PaginatedTransactionList.ts +++ b/src/api/resources/accounting/types/PaginatedTransactionList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedTransactionList { next?: string; diff --git a/src/api/resources/accounting/types/PaginatedVendorCreditList.ts b/src/api/resources/accounting/types/PaginatedVendorCreditList.ts index edbeb037a..7be843292 100644 --- a/src/api/resources/accounting/types/PaginatedVendorCreditList.ts +++ b/src/api/resources/accounting/types/PaginatedVendorCreditList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedVendorCreditList { next?: string; diff --git a/src/api/resources/accounting/types/PatchedPaymentRequest.ts b/src/api/resources/accounting/types/PatchedPaymentRequest.ts index 23874b809..c71977492 100644 --- a/src/api/resources/accounting/types/PatchedPaymentRequest.ts +++ b/src/api/resources/accounting/types/PatchedPaymentRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Payment Object diff --git a/src/api/resources/accounting/types/PatchedPaymentRequestAccount.ts b/src/api/resources/accounting/types/PatchedPaymentRequestAccount.ts index 243892e25..70df32798 100644 --- a/src/api/resources/accounting/types/PatchedPaymentRequestAccount.ts +++ b/src/api/resources/accounting/types/PatchedPaymentRequestAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The supplier’s or customer’s account in which the payment is made. diff --git a/src/api/resources/accounting/types/PatchedPaymentRequestAccountingPeriod.ts b/src/api/resources/accounting/types/PatchedPaymentRequestAccountingPeriod.ts index 2890f696b..5c3ab7757 100644 --- a/src/api/resources/accounting/types/PatchedPaymentRequestAccountingPeriod.ts +++ b/src/api/resources/accounting/types/PatchedPaymentRequestAccountingPeriod.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The accounting period that the Payment was generated in. diff --git a/src/api/resources/accounting/types/PatchedPaymentRequestAppliedToLinesItem.ts b/src/api/resources/accounting/types/PatchedPaymentRequestAppliedToLinesItem.ts index 0e8a978a3..0891a2313 100644 --- a/src/api/resources/accounting/types/PatchedPaymentRequestAppliedToLinesItem.ts +++ b/src/api/resources/accounting/types/PatchedPaymentRequestAppliedToLinesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type PatchedPaymentRequestAppliedToLinesItem = string | Merge.accounting.PaymentLineItem; diff --git a/src/api/resources/accounting/types/PatchedPaymentRequestCompany.ts b/src/api/resources/accounting/types/PatchedPaymentRequestCompany.ts index fd7b9911f..468b48b4c 100644 --- a/src/api/resources/accounting/types/PatchedPaymentRequestCompany.ts +++ b/src/api/resources/accounting/types/PatchedPaymentRequestCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the payment belongs to. diff --git a/src/api/resources/accounting/types/PatchedPaymentRequestContact.ts b/src/api/resources/accounting/types/PatchedPaymentRequestContact.ts index b1bb0f745..1177b5977 100644 --- a/src/api/resources/accounting/types/PatchedPaymentRequestContact.ts +++ b/src/api/resources/accounting/types/PatchedPaymentRequestContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The supplier, or customer involved in the payment. diff --git a/src/api/resources/accounting/types/PatchedPaymentRequestCurrency.ts b/src/api/resources/accounting/types/PatchedPaymentRequestCurrency.ts index cb4617431..a6753d462 100644 --- a/src/api/resources/accounting/types/PatchedPaymentRequestCurrency.ts +++ b/src/api/resources/accounting/types/PatchedPaymentRequestCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The payment's currency. diff --git a/src/api/resources/accounting/types/PatchedPaymentRequestTrackingCategoriesItem.ts b/src/api/resources/accounting/types/PatchedPaymentRequestTrackingCategoriesItem.ts index 88b17d96e..a0dd193e4 100644 --- a/src/api/resources/accounting/types/PatchedPaymentRequestTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/PatchedPaymentRequestTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type PatchedPaymentRequestTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/PatchedPaymentRequestType.ts b/src/api/resources/accounting/types/PatchedPaymentRequestType.ts index 42a8f7681..61dd48c7e 100644 --- a/src/api/resources/accounting/types/PatchedPaymentRequestType.ts +++ b/src/api/resources/accounting/types/PatchedPaymentRequestType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The type of the invoice. diff --git a/src/api/resources/accounting/types/Payment.ts b/src/api/resources/accounting/types/Payment.ts index dabd27223..6e741d735 100644 --- a/src/api/resources/accounting/types/Payment.ts +++ b/src/api/resources/accounting/types/Payment.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Payment Object diff --git a/src/api/resources/accounting/types/PaymentAccount.ts b/src/api/resources/accounting/types/PaymentAccount.ts index 937fe0b83..3386268c9 100644 --- a/src/api/resources/accounting/types/PaymentAccount.ts +++ b/src/api/resources/accounting/types/PaymentAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The supplier’s or customer’s account in which the payment is made. diff --git a/src/api/resources/accounting/types/PaymentAccountingPeriod.ts b/src/api/resources/accounting/types/PaymentAccountingPeriod.ts index b66c37a3f..d0a4aa718 100644 --- a/src/api/resources/accounting/types/PaymentAccountingPeriod.ts +++ b/src/api/resources/accounting/types/PaymentAccountingPeriod.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The accounting period that the Payment was generated in. diff --git a/src/api/resources/accounting/types/PaymentAppliedToLinesItem.ts b/src/api/resources/accounting/types/PaymentAppliedToLinesItem.ts index 03b7b8837..a4f5d3ded 100644 --- a/src/api/resources/accounting/types/PaymentAppliedToLinesItem.ts +++ b/src/api/resources/accounting/types/PaymentAppliedToLinesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type PaymentAppliedToLinesItem = string | Merge.accounting.PaymentLineItem; diff --git a/src/api/resources/accounting/types/PaymentCompany.ts b/src/api/resources/accounting/types/PaymentCompany.ts index 9e719fcef..2dd3164eb 100644 --- a/src/api/resources/accounting/types/PaymentCompany.ts +++ b/src/api/resources/accounting/types/PaymentCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the payment belongs to. diff --git a/src/api/resources/accounting/types/PaymentContact.ts b/src/api/resources/accounting/types/PaymentContact.ts index 22e85fd3e..6fd166411 100644 --- a/src/api/resources/accounting/types/PaymentContact.ts +++ b/src/api/resources/accounting/types/PaymentContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The supplier, or customer involved in the payment. diff --git a/src/api/resources/accounting/types/PaymentCurrency.ts b/src/api/resources/accounting/types/PaymentCurrency.ts index 19ae1fed1..14422ce2f 100644 --- a/src/api/resources/accounting/types/PaymentCurrency.ts +++ b/src/api/resources/accounting/types/PaymentCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The payment's currency. diff --git a/src/api/resources/accounting/types/PaymentLineItemRequest.ts b/src/api/resources/accounting/types/PaymentLineItemRequest.ts index 92cdcc96a..f62af2139 100644 --- a/src/api/resources/accounting/types/PaymentLineItemRequest.ts +++ b/src/api/resources/accounting/types/PaymentLineItemRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The PaymentLineItem Object diff --git a/src/api/resources/accounting/types/PaymentRequest.ts b/src/api/resources/accounting/types/PaymentRequest.ts index 39629652a..7a5a6f161 100644 --- a/src/api/resources/accounting/types/PaymentRequest.ts +++ b/src/api/resources/accounting/types/PaymentRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Payment Object diff --git a/src/api/resources/accounting/types/PaymentRequestAccount.ts b/src/api/resources/accounting/types/PaymentRequestAccount.ts index ccbe17370..003e30679 100644 --- a/src/api/resources/accounting/types/PaymentRequestAccount.ts +++ b/src/api/resources/accounting/types/PaymentRequestAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The supplier’s or customer’s account in which the payment is made. diff --git a/src/api/resources/accounting/types/PaymentRequestAccountingPeriod.ts b/src/api/resources/accounting/types/PaymentRequestAccountingPeriod.ts index 23ba90377..e056785cf 100644 --- a/src/api/resources/accounting/types/PaymentRequestAccountingPeriod.ts +++ b/src/api/resources/accounting/types/PaymentRequestAccountingPeriod.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The accounting period that the Payment was generated in. diff --git a/src/api/resources/accounting/types/PaymentRequestAppliedToLinesItem.ts b/src/api/resources/accounting/types/PaymentRequestAppliedToLinesItem.ts index b6087b45c..ac3c84aa2 100644 --- a/src/api/resources/accounting/types/PaymentRequestAppliedToLinesItem.ts +++ b/src/api/resources/accounting/types/PaymentRequestAppliedToLinesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type PaymentRequestAppliedToLinesItem = string | Merge.accounting.PaymentLineItemRequest; diff --git a/src/api/resources/accounting/types/PaymentRequestCompany.ts b/src/api/resources/accounting/types/PaymentRequestCompany.ts index a2ef709ea..52de3aa26 100644 --- a/src/api/resources/accounting/types/PaymentRequestCompany.ts +++ b/src/api/resources/accounting/types/PaymentRequestCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the payment belongs to. diff --git a/src/api/resources/accounting/types/PaymentRequestContact.ts b/src/api/resources/accounting/types/PaymentRequestContact.ts index bc6d09c56..4c07d98f0 100644 --- a/src/api/resources/accounting/types/PaymentRequestContact.ts +++ b/src/api/resources/accounting/types/PaymentRequestContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The supplier, or customer involved in the payment. diff --git a/src/api/resources/accounting/types/PaymentRequestCurrency.ts b/src/api/resources/accounting/types/PaymentRequestCurrency.ts index 7b510d7a9..b1e40c593 100644 --- a/src/api/resources/accounting/types/PaymentRequestCurrency.ts +++ b/src/api/resources/accounting/types/PaymentRequestCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The payment's currency. diff --git a/src/api/resources/accounting/types/PaymentRequestTrackingCategoriesItem.ts b/src/api/resources/accounting/types/PaymentRequestTrackingCategoriesItem.ts index ce06a3c44..1120b8538 100644 --- a/src/api/resources/accounting/types/PaymentRequestTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/PaymentRequestTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type PaymentRequestTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/PaymentRequestType.ts b/src/api/resources/accounting/types/PaymentRequestType.ts index 09560dd2d..2eff4cadb 100644 --- a/src/api/resources/accounting/types/PaymentRequestType.ts +++ b/src/api/resources/accounting/types/PaymentRequestType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The type of the invoice. diff --git a/src/api/resources/accounting/types/PaymentResponse.ts b/src/api/resources/accounting/types/PaymentResponse.ts index 18a6c1920..57f508e77 100644 --- a/src/api/resources/accounting/types/PaymentResponse.ts +++ b/src/api/resources/accounting/types/PaymentResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaymentResponse { model: Merge.accounting.Payment; diff --git a/src/api/resources/accounting/types/PaymentTrackingCategoriesItem.ts b/src/api/resources/accounting/types/PaymentTrackingCategoriesItem.ts index 705cf561a..19e0c499a 100644 --- a/src/api/resources/accounting/types/PaymentTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/PaymentTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type PaymentTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/PaymentType.ts b/src/api/resources/accounting/types/PaymentType.ts index 30f05f410..a56aa6058 100644 --- a/src/api/resources/accounting/types/PaymentType.ts +++ b/src/api/resources/accounting/types/PaymentType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The type of the invoice. diff --git a/src/api/resources/accounting/types/PurchaseOrder.ts b/src/api/resources/accounting/types/PurchaseOrder.ts index de34c05ff..af15cf6ea 100644 --- a/src/api/resources/accounting/types/PurchaseOrder.ts +++ b/src/api/resources/accounting/types/PurchaseOrder.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The PurchaseOrder Object diff --git a/src/api/resources/accounting/types/PurchaseOrderAccountingPeriod.ts b/src/api/resources/accounting/types/PurchaseOrderAccountingPeriod.ts index e6c31b883..5dbbfcc19 100644 --- a/src/api/resources/accounting/types/PurchaseOrderAccountingPeriod.ts +++ b/src/api/resources/accounting/types/PurchaseOrderAccountingPeriod.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The accounting period that the PurchaseOrder was generated in. diff --git a/src/api/resources/accounting/types/PurchaseOrderCompany.ts b/src/api/resources/accounting/types/PurchaseOrderCompany.ts index 1e5beb3ea..32c9cf2b8 100644 --- a/src/api/resources/accounting/types/PurchaseOrderCompany.ts +++ b/src/api/resources/accounting/types/PurchaseOrderCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the purchase order belongs to. diff --git a/src/api/resources/accounting/types/PurchaseOrderCurrency.ts b/src/api/resources/accounting/types/PurchaseOrderCurrency.ts index 3f5687846..ee78c87da 100644 --- a/src/api/resources/accounting/types/PurchaseOrderCurrency.ts +++ b/src/api/resources/accounting/types/PurchaseOrderCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The purchase order's currency. diff --git a/src/api/resources/accounting/types/PurchaseOrderDeliveryAddress.ts b/src/api/resources/accounting/types/PurchaseOrderDeliveryAddress.ts index 7d662db8b..301a5021f 100644 --- a/src/api/resources/accounting/types/PurchaseOrderDeliveryAddress.ts +++ b/src/api/resources/accounting/types/PurchaseOrderDeliveryAddress.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The purchase order's delivery address. diff --git a/src/api/resources/accounting/types/PurchaseOrderLineItem.ts b/src/api/resources/accounting/types/PurchaseOrderLineItem.ts index 5f3a5265a..f88543e0c 100644 --- a/src/api/resources/accounting/types/PurchaseOrderLineItem.ts +++ b/src/api/resources/accounting/types/PurchaseOrderLineItem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The PurchaseOrderLineItem Object diff --git a/src/api/resources/accounting/types/PurchaseOrderLineItemCurrency.ts b/src/api/resources/accounting/types/PurchaseOrderLineItemCurrency.ts index 4bcb78d16..ea2b572e6 100644 --- a/src/api/resources/accounting/types/PurchaseOrderLineItemCurrency.ts +++ b/src/api/resources/accounting/types/PurchaseOrderLineItemCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The purchase order line item's currency. diff --git a/src/api/resources/accounting/types/PurchaseOrderLineItemItem.ts b/src/api/resources/accounting/types/PurchaseOrderLineItemItem.ts index bd708ddc8..e8857e0c5 100644 --- a/src/api/resources/accounting/types/PurchaseOrderLineItemItem.ts +++ b/src/api/resources/accounting/types/PurchaseOrderLineItemItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type PurchaseOrderLineItemItem = string | Merge.accounting.Item; diff --git a/src/api/resources/accounting/types/PurchaseOrderLineItemRequest.ts b/src/api/resources/accounting/types/PurchaseOrderLineItemRequest.ts index f904b0508..9ce2b6e78 100644 --- a/src/api/resources/accounting/types/PurchaseOrderLineItemRequest.ts +++ b/src/api/resources/accounting/types/PurchaseOrderLineItemRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The PurchaseOrderLineItem Object diff --git a/src/api/resources/accounting/types/PurchaseOrderLineItemRequestCurrency.ts b/src/api/resources/accounting/types/PurchaseOrderLineItemRequestCurrency.ts index 4cb006f2e..6ca8a2f6b 100644 --- a/src/api/resources/accounting/types/PurchaseOrderLineItemRequestCurrency.ts +++ b/src/api/resources/accounting/types/PurchaseOrderLineItemRequestCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The purchase order line item's currency. diff --git a/src/api/resources/accounting/types/PurchaseOrderLineItemRequestItem.ts b/src/api/resources/accounting/types/PurchaseOrderLineItemRequestItem.ts index 93340c399..68139245b 100644 --- a/src/api/resources/accounting/types/PurchaseOrderLineItemRequestItem.ts +++ b/src/api/resources/accounting/types/PurchaseOrderLineItemRequestItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type PurchaseOrderLineItemRequestItem = string | Merge.accounting.Item; diff --git a/src/api/resources/accounting/types/PurchaseOrderRequest.ts b/src/api/resources/accounting/types/PurchaseOrderRequest.ts index 41799befb..89c312227 100644 --- a/src/api/resources/accounting/types/PurchaseOrderRequest.ts +++ b/src/api/resources/accounting/types/PurchaseOrderRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The PurchaseOrder Object diff --git a/src/api/resources/accounting/types/PurchaseOrderRequestCompany.ts b/src/api/resources/accounting/types/PurchaseOrderRequestCompany.ts index 4fec9b0fb..b90b4c74c 100644 --- a/src/api/resources/accounting/types/PurchaseOrderRequestCompany.ts +++ b/src/api/resources/accounting/types/PurchaseOrderRequestCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the purchase order belongs to. diff --git a/src/api/resources/accounting/types/PurchaseOrderRequestCurrency.ts b/src/api/resources/accounting/types/PurchaseOrderRequestCurrency.ts index d55255f18..66fd93dfa 100644 --- a/src/api/resources/accounting/types/PurchaseOrderRequestCurrency.ts +++ b/src/api/resources/accounting/types/PurchaseOrderRequestCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The purchase order's currency. diff --git a/src/api/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.ts b/src/api/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.ts index 38c0ccbb2..df51b94a8 100644 --- a/src/api/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.ts +++ b/src/api/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The purchase order's delivery address. diff --git a/src/api/resources/accounting/types/PurchaseOrderRequestStatus.ts b/src/api/resources/accounting/types/PurchaseOrderRequestStatus.ts index 8edd81495..6000857af 100644 --- a/src/api/resources/accounting/types/PurchaseOrderRequestStatus.ts +++ b/src/api/resources/accounting/types/PurchaseOrderRequestStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The purchase order's status. diff --git a/src/api/resources/accounting/types/PurchaseOrderRequestTrackingCategoriesItem.ts b/src/api/resources/accounting/types/PurchaseOrderRequestTrackingCategoriesItem.ts index 93866cf21..f5f5fc693 100644 --- a/src/api/resources/accounting/types/PurchaseOrderRequestTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/PurchaseOrderRequestTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type PurchaseOrderRequestTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/PurchaseOrderRequestVendor.ts b/src/api/resources/accounting/types/PurchaseOrderRequestVendor.ts index 64d383f34..6b74cd53c 100644 --- a/src/api/resources/accounting/types/PurchaseOrderRequestVendor.ts +++ b/src/api/resources/accounting/types/PurchaseOrderRequestVendor.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The party fulfilling the purchase order. diff --git a/src/api/resources/accounting/types/PurchaseOrderResponse.ts b/src/api/resources/accounting/types/PurchaseOrderResponse.ts index 29fdb2d74..db56f416c 100644 --- a/src/api/resources/accounting/types/PurchaseOrderResponse.ts +++ b/src/api/resources/accounting/types/PurchaseOrderResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PurchaseOrderResponse { model: Merge.accounting.PurchaseOrder; diff --git a/src/api/resources/accounting/types/PurchaseOrderStatus.ts b/src/api/resources/accounting/types/PurchaseOrderStatus.ts index f8b342034..26512b7f8 100644 --- a/src/api/resources/accounting/types/PurchaseOrderStatus.ts +++ b/src/api/resources/accounting/types/PurchaseOrderStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The purchase order's status. diff --git a/src/api/resources/accounting/types/PurchaseOrderTrackingCategoriesItem.ts b/src/api/resources/accounting/types/PurchaseOrderTrackingCategoriesItem.ts index 10a9865f6..bb48930c7 100644 --- a/src/api/resources/accounting/types/PurchaseOrderTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/PurchaseOrderTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type PurchaseOrderTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/PurchaseOrderVendor.ts b/src/api/resources/accounting/types/PurchaseOrderVendor.ts index b0f265242..33acc57ff 100644 --- a/src/api/resources/accounting/types/PurchaseOrderVendor.ts +++ b/src/api/resources/accounting/types/PurchaseOrderVendor.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The party fulfilling the purchase order. diff --git a/src/api/resources/accounting/types/RemoteField.ts b/src/api/resources/accounting/types/RemoteField.ts index 17afe45bf..24dca01a4 100644 --- a/src/api/resources/accounting/types/RemoteField.ts +++ b/src/api/resources/accounting/types/RemoteField.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteField { remoteFieldClass: Merge.accounting.RemoteFieldClass; diff --git a/src/api/resources/accounting/types/RemoteFieldApi.ts b/src/api/resources/accounting/types/RemoteFieldApi.ts index f95db3479..e6258b4ea 100644 --- a/src/api/resources/accounting/types/RemoteFieldApi.ts +++ b/src/api/resources/accounting/types/RemoteFieldApi.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldApi { schema: Record; diff --git a/src/api/resources/accounting/types/RemoteFieldApiResponse.ts b/src/api/resources/accounting/types/RemoteFieldApiResponse.ts index e71c2e9c4..df66dfa5a 100644 --- a/src/api/resources/accounting/types/RemoteFieldApiResponse.ts +++ b/src/api/resources/accounting/types/RemoteFieldApiResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldApiResponse { account?: Merge.accounting.RemoteFieldApi[]; diff --git a/src/api/resources/accounting/types/RemoteFieldClass.ts b/src/api/resources/accounting/types/RemoteFieldClass.ts index 620f5459d..98df4fcfd 100644 --- a/src/api/resources/accounting/types/RemoteFieldClass.ts +++ b/src/api/resources/accounting/types/RemoteFieldClass.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldClass { id?: string; diff --git a/src/api/resources/accounting/types/RemoteFieldRequest.ts b/src/api/resources/accounting/types/RemoteFieldRequest.ts index f6fd4f827..82e17da26 100644 --- a/src/api/resources/accounting/types/RemoteFieldRequest.ts +++ b/src/api/resources/accounting/types/RemoteFieldRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldRequest { remoteFieldClass: Merge.accounting.RemoteFieldRequestRemoteFieldClass; diff --git a/src/api/resources/accounting/types/RemoteFieldRequestRemoteFieldClass.ts b/src/api/resources/accounting/types/RemoteFieldRequestRemoteFieldClass.ts index 26a8b5653..00bc930cb 100644 --- a/src/api/resources/accounting/types/RemoteFieldRequestRemoteFieldClass.ts +++ b/src/api/resources/accounting/types/RemoteFieldRequestRemoteFieldClass.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type RemoteFieldRequestRemoteFieldClass = string | Merge.accounting.RemoteFieldClass; diff --git a/src/api/resources/accounting/types/RemoteResponse.ts b/src/api/resources/accounting/types/RemoteResponse.ts index c45dca9ea..83591ff55 100644 --- a/src/api/resources/accounting/types/RemoteResponse.ts +++ b/src/api/resources/accounting/types/RemoteResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The RemoteResponse Object diff --git a/src/api/resources/accounting/types/SyncStatus.ts b/src/api/resources/accounting/types/SyncStatus.ts index 1dd178af6..865dbe788 100644 --- a/src/api/resources/accounting/types/SyncStatus.ts +++ b/src/api/resources/accounting/types/SyncStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The SyncStatus Object diff --git a/src/api/resources/accounting/types/TaxComponent.ts b/src/api/resources/accounting/types/TaxComponent.ts index a91421a6f..4f3b36816 100644 --- a/src/api/resources/accounting/types/TaxComponent.ts +++ b/src/api/resources/accounting/types/TaxComponent.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The TaxRate Object diff --git a/src/api/resources/accounting/types/TaxComponentComponentType.ts b/src/api/resources/accounting/types/TaxComponentComponentType.ts index 356853e6d..ec2a0adb7 100644 --- a/src/api/resources/accounting/types/TaxComponentComponentType.ts +++ b/src/api/resources/accounting/types/TaxComponentComponentType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Returns PURCHASE if the tax component corresponds to a purchase tax or SALES if the tax component corresponds to a sales tax. diff --git a/src/api/resources/accounting/types/TaxRate.ts b/src/api/resources/accounting/types/TaxRate.ts index e6fe37102..3db8e6cf8 100644 --- a/src/api/resources/accounting/types/TaxRate.ts +++ b/src/api/resources/accounting/types/TaxRate.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The TaxRate Object diff --git a/src/api/resources/accounting/types/TaxRateCompany.ts b/src/api/resources/accounting/types/TaxRateCompany.ts index 3a4724be6..32bda4e6c 100644 --- a/src/api/resources/accounting/types/TaxRateCompany.ts +++ b/src/api/resources/accounting/types/TaxRateCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The subsidiary that the tax rate belongs to (in the case of multi-entity systems). diff --git a/src/api/resources/accounting/types/TaxRateStatus.ts b/src/api/resources/accounting/types/TaxRateStatus.ts index 1841bb410..b00538d03 100644 --- a/src/api/resources/accounting/types/TaxRateStatus.ts +++ b/src/api/resources/accounting/types/TaxRateStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The tax rate’s status - `ACTIVE` if an active tax rate, `ARCHIVED` if not active. diff --git a/src/api/resources/accounting/types/TaxRateTaxComponentsItem.ts b/src/api/resources/accounting/types/TaxRateTaxComponentsItem.ts index 114855534..975c5c3d1 100644 --- a/src/api/resources/accounting/types/TaxRateTaxComponentsItem.ts +++ b/src/api/resources/accounting/types/TaxRateTaxComponentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type TaxRateTaxComponentsItem = string | Merge.accounting.TaxComponent; diff --git a/src/api/resources/accounting/types/TrackingCategory.ts b/src/api/resources/accounting/types/TrackingCategory.ts index 2870015fc..cc3c60224 100644 --- a/src/api/resources/accounting/types/TrackingCategory.ts +++ b/src/api/resources/accounting/types/TrackingCategory.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The TrackingCategory Object diff --git a/src/api/resources/accounting/types/TrackingCategoryCategoryType.ts b/src/api/resources/accounting/types/TrackingCategoryCategoryType.ts index 69bf1aecd..947c28af8 100644 --- a/src/api/resources/accounting/types/TrackingCategoryCategoryType.ts +++ b/src/api/resources/accounting/types/TrackingCategoryCategoryType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The tracking category’s type. diff --git a/src/api/resources/accounting/types/TrackingCategoryCompany.ts b/src/api/resources/accounting/types/TrackingCategoryCompany.ts index ba0658209..a5a6a6b38 100644 --- a/src/api/resources/accounting/types/TrackingCategoryCompany.ts +++ b/src/api/resources/accounting/types/TrackingCategoryCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the tracking category belongs to. diff --git a/src/api/resources/accounting/types/TrackingCategoryStatus.ts b/src/api/resources/accounting/types/TrackingCategoryStatus.ts index 8b6b32567..b8d457d65 100644 --- a/src/api/resources/accounting/types/TrackingCategoryStatus.ts +++ b/src/api/resources/accounting/types/TrackingCategoryStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The tracking category's status. diff --git a/src/api/resources/accounting/types/Transaction.ts b/src/api/resources/accounting/types/Transaction.ts index ebb8a370b..f9897b79e 100644 --- a/src/api/resources/accounting/types/Transaction.ts +++ b/src/api/resources/accounting/types/Transaction.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Transaction Object diff --git a/src/api/resources/accounting/types/TransactionAccount.ts b/src/api/resources/accounting/types/TransactionAccount.ts index 08612469a..fb766d22f 100644 --- a/src/api/resources/accounting/types/TransactionAccount.ts +++ b/src/api/resources/accounting/types/TransactionAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The transaction's account. diff --git a/src/api/resources/accounting/types/TransactionAccountingPeriod.ts b/src/api/resources/accounting/types/TransactionAccountingPeriod.ts index f95edd606..ded76182d 100644 --- a/src/api/resources/accounting/types/TransactionAccountingPeriod.ts +++ b/src/api/resources/accounting/types/TransactionAccountingPeriod.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The accounting period that the Transaction was generated in. diff --git a/src/api/resources/accounting/types/TransactionContact.ts b/src/api/resources/accounting/types/TransactionContact.ts index 711cc1d02..81cf1cf13 100644 --- a/src/api/resources/accounting/types/TransactionContact.ts +++ b/src/api/resources/accounting/types/TransactionContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The contact to whom the transaction relates to. diff --git a/src/api/resources/accounting/types/TransactionCurrency.ts b/src/api/resources/accounting/types/TransactionCurrency.ts index 6ed480665..09e333249 100644 --- a/src/api/resources/accounting/types/TransactionCurrency.ts +++ b/src/api/resources/accounting/types/TransactionCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The transaction's currency. diff --git a/src/api/resources/accounting/types/TransactionLineItem.ts b/src/api/resources/accounting/types/TransactionLineItem.ts index 177dc0398..1364c705f 100644 --- a/src/api/resources/accounting/types/TransactionLineItem.ts +++ b/src/api/resources/accounting/types/TransactionLineItem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The TransactionLineItem Object diff --git a/src/api/resources/accounting/types/TransactionLineItemCurrency.ts b/src/api/resources/accounting/types/TransactionLineItemCurrency.ts index 89fe36a91..9e58a239d 100644 --- a/src/api/resources/accounting/types/TransactionLineItemCurrency.ts +++ b/src/api/resources/accounting/types/TransactionLineItemCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The line item's currency. diff --git a/src/api/resources/accounting/types/TransactionLineItemItem.ts b/src/api/resources/accounting/types/TransactionLineItemItem.ts index 24ff52e39..a10c05b4b 100644 --- a/src/api/resources/accounting/types/TransactionLineItemItem.ts +++ b/src/api/resources/accounting/types/TransactionLineItemItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type TransactionLineItemItem = string | Merge.accounting.Item; diff --git a/src/api/resources/accounting/types/TransactionTrackingCategoriesItem.ts b/src/api/resources/accounting/types/TransactionTrackingCategoriesItem.ts index ae75f6263..11a5ca684 100644 --- a/src/api/resources/accounting/types/TransactionTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/TransactionTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type TransactionTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/VendorCredit.ts b/src/api/resources/accounting/types/VendorCredit.ts index 880a9ce4f..24485d39c 100644 --- a/src/api/resources/accounting/types/VendorCredit.ts +++ b/src/api/resources/accounting/types/VendorCredit.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The VendorCredit Object diff --git a/src/api/resources/accounting/types/VendorCreditAccountingPeriod.ts b/src/api/resources/accounting/types/VendorCreditAccountingPeriod.ts index 97e154218..d362858ae 100644 --- a/src/api/resources/accounting/types/VendorCreditAccountingPeriod.ts +++ b/src/api/resources/accounting/types/VendorCreditAccountingPeriod.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The accounting period that the VendorCredit was generated in. diff --git a/src/api/resources/accounting/types/VendorCreditCompany.ts b/src/api/resources/accounting/types/VendorCreditCompany.ts index 6996aaaca..dd7d1bdb9 100644 --- a/src/api/resources/accounting/types/VendorCreditCompany.ts +++ b/src/api/resources/accounting/types/VendorCreditCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The company the vendor credit belongs to. diff --git a/src/api/resources/accounting/types/VendorCreditCurrency.ts b/src/api/resources/accounting/types/VendorCreditCurrency.ts index 5847354c9..9f742336f 100644 --- a/src/api/resources/accounting/types/VendorCreditCurrency.ts +++ b/src/api/resources/accounting/types/VendorCreditCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The vendor credit's currency. diff --git a/src/api/resources/accounting/types/VendorCreditLine.ts b/src/api/resources/accounting/types/VendorCreditLine.ts index 30cf6d2c2..c6a2ef64a 100644 --- a/src/api/resources/accounting/types/VendorCreditLine.ts +++ b/src/api/resources/accounting/types/VendorCreditLine.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The VendorCreditLine Object diff --git a/src/api/resources/accounting/types/VendorCreditLineAccount.ts b/src/api/resources/accounting/types/VendorCreditLineAccount.ts index 143644a3f..2324994ea 100644 --- a/src/api/resources/accounting/types/VendorCreditLineAccount.ts +++ b/src/api/resources/accounting/types/VendorCreditLineAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The line's account. diff --git a/src/api/resources/accounting/types/VendorCreditTrackingCategoriesItem.ts b/src/api/resources/accounting/types/VendorCreditTrackingCategoriesItem.ts index ffb5f7587..eeadf9b8d 100644 --- a/src/api/resources/accounting/types/VendorCreditTrackingCategoriesItem.ts +++ b/src/api/resources/accounting/types/VendorCreditTrackingCategoriesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type VendorCreditTrackingCategoriesItem = string | Merge.accounting.TrackingCategory; diff --git a/src/api/resources/accounting/types/VendorCreditVendor.ts b/src/api/resources/accounting/types/VendorCreditVendor.ts index 39aac5f3c..b5c4e8574 100644 --- a/src/api/resources/accounting/types/VendorCreditVendor.ts +++ b/src/api/resources/accounting/types/VendorCreditVendor.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The vendor that owes the gift or refund. diff --git a/src/api/resources/accounting/types/WarningValidationProblem.ts b/src/api/resources/accounting/types/WarningValidationProblem.ts index 69a8ba258..1c6765312 100644 --- a/src/api/resources/accounting/types/WarningValidationProblem.ts +++ b/src/api/resources/accounting/types/WarningValidationProblem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface WarningValidationProblem { source?: Merge.accounting.ValidationProblemSource; diff --git a/src/api/resources/ats/client/Client.ts b/src/api/resources/ats/client/Client.ts index f48655609..53ce4f38f 100644 --- a/src/api/resources/ats/client/Client.ts +++ b/src/api/resources/ats/client/Client.ts @@ -42,13 +42,22 @@ export declare namespace Ats { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } diff --git a/src/api/resources/ats/resources/accountDetails/client/Client.ts b/src/api/resources/ats/resources/accountDetails/client/Client.ts index bb332f027..170b56d7b 100644 --- a/src/api/resources/ats/resources/accountDetails/client/Client.ts +++ b/src/api/resources/ats/resources/accountDetails/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AccountDetails { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class AccountDetails { /** * Get details for a linked account. * + * @param {AccountDetails.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.accountDetails.retrieve() + * await client.ats.accountDetails.retrieve() */ public async retrieve(requestOptions?: AccountDetails.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class AccountDetails { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.AccountDetails.parseOrThrow(_response.body, { + return serializers.ats.AccountDetails.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class AccountDetails { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/account-details."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -85,7 +102,7 @@ export class AccountDetails { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/accountToken/client/Client.ts b/src/api/resources/ats/resources/accountToken/client/Client.ts index 4b4a4640d..30e7aeef1 100644 --- a/src/api/resources/ats/resources/accountToken/client/Client.ts +++ b/src/api/resources/ats/resources/accountToken/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AccountToken { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class AccountToken { /** * Returns the account token for the end user with the provided public token. * + * @param {string} publicToken + * @param {AccountToken.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.accountToken.retrieve("public_token") + * await client.ats.accountToken.retrieve("public_token") */ public async retrieve( publicToken: string, @@ -39,7 +51,7 @@ export class AccountToken { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/account-token/${publicToken}` + `ats/v1/account-token/${encodeURIComponent(publicToken)}` ), method: "GET", headers: { @@ -50,14 +62,20 @@ export class AccountToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.AccountToken.parseOrThrow(_response.body, { + return serializers.ats.AccountToken.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -80,7 +98,9 @@ export class AccountToken { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ats/v1/account-token/{public_token}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -88,7 +108,7 @@ export class AccountToken { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/activities/client/Client.ts b/src/api/resources/ats/resources/activities/client/Client.ts index 70c7806b8..4a9ad8a74 100644 --- a/src/api/resources/ats/resources/activities/client/Client.ts +++ b/src/api/resources/ats/resources/activities/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Activities { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Activities { /** * Returns a list of `Activity` objects. * + * @param {Merge.ats.ActivitiesListRequest} request + * @param {Activities.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.activities.list({}) + * await client.ats.activities.list() */ public async list( request: Merge.ats.ActivitiesListRequest = {}, @@ -52,7 +64,7 @@ export class Activities { showEnumOrigins, userId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -123,15 +135,21 @@ export class Activities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedActivityList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedActivityList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Activities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/activities."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,8 +183,11 @@ export class Activities { /** * Creates an `Activity` object with the given values. * + * @param {Merge.ats.ActivityEndpointRequest} request + * @param {Activities.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.activities.create({ + * await client.ats.activities.create({ * model: {}, * remoteUserId: "remote_user_id" * }) @@ -176,7 +197,7 @@ export class Activities { requestOptions?: Activities.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -199,16 +220,22 @@ export class Activities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.ats.ActivityEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.ats.ActivityEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.ActivityResponse.parseOrThrow(_response.body, { + return serializers.ats.ActivityResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -231,7 +258,7 @@ export class Activities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/activities."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -242,8 +269,12 @@ export class Activities { /** * Returns an `Activity` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.ActivitiesRetrieveRequest} request + * @param {Activities.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.activities.retrieve("id", {}) + * await client.ats.activities.retrieve("id") */ public async retrieve( id: string, @@ -251,7 +282,7 @@ export class Activities { requestOptions?: Activities.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -271,7 +302,7 @@ export class Activities { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/activities/${id}` + `ats/v1/activities/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -282,15 +313,21 @@ export class Activities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.Activity.parseOrThrow(_response.body, { + return serializers.ats.Activity.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -313,7 +350,7 @@ export class Activities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/activities/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -324,8 +361,10 @@ export class Activities { /** * Returns metadata for `Activity` POSTs. * + * @param {Activities.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.activities.metaPostRetrieve() + * await client.ats.activities.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Activities.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -342,14 +381,20 @@ export class Activities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.MetaResponse.parseOrThrow(_response.body, { + return serializers.ats.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -372,7 +417,7 @@ export class Activities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/activities/meta/post."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -380,7 +425,7 @@ export class Activities { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/activities/client/requests/ActivitiesListRequest.ts b/src/api/resources/ats/resources/activities/client/requests/ActivitiesListRequest.ts index 15e62d20d..9d2d1535e 100644 --- a/src/api/resources/ats/resources/activities/client/requests/ActivitiesListRequest.ts +++ b/src/api/resources/ats/resources/activities/client/requests/ActivitiesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/activities/client/requests/ActivitiesRetrieveRequest.ts b/src/api/resources/ats/resources/activities/client/requests/ActivitiesRetrieveRequest.ts index c1c822452..d3bf90c1c 100644 --- a/src/api/resources/ats/resources/activities/client/requests/ActivitiesRetrieveRequest.ts +++ b/src/api/resources/ats/resources/activities/client/requests/ActivitiesRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/activities/client/requests/ActivityEndpointRequest.ts b/src/api/resources/ats/resources/activities/client/requests/ActivityEndpointRequest.ts index 099c5dc99..cbf92e092 100644 --- a/src/api/resources/ats/resources/activities/client/requests/ActivityEndpointRequest.ts +++ b/src/api/resources/ats/resources/activities/client/requests/ActivityEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/activities/client/requests/index.ts b/src/api/resources/ats/resources/activities/client/requests/index.ts index f716f09b6..0365c63b3 100644 --- a/src/api/resources/ats/resources/activities/client/requests/index.ts +++ b/src/api/resources/ats/resources/activities/client/requests/index.ts @@ -1,3 +1,3 @@ -export { ActivitiesListRequest } from "./ActivitiesListRequest"; -export { ActivityEndpointRequest } from "./ActivityEndpointRequest"; -export { ActivitiesRetrieveRequest } from "./ActivitiesRetrieveRequest"; +export { type ActivitiesListRequest } from "./ActivitiesListRequest"; +export { type ActivityEndpointRequest } from "./ActivityEndpointRequest"; +export { type ActivitiesRetrieveRequest } from "./ActivitiesRetrieveRequest"; diff --git a/src/api/resources/ats/resources/applications/client/Client.ts b/src/api/resources/ats/resources/applications/client/Client.ts index 94b929c37..a992d38d9 100644 --- a/src/api/resources/ats/resources/applications/client/Client.ts +++ b/src/api/resources/ats/resources/applications/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Applications { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Applications { /** * Returns a list of `Application` objects. * + * @param {Merge.ats.ApplicationsListRequest} request + * @param {Applications.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.applications.list({}) + * await client.ats.applications.list() */ public async list( request: Merge.ats.ApplicationsListRequest = {}, @@ -55,7 +67,7 @@ export class Applications { remoteId, source, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (candidateId != null) { _queryParams["candidate_id"] = candidateId; } @@ -138,15 +150,21 @@ export class Applications { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedApplicationList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedApplicationList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -169,7 +187,7 @@ export class Applications { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/applications."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -180,8 +198,11 @@ export class Applications { /** * Creates an `Application` object with the given values. * + * @param {Merge.ats.ApplicationEndpointRequest} request + * @param {Applications.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.applications.create({ + * await client.ats.applications.create({ * model: {}, * remoteUserId: "remote_user_id" * }) @@ -191,7 +212,7 @@ export class Applications { requestOptions?: Applications.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -214,18 +235,22 @@ export class Applications { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.ats.ApplicationEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.ats.ApplicationEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.ApplicationResponse.parseOrThrow(_response.body, { + return serializers.ats.ApplicationResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -248,7 +273,7 @@ export class Applications { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/applications."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -259,8 +284,12 @@ export class Applications { /** * Returns an `Application` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.ApplicationsRetrieveRequest} request + * @param {Applications.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.applications.retrieve("id", {}) + * await client.ats.applications.retrieve("id") */ public async retrieve( id: string, @@ -268,7 +297,7 @@ export class Applications { requestOptions?: Applications.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -280,7 +309,7 @@ export class Applications { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/applications/${id}` + `ats/v1/applications/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -291,15 +320,21 @@ export class Applications { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.Application.parseOrThrow(_response.body, { + return serializers.ats.Application.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -322,7 +357,7 @@ export class Applications { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/applications/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -333,8 +368,12 @@ export class Applications { /** * Updates the `current_stage` field of an `Application` object * + * @param {string} id + * @param {Merge.ats.UpdateApplicationStageRequest} request + * @param {Applications.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.applications.changeStageCreate("id", {}) + * await client.ats.applications.changeStageCreate("id") */ public async changeStageCreate( id: string, @@ -342,7 +381,7 @@ export class Applications { requestOptions?: Applications.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -354,7 +393,7 @@ export class Applications { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/applications/${id}/change-stage` + `ats/v1/applications/${encodeURIComponent(id)}/change-stage` ), method: "POST", headers: { @@ -365,18 +404,22 @@ export class Applications { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.ats.UpdateApplicationStageRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.ats.UpdateApplicationStageRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.ApplicationResponse.parseOrThrow(_response.body, { + return serializers.ats.ApplicationResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -399,7 +442,9 @@ export class Applications { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /ats/v1/applications/{id}/change-stage." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -410,15 +455,18 @@ export class Applications { /** * Returns metadata for `Application` POSTs. * + * @param {Merge.ats.ApplicationsMetaPostRetrieveRequest} request + * @param {Applications.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.applications.metaPostRetrieve({}) + * await client.ats.applications.metaPostRetrieve() */ public async metaPostRetrieve( request: Merge.ats.ApplicationsMetaPostRetrieveRequest = {}, requestOptions?: Applications.RequestOptions ): Promise { const { applicationRemoteTemplateId } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (applicationRemoteTemplateId != null) { _queryParams["application_remote_template_id"] = applicationRemoteTemplateId; } @@ -437,15 +485,21 @@ export class Applications { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.MetaResponse.parseOrThrow(_response.body, { + return serializers.ats.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -468,7 +522,7 @@ export class Applications { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/applications/meta/post."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -476,7 +530,7 @@ export class Applications { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/applications/client/requests/ApplicationEndpointRequest.ts b/src/api/resources/ats/resources/applications/client/requests/ApplicationEndpointRequest.ts index 363ee3af9..6f4ed20cb 100644 --- a/src/api/resources/ats/resources/applications/client/requests/ApplicationEndpointRequest.ts +++ b/src/api/resources/ats/resources/applications/client/requests/ApplicationEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/applications/client/requests/ApplicationsListRequest.ts b/src/api/resources/ats/resources/applications/client/requests/ApplicationsListRequest.ts index 319c1efd2..6cd79a7ac 100644 --- a/src/api/resources/ats/resources/applications/client/requests/ApplicationsListRequest.ts +++ b/src/api/resources/ats/resources/applications/client/requests/ApplicationsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/applications/client/requests/ApplicationsRetrieveRequest.ts b/src/api/resources/ats/resources/applications/client/requests/ApplicationsRetrieveRequest.ts index b2f78cc0e..37ffa01dd 100644 --- a/src/api/resources/ats/resources/applications/client/requests/ApplicationsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/applications/client/requests/ApplicationsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/applications/client/requests/index.ts b/src/api/resources/ats/resources/applications/client/requests/index.ts index 1240e50db..c226341ef 100644 --- a/src/api/resources/ats/resources/applications/client/requests/index.ts +++ b/src/api/resources/ats/resources/applications/client/requests/index.ts @@ -1,5 +1,5 @@ -export { ApplicationsListRequest } from "./ApplicationsListRequest"; -export { ApplicationEndpointRequest } from "./ApplicationEndpointRequest"; -export { ApplicationsRetrieveRequest } from "./ApplicationsRetrieveRequest"; -export { UpdateApplicationStageRequest } from "./UpdateApplicationStageRequest"; -export { ApplicationsMetaPostRetrieveRequest } from "./ApplicationsMetaPostRetrieveRequest"; +export { type ApplicationsListRequest } from "./ApplicationsListRequest"; +export { type ApplicationEndpointRequest } from "./ApplicationEndpointRequest"; +export { type ApplicationsRetrieveRequest } from "./ApplicationsRetrieveRequest"; +export { type UpdateApplicationStageRequest } from "./UpdateApplicationStageRequest"; +export { type ApplicationsMetaPostRetrieveRequest } from "./ApplicationsMetaPostRetrieveRequest"; diff --git a/src/api/resources/ats/resources/asyncPassthrough/client/Client.ts b/src/api/resources/ats/resources/asyncPassthrough/client/Client.ts index ff5ce05f3..3e0c202c5 100644 --- a/src/api/resources/ats/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/ats/resources/asyncPassthrough/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace AsyncPassthrough { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,9 +38,12 @@ export class AsyncPassthrough { /** * Asynchronously pull data from an endpoint not currently supported by Merge. * + * @param {Merge.ats.DataPassthroughRequest} request + * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.asyncPassthrough.create({ - * method: Merge.ats.MethodEnum.Get, + * await client.ats.asyncPassthrough.create({ + * method: "GET", * path: "/scooters" * }) */ @@ -53,17 +65,21 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ats.DataPassthroughRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.ats.DataPassthroughRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.AsyncPassthroughReciept.parseOrThrow(_response.body, { + return serializers.ats.AsyncPassthroughReciept.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +102,7 @@ export class AsyncPassthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/async-passthrough."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -96,6 +112,12 @@ export class AsyncPassthrough { /** * Retrieves data from earlier async-passthrough POST request + * + * @param {string} asyncPassthroughReceiptId + * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.ats.asyncPassthrough.retrieve("async_passthrough_receipt_id") */ public async retrieve( asyncPassthroughReceiptId: string, @@ -104,7 +126,7 @@ export class AsyncPassthrough { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/async-passthrough/${asyncPassthroughReceiptId}` + `ats/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}` ), method: "GET", headers: { @@ -115,14 +137,20 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { + return serializers.ats.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +173,9 @@ export class AsyncPassthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ats/v1/async-passthrough/{async_passthrough_receipt_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -153,7 +183,7 @@ export class AsyncPassthrough { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/api/resources/ats/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts index 1ffb5cedf..1570bbb6d 100644 --- a/src/api/resources/ats/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts +++ b/src/api/resources/ats/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; export type AsyncPassthroughRetrieveResponse = Merge.ats.RemoteResponse | string; diff --git a/src/api/resources/ats/resources/attachments/client/Client.ts b/src/api/resources/ats/resources/attachments/client/Client.ts index 1dd2a2bed..c122a031e 100644 --- a/src/api/resources/ats/resources/attachments/client/Client.ts +++ b/src/api/resources/ats/resources/attachments/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Attachments { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Attachments { /** * Returns a list of `Attachment` objects. * + * @param {Merge.ats.AttachmentsListRequest} request + * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.attachments.list({}) + * await client.ats.attachments.list() */ public async list( request: Merge.ats.AttachmentsListRequest = {}, @@ -52,7 +64,7 @@ export class Attachments { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (candidateId != null) { _queryParams["candidate_id"] = candidateId; } @@ -123,15 +135,21 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedAttachmentList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedAttachmentList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Attachments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/attachments."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,8 +183,11 @@ export class Attachments { /** * Creates an `Attachment` object with the given values. * + * @param {Merge.ats.AttachmentEndpointRequest} request + * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.attachments.create({ + * await client.ats.attachments.create({ * model: {}, * remoteUserId: "remote_user_id" * }) @@ -176,7 +197,7 @@ export class Attachments { requestOptions?: Attachments.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -199,18 +220,22 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.ats.AttachmentEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.ats.AttachmentEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.AttachmentResponse.parseOrThrow(_response.body, { + return serializers.ats.AttachmentResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -233,7 +258,7 @@ export class Attachments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/attachments."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -244,8 +269,12 @@ export class Attachments { /** * Returns an `Attachment` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.AttachmentsRetrieveRequest} request + * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.attachments.retrieve("id", {}) + * await client.ats.attachments.retrieve("id") */ public async retrieve( id: string, @@ -253,7 +282,7 @@ export class Attachments { requestOptions?: Attachments.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -273,7 +302,7 @@ export class Attachments { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/attachments/${id}` + `ats/v1/attachments/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -284,15 +313,21 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.Attachment.parseOrThrow(_response.body, { + return serializers.ats.Attachment.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -315,7 +350,7 @@ export class Attachments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/attachments/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -326,8 +361,10 @@ export class Attachments { /** * Returns metadata for `Attachment` POSTs. * + * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.attachments.metaPostRetrieve() + * await client.ats.attachments.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Attachments.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -344,14 +381,20 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.MetaResponse.parseOrThrow(_response.body, { + return serializers.ats.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -374,7 +417,7 @@ export class Attachments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/attachments/meta/post."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -382,7 +425,7 @@ export class Attachments { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/attachments/client/requests/AttachmentEndpointRequest.ts b/src/api/resources/ats/resources/attachments/client/requests/AttachmentEndpointRequest.ts index 2eb2bba06..dd9150979 100644 --- a/src/api/resources/ats/resources/attachments/client/requests/AttachmentEndpointRequest.ts +++ b/src/api/resources/ats/resources/attachments/client/requests/AttachmentEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/attachments/client/requests/index.ts b/src/api/resources/ats/resources/attachments/client/requests/index.ts index bcbd60b03..ab3ba5efb 100644 --- a/src/api/resources/ats/resources/attachments/client/requests/index.ts +++ b/src/api/resources/ats/resources/attachments/client/requests/index.ts @@ -1,3 +1,3 @@ -export { AttachmentsListRequest } from "./AttachmentsListRequest"; -export { AttachmentEndpointRequest } from "./AttachmentEndpointRequest"; -export { AttachmentsRetrieveRequest } from "./AttachmentsRetrieveRequest"; +export { type AttachmentsListRequest } from "./AttachmentsListRequest"; +export { type AttachmentEndpointRequest } from "./AttachmentEndpointRequest"; +export { type AttachmentsRetrieveRequest } from "./AttachmentsRetrieveRequest"; diff --git a/src/api/resources/ats/resources/auditTrail/client/Client.ts b/src/api/resources/ats/resources/auditTrail/client/Client.ts index 42b20b243..ef4971ac2 100644 --- a/src/api/resources/ats/resources/auditTrail/client/Client.ts +++ b/src/api/resources/ats/resources/auditTrail/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AuditTrail { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,15 +38,18 @@ export class AuditTrail { /** * Gets a list of audit trail events. * + * @param {Merge.ats.AuditTrailListRequest} request + * @param {AuditTrail.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.auditTrail.list({}) + * await client.ats.auditTrail.list() */ public async list( request: Merge.ats.AuditTrailListRequest = {}, requestOptions?: AuditTrail.RequestOptions ): Promise { const { cursor, endDate, eventType, pageSize, startDate, userEmail } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -76,15 +88,21 @@ export class AuditTrail { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedAuditLogEventList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedAuditLogEventList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -107,7 +125,7 @@ export class AuditTrail { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/audit-trail."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -115,7 +133,7 @@ export class AuditTrail { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/auditTrail/client/requests/index.ts b/src/api/resources/ats/resources/auditTrail/client/requests/index.ts index ddce9e786..2c0762c28 100644 --- a/src/api/resources/ats/resources/auditTrail/client/requests/index.ts +++ b/src/api/resources/ats/resources/auditTrail/client/requests/index.ts @@ -1 +1 @@ -export { AuditTrailListRequest } from "./AuditTrailListRequest"; +export { type AuditTrailListRequest } from "./AuditTrailListRequest"; diff --git a/src/api/resources/ats/resources/availableActions/client/Client.ts b/src/api/resources/ats/resources/availableActions/client/Client.ts index 1fb6c2948..01dc1cf1c 100644 --- a/src/api/resources/ats/resources/availableActions/client/Client.ts +++ b/src/api/resources/ats/resources/availableActions/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AvailableActions { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class AvailableActions { /** * Returns a list of models and actions available for an account. * + * @param {AvailableActions.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.availableActions.retrieve() + * await client.ats.availableActions.retrieve() */ public async retrieve(requestOptions?: AvailableActions.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class AvailableActions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.AvailableActions.parseOrThrow(_response.body, { + return serializers.ats.AvailableActions.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class AvailableActions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/available-actions."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -85,7 +102,7 @@ export class AvailableActions { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/candidates/client/Client.ts b/src/api/resources/ats/resources/candidates/client/Client.ts index 1f665b891..48ed46113 100644 --- a/src/api/resources/ats/resources/candidates/client/Client.ts +++ b/src/api/resources/ats/resources/candidates/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Candidates { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Candidates { /** * Returns a list of `Candidate` objects. * + * @param {Merge.ats.CandidatesListRequest} request + * @param {Candidates.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.candidates.list({}) + * await client.ats.candidates.list() */ public async list( request: Merge.ats.CandidatesListRequest = {}, @@ -53,7 +65,7 @@ export class Candidates { remoteId, tags, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -128,15 +140,21 @@ export class Candidates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedCandidateList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedCandidateList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -159,7 +177,7 @@ export class Candidates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/candidates."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -170,8 +188,11 @@ export class Candidates { /** * Creates a `Candidate` object with the given values. * + * @param {Merge.ats.CandidateEndpointRequest} request + * @param {Candidates.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.candidates.create({ + * await client.ats.candidates.create({ * model: {}, * remoteUserId: "remote_user_id" * }) @@ -181,7 +202,7 @@ export class Candidates { requestOptions?: Candidates.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -204,18 +225,22 @@ export class Candidates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.ats.CandidateEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.ats.CandidateEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.CandidateResponse.parseOrThrow(_response.body, { + return serializers.ats.CandidateResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -238,7 +263,7 @@ export class Candidates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/candidates."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -249,8 +274,12 @@ export class Candidates { /** * Returns a `Candidate` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.CandidatesRetrieveRequest} request + * @param {Candidates.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.candidates.retrieve("id", {}) + * await client.ats.candidates.retrieve("id") */ public async retrieve( id: string, @@ -258,7 +287,7 @@ export class Candidates { requestOptions?: Candidates.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -270,7 +299,7 @@ export class Candidates { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/candidates/${id}` + `ats/v1/candidates/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -281,15 +310,21 @@ export class Candidates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.Candidate.parseOrThrow(_response.body, { + return serializers.ats.Candidate.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -312,7 +347,7 @@ export class Candidates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/candidates/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -323,8 +358,12 @@ export class Candidates { /** * Updates a `Candidate` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.PatchedCandidateEndpointRequest} request + * @param {Candidates.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.candidates.partialUpdate("id", { + * await client.ats.candidates.partialUpdate("id", { * model: {}, * remoteUserId: "remote_user_id" * }) @@ -335,7 +374,7 @@ export class Candidates { requestOptions?: Candidates.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -347,7 +386,7 @@ export class Candidates { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/candidates/${id}` + `ats/v1/candidates/${encodeURIComponent(id)}` ), method: "PATCH", headers: { @@ -358,18 +397,24 @@ export class Candidates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.ats.PatchedCandidateEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.ats.PatchedCandidateEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.CandidateResponse.parseOrThrow(_response.body, { + return serializers.ats.CandidateResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -392,7 +437,7 @@ export class Candidates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling PATCH /ats/v1/candidates/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -403,9 +448,13 @@ export class Candidates { /** * Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. * + * @param {string} modelId + * @param {Merge.ats.IgnoreCommonModelRequest} request + * @param {Candidates.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.candidates.ignoreCreate("model_id", { - * reason: Merge.ats.ReasonEnum.GeneralCustomerRequest + * await client.ats.candidates.ignoreCreate("model_id", { + * reason: "GENERAL_CUSTOMER_REQUEST" * }) */ public async ignoreCreate( @@ -416,7 +465,7 @@ export class Candidates { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/candidates/ignore/${modelId}` + `ats/v1/candidates/ignore/${encodeURIComponent(modelId)}` ), method: "POST", headers: { @@ -427,14 +476,18 @@ export class Candidates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ats.IgnoreCommonModelRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.ats.IgnoreCommonModelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -454,7 +507,9 @@ export class Candidates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /ats/v1/candidates/ignore/{model_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -465,8 +520,11 @@ export class Candidates { /** * Returns metadata for `Candidate` PATCHs. * + * @param {string} id + * @param {Candidates.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.candidates.metaPatchRetrieve("id") + * await client.ats.candidates.metaPatchRetrieve("id") */ public async metaPatchRetrieve( id: string, @@ -475,7 +533,7 @@ export class Candidates { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/candidates/meta/patch/${id}` + `ats/v1/candidates/meta/patch/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -486,14 +544,20 @@ export class Candidates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.MetaResponse.parseOrThrow(_response.body, { + return serializers.ats.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -516,7 +580,9 @@ export class Candidates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ats/v1/candidates/meta/patch/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -527,8 +593,10 @@ export class Candidates { /** * Returns metadata for `Candidate` POSTs. * + * @param {Candidates.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.candidates.metaPostRetrieve() + * await client.ats.candidates.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Candidates.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -545,14 +613,20 @@ export class Candidates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.MetaResponse.parseOrThrow(_response.body, { + return serializers.ats.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -575,7 +649,7 @@ export class Candidates { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/candidates/meta/post."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -583,7 +657,7 @@ export class Candidates { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/candidates/client/requests/CandidateEndpointRequest.ts b/src/api/resources/ats/resources/candidates/client/requests/CandidateEndpointRequest.ts index a5b1197c1..9f236ed2b 100644 --- a/src/api/resources/ats/resources/candidates/client/requests/CandidateEndpointRequest.ts +++ b/src/api/resources/ats/resources/candidates/client/requests/CandidateEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/candidates/client/requests/CandidatesListRequest.ts b/src/api/resources/ats/resources/candidates/client/requests/CandidatesListRequest.ts index 3adcd606f..35bd09fa6 100644 --- a/src/api/resources/ats/resources/candidates/client/requests/CandidatesListRequest.ts +++ b/src/api/resources/ats/resources/candidates/client/requests/CandidatesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/candidates/client/requests/CandidatesRetrieveRequest.ts b/src/api/resources/ats/resources/candidates/client/requests/CandidatesRetrieveRequest.ts index 789952029..5ad60e3b7 100644 --- a/src/api/resources/ats/resources/candidates/client/requests/CandidatesRetrieveRequest.ts +++ b/src/api/resources/ats/resources/candidates/client/requests/CandidatesRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/candidates/client/requests/IgnoreCommonModelRequest.ts b/src/api/resources/ats/resources/candidates/client/requests/IgnoreCommonModelRequest.ts index d9aa7c856..b9cedb383 100644 --- a/src/api/resources/ats/resources/candidates/client/requests/IgnoreCommonModelRequest.ts +++ b/src/api/resources/ats/resources/candidates/client/requests/IgnoreCommonModelRequest.ts @@ -2,12 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example * { - * reason: Merge.ats.ReasonEnum.GeneralCustomerRequest + * reason: "GENERAL_CUSTOMER_REQUEST" * } */ export interface IgnoreCommonModelRequest { diff --git a/src/api/resources/ats/resources/candidates/client/requests/PatchedCandidateEndpointRequest.ts b/src/api/resources/ats/resources/candidates/client/requests/PatchedCandidateEndpointRequest.ts index 215565822..1e7c3e2a3 100644 --- a/src/api/resources/ats/resources/candidates/client/requests/PatchedCandidateEndpointRequest.ts +++ b/src/api/resources/ats/resources/candidates/client/requests/PatchedCandidateEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/candidates/client/requests/index.ts b/src/api/resources/ats/resources/candidates/client/requests/index.ts index ed5372ce0..3e163ee1a 100644 --- a/src/api/resources/ats/resources/candidates/client/requests/index.ts +++ b/src/api/resources/ats/resources/candidates/client/requests/index.ts @@ -1,5 +1,5 @@ -export { CandidatesListRequest } from "./CandidatesListRequest"; -export { CandidateEndpointRequest } from "./CandidateEndpointRequest"; -export { CandidatesRetrieveRequest } from "./CandidatesRetrieveRequest"; -export { PatchedCandidateEndpointRequest } from "./PatchedCandidateEndpointRequest"; -export { IgnoreCommonModelRequest } from "./IgnoreCommonModelRequest"; +export { type CandidatesListRequest } from "./CandidatesListRequest"; +export { type CandidateEndpointRequest } from "./CandidateEndpointRequest"; +export { type CandidatesRetrieveRequest } from "./CandidatesRetrieveRequest"; +export { type PatchedCandidateEndpointRequest } from "./PatchedCandidateEndpointRequest"; +export { type IgnoreCommonModelRequest } from "./IgnoreCommonModelRequest"; diff --git a/src/api/resources/ats/resources/deleteAccount/client/Client.ts b/src/api/resources/ats/resources/deleteAccount/client/Client.ts index 448cf49d0..288d2eeb7 100644 --- a/src/api/resources/ats/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/ats/resources/deleteAccount/client/Client.ts @@ -5,19 +5,28 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace DeleteAccount { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -27,8 +36,10 @@ export class DeleteAccount { /** * Delete a linked account. * + * @param {DeleteAccount.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.deleteAccount.delete() + * await client.ats.deleteAccount.delete() */ public async delete(requestOptions?: DeleteAccount.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -45,11 +56,17 @@ export class DeleteAccount { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -69,7 +86,7 @@ export class DeleteAccount { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/delete-account."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -77,7 +94,7 @@ export class DeleteAccount { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/departments/client/Client.ts b/src/api/resources/ats/resources/departments/client/Client.ts index 8fad6b2ed..5afa22160 100644 --- a/src/api/resources/ats/resources/departments/client/Client.ts +++ b/src/api/resources/ats/resources/departments/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Departments { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Departments { /** * Returns a list of `Department` objects. * + * @param {Merge.ats.DepartmentsListRequest} request + * @param {Departments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.departments.list({}) + * await client.ats.departments.list() */ public async list( request: Merge.ats.DepartmentsListRequest = {}, @@ -48,7 +60,7 @@ export class Departments { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,15 +115,21 @@ export class Departments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedDepartmentList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedDepartmentList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -134,7 +152,7 @@ export class Departments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/departments."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -145,8 +163,12 @@ export class Departments { /** * Returns a `Department` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.DepartmentsRetrieveRequest} request + * @param {Departments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.departments.retrieve("id", {}) + * await client.ats.departments.retrieve("id") */ public async retrieve( id: string, @@ -154,7 +176,7 @@ export class Departments { requestOptions?: Departments.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -162,7 +184,7 @@ export class Departments { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/departments/${id}` + `ats/v1/departments/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -173,15 +195,21 @@ export class Departments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.Department.parseOrThrow(_response.body, { + return serializers.ats.Department.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -204,7 +232,7 @@ export class Departments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/departments/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -212,7 +240,7 @@ export class Departments { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/departments/client/requests/index.ts b/src/api/resources/ats/resources/departments/client/requests/index.ts index 86d6f5fc5..2a3377775 100644 --- a/src/api/resources/ats/resources/departments/client/requests/index.ts +++ b/src/api/resources/ats/resources/departments/client/requests/index.ts @@ -1,2 +1,2 @@ -export { DepartmentsListRequest } from "./DepartmentsListRequest"; -export { DepartmentsRetrieveRequest } from "./DepartmentsRetrieveRequest"; +export { type DepartmentsListRequest } from "./DepartmentsListRequest"; +export { type DepartmentsRetrieveRequest } from "./DepartmentsRetrieveRequest"; diff --git a/src/api/resources/ats/resources/eeocs/client/Client.ts b/src/api/resources/ats/resources/eeocs/client/Client.ts index ab1c43d01..30780dae8 100644 --- a/src/api/resources/ats/resources/eeocs/client/Client.ts +++ b/src/api/resources/ats/resources/eeocs/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Eeocs { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Eeocs { /** * Returns a list of `EEOC` objects. * + * @param {Merge.ats.EeocsListRequest} request + * @param {Eeocs.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.eeocs.list({}) + * await client.ats.eeocs.list() */ public async list( request: Merge.ats.EeocsListRequest = {}, @@ -52,7 +64,7 @@ export class Eeocs { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (candidateId != null) { _queryParams["candidate_id"] = candidateId; } @@ -123,15 +135,21 @@ export class Eeocs { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedEeocList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedEeocList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Eeocs { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/eeocs."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,8 +183,12 @@ export class Eeocs { /** * Returns an `EEOC` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.EeocsRetrieveRequest} request + * @param {Eeocs.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.eeocs.retrieve("id", {}) + * await client.ats.eeocs.retrieve("id") */ public async retrieve( id: string, @@ -174,7 +196,7 @@ export class Eeocs { requestOptions?: Eeocs.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -194,7 +216,7 @@ export class Eeocs { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/eeocs/${id}` + `ats/v1/eeocs/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -205,15 +227,21 @@ export class Eeocs { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.Eeoc.parseOrThrow(_response.body, { + return serializers.ats.Eeoc.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -236,7 +264,7 @@ export class Eeocs { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/eeocs/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -244,7 +272,7 @@ export class Eeocs { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/eeocs/client/requests/EeocsListRequest.ts b/src/api/resources/ats/resources/eeocs/client/requests/EeocsListRequest.ts index 078f6cb51..5bd04af0d 100644 --- a/src/api/resources/ats/resources/eeocs/client/requests/EeocsListRequest.ts +++ b/src/api/resources/ats/resources/eeocs/client/requests/EeocsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/eeocs/client/requests/EeocsRetrieveRequest.ts b/src/api/resources/ats/resources/eeocs/client/requests/EeocsRetrieveRequest.ts index 581cfce55..5e520817d 100644 --- a/src/api/resources/ats/resources/eeocs/client/requests/EeocsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/eeocs/client/requests/EeocsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/eeocs/client/requests/index.ts b/src/api/resources/ats/resources/eeocs/client/requests/index.ts index 8dd256259..78621f9a5 100644 --- a/src/api/resources/ats/resources/eeocs/client/requests/index.ts +++ b/src/api/resources/ats/resources/eeocs/client/requests/index.ts @@ -1,2 +1,2 @@ -export { EeocsListRequest } from "./EeocsListRequest"; -export { EeocsRetrieveRequest } from "./EeocsRetrieveRequest"; +export { type EeocsListRequest } from "./EeocsListRequest"; +export { type EeocsRetrieveRequest } from "./EeocsRetrieveRequest"; diff --git a/src/api/resources/ats/resources/fieldMapping/client/Client.ts b/src/api/resources/ats/resources/fieldMapping/client/Client.ts index d50d55408..f00a5d1ac 100644 --- a/src/api/resources/ats/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/ats/resources/fieldMapping/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace FieldMapping { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class FieldMapping { /** * Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). * + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.fieldMapping.fieldMappingsRetrieve() + * await client.ats.fieldMapping.fieldMappingsRetrieve() */ public async fieldMappingsRetrieve( requestOptions?: FieldMapping.RequestOptions @@ -49,14 +60,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { + return serializers.ats.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +96,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/field-mappings."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -90,8 +107,11 @@ export class FieldMapping { /** * Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {Merge.ats.CreateFieldMappingRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.fieldMapping.fieldMappingsCreate({ + * await client.ats.fieldMapping.fieldMappingsCreate({ * targetFieldName: "example_target_field_name", * targetFieldDescription: "this is a example description of the target field", * remoteFieldTraversalPath: ["example_remote_field"], @@ -118,17 +138,21 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ats.CreateFieldMappingRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.ats.CreateFieldMappingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.ats.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -151,7 +175,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/field-mappings."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -162,8 +186,11 @@ export class FieldMapping { /** * Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {string} fieldMappingId + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.fieldMapping.fieldMappingsDestroy("field_mapping_id") + * await client.ats.fieldMapping.fieldMappingsDestroy("field_mapping_id") */ public async fieldMappingsDestroy( fieldMappingId: string, @@ -172,7 +199,7 @@ export class FieldMapping { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/field-mappings/${fieldMappingId}` + `ats/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` ), method: "DELETE", headers: { @@ -183,14 +210,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.ats.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +246,9 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling DELETE /ats/v1/field-mappings/{field_mapping_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -224,8 +259,12 @@ export class FieldMapping { /** * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {string} fieldMappingId + * @param {Merge.ats.PatchedEditFieldMappingRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id", {}) + * await client.ats.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id") */ public async fieldMappingsPartialUpdate( fieldMappingId: string, @@ -235,7 +274,7 @@ export class FieldMapping { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/field-mappings/${fieldMappingId}` + `ats/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` ), method: "PATCH", headers: { @@ -246,17 +285,23 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ats.PatchedEditFieldMappingRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.ats.PatchedEditFieldMappingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.ats.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -279,7 +324,9 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling PATCH /ats/v1/field-mappings/{field_mapping_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -290,15 +337,18 @@ export class FieldMapping { /** * Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). * + * @param {Merge.ats.RemoteFieldsRetrieveRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.fieldMapping.remoteFieldsRetrieve({}) + * await client.ats.fieldMapping.remoteFieldsRetrieve() */ public async remoteFieldsRetrieve( request: Merge.ats.RemoteFieldsRetrieveRequest = {}, requestOptions?: FieldMapping.RequestOptions ): Promise { const { commonModels, includeExampleValues } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (commonModels != null) { _queryParams["common_models"] = commonModels; } @@ -321,15 +371,21 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.RemoteFieldApiResponse.parseOrThrow(_response.body, { + return serializers.ats.RemoteFieldApiResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -352,7 +408,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/remote-fields."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -363,8 +419,10 @@ export class FieldMapping { /** * Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). * + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.fieldMapping.targetFieldsRetrieve() + * await client.ats.fieldMapping.targetFieldsRetrieve() */ public async targetFieldsRetrieve( requestOptions?: FieldMapping.RequestOptions @@ -383,14 +441,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { + return serializers.ats.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -413,7 +477,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/target-fields."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -421,7 +485,7 @@ export class FieldMapping { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/fieldMapping/client/requests/index.ts b/src/api/resources/ats/resources/fieldMapping/client/requests/index.ts index cb93982a7..450f54c2b 100644 --- a/src/api/resources/ats/resources/fieldMapping/client/requests/index.ts +++ b/src/api/resources/ats/resources/fieldMapping/client/requests/index.ts @@ -1,3 +1,3 @@ -export { CreateFieldMappingRequest } from "./CreateFieldMappingRequest"; -export { PatchedEditFieldMappingRequest } from "./PatchedEditFieldMappingRequest"; -export { RemoteFieldsRetrieveRequest } from "./RemoteFieldsRetrieveRequest"; +export { type CreateFieldMappingRequest } from "./CreateFieldMappingRequest"; +export { type PatchedEditFieldMappingRequest } from "./PatchedEditFieldMappingRequest"; +export { type RemoteFieldsRetrieveRequest } from "./RemoteFieldsRetrieveRequest"; diff --git a/src/api/resources/ats/resources/forceResync/client/Client.ts b/src/api/resources/ats/resources/forceResync/client/Client.ts index 25c9deb96..a87426b96 100644 --- a/src/api/resources/ats/resources/forceResync/client/Client.ts +++ b/src/api/resources/ats/resources/forceResync/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace ForceResync { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class ForceResync { /** * Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. * + * @param {ForceResync.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.forceResync.syncStatusResyncCreate() + * await client.ats.forceResync.syncStatusResyncCreate() */ public async syncStatusResyncCreate(requestOptions?: ForceResync.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class ForceResync { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { + return serializers.ats.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class ForceResync { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/sync-status/resync."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -85,7 +102,7 @@ export class ForceResync { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/generateKey/client/Client.ts b/src/api/resources/ats/resources/generateKey/client/Client.ts index 65a7a5171..27dcf3120 100644 --- a/src/api/resources/ats/resources/generateKey/client/Client.ts +++ b/src/api/resources/ats/resources/generateKey/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace GenerateKey { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class GenerateKey { /** * Create a remote key. * + * @param {Merge.ats.GenerateRemoteKeyRequest} request + * @param {GenerateKey.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.generateKey.create({ + * await client.ats.generateKey.create({ * name: "Remote Deployment Key 1" * }) */ @@ -52,17 +64,21 @@ export class GenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ats.GenerateRemoteKeyRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.ats.GenerateRemoteKeyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.RemoteKey.parseOrThrow(_response.body, { + return serializers.ats.RemoteKey.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +101,7 @@ export class GenerateKey { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/generate-key."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -93,7 +109,7 @@ export class GenerateKey { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/generateKey/client/requests/index.ts b/src/api/resources/ats/resources/generateKey/client/requests/index.ts index 0df6e7c8b..d8255223c 100644 --- a/src/api/resources/ats/resources/generateKey/client/requests/index.ts +++ b/src/api/resources/ats/resources/generateKey/client/requests/index.ts @@ -1 +1 @@ -export { GenerateRemoteKeyRequest } from "./GenerateRemoteKeyRequest"; +export { type GenerateRemoteKeyRequest } from "./GenerateRemoteKeyRequest"; diff --git a/src/api/resources/ats/resources/interviews/client/Client.ts b/src/api/resources/ats/resources/interviews/client/Client.ts index cf2dd993a..30172f263 100644 --- a/src/api/resources/ats/resources/interviews/client/Client.ts +++ b/src/api/resources/ats/resources/interviews/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Interviews { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Interviews { /** * Returns a list of `ScheduledInterview` objects. * + * @param {Merge.ats.InterviewsListRequest} request + * @param {Interviews.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.interviews.list({}) + * await client.ats.interviews.list() */ public async list( request: Merge.ats.InterviewsListRequest = {}, @@ -55,7 +67,7 @@ export class Interviews { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (applicationId != null) { _queryParams["application_id"] = applicationId; } @@ -138,15 +150,21 @@ export class Interviews { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedScheduledInterviewList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedScheduledInterviewList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -169,7 +187,7 @@ export class Interviews { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/interviews."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -180,8 +198,11 @@ export class Interviews { /** * Creates a `ScheduledInterview` object with the given values. * + * @param {Merge.ats.ScheduledInterviewEndpointRequest} request + * @param {Interviews.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.interviews.create({ + * await client.ats.interviews.create({ * model: {}, * remoteUserId: "remote_user_id" * }) @@ -191,7 +212,7 @@ export class Interviews { requestOptions?: Interviews.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -214,18 +235,24 @@ export class Interviews { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.ats.ScheduledInterviewEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.ats.ScheduledInterviewEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.ScheduledInterviewResponse.parseOrThrow(_response.body, { + return serializers.ats.ScheduledInterviewResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -248,7 +275,7 @@ export class Interviews { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/interviews."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -259,8 +286,12 @@ export class Interviews { /** * Returns a `ScheduledInterview` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.InterviewsRetrieveRequest} request + * @param {Interviews.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.interviews.retrieve("id", {}) + * await client.ats.interviews.retrieve("id") */ public async retrieve( id: string, @@ -268,7 +299,7 @@ export class Interviews { requestOptions?: Interviews.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -288,7 +319,7 @@ export class Interviews { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/interviews/${id}` + `ats/v1/interviews/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -299,15 +330,21 @@ export class Interviews { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.ScheduledInterview.parseOrThrow(_response.body, { + return serializers.ats.ScheduledInterview.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -330,7 +367,7 @@ export class Interviews { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/interviews/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -341,8 +378,10 @@ export class Interviews { /** * Returns metadata for `ScheduledInterview` POSTs. * + * @param {Interviews.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.interviews.metaPostRetrieve() + * await client.ats.interviews.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Interviews.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -359,14 +398,20 @@ export class Interviews { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.MetaResponse.parseOrThrow(_response.body, { + return serializers.ats.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -389,7 +434,7 @@ export class Interviews { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/interviews/meta/post."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -397,7 +442,7 @@ export class Interviews { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/interviews/client/requests/InterviewsListRequest.ts b/src/api/resources/ats/resources/interviews/client/requests/InterviewsListRequest.ts index 185cddf4e..b96ba620f 100644 --- a/src/api/resources/ats/resources/interviews/client/requests/InterviewsListRequest.ts +++ b/src/api/resources/ats/resources/interviews/client/requests/InterviewsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/interviews/client/requests/InterviewsRetrieveRequest.ts b/src/api/resources/ats/resources/interviews/client/requests/InterviewsRetrieveRequest.ts index 89c0f26ca..6fa7d0a71 100644 --- a/src/api/resources/ats/resources/interviews/client/requests/InterviewsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/interviews/client/requests/InterviewsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/interviews/client/requests/ScheduledInterviewEndpointRequest.ts b/src/api/resources/ats/resources/interviews/client/requests/ScheduledInterviewEndpointRequest.ts index d079d267a..063aa1813 100644 --- a/src/api/resources/ats/resources/interviews/client/requests/ScheduledInterviewEndpointRequest.ts +++ b/src/api/resources/ats/resources/interviews/client/requests/ScheduledInterviewEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/interviews/client/requests/index.ts b/src/api/resources/ats/resources/interviews/client/requests/index.ts index ff953e9e4..cbe8cdd89 100644 --- a/src/api/resources/ats/resources/interviews/client/requests/index.ts +++ b/src/api/resources/ats/resources/interviews/client/requests/index.ts @@ -1,3 +1,3 @@ -export { InterviewsListRequest } from "./InterviewsListRequest"; -export { ScheduledInterviewEndpointRequest } from "./ScheduledInterviewEndpointRequest"; -export { InterviewsRetrieveRequest } from "./InterviewsRetrieveRequest"; +export { type InterviewsListRequest } from "./InterviewsListRequest"; +export { type ScheduledInterviewEndpointRequest } from "./ScheduledInterviewEndpointRequest"; +export { type InterviewsRetrieveRequest } from "./InterviewsRetrieveRequest"; diff --git a/src/api/resources/ats/resources/issues/client/Client.ts b/src/api/resources/ats/resources/issues/client/Client.ts index e6ddbb998..e77181c60 100644 --- a/src/api/resources/ats/resources/issues/client/Client.ts +++ b/src/api/resources/ats/resources/issues/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Issues { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Issues { /** * Gets all issues for Organization. * + * @param {Merge.ats.IssuesListRequest} request + * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.issues.list({}) + * await client.ats.issues.list() */ public async list( request: Merge.ats.IssuesListRequest = {}, @@ -52,7 +64,7 @@ export class Issues { startDate, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountToken != null) { _queryParams["account_token"] = accountToken; } @@ -123,15 +135,21 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedIssueList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedIssueList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Issues { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/issues."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,14 +183,17 @@ export class Issues { /** * Get a specific issue. * + * @param {string} id + * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.issues.retrieve("id") + * await client.ats.issues.retrieve("id") */ public async retrieve(id: string, requestOptions?: Issues.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/issues/${id}` + `ats/v1/issues/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -183,14 +204,20 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.Issue.parseOrThrow(_response.body, { + return serializers.ats.Issue.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +240,7 @@ export class Issues { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/issues/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -221,7 +248,7 @@ export class Issues { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/issues/client/requests/IssuesListRequest.ts b/src/api/resources/ats/resources/issues/client/requests/IssuesListRequest.ts index f5e89207c..0c68b972c 100644 --- a/src/api/resources/ats/resources/issues/client/requests/IssuesListRequest.ts +++ b/src/api/resources/ats/resources/issues/client/requests/IssuesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/issues/client/requests/index.ts b/src/api/resources/ats/resources/issues/client/requests/index.ts index 278763f77..ad215d907 100644 --- a/src/api/resources/ats/resources/issues/client/requests/index.ts +++ b/src/api/resources/ats/resources/issues/client/requests/index.ts @@ -1 +1 @@ -export { IssuesListRequest } from "./IssuesListRequest"; +export { type IssuesListRequest } from "./IssuesListRequest"; diff --git a/src/api/resources/ats/resources/jobInterviewStages/client/Client.ts b/src/api/resources/ats/resources/jobInterviewStages/client/Client.ts index 33782466a..410bb67cc 100644 --- a/src/api/resources/ats/resources/jobInterviewStages/client/Client.ts +++ b/src/api/resources/ats/resources/jobInterviewStages/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace JobInterviewStages { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class JobInterviewStages { /** * Returns a list of `JobInterviewStage` objects. * + * @param {Merge.ats.JobInterviewStagesListRequest} request + * @param {JobInterviewStages.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.jobInterviewStages.list({}) + * await client.ats.jobInterviewStages.list() */ public async list( request: Merge.ats.JobInterviewStagesListRequest = {}, @@ -50,7 +62,7 @@ export class JobInterviewStages { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -113,15 +125,21 @@ export class JobInterviewStages { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedJobInterviewStageList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedJobInterviewStageList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -144,7 +162,7 @@ export class JobInterviewStages { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/job-interview-stages."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -155,8 +173,12 @@ export class JobInterviewStages { /** * Returns a `JobInterviewStage` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.JobInterviewStagesRetrieveRequest} request + * @param {JobInterviewStages.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.jobInterviewStages.retrieve("id", {}) + * await client.ats.jobInterviewStages.retrieve("id") */ public async retrieve( id: string, @@ -164,7 +186,7 @@ export class JobInterviewStages { requestOptions?: JobInterviewStages.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -176,7 +198,7 @@ export class JobInterviewStages { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/job-interview-stages/${id}` + `ats/v1/job-interview-stages/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -187,15 +209,21 @@ export class JobInterviewStages { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.JobInterviewStage.parseOrThrow(_response.body, { + return serializers.ats.JobInterviewStage.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -218,7 +246,9 @@ export class JobInterviewStages { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ats/v1/job-interview-stages/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -226,7 +256,7 @@ export class JobInterviewStages { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/jobInterviewStages/client/requests/index.ts b/src/api/resources/ats/resources/jobInterviewStages/client/requests/index.ts index 83b4b1031..59821d5df 100644 --- a/src/api/resources/ats/resources/jobInterviewStages/client/requests/index.ts +++ b/src/api/resources/ats/resources/jobInterviewStages/client/requests/index.ts @@ -1,2 +1,2 @@ -export { JobInterviewStagesListRequest } from "./JobInterviewStagesListRequest"; -export { JobInterviewStagesRetrieveRequest } from "./JobInterviewStagesRetrieveRequest"; +export { type JobInterviewStagesListRequest } from "./JobInterviewStagesListRequest"; +export { type JobInterviewStagesRetrieveRequest } from "./JobInterviewStagesRetrieveRequest"; diff --git a/src/api/resources/ats/resources/jobPostings/client/Client.ts b/src/api/resources/ats/resources/jobPostings/client/Client.ts index bc92bf425..dd6cdd6cf 100644 --- a/src/api/resources/ats/resources/jobPostings/client/Client.ts +++ b/src/api/resources/ats/resources/jobPostings/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace JobPostings { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class JobPostings { /** * Returns a list of `JobPosting` objects. * + * @param {Merge.ats.JobPostingsListRequest} request + * @param {JobPostings.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.jobPostings.list({}) + * await client.ats.jobPostings.list() */ public async list( request: Merge.ats.JobPostingsListRequest = {}, @@ -50,7 +62,7 @@ export class JobPostings { remoteId, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -113,15 +125,21 @@ export class JobPostings { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedJobPostingList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedJobPostingList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -144,7 +162,7 @@ export class JobPostings { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/job-postings."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -155,8 +173,12 @@ export class JobPostings { /** * Returns a `JobPosting` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.JobPostingsRetrieveRequest} request + * @param {JobPostings.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.jobPostings.retrieve("id", {}) + * await client.ats.jobPostings.retrieve("id") */ public async retrieve( id: string, @@ -164,7 +186,7 @@ export class JobPostings { requestOptions?: JobPostings.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -176,7 +198,7 @@ export class JobPostings { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/job-postings/${id}` + `ats/v1/job-postings/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -187,15 +209,21 @@ export class JobPostings { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.JobPosting.parseOrThrow(_response.body, { + return serializers.ats.JobPosting.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -218,7 +246,7 @@ export class JobPostings { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/job-postings/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -226,7 +254,7 @@ export class JobPostings { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/jobPostings/client/requests/JobPostingsListRequest.ts b/src/api/resources/ats/resources/jobPostings/client/requests/JobPostingsListRequest.ts index 069c35182..1d09301c3 100644 --- a/src/api/resources/ats/resources/jobPostings/client/requests/JobPostingsListRequest.ts +++ b/src/api/resources/ats/resources/jobPostings/client/requests/JobPostingsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/jobPostings/client/requests/index.ts b/src/api/resources/ats/resources/jobPostings/client/requests/index.ts index d4d161acd..b3e4e9738 100644 --- a/src/api/resources/ats/resources/jobPostings/client/requests/index.ts +++ b/src/api/resources/ats/resources/jobPostings/client/requests/index.ts @@ -1,2 +1,2 @@ -export { JobPostingsListRequest } from "./JobPostingsListRequest"; -export { JobPostingsRetrieveRequest } from "./JobPostingsRetrieveRequest"; +export { type JobPostingsListRequest } from "./JobPostingsListRequest"; +export { type JobPostingsRetrieveRequest } from "./JobPostingsRetrieveRequest"; diff --git a/src/api/resources/ats/resources/jobs/client/Client.ts b/src/api/resources/ats/resources/jobs/client/Client.ts index aa6801e8a..6aa7d77ff 100644 --- a/src/api/resources/ats/resources/jobs/client/Client.ts +++ b/src/api/resources/ats/resources/jobs/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Jobs { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Jobs { /** * Returns a list of `Job` objects. * + * @param {Merge.ats.JobsListRequest} request + * @param {Jobs.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.jobs.list({}) + * await client.ats.jobs.list() */ public async list( request: Merge.ats.JobsListRequest = {}, @@ -54,7 +66,7 @@ export class Jobs { showEnumOrigins, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (code != null) { _queryParams["code"] = code; } @@ -133,15 +145,21 @@ export class Jobs { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedJobList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedJobList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -164,7 +182,7 @@ export class Jobs { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/jobs."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -175,8 +193,12 @@ export class Jobs { /** * Returns a `Job` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.JobsRetrieveRequest} request + * @param {Jobs.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.jobs.retrieve("id", {}) + * await client.ats.jobs.retrieve("id") */ public async retrieve( id: string, @@ -184,7 +206,7 @@ export class Jobs { requestOptions?: Jobs.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -204,7 +226,7 @@ export class Jobs { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/jobs/${id}` + `ats/v1/jobs/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -215,15 +237,21 @@ export class Jobs { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.Job.parseOrThrow(_response.body, { + return serializers.ats.Job.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -246,7 +274,7 @@ export class Jobs { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/jobs/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -257,8 +285,12 @@ export class Jobs { /** * Returns a list of `ScreeningQuestion` objects. * + * @param {string} jobId + * @param {Merge.ats.JobsScreeningQuestionsListRequest} request + * @param {Jobs.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.jobs.screeningQuestionsList("job_id", {}) + * await client.ats.jobs.screeningQuestionsList("job_id") */ public async screeningQuestionsList( jobId: string, @@ -266,7 +298,7 @@ export class Jobs { requestOptions?: Jobs.RequestOptions ): Promise { const { cursor, expand, includeDeletedData, includeRemoteData, includeShellData, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -294,7 +326,7 @@ export class Jobs { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/jobs/${jobId}/screening-questions` + `ats/v1/jobs/${encodeURIComponent(jobId)}/screening-questions` ), method: "GET", headers: { @@ -305,15 +337,21 @@ export class Jobs { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedScreeningQuestionList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedScreeningQuestionList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -336,7 +374,9 @@ export class Jobs { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ats/v1/jobs/{job_id}/screening-questions." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -344,7 +384,7 @@ export class Jobs { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/jobs/client/requests/JobsListRequest.ts b/src/api/resources/ats/resources/jobs/client/requests/JobsListRequest.ts index b2318fe86..cfd8922ef 100644 --- a/src/api/resources/ats/resources/jobs/client/requests/JobsListRequest.ts +++ b/src/api/resources/ats/resources/jobs/client/requests/JobsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/jobs/client/requests/JobsRetrieveRequest.ts b/src/api/resources/ats/resources/jobs/client/requests/JobsRetrieveRequest.ts index 47d466287..d280b169d 100644 --- a/src/api/resources/ats/resources/jobs/client/requests/JobsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/jobs/client/requests/JobsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/jobs/client/requests/JobsScreeningQuestionsListRequest.ts b/src/api/resources/ats/resources/jobs/client/requests/JobsScreeningQuestionsListRequest.ts index ac9c7ffa9..0055fc971 100644 --- a/src/api/resources/ats/resources/jobs/client/requests/JobsScreeningQuestionsListRequest.ts +++ b/src/api/resources/ats/resources/jobs/client/requests/JobsScreeningQuestionsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/jobs/client/requests/index.ts b/src/api/resources/ats/resources/jobs/client/requests/index.ts index 60235293c..5a33d8c1c 100644 --- a/src/api/resources/ats/resources/jobs/client/requests/index.ts +++ b/src/api/resources/ats/resources/jobs/client/requests/index.ts @@ -1,3 +1,3 @@ -export { JobsListRequest } from "./JobsListRequest"; -export { JobsRetrieveRequest } from "./JobsRetrieveRequest"; -export { JobsScreeningQuestionsListRequest } from "./JobsScreeningQuestionsListRequest"; +export { type JobsListRequest } from "./JobsListRequest"; +export { type JobsRetrieveRequest } from "./JobsRetrieveRequest"; +export { type JobsScreeningQuestionsListRequest } from "./JobsScreeningQuestionsListRequest"; diff --git a/src/api/resources/ats/resources/linkToken/client/Client.ts b/src/api/resources/ats/resources/linkToken/client/Client.ts index 07360d1b2..550e13a5c 100644 --- a/src/api/resources/ats/resources/linkToken/client/Client.ts +++ b/src/api/resources/ats/resources/linkToken/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace LinkToken { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,12 +38,15 @@ export class LinkToken { /** * Creates a link token to be used when linking a new end user. * + * @param {Merge.ats.EndUserDetailsRequest} request + * @param {LinkToken.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.linkToken.create({ + * await client.ats.linkToken.create({ * endUserEmailAddress: "example@gmail.com", * endUserOrganizationName: "Test Organization", * endUserOriginId: "12345", - * categories: [Merge.ats.CategoriesEnum.Hris, Merge.ats.CategoriesEnum.Ats] + * categories: ["hris", "ats"] * }) */ public async create( @@ -55,15 +67,21 @@ export class LinkToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ats.EndUserDetailsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.ats.EndUserDetailsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.LinkToken.parseOrThrow(_response.body, { + return serializers.ats.LinkToken.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +104,7 @@ export class LinkToken { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/link-token."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -94,7 +112,7 @@ export class LinkToken { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/linkToken/client/requests/EndUserDetailsRequest.ts b/src/api/resources/ats/resources/linkToken/client/requests/EndUserDetailsRequest.ts index 27c04ea15..670e06d99 100644 --- a/src/api/resources/ats/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/api/resources/ats/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example @@ -10,7 +10,7 @@ import * as Merge from "../../../../../.."; * endUserEmailAddress: "example@gmail.com", * endUserOrganizationName: "Test Organization", * endUserOriginId: "12345", - * categories: [Merge.ats.CategoriesEnum.Hris, Merge.ats.CategoriesEnum.Ats] + * categories: ["hris", "ats"] * } */ export interface EndUserDetailsRequest { diff --git a/src/api/resources/ats/resources/linkToken/client/requests/index.ts b/src/api/resources/ats/resources/linkToken/client/requests/index.ts index d94b44a3e..de1b7e67d 100644 --- a/src/api/resources/ats/resources/linkToken/client/requests/index.ts +++ b/src/api/resources/ats/resources/linkToken/client/requests/index.ts @@ -1 +1 @@ -export { EndUserDetailsRequest } from "./EndUserDetailsRequest"; +export { type EndUserDetailsRequest } from "./EndUserDetailsRequest"; diff --git a/src/api/resources/ats/resources/linkedAccounts/client/Client.ts b/src/api/resources/ats/resources/linkedAccounts/client/Client.ts index b92e994c0..2a52a57bf 100644 --- a/src/api/resources/ats/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/ats/resources/linkedAccounts/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace LinkedAccounts { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class LinkedAccounts { /** * List linked accounts for your organization. * + * @param {Merge.ats.LinkedAccountsListRequest} request + * @param {LinkedAccounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.linkedAccounts.list({}) + * await client.ats.linkedAccounts.list() */ public async list( request: Merge.ats.LinkedAccountsListRequest = {}, @@ -51,7 +63,7 @@ export class LinkedAccounts { pageSize, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (category != null) { _queryParams["category"] = category; } @@ -118,15 +130,21 @@ export class LinkedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -149,7 +167,7 @@ export class LinkedAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/linked-accounts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -157,7 +175,7 @@ export class LinkedAccounts { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts b/src/api/resources/ats/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts index fd2b894f3..7ad64728f 100644 --- a/src/api/resources/ats/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts +++ b/src/api/resources/ats/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/linkedAccounts/client/requests/index.ts b/src/api/resources/ats/resources/linkedAccounts/client/requests/index.ts index ef755b09f..d28d7a17d 100644 --- a/src/api/resources/ats/resources/linkedAccounts/client/requests/index.ts +++ b/src/api/resources/ats/resources/linkedAccounts/client/requests/index.ts @@ -1 +1 @@ -export { LinkedAccountsListRequest } from "./LinkedAccountsListRequest"; +export { type LinkedAccountsListRequest } from "./LinkedAccountsListRequest"; diff --git a/src/api/resources/ats/resources/offers/client/Client.ts b/src/api/resources/ats/resources/offers/client/Client.ts index 1991febd6..5c434236d 100644 --- a/src/api/resources/ats/resources/offers/client/Client.ts +++ b/src/api/resources/ats/resources/offers/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Offers { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Offers { /** * Returns a list of `Offer` objects. * + * @param {Merge.ats.OffersListRequest} request + * @param {Offers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.offers.list({}) + * await client.ats.offers.list() */ public async list( request: Merge.ats.OffersListRequest = {}, @@ -53,7 +65,7 @@ export class Offers { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (applicationId != null) { _queryParams["application_id"] = applicationId; } @@ -128,15 +140,21 @@ export class Offers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedOfferList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedOfferList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -159,7 +177,7 @@ export class Offers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/offers."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -170,8 +188,12 @@ export class Offers { /** * Returns an `Offer` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.OffersRetrieveRequest} request + * @param {Offers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.offers.retrieve("id", {}) + * await client.ats.offers.retrieve("id") */ public async retrieve( id: string, @@ -179,7 +201,7 @@ export class Offers { requestOptions?: Offers.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -199,7 +221,7 @@ export class Offers { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/offers/${id}` + `ats/v1/offers/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -210,15 +232,21 @@ export class Offers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.Offer.parseOrThrow(_response.body, { + return serializers.ats.Offer.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -241,7 +269,7 @@ export class Offers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/offers/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -249,7 +277,7 @@ export class Offers { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/offers/client/requests/OffersListRequest.ts b/src/api/resources/ats/resources/offers/client/requests/OffersListRequest.ts index 2d1b19112..9c2661604 100644 --- a/src/api/resources/ats/resources/offers/client/requests/OffersListRequest.ts +++ b/src/api/resources/ats/resources/offers/client/requests/OffersListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/offers/client/requests/OffersRetrieveRequest.ts b/src/api/resources/ats/resources/offers/client/requests/OffersRetrieveRequest.ts index 6c14fce5a..cc8c60321 100644 --- a/src/api/resources/ats/resources/offers/client/requests/OffersRetrieveRequest.ts +++ b/src/api/resources/ats/resources/offers/client/requests/OffersRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/offers/client/requests/index.ts b/src/api/resources/ats/resources/offers/client/requests/index.ts index f83e40855..3888ba0bb 100644 --- a/src/api/resources/ats/resources/offers/client/requests/index.ts +++ b/src/api/resources/ats/resources/offers/client/requests/index.ts @@ -1,2 +1,2 @@ -export { OffersListRequest } from "./OffersListRequest"; -export { OffersRetrieveRequest } from "./OffersRetrieveRequest"; +export { type OffersListRequest } from "./OffersListRequest"; +export { type OffersRetrieveRequest } from "./OffersRetrieveRequest"; diff --git a/src/api/resources/ats/resources/offices/client/Client.ts b/src/api/resources/ats/resources/offices/client/Client.ts index 2ecab9234..d72a8b09a 100644 --- a/src/api/resources/ats/resources/offices/client/Client.ts +++ b/src/api/resources/ats/resources/offices/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Offices { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Offices { /** * Returns a list of `Office` objects. * + * @param {Merge.ats.OfficesListRequest} request + * @param {Offices.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.offices.list({}) + * await client.ats.offices.list() */ public async list( request: Merge.ats.OfficesListRequest = {}, @@ -48,7 +60,7 @@ export class Offices { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,15 +115,21 @@ export class Offices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedOfficeList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedOfficeList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -134,7 +152,7 @@ export class Offices { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/offices."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -145,8 +163,12 @@ export class Offices { /** * Returns an `Office` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.OfficesRetrieveRequest} request + * @param {Offices.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.offices.retrieve("id", {}) + * await client.ats.offices.retrieve("id") */ public async retrieve( id: string, @@ -154,7 +176,7 @@ export class Offices { requestOptions?: Offices.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -162,7 +184,7 @@ export class Offices { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/offices/${id}` + `ats/v1/offices/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -173,15 +195,21 @@ export class Offices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.Office.parseOrThrow(_response.body, { + return serializers.ats.Office.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -204,7 +232,7 @@ export class Offices { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/offices/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -212,7 +240,7 @@ export class Offices { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/offices/client/requests/index.ts b/src/api/resources/ats/resources/offices/client/requests/index.ts index a470950c5..db83be6ff 100644 --- a/src/api/resources/ats/resources/offices/client/requests/index.ts +++ b/src/api/resources/ats/resources/offices/client/requests/index.ts @@ -1,2 +1,2 @@ -export { OfficesListRequest } from "./OfficesListRequest"; -export { OfficesRetrieveRequest } from "./OfficesRetrieveRequest"; +export { type OfficesListRequest } from "./OfficesListRequest"; +export { type OfficesRetrieveRequest } from "./OfficesRetrieveRequest"; diff --git a/src/api/resources/ats/resources/passthrough/client/Client.ts b/src/api/resources/ats/resources/passthrough/client/Client.ts index e2699cab6..78a2b40c2 100644 --- a/src/api/resources/ats/resources/passthrough/client/Client.ts +++ b/src/api/resources/ats/resources/passthrough/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace Passthrough { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,9 +38,12 @@ export class Passthrough { /** * Pull data from an endpoint not currently supported by Merge. * + * @param {Merge.ats.DataPassthroughRequest} request + * @param {Passthrough.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.passthrough.create({ - * method: Merge.ats.MethodEnum.Get, + * await client.ats.passthrough.create({ + * method: "GET", * path: "/scooters" * }) */ @@ -53,17 +65,21 @@ export class Passthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ats.DataPassthroughRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.ats.DataPassthroughRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.RemoteResponse.parseOrThrow(_response.body, { + return serializers.ats.RemoteResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +102,7 @@ export class Passthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/passthrough."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -94,7 +110,7 @@ export class Passthrough { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/regenerateKey/client/Client.ts b/src/api/resources/ats/resources/regenerateKey/client/Client.ts index c43c370ea..3a30e2822 100644 --- a/src/api/resources/ats/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/ats/resources/regenerateKey/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace RegenerateKey { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class RegenerateKey { /** * Exchange remote keys. * + * @param {Merge.ats.RemoteKeyForRegenerationRequest} request + * @param {RegenerateKey.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.regenerateKey.create({ + * await client.ats.regenerateKey.create({ * name: "Remote Deployment Key 1" * }) */ @@ -52,17 +64,23 @@ export class RegenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ats.RemoteKeyForRegenerationRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.ats.RemoteKeyForRegenerationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.RemoteKey.parseOrThrow(_response.body, { + return serializers.ats.RemoteKey.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +103,7 @@ export class RegenerateKey { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/regenerate-key."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -93,7 +111,7 @@ export class RegenerateKey { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/regenerateKey/client/requests/index.ts b/src/api/resources/ats/resources/regenerateKey/client/requests/index.ts index 2987ef933..09bb5dbd0 100644 --- a/src/api/resources/ats/resources/regenerateKey/client/requests/index.ts +++ b/src/api/resources/ats/resources/regenerateKey/client/requests/index.ts @@ -1 +1 @@ -export { RemoteKeyForRegenerationRequest } from "./RemoteKeyForRegenerationRequest"; +export { type RemoteKeyForRegenerationRequest } from "./RemoteKeyForRegenerationRequest"; diff --git a/src/api/resources/ats/resources/rejectReasons/client/Client.ts b/src/api/resources/ats/resources/rejectReasons/client/Client.ts index eec0d2fa0..30885bf16 100644 --- a/src/api/resources/ats/resources/rejectReasons/client/Client.ts +++ b/src/api/resources/ats/resources/rejectReasons/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace RejectReasons { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class RejectReasons { /** * Returns a list of `RejectReason` objects. * + * @param {Merge.ats.RejectReasonsListRequest} request + * @param {RejectReasons.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.rejectReasons.list({}) + * await client.ats.rejectReasons.list() */ public async list( request: Merge.ats.RejectReasonsListRequest = {}, @@ -48,7 +60,7 @@ export class RejectReasons { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,15 +115,21 @@ export class RejectReasons { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedRejectReasonList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedRejectReasonList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -134,7 +152,7 @@ export class RejectReasons { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/reject-reasons."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -145,8 +163,12 @@ export class RejectReasons { /** * Returns a `RejectReason` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.RejectReasonsRetrieveRequest} request + * @param {RejectReasons.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.rejectReasons.retrieve("id", {}) + * await client.ats.rejectReasons.retrieve("id") */ public async retrieve( id: string, @@ -154,7 +176,7 @@ export class RejectReasons { requestOptions?: RejectReasons.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -162,7 +184,7 @@ export class RejectReasons { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/reject-reasons/${id}` + `ats/v1/reject-reasons/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -173,15 +195,21 @@ export class RejectReasons { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.RejectReason.parseOrThrow(_response.body, { + return serializers.ats.RejectReason.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -204,7 +232,7 @@ export class RejectReasons { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/reject-reasons/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -212,7 +240,7 @@ export class RejectReasons { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/rejectReasons/client/requests/index.ts b/src/api/resources/ats/resources/rejectReasons/client/requests/index.ts index c3a0249d7..4da8c0687 100644 --- a/src/api/resources/ats/resources/rejectReasons/client/requests/index.ts +++ b/src/api/resources/ats/resources/rejectReasons/client/requests/index.ts @@ -1,2 +1,2 @@ -export { RejectReasonsListRequest } from "./RejectReasonsListRequest"; -export { RejectReasonsRetrieveRequest } from "./RejectReasonsRetrieveRequest"; +export { type RejectReasonsListRequest } from "./RejectReasonsListRequest"; +export { type RejectReasonsRetrieveRequest } from "./RejectReasonsRetrieveRequest"; diff --git a/src/api/resources/ats/resources/scopes/client/Client.ts b/src/api/resources/ats/resources/scopes/client/Client.ts index 26ee6b0a9..faab30a28 100644 --- a/src/api/resources/ats/resources/scopes/client/Client.ts +++ b/src/api/resources/ats/resources/scopes/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Scopes { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class Scopes { /** * Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). * + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.scopes.defaultScopesRetrieve() + * await client.ats.scopes.defaultScopesRetrieve() */ public async defaultScopesRetrieve(requestOptions?: Scopes.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.ats.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/default-scopes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -88,8 +105,10 @@ export class Scopes { /** * Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). * + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.scopes.linkedAccountScopesRetrieve() + * await client.ats.scopes.linkedAccountScopesRetrieve() */ public async linkedAccountScopesRetrieve( requestOptions?: Scopes.RequestOptions @@ -108,14 +127,20 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.ats.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -138,7 +163,7 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/linked-account-scopes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -149,8 +174,11 @@ export class Scopes { /** * Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) * + * @param {Merge.ats.LinkedAccountCommonModelScopeDeserializerRequest} request + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.scopes.linkedAccountScopesCreate({ + * await client.ats.scopes.linkedAccountScopesCreate({ * commonModels: [{ * modelName: "Employee", * modelPermissions: { @@ -189,17 +217,23 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ats.LinkedAccountCommonModelScopeDeserializerRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.ats.LinkedAccountCommonModelScopeDeserializerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.ats.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -222,7 +256,7 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/linked-account-scopes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -230,7 +264,7 @@ export class Scopes { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts b/src/api/resources/ats/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts index 471bf10e0..e64c72a96 100644 --- a/src/api/resources/ats/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/api/resources/ats/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/scopes/client/requests/index.ts b/src/api/resources/ats/resources/scopes/client/requests/index.ts index 28d8d7974..d193f008e 100644 --- a/src/api/resources/ats/resources/scopes/client/requests/index.ts +++ b/src/api/resources/ats/resources/scopes/client/requests/index.ts @@ -1 +1 @@ -export { LinkedAccountCommonModelScopeDeserializerRequest } from "./LinkedAccountCommonModelScopeDeserializerRequest"; +export { type LinkedAccountCommonModelScopeDeserializerRequest } from "./LinkedAccountCommonModelScopeDeserializerRequest"; diff --git a/src/api/resources/ats/resources/scorecards/client/Client.ts b/src/api/resources/ats/resources/scorecards/client/Client.ts index a66d4f5cd..e99b520f2 100644 --- a/src/api/resources/ats/resources/scorecards/client/Client.ts +++ b/src/api/resources/ats/resources/scorecards/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Scorecards { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Scorecards { /** * Returns a list of `Scorecard` objects. * + * @param {Merge.ats.ScorecardsListRequest} request + * @param {Scorecards.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.scorecards.list({}) + * await client.ats.scorecards.list() */ public async list( request: Merge.ats.ScorecardsListRequest = {}, @@ -54,7 +66,7 @@ export class Scorecards { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (applicationId != null) { _queryParams["application_id"] = applicationId; } @@ -133,15 +145,21 @@ export class Scorecards { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedScorecardList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedScorecardList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -164,7 +182,7 @@ export class Scorecards { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/scorecards."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -175,8 +193,12 @@ export class Scorecards { /** * Returns a `Scorecard` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.ScorecardsRetrieveRequest} request + * @param {Scorecards.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.scorecards.retrieve("id", {}) + * await client.ats.scorecards.retrieve("id") */ public async retrieve( id: string, @@ -184,7 +206,7 @@ export class Scorecards { requestOptions?: Scorecards.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -204,7 +226,7 @@ export class Scorecards { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/scorecards/${id}` + `ats/v1/scorecards/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -215,15 +237,21 @@ export class Scorecards { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.Scorecard.parseOrThrow(_response.body, { + return serializers.ats.Scorecard.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -246,7 +274,7 @@ export class Scorecards { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/scorecards/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -254,7 +282,7 @@ export class Scorecards { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsListRequest.ts b/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsListRequest.ts index f2a43f1cd..453e07851 100644 --- a/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsListRequest.ts +++ b/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsRetrieveRequest.ts b/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsRetrieveRequest.ts index 1c2a3e6c6..22fa72437 100644 --- a/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsRetrieveRequest.ts +++ b/src/api/resources/ats/resources/scorecards/client/requests/ScorecardsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ats/resources/scorecards/client/requests/index.ts b/src/api/resources/ats/resources/scorecards/client/requests/index.ts index a31f6b5c4..7025ab4e2 100644 --- a/src/api/resources/ats/resources/scorecards/client/requests/index.ts +++ b/src/api/resources/ats/resources/scorecards/client/requests/index.ts @@ -1,2 +1,2 @@ -export { ScorecardsListRequest } from "./ScorecardsListRequest"; -export { ScorecardsRetrieveRequest } from "./ScorecardsRetrieveRequest"; +export { type ScorecardsListRequest } from "./ScorecardsListRequest"; +export { type ScorecardsRetrieveRequest } from "./ScorecardsRetrieveRequest"; diff --git a/src/api/resources/ats/resources/syncStatus/client/Client.ts b/src/api/resources/ats/resources/syncStatus/client/Client.ts index 0f3f1d8c3..546a3bb1b 100644 --- a/src/api/resources/ats/resources/syncStatus/client/Client.ts +++ b/src/api/resources/ats/resources/syncStatus/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace SyncStatus { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,15 +38,18 @@ export class SyncStatus { /** * Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). * + * @param {Merge.ats.SyncStatusListRequest} request + * @param {SyncStatus.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.syncStatus.list({}) + * await client.ats.syncStatus.list() */ public async list( request: Merge.ats.SyncStatusListRequest = {}, requestOptions?: SyncStatus.RequestOptions ): Promise { const { cursor, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -60,15 +72,21 @@ export class SyncStatus { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedSyncStatusList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedSyncStatusList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -91,7 +109,7 @@ export class SyncStatus { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/sync-status."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -99,7 +117,7 @@ export class SyncStatus { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/syncStatus/client/requests/index.ts b/src/api/resources/ats/resources/syncStatus/client/requests/index.ts index 58e9548fe..ef4f7c855 100644 --- a/src/api/resources/ats/resources/syncStatus/client/requests/index.ts +++ b/src/api/resources/ats/resources/syncStatus/client/requests/index.ts @@ -1 +1 @@ -export { SyncStatusListRequest } from "./SyncStatusListRequest"; +export { type SyncStatusListRequest } from "./SyncStatusListRequest"; diff --git a/src/api/resources/ats/resources/tags/client/Client.ts b/src/api/resources/ats/resources/tags/client/Client.ts index 1618178bd..8a584c5da 100644 --- a/src/api/resources/ats/resources/tags/client/Client.ts +++ b/src/api/resources/ats/resources/tags/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Tags { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Tags { /** * Returns a list of `Tag` objects. * + * @param {Merge.ats.TagsListRequest} request + * @param {Tags.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.tags.list({}) + * await client.ats.tags.list() */ public async list( request: Merge.ats.TagsListRequest = {}, @@ -48,7 +60,7 @@ export class Tags { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,15 +115,21 @@ export class Tags { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedTagList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedTagList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -134,7 +152,7 @@ export class Tags { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/tags."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -142,7 +160,7 @@ export class Tags { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/tags/client/requests/index.ts b/src/api/resources/ats/resources/tags/client/requests/index.ts index 227db3bd7..116a6a69a 100644 --- a/src/api/resources/ats/resources/tags/client/requests/index.ts +++ b/src/api/resources/ats/resources/tags/client/requests/index.ts @@ -1 +1 @@ -export { TagsListRequest } from "./TagsListRequest"; +export { type TagsListRequest } from "./TagsListRequest"; diff --git a/src/api/resources/ats/resources/users/client/Client.ts b/src/api/resources/ats/resources/users/client/Client.ts index 3e6e3fd0d..de8519140 100644 --- a/src/api/resources/ats/resources/users/client/Client.ts +++ b/src/api/resources/ats/resources/users/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Users { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Users { /** * Returns a list of `RemoteUser` objects. * + * @param {Merge.ats.UsersListRequest} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.users.list({}) + * await client.ats.users.list() */ public async list( request: Merge.ats.UsersListRequest = {}, @@ -51,7 +63,7 @@ export class Users { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -118,15 +130,21 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.PaginatedRemoteUserList.parseOrThrow(_response.body, { + return serializers.ats.PaginatedRemoteUserList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -149,7 +167,7 @@ export class Users { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/users."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -160,8 +178,12 @@ export class Users { /** * Returns a `RemoteUser` object with the given `id`. * + * @param {string} id + * @param {Merge.ats.UsersRetrieveRequest} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.users.retrieve("id", {}) + * await client.ats.users.retrieve("id") */ public async retrieve( id: string, @@ -169,7 +191,7 @@ export class Users { requestOptions?: Users.RequestOptions ): Promise { const { includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -185,7 +207,7 @@ export class Users { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/users/${id}` + `ats/v1/users/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -196,15 +218,21 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.RemoteUser.parseOrThrow(_response.body, { + return serializers.ats.RemoteUser.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -227,7 +255,7 @@ export class Users { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/users/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -235,7 +263,7 @@ export class Users { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/users/client/requests/index.ts b/src/api/resources/ats/resources/users/client/requests/index.ts index df5bbab6e..7d1cf841a 100644 --- a/src/api/resources/ats/resources/users/client/requests/index.ts +++ b/src/api/resources/ats/resources/users/client/requests/index.ts @@ -1,2 +1,2 @@ -export { UsersListRequest } from "./UsersListRequest"; -export { UsersRetrieveRequest } from "./UsersRetrieveRequest"; +export { type UsersListRequest } from "./UsersListRequest"; +export { type UsersRetrieveRequest } from "./UsersRetrieveRequest"; diff --git a/src/api/resources/ats/resources/webhookReceivers/client/Client.ts b/src/api/resources/ats/resources/webhookReceivers/client/Client.ts index 64d2729cc..6cc6e03e2 100644 --- a/src/api/resources/ats/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/ats/resources/webhookReceivers/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace WebhookReceivers { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class WebhookReceivers { /** * Returns a list of `WebhookReceiver` objects. * + * @param {WebhookReceivers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.webhookReceivers.list() + * await client.ats.webhookReceivers.list() */ public async list(requestOptions?: WebhookReceivers.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.webhookReceivers.list.Response.parseOrThrow(_response.body, { + return serializers.ats.webhookReceivers.list.Response.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class WebhookReceivers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ats/v1/webhook-receivers."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -88,8 +105,11 @@ export class WebhookReceivers { /** * Creates a `WebhookReceiver` object with the given values. * + * @param {Merge.ats.WebhookReceiverRequest} request + * @param {WebhookReceivers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ats.webhookReceivers.create({ + * await client.ats.webhookReceivers.create({ * event: "event", * isActive: true * }) @@ -112,17 +132,21 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ats.WebhookReceiverRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.ats.WebhookReceiverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ats.WebhookReceiver.parseOrThrow(_response.body, { + return serializers.ats.WebhookReceiver.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +169,7 @@ export class WebhookReceivers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ats/v1/webhook-receivers."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -153,7 +177,7 @@ export class WebhookReceivers { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ats/resources/webhookReceivers/client/requests/index.ts b/src/api/resources/ats/resources/webhookReceivers/client/requests/index.ts index 29f534250..1df76ea53 100644 --- a/src/api/resources/ats/resources/webhookReceivers/client/requests/index.ts +++ b/src/api/resources/ats/resources/webhookReceivers/client/requests/index.ts @@ -1 +1 @@ -export { WebhookReceiverRequest } from "./WebhookReceiverRequest"; +export { type WebhookReceiverRequest } from "./WebhookReceiverRequest"; diff --git a/src/api/resources/ats/types/AccountDetails.ts b/src/api/resources/ats/types/AccountDetails.ts index 72e5cf802..80d018b9a 100644 --- a/src/api/resources/ats/types/AccountDetails.ts +++ b/src/api/resources/ats/types/AccountDetails.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountDetails { id?: string; diff --git a/src/api/resources/ats/types/AccountDetailsAndActions.ts b/src/api/resources/ats/types/AccountDetailsAndActions.ts index 6bc99de89..b89ef4cf4 100644 --- a/src/api/resources/ats/types/AccountDetailsAndActions.ts +++ b/src/api/resources/ats/types/AccountDetailsAndActions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The LinkedAccount Object diff --git a/src/api/resources/ats/types/AccountDetailsAndActionsIntegration.ts b/src/api/resources/ats/types/AccountDetailsAndActionsIntegration.ts index 10c743f47..9bc84efed 100644 --- a/src/api/resources/ats/types/AccountDetailsAndActionsIntegration.ts +++ b/src/api/resources/ats/types/AccountDetailsAndActionsIntegration.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountDetailsAndActionsIntegration { name: string; diff --git a/src/api/resources/ats/types/AccountIntegration.ts b/src/api/resources/ats/types/AccountIntegration.ts index 53cc11aed..7fc19dcc3 100644 --- a/src/api/resources/ats/types/AccountIntegration.ts +++ b/src/api/resources/ats/types/AccountIntegration.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountIntegration { /** Company name. */ diff --git a/src/api/resources/ats/types/AccountToken.ts b/src/api/resources/ats/types/AccountToken.ts index 946115f0f..d61e7cc01 100644 --- a/src/api/resources/ats/types/AccountToken.ts +++ b/src/api/resources/ats/types/AccountToken.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountToken { accountToken: string; diff --git a/src/api/resources/ats/types/Activity.ts b/src/api/resources/ats/types/Activity.ts index 6150bac4e..ed6fcdac7 100644 --- a/src/api/resources/ats/types/Activity.ts +++ b/src/api/resources/ats/types/Activity.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Activity Object diff --git a/src/api/resources/ats/types/ActivityActivityType.ts b/src/api/resources/ats/types/ActivityActivityType.ts index 71af1ffe6..67a0c7013 100644 --- a/src/api/resources/ats/types/ActivityActivityType.ts +++ b/src/api/resources/ats/types/ActivityActivityType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The activity's type. diff --git a/src/api/resources/ats/types/ActivityRequest.ts b/src/api/resources/ats/types/ActivityRequest.ts index d92046fb3..3e349f372 100644 --- a/src/api/resources/ats/types/ActivityRequest.ts +++ b/src/api/resources/ats/types/ActivityRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Activity Object diff --git a/src/api/resources/ats/types/ActivityRequestActivityType.ts b/src/api/resources/ats/types/ActivityRequestActivityType.ts index f155b70ab..e1146b69a 100644 --- a/src/api/resources/ats/types/ActivityRequestActivityType.ts +++ b/src/api/resources/ats/types/ActivityRequestActivityType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The activity's type. diff --git a/src/api/resources/ats/types/ActivityRequestUser.ts b/src/api/resources/ats/types/ActivityRequestUser.ts index f86875b29..0d7a8ea07 100644 --- a/src/api/resources/ats/types/ActivityRequestUser.ts +++ b/src/api/resources/ats/types/ActivityRequestUser.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The user that performed the action. diff --git a/src/api/resources/ats/types/ActivityRequestVisibility.ts b/src/api/resources/ats/types/ActivityRequestVisibility.ts index 407d90c1d..8b8348487 100644 --- a/src/api/resources/ats/types/ActivityRequestVisibility.ts +++ b/src/api/resources/ats/types/ActivityRequestVisibility.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The activity's visibility. diff --git a/src/api/resources/ats/types/ActivityResponse.ts b/src/api/resources/ats/types/ActivityResponse.ts index 3b5749929..5238a31ee 100644 --- a/src/api/resources/ats/types/ActivityResponse.ts +++ b/src/api/resources/ats/types/ActivityResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ActivityResponse { model: Merge.ats.Activity; diff --git a/src/api/resources/ats/types/ActivityUser.ts b/src/api/resources/ats/types/ActivityUser.ts index c9b45a6b9..51c995738 100644 --- a/src/api/resources/ats/types/ActivityUser.ts +++ b/src/api/resources/ats/types/ActivityUser.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The user that performed the action. diff --git a/src/api/resources/ats/types/ActivityVisibility.ts b/src/api/resources/ats/types/ActivityVisibility.ts index d03a89905..a33aee82e 100644 --- a/src/api/resources/ats/types/ActivityVisibility.ts +++ b/src/api/resources/ats/types/ActivityVisibility.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The activity's visibility. diff --git a/src/api/resources/ats/types/Application.ts b/src/api/resources/ats/types/Application.ts index 0754a10cb..dac73c043 100644 --- a/src/api/resources/ats/types/Application.ts +++ b/src/api/resources/ats/types/Application.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Application Object diff --git a/src/api/resources/ats/types/ApplicationCandidate.ts b/src/api/resources/ats/types/ApplicationCandidate.ts index fee6dd2a5..ff1f3e5f1 100644 --- a/src/api/resources/ats/types/ApplicationCandidate.ts +++ b/src/api/resources/ats/types/ApplicationCandidate.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The candidate applying. diff --git a/src/api/resources/ats/types/ApplicationCreditedTo.ts b/src/api/resources/ats/types/ApplicationCreditedTo.ts index 1e6cfc721..bb2f1cd08 100644 --- a/src/api/resources/ats/types/ApplicationCreditedTo.ts +++ b/src/api/resources/ats/types/ApplicationCreditedTo.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The user credited for this application. diff --git a/src/api/resources/ats/types/ApplicationCurrentStage.ts b/src/api/resources/ats/types/ApplicationCurrentStage.ts index 81e476f77..9a5944b17 100644 --- a/src/api/resources/ats/types/ApplicationCurrentStage.ts +++ b/src/api/resources/ats/types/ApplicationCurrentStage.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The application's current stage. diff --git a/src/api/resources/ats/types/ApplicationJob.ts b/src/api/resources/ats/types/ApplicationJob.ts index bfba7805b..fc44b5c0c 100644 --- a/src/api/resources/ats/types/ApplicationJob.ts +++ b/src/api/resources/ats/types/ApplicationJob.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The job being applied for. diff --git a/src/api/resources/ats/types/ApplicationOffersItem.ts b/src/api/resources/ats/types/ApplicationOffersItem.ts index 14cd4e389..488ae5066 100644 --- a/src/api/resources/ats/types/ApplicationOffersItem.ts +++ b/src/api/resources/ats/types/ApplicationOffersItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type ApplicationOffersItem = string | Merge.ats.Offer; diff --git a/src/api/resources/ats/types/ApplicationRejectReason.ts b/src/api/resources/ats/types/ApplicationRejectReason.ts index 1825e3d7f..275c50484 100644 --- a/src/api/resources/ats/types/ApplicationRejectReason.ts +++ b/src/api/resources/ats/types/ApplicationRejectReason.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The application's reason for rejection. diff --git a/src/api/resources/ats/types/ApplicationRequest.ts b/src/api/resources/ats/types/ApplicationRequest.ts index 6db3adc8a..e5fc4907e 100644 --- a/src/api/resources/ats/types/ApplicationRequest.ts +++ b/src/api/resources/ats/types/ApplicationRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Application Object diff --git a/src/api/resources/ats/types/ApplicationRequestCandidate.ts b/src/api/resources/ats/types/ApplicationRequestCandidate.ts index 2fdec9ebb..eda6a43e0 100644 --- a/src/api/resources/ats/types/ApplicationRequestCandidate.ts +++ b/src/api/resources/ats/types/ApplicationRequestCandidate.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The candidate applying. diff --git a/src/api/resources/ats/types/ApplicationRequestCreditedTo.ts b/src/api/resources/ats/types/ApplicationRequestCreditedTo.ts index 99547735c..276b40d87 100644 --- a/src/api/resources/ats/types/ApplicationRequestCreditedTo.ts +++ b/src/api/resources/ats/types/ApplicationRequestCreditedTo.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The user credited for this application. diff --git a/src/api/resources/ats/types/ApplicationRequestCurrentStage.ts b/src/api/resources/ats/types/ApplicationRequestCurrentStage.ts index b8ef410d6..dea9294a4 100644 --- a/src/api/resources/ats/types/ApplicationRequestCurrentStage.ts +++ b/src/api/resources/ats/types/ApplicationRequestCurrentStage.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The application's current stage. diff --git a/src/api/resources/ats/types/ApplicationRequestJob.ts b/src/api/resources/ats/types/ApplicationRequestJob.ts index 480964adc..331fe7ece 100644 --- a/src/api/resources/ats/types/ApplicationRequestJob.ts +++ b/src/api/resources/ats/types/ApplicationRequestJob.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The job being applied for. diff --git a/src/api/resources/ats/types/ApplicationRequestOffersItem.ts b/src/api/resources/ats/types/ApplicationRequestOffersItem.ts index 007618c35..6294beab3 100644 --- a/src/api/resources/ats/types/ApplicationRequestOffersItem.ts +++ b/src/api/resources/ats/types/ApplicationRequestOffersItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type ApplicationRequestOffersItem = string | Merge.ats.Offer; diff --git a/src/api/resources/ats/types/ApplicationRequestRejectReason.ts b/src/api/resources/ats/types/ApplicationRequestRejectReason.ts index db5ad7ed1..82aeb38af 100644 --- a/src/api/resources/ats/types/ApplicationRequestRejectReason.ts +++ b/src/api/resources/ats/types/ApplicationRequestRejectReason.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The application's reason for rejection. diff --git a/src/api/resources/ats/types/ApplicationRequestScreeningQuestionAnswersItem.ts b/src/api/resources/ats/types/ApplicationRequestScreeningQuestionAnswersItem.ts index 7dbb86c0f..1825d2c27 100644 --- a/src/api/resources/ats/types/ApplicationRequestScreeningQuestionAnswersItem.ts +++ b/src/api/resources/ats/types/ApplicationRequestScreeningQuestionAnswersItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type ApplicationRequestScreeningQuestionAnswersItem = string | Merge.ats.ScreeningQuestionAnswerRequest; diff --git a/src/api/resources/ats/types/ApplicationResponse.ts b/src/api/resources/ats/types/ApplicationResponse.ts index 6a31f87af..282529b08 100644 --- a/src/api/resources/ats/types/ApplicationResponse.ts +++ b/src/api/resources/ats/types/ApplicationResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ApplicationResponse { model: Merge.ats.Application; diff --git a/src/api/resources/ats/types/ApplicationScreeningQuestionAnswersItem.ts b/src/api/resources/ats/types/ApplicationScreeningQuestionAnswersItem.ts index 55b22146f..0037e704e 100644 --- a/src/api/resources/ats/types/ApplicationScreeningQuestionAnswersItem.ts +++ b/src/api/resources/ats/types/ApplicationScreeningQuestionAnswersItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type ApplicationScreeningQuestionAnswersItem = string | Merge.ats.ScreeningQuestionAnswer; diff --git a/src/api/resources/ats/types/Attachment.ts b/src/api/resources/ats/types/Attachment.ts index f0bc3a65f..b04f1954e 100644 --- a/src/api/resources/ats/types/Attachment.ts +++ b/src/api/resources/ats/types/Attachment.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Attachment Object diff --git a/src/api/resources/ats/types/AttachmentAttachmentType.ts b/src/api/resources/ats/types/AttachmentAttachmentType.ts index 1f69bd309..0ce11d6ff 100644 --- a/src/api/resources/ats/types/AttachmentAttachmentType.ts +++ b/src/api/resources/ats/types/AttachmentAttachmentType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The attachment's type. diff --git a/src/api/resources/ats/types/AttachmentRequest.ts b/src/api/resources/ats/types/AttachmentRequest.ts index 98ac7041e..bec466857 100644 --- a/src/api/resources/ats/types/AttachmentRequest.ts +++ b/src/api/resources/ats/types/AttachmentRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Attachment Object diff --git a/src/api/resources/ats/types/AttachmentRequestAttachmentType.ts b/src/api/resources/ats/types/AttachmentRequestAttachmentType.ts index fa0a23a24..4a97b05cd 100644 --- a/src/api/resources/ats/types/AttachmentRequestAttachmentType.ts +++ b/src/api/resources/ats/types/AttachmentRequestAttachmentType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The attachment's type. diff --git a/src/api/resources/ats/types/AttachmentResponse.ts b/src/api/resources/ats/types/AttachmentResponse.ts index 1198f5c42..175807f43 100644 --- a/src/api/resources/ats/types/AttachmentResponse.ts +++ b/src/api/resources/ats/types/AttachmentResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AttachmentResponse { model: Merge.ats.Attachment; diff --git a/src/api/resources/ats/types/AuditLogEvent.ts b/src/api/resources/ats/types/AuditLogEvent.ts index e191b7f0a..8b4b29ce4 100644 --- a/src/api/resources/ats/types/AuditLogEvent.ts +++ b/src/api/resources/ats/types/AuditLogEvent.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AuditLogEvent { id?: string; diff --git a/src/api/resources/ats/types/AuditLogEventEventType.ts b/src/api/resources/ats/types/AuditLogEventEventType.ts index 0d8db9c79..add94173b 100644 --- a/src/api/resources/ats/types/AuditLogEventEventType.ts +++ b/src/api/resources/ats/types/AuditLogEventEventType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Designates the type of event that occurred. diff --git a/src/api/resources/ats/types/AuditLogEventRole.ts b/src/api/resources/ats/types/AuditLogEventRole.ts index 875bbf39f..f37ce00f6 100644 --- a/src/api/resources/ats/types/AuditLogEventRole.ts +++ b/src/api/resources/ats/types/AuditLogEventRole.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. diff --git a/src/api/resources/ats/types/AvailableActions.ts b/src/api/resources/ats/types/AvailableActions.ts index 0ad3be1f2..dc2aa71c5 100644 --- a/src/api/resources/ats/types/AvailableActions.ts +++ b/src/api/resources/ats/types/AvailableActions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The AvailableActions Object diff --git a/src/api/resources/ats/types/Candidate.ts b/src/api/resources/ats/types/Candidate.ts index 605998875..d8f208964 100644 --- a/src/api/resources/ats/types/Candidate.ts +++ b/src/api/resources/ats/types/Candidate.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Candidate Object diff --git a/src/api/resources/ats/types/CandidateApplicationsItem.ts b/src/api/resources/ats/types/CandidateApplicationsItem.ts index 059cfcc4d..d2b9811da 100644 --- a/src/api/resources/ats/types/CandidateApplicationsItem.ts +++ b/src/api/resources/ats/types/CandidateApplicationsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type CandidateApplicationsItem = string | Merge.ats.Application; diff --git a/src/api/resources/ats/types/CandidateAttachmentsItem.ts b/src/api/resources/ats/types/CandidateAttachmentsItem.ts index 2e33650cd..ebe3ec745 100644 --- a/src/api/resources/ats/types/CandidateAttachmentsItem.ts +++ b/src/api/resources/ats/types/CandidateAttachmentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type CandidateAttachmentsItem = string | Merge.ats.Attachment; diff --git a/src/api/resources/ats/types/CandidateRequest.ts b/src/api/resources/ats/types/CandidateRequest.ts index 0ffdb799a..fbf621b0b 100644 --- a/src/api/resources/ats/types/CandidateRequest.ts +++ b/src/api/resources/ats/types/CandidateRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Candidate Object diff --git a/src/api/resources/ats/types/CandidateRequestApplicationsItem.ts b/src/api/resources/ats/types/CandidateRequestApplicationsItem.ts index a531a6e47..f35dde13a 100644 --- a/src/api/resources/ats/types/CandidateRequestApplicationsItem.ts +++ b/src/api/resources/ats/types/CandidateRequestApplicationsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type CandidateRequestApplicationsItem = string | Merge.ats.Application; diff --git a/src/api/resources/ats/types/CandidateRequestAttachmentsItem.ts b/src/api/resources/ats/types/CandidateRequestAttachmentsItem.ts index f275dfecd..6979fa6b0 100644 --- a/src/api/resources/ats/types/CandidateRequestAttachmentsItem.ts +++ b/src/api/resources/ats/types/CandidateRequestAttachmentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type CandidateRequestAttachmentsItem = string | Merge.ats.Attachment; diff --git a/src/api/resources/ats/types/CandidateResponse.ts b/src/api/resources/ats/types/CandidateResponse.ts index 3a06c258f..37683e924 100644 --- a/src/api/resources/ats/types/CandidateResponse.ts +++ b/src/api/resources/ats/types/CandidateResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CandidateResponse { model: Merge.ats.Candidate; diff --git a/src/api/resources/ats/types/CommonModelScopeApi.ts b/src/api/resources/ats/types/CommonModelScopeApi.ts index f38ef60e2..35f51fa4d 100644 --- a/src/api/resources/ats/types/CommonModelScopeApi.ts +++ b/src/api/resources/ats/types/CommonModelScopeApi.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CommonModelScopeApi { /** The common models you want to update the scopes for */ diff --git a/src/api/resources/ats/types/CommonModelScopesBodyRequest.ts b/src/api/resources/ats/types/CommonModelScopesBodyRequest.ts index 7557c4247..71504df82 100644 --- a/src/api/resources/ats/types/CommonModelScopesBodyRequest.ts +++ b/src/api/resources/ats/types/CommonModelScopesBodyRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CommonModelScopesBodyRequest { modelId: string; diff --git a/src/api/resources/ats/types/DataPassthroughRequest.ts b/src/api/resources/ats/types/DataPassthroughRequest.ts index a2310e611..a1cd084f2 100644 --- a/src/api/resources/ats/types/DataPassthroughRequest.ts +++ b/src/api/resources/ats/types/DataPassthroughRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The DataPassthrough Object diff --git a/src/api/resources/ats/types/DebugModeLog.ts b/src/api/resources/ats/types/DebugModeLog.ts index a67cb5711..2774e425e 100644 --- a/src/api/resources/ats/types/DebugModeLog.ts +++ b/src/api/resources/ats/types/DebugModeLog.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface DebugModeLog { logId: string; diff --git a/src/api/resources/ats/types/Department.ts b/src/api/resources/ats/types/Department.ts index b3f390b47..8bb25744a 100644 --- a/src/api/resources/ats/types/Department.ts +++ b/src/api/resources/ats/types/Department.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Department Object diff --git a/src/api/resources/ats/types/Eeoc.ts b/src/api/resources/ats/types/Eeoc.ts index 63c7e9423..0a211d0a0 100644 --- a/src/api/resources/ats/types/Eeoc.ts +++ b/src/api/resources/ats/types/Eeoc.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The EEOC Object diff --git a/src/api/resources/ats/types/EeocCandidate.ts b/src/api/resources/ats/types/EeocCandidate.ts index ed11a0e35..491fbc620 100644 --- a/src/api/resources/ats/types/EeocCandidate.ts +++ b/src/api/resources/ats/types/EeocCandidate.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The candidate being represented. diff --git a/src/api/resources/ats/types/EeocDisabilityStatus.ts b/src/api/resources/ats/types/EeocDisabilityStatus.ts index 9244b0166..b22b664d8 100644 --- a/src/api/resources/ats/types/EeocDisabilityStatus.ts +++ b/src/api/resources/ats/types/EeocDisabilityStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The candidate's disability status. diff --git a/src/api/resources/ats/types/EeocGender.ts b/src/api/resources/ats/types/EeocGender.ts index 36f2254c8..40df749c4 100644 --- a/src/api/resources/ats/types/EeocGender.ts +++ b/src/api/resources/ats/types/EeocGender.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The candidate's gender. diff --git a/src/api/resources/ats/types/EeocRace.ts b/src/api/resources/ats/types/EeocRace.ts index 20a01c18f..d8a02ac54 100644 --- a/src/api/resources/ats/types/EeocRace.ts +++ b/src/api/resources/ats/types/EeocRace.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The candidate's race. diff --git a/src/api/resources/ats/types/EeocVeteranStatus.ts b/src/api/resources/ats/types/EeocVeteranStatus.ts index e653db44a..e70c560eb 100644 --- a/src/api/resources/ats/types/EeocVeteranStatus.ts +++ b/src/api/resources/ats/types/EeocVeteranStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The candidate's veteran status. diff --git a/src/api/resources/ats/types/EmailAddress.ts b/src/api/resources/ats/types/EmailAddress.ts index eb4c4d46b..c63e31a8b 100644 --- a/src/api/resources/ats/types/EmailAddress.ts +++ b/src/api/resources/ats/types/EmailAddress.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The EmailAddress Object diff --git a/src/api/resources/ats/types/EmailAddressEmailAddressType.ts b/src/api/resources/ats/types/EmailAddressEmailAddressType.ts index d00e1c082..dff618e4d 100644 --- a/src/api/resources/ats/types/EmailAddressEmailAddressType.ts +++ b/src/api/resources/ats/types/EmailAddressEmailAddressType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The type of email address. diff --git a/src/api/resources/ats/types/EmailAddressRequest.ts b/src/api/resources/ats/types/EmailAddressRequest.ts index c0ef8a9fe..0e730a1e7 100644 --- a/src/api/resources/ats/types/EmailAddressRequest.ts +++ b/src/api/resources/ats/types/EmailAddressRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The EmailAddress Object diff --git a/src/api/resources/ats/types/EmailAddressRequestEmailAddressType.ts b/src/api/resources/ats/types/EmailAddressRequestEmailAddressType.ts index ffd71b019..bf7db5835 100644 --- a/src/api/resources/ats/types/EmailAddressRequestEmailAddressType.ts +++ b/src/api/resources/ats/types/EmailAddressRequestEmailAddressType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The type of email address. diff --git a/src/api/resources/ats/types/ErrorValidationProblem.ts b/src/api/resources/ats/types/ErrorValidationProblem.ts index ae90fcb2b..2b84571b2 100644 --- a/src/api/resources/ats/types/ErrorValidationProblem.ts +++ b/src/api/resources/ats/types/ErrorValidationProblem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ErrorValidationProblem { source?: Merge.ats.ValidationProblemSource; diff --git a/src/api/resources/ats/types/ExternalTargetFieldApiResponse.ts b/src/api/resources/ats/types/ExternalTargetFieldApiResponse.ts index 9ee9f7d37..ae4e47665 100644 --- a/src/api/resources/ats/types/ExternalTargetFieldApiResponse.ts +++ b/src/api/resources/ats/types/ExternalTargetFieldApiResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ExternalTargetFieldApiResponse { activity?: Merge.ats.ExternalTargetFieldApi[]; diff --git a/src/api/resources/ats/types/FieldMappingApiInstance.ts b/src/api/resources/ats/types/FieldMappingApiInstance.ts index 10b4caef6..44a2f0f26 100644 --- a/src/api/resources/ats/types/FieldMappingApiInstance.ts +++ b/src/api/resources/ats/types/FieldMappingApiInstance.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstance { id?: string; diff --git a/src/api/resources/ats/types/FieldMappingApiInstanceRemoteField.ts b/src/api/resources/ats/types/FieldMappingApiInstanceRemoteField.ts index d5f41a1da..932cbccfc 100644 --- a/src/api/resources/ats/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/api/resources/ats/types/FieldMappingApiInstanceRemoteField.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstanceRemoteField { remoteKeyName: string; diff --git a/src/api/resources/ats/types/FieldMappingApiInstanceResponse.ts b/src/api/resources/ats/types/FieldMappingApiInstanceResponse.ts index fefbda912..92d81582e 100644 --- a/src/api/resources/ats/types/FieldMappingApiInstanceResponse.ts +++ b/src/api/resources/ats/types/FieldMappingApiInstanceResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstanceResponse { activity?: Merge.ats.FieldMappingApiInstance[]; diff --git a/src/api/resources/ats/types/FieldMappingInstanceResponse.ts b/src/api/resources/ats/types/FieldMappingInstanceResponse.ts index da4484b6e..5dcc4848b 100644 --- a/src/api/resources/ats/types/FieldMappingInstanceResponse.ts +++ b/src/api/resources/ats/types/FieldMappingInstanceResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingInstanceResponse { model: Merge.ats.FieldMappingApiInstance; diff --git a/src/api/resources/ats/types/IndividualCommonModelScopeDeserializer.ts b/src/api/resources/ats/types/IndividualCommonModelScopeDeserializer.ts index bd95dbc04..600e97907 100644 --- a/src/api/resources/ats/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/api/resources/ats/types/IndividualCommonModelScopeDeserializer.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface IndividualCommonModelScopeDeserializer { modelName: string; diff --git a/src/api/resources/ats/types/IndividualCommonModelScopeDeserializerRequest.ts b/src/api/resources/ats/types/IndividualCommonModelScopeDeserializerRequest.ts index ce3a34a41..32383dfed 100644 --- a/src/api/resources/ats/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/api/resources/ats/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface IndividualCommonModelScopeDeserializerRequest { modelName: string; diff --git a/src/api/resources/ats/types/Issue.ts b/src/api/resources/ats/types/Issue.ts index 3d36c5605..b5f0b397a 100644 --- a/src/api/resources/ats/types/Issue.ts +++ b/src/api/resources/ats/types/Issue.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface Issue { id?: string; diff --git a/src/api/resources/ats/types/IssueStatus.ts b/src/api/resources/ats/types/IssueStatus.ts index 1e587c484..b3e815cc4 100644 --- a/src/api/resources/ats/types/IssueStatus.ts +++ b/src/api/resources/ats/types/IssueStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Status of the issue. Options: ('ONGOING', 'RESOLVED') diff --git a/src/api/resources/ats/types/Job.ts b/src/api/resources/ats/types/Job.ts index dbd522856..b4d86a22f 100644 --- a/src/api/resources/ats/types/Job.ts +++ b/src/api/resources/ats/types/Job.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Job Object diff --git a/src/api/resources/ats/types/JobDepartmentsItem.ts b/src/api/resources/ats/types/JobDepartmentsItem.ts index 9c33235c3..f97dcc05c 100644 --- a/src/api/resources/ats/types/JobDepartmentsItem.ts +++ b/src/api/resources/ats/types/JobDepartmentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JobDepartmentsItem = string | Merge.ats.Department; diff --git a/src/api/resources/ats/types/JobHiringManagersItem.ts b/src/api/resources/ats/types/JobHiringManagersItem.ts index 1d80f6323..353e66072 100644 --- a/src/api/resources/ats/types/JobHiringManagersItem.ts +++ b/src/api/resources/ats/types/JobHiringManagersItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JobHiringManagersItem = string | Merge.ats.RemoteUser; diff --git a/src/api/resources/ats/types/JobInterviewStage.ts b/src/api/resources/ats/types/JobInterviewStage.ts index 1a8fc87aa..df2828703 100644 --- a/src/api/resources/ats/types/JobInterviewStage.ts +++ b/src/api/resources/ats/types/JobInterviewStage.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The JobInterviewStage Object diff --git a/src/api/resources/ats/types/JobInterviewStageJob.ts b/src/api/resources/ats/types/JobInterviewStageJob.ts index c2e706b65..30f6fa0b6 100644 --- a/src/api/resources/ats/types/JobInterviewStageJob.ts +++ b/src/api/resources/ats/types/JobInterviewStageJob.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * This field is populated only if the stage is specific to a particular job. If the stage is generic, this field will not be populated. diff --git a/src/api/resources/ats/types/JobOfficesItem.ts b/src/api/resources/ats/types/JobOfficesItem.ts index 89fe35909..31ea79134 100644 --- a/src/api/resources/ats/types/JobOfficesItem.ts +++ b/src/api/resources/ats/types/JobOfficesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JobOfficesItem = string | Merge.ats.Office; diff --git a/src/api/resources/ats/types/JobPosting.ts b/src/api/resources/ats/types/JobPosting.ts index 1849419cc..f882d6e8d 100644 --- a/src/api/resources/ats/types/JobPosting.ts +++ b/src/api/resources/ats/types/JobPosting.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The JobPosting Object diff --git a/src/api/resources/ats/types/JobPostingJob.ts b/src/api/resources/ats/types/JobPostingJob.ts index 59c45c088..de0114a03 100644 --- a/src/api/resources/ats/types/JobPostingJob.ts +++ b/src/api/resources/ats/types/JobPostingJob.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * ID of `Job` object for this `JobPosting`. diff --git a/src/api/resources/ats/types/JobPostingJobPostingUrlsItem.ts b/src/api/resources/ats/types/JobPostingJobPostingUrlsItem.ts index 5d9ff149f..ef761e1e2 100644 --- a/src/api/resources/ats/types/JobPostingJobPostingUrlsItem.ts +++ b/src/api/resources/ats/types/JobPostingJobPostingUrlsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JobPostingJobPostingUrlsItem = string | Merge.ats.Url; diff --git a/src/api/resources/ats/types/JobRecruitersItem.ts b/src/api/resources/ats/types/JobRecruitersItem.ts index ffec9ad5e..cfe75c7d4 100644 --- a/src/api/resources/ats/types/JobRecruitersItem.ts +++ b/src/api/resources/ats/types/JobRecruitersItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type JobRecruitersItem = string | Merge.ats.RemoteUser; diff --git a/src/api/resources/ats/types/JobStatus.ts b/src/api/resources/ats/types/JobStatus.ts index 679a4257a..24721a30a 100644 --- a/src/api/resources/ats/types/JobStatus.ts +++ b/src/api/resources/ats/types/JobStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The job's status. diff --git a/src/api/resources/ats/types/MetaResponse.ts b/src/api/resources/ats/types/MetaResponse.ts index 68c8ce3cd..a34361790 100644 --- a/src/api/resources/ats/types/MetaResponse.ts +++ b/src/api/resources/ats/types/MetaResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface MetaResponse { requestSchema: Record; diff --git a/src/api/resources/ats/types/MultipartFormFieldRequest.ts b/src/api/resources/ats/types/MultipartFormFieldRequest.ts index e9af7924c..de3a3dd81 100644 --- a/src/api/resources/ats/types/MultipartFormFieldRequest.ts +++ b/src/api/resources/ats/types/MultipartFormFieldRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The MultipartFormField Object diff --git a/src/api/resources/ats/types/MultipartFormFieldRequestEncoding.ts b/src/api/resources/ats/types/MultipartFormFieldRequestEncoding.ts index 40430f27e..7bae6dc8f 100644 --- a/src/api/resources/ats/types/MultipartFormFieldRequestEncoding.ts +++ b/src/api/resources/ats/types/MultipartFormFieldRequestEncoding.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The encoding of the value of `data`. Defaults to `RAW` if not defined. diff --git a/src/api/resources/ats/types/Offer.ts b/src/api/resources/ats/types/Offer.ts index a6cd0570b..2f6cddb00 100644 --- a/src/api/resources/ats/types/Offer.ts +++ b/src/api/resources/ats/types/Offer.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Offer Object diff --git a/src/api/resources/ats/types/OfferApplication.ts b/src/api/resources/ats/types/OfferApplication.ts index 3eb9f6dfd..95ad50dc1 100644 --- a/src/api/resources/ats/types/OfferApplication.ts +++ b/src/api/resources/ats/types/OfferApplication.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The application who is receiving the offer. diff --git a/src/api/resources/ats/types/OfferCreator.ts b/src/api/resources/ats/types/OfferCreator.ts index eace98d42..a849d54ab 100644 --- a/src/api/resources/ats/types/OfferCreator.ts +++ b/src/api/resources/ats/types/OfferCreator.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The user who created the offer. diff --git a/src/api/resources/ats/types/OfferStatus.ts b/src/api/resources/ats/types/OfferStatus.ts index fd893c42f..c17b28cc2 100644 --- a/src/api/resources/ats/types/OfferStatus.ts +++ b/src/api/resources/ats/types/OfferStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The offer's status. diff --git a/src/api/resources/ats/types/Office.ts b/src/api/resources/ats/types/Office.ts index 2abc887ff..4c74a76f0 100644 --- a/src/api/resources/ats/types/Office.ts +++ b/src/api/resources/ats/types/Office.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Office Object diff --git a/src/api/resources/ats/types/PaginatedAccountDetailsAndActionsList.ts b/src/api/resources/ats/types/PaginatedAccountDetailsAndActionsList.ts index eef091e7b..034e06d72 100644 --- a/src/api/resources/ats/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/api/resources/ats/types/PaginatedAccountDetailsAndActionsList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAccountDetailsAndActionsList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedActivityList.ts b/src/api/resources/ats/types/PaginatedActivityList.ts index 12e99b15c..ec8802031 100644 --- a/src/api/resources/ats/types/PaginatedActivityList.ts +++ b/src/api/resources/ats/types/PaginatedActivityList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedActivityList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedApplicationList.ts b/src/api/resources/ats/types/PaginatedApplicationList.ts index 6f8e39f63..462d6d1cc 100644 --- a/src/api/resources/ats/types/PaginatedApplicationList.ts +++ b/src/api/resources/ats/types/PaginatedApplicationList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedApplicationList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedAttachmentList.ts b/src/api/resources/ats/types/PaginatedAttachmentList.ts index 6c47e604e..ea4f84cd7 100644 --- a/src/api/resources/ats/types/PaginatedAttachmentList.ts +++ b/src/api/resources/ats/types/PaginatedAttachmentList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAttachmentList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedAuditLogEventList.ts b/src/api/resources/ats/types/PaginatedAuditLogEventList.ts index bbb82d021..9cf760c86 100644 --- a/src/api/resources/ats/types/PaginatedAuditLogEventList.ts +++ b/src/api/resources/ats/types/PaginatedAuditLogEventList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAuditLogEventList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedCandidateList.ts b/src/api/resources/ats/types/PaginatedCandidateList.ts index 930d0be81..53f0d9bae 100644 --- a/src/api/resources/ats/types/PaginatedCandidateList.ts +++ b/src/api/resources/ats/types/PaginatedCandidateList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedCandidateList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedDepartmentList.ts b/src/api/resources/ats/types/PaginatedDepartmentList.ts index 26ea7dff4..1f26bd8ab 100644 --- a/src/api/resources/ats/types/PaginatedDepartmentList.ts +++ b/src/api/resources/ats/types/PaginatedDepartmentList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedDepartmentList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedEeocList.ts b/src/api/resources/ats/types/PaginatedEeocList.ts index 29d52e04f..4a1925a91 100644 --- a/src/api/resources/ats/types/PaginatedEeocList.ts +++ b/src/api/resources/ats/types/PaginatedEeocList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedEeocList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedIssueList.ts b/src/api/resources/ats/types/PaginatedIssueList.ts index 71f281874..4f23100de 100644 --- a/src/api/resources/ats/types/PaginatedIssueList.ts +++ b/src/api/resources/ats/types/PaginatedIssueList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedIssueList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedJobInterviewStageList.ts b/src/api/resources/ats/types/PaginatedJobInterviewStageList.ts index f25230577..41d647f17 100644 --- a/src/api/resources/ats/types/PaginatedJobInterviewStageList.ts +++ b/src/api/resources/ats/types/PaginatedJobInterviewStageList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedJobInterviewStageList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedJobList.ts b/src/api/resources/ats/types/PaginatedJobList.ts index 3dcbe5e53..9ecbb4647 100644 --- a/src/api/resources/ats/types/PaginatedJobList.ts +++ b/src/api/resources/ats/types/PaginatedJobList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedJobList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedJobPostingList.ts b/src/api/resources/ats/types/PaginatedJobPostingList.ts index 45e4e294f..d1c415bf7 100644 --- a/src/api/resources/ats/types/PaginatedJobPostingList.ts +++ b/src/api/resources/ats/types/PaginatedJobPostingList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedJobPostingList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedOfferList.ts b/src/api/resources/ats/types/PaginatedOfferList.ts index 3fd410241..101e330a1 100644 --- a/src/api/resources/ats/types/PaginatedOfferList.ts +++ b/src/api/resources/ats/types/PaginatedOfferList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedOfferList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedOfficeList.ts b/src/api/resources/ats/types/PaginatedOfficeList.ts index 4ccf8c8cf..aa9532d1b 100644 --- a/src/api/resources/ats/types/PaginatedOfficeList.ts +++ b/src/api/resources/ats/types/PaginatedOfficeList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedOfficeList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedRejectReasonList.ts b/src/api/resources/ats/types/PaginatedRejectReasonList.ts index 69d74d3ca..f4e7ad2ea 100644 --- a/src/api/resources/ats/types/PaginatedRejectReasonList.ts +++ b/src/api/resources/ats/types/PaginatedRejectReasonList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedRejectReasonList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedRemoteUserList.ts b/src/api/resources/ats/types/PaginatedRemoteUserList.ts index 0ab3ffcaa..dc2d3cd3b 100644 --- a/src/api/resources/ats/types/PaginatedRemoteUserList.ts +++ b/src/api/resources/ats/types/PaginatedRemoteUserList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedRemoteUserList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedScheduledInterviewList.ts b/src/api/resources/ats/types/PaginatedScheduledInterviewList.ts index e63bab5bb..8a36922c4 100644 --- a/src/api/resources/ats/types/PaginatedScheduledInterviewList.ts +++ b/src/api/resources/ats/types/PaginatedScheduledInterviewList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedScheduledInterviewList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedScorecardList.ts b/src/api/resources/ats/types/PaginatedScorecardList.ts index 35fedf74f..afa57aea0 100644 --- a/src/api/resources/ats/types/PaginatedScorecardList.ts +++ b/src/api/resources/ats/types/PaginatedScorecardList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedScorecardList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedScreeningQuestionList.ts b/src/api/resources/ats/types/PaginatedScreeningQuestionList.ts index d670f6025..f56958384 100644 --- a/src/api/resources/ats/types/PaginatedScreeningQuestionList.ts +++ b/src/api/resources/ats/types/PaginatedScreeningQuestionList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedScreeningQuestionList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedSyncStatusList.ts b/src/api/resources/ats/types/PaginatedSyncStatusList.ts index 684fe97e8..d2b90a556 100644 --- a/src/api/resources/ats/types/PaginatedSyncStatusList.ts +++ b/src/api/resources/ats/types/PaginatedSyncStatusList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedSyncStatusList { next?: string; diff --git a/src/api/resources/ats/types/PaginatedTagList.ts b/src/api/resources/ats/types/PaginatedTagList.ts index 34a901d7e..e2a801ae6 100644 --- a/src/api/resources/ats/types/PaginatedTagList.ts +++ b/src/api/resources/ats/types/PaginatedTagList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedTagList { next?: string; diff --git a/src/api/resources/ats/types/PatchedCandidateRequest.ts b/src/api/resources/ats/types/PatchedCandidateRequest.ts index 3c331a67b..f7b06d4e6 100644 --- a/src/api/resources/ats/types/PatchedCandidateRequest.ts +++ b/src/api/resources/ats/types/PatchedCandidateRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Candidate Object diff --git a/src/api/resources/ats/types/PhoneNumber.ts b/src/api/resources/ats/types/PhoneNumber.ts index c0e999253..dba887cc3 100644 --- a/src/api/resources/ats/types/PhoneNumber.ts +++ b/src/api/resources/ats/types/PhoneNumber.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The PhoneNumber Object diff --git a/src/api/resources/ats/types/PhoneNumberPhoneNumberType.ts b/src/api/resources/ats/types/PhoneNumberPhoneNumberType.ts index 12f7f590f..f32236805 100644 --- a/src/api/resources/ats/types/PhoneNumberPhoneNumberType.ts +++ b/src/api/resources/ats/types/PhoneNumberPhoneNumberType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The type of phone number. diff --git a/src/api/resources/ats/types/PhoneNumberRequest.ts b/src/api/resources/ats/types/PhoneNumberRequest.ts index 6dd61551d..71c58249a 100644 --- a/src/api/resources/ats/types/PhoneNumberRequest.ts +++ b/src/api/resources/ats/types/PhoneNumberRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The PhoneNumber Object diff --git a/src/api/resources/ats/types/PhoneNumberRequestPhoneNumberType.ts b/src/api/resources/ats/types/PhoneNumberRequestPhoneNumberType.ts index 37892087b..325d26823 100644 --- a/src/api/resources/ats/types/PhoneNumberRequestPhoneNumberType.ts +++ b/src/api/resources/ats/types/PhoneNumberRequestPhoneNumberType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The type of phone number. diff --git a/src/api/resources/ats/types/RejectReason.ts b/src/api/resources/ats/types/RejectReason.ts index daac14408..6ecb67e52 100644 --- a/src/api/resources/ats/types/RejectReason.ts +++ b/src/api/resources/ats/types/RejectReason.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The RejectReason Object diff --git a/src/api/resources/ats/types/RemoteFieldApi.ts b/src/api/resources/ats/types/RemoteFieldApi.ts index 27ba360dd..b2ba58ecb 100644 --- a/src/api/resources/ats/types/RemoteFieldApi.ts +++ b/src/api/resources/ats/types/RemoteFieldApi.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldApi { schema: Record; diff --git a/src/api/resources/ats/types/RemoteFieldApiResponse.ts b/src/api/resources/ats/types/RemoteFieldApiResponse.ts index 1350fc5f3..1493f83e7 100644 --- a/src/api/resources/ats/types/RemoteFieldApiResponse.ts +++ b/src/api/resources/ats/types/RemoteFieldApiResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldApiResponse { activity?: Merge.ats.RemoteFieldApi[]; diff --git a/src/api/resources/ats/types/RemoteResponse.ts b/src/api/resources/ats/types/RemoteResponse.ts index 110cd0e40..fc38d8f3a 100644 --- a/src/api/resources/ats/types/RemoteResponse.ts +++ b/src/api/resources/ats/types/RemoteResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The RemoteResponse Object diff --git a/src/api/resources/ats/types/RemoteResponseResponseType.ts b/src/api/resources/ats/types/RemoteResponseResponseType.ts index 17ef32f68..21fb674f7 100644 --- a/src/api/resources/ats/types/RemoteResponseResponseType.ts +++ b/src/api/resources/ats/types/RemoteResponseResponseType.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type RemoteResponseResponseType = Merge.ats.ResponseTypeEnum | string; diff --git a/src/api/resources/ats/types/RemoteUser.ts b/src/api/resources/ats/types/RemoteUser.ts index 3dacaa9cd..e23a50f63 100644 --- a/src/api/resources/ats/types/RemoteUser.ts +++ b/src/api/resources/ats/types/RemoteUser.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The RemoteUser Object diff --git a/src/api/resources/ats/types/RemoteUserAccessRole.ts b/src/api/resources/ats/types/RemoteUserAccessRole.ts index f9d058451..27e44f86e 100644 --- a/src/api/resources/ats/types/RemoteUserAccessRole.ts +++ b/src/api/resources/ats/types/RemoteUserAccessRole.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The user's role. diff --git a/src/api/resources/ats/types/ScheduledInterview.ts b/src/api/resources/ats/types/ScheduledInterview.ts index c10f64294..257928e24 100644 --- a/src/api/resources/ats/types/ScheduledInterview.ts +++ b/src/api/resources/ats/types/ScheduledInterview.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The ScheduledInterview Object diff --git a/src/api/resources/ats/types/ScheduledInterviewApplication.ts b/src/api/resources/ats/types/ScheduledInterviewApplication.ts index 1f69d6fbe..7243156f7 100644 --- a/src/api/resources/ats/types/ScheduledInterviewApplication.ts +++ b/src/api/resources/ats/types/ScheduledInterviewApplication.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The application being interviewed. diff --git a/src/api/resources/ats/types/ScheduledInterviewInterviewersItem.ts b/src/api/resources/ats/types/ScheduledInterviewInterviewersItem.ts index cee10c399..220232031 100644 --- a/src/api/resources/ats/types/ScheduledInterviewInterviewersItem.ts +++ b/src/api/resources/ats/types/ScheduledInterviewInterviewersItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type ScheduledInterviewInterviewersItem = string | Merge.ats.RemoteUser; diff --git a/src/api/resources/ats/types/ScheduledInterviewJobInterviewStage.ts b/src/api/resources/ats/types/ScheduledInterviewJobInterviewStage.ts index 6435d6d93..859881523 100644 --- a/src/api/resources/ats/types/ScheduledInterviewJobInterviewStage.ts +++ b/src/api/resources/ats/types/ScheduledInterviewJobInterviewStage.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The stage of the interview. diff --git a/src/api/resources/ats/types/ScheduledInterviewOrganizer.ts b/src/api/resources/ats/types/ScheduledInterviewOrganizer.ts index c3eea11ad..656b668ea 100644 --- a/src/api/resources/ats/types/ScheduledInterviewOrganizer.ts +++ b/src/api/resources/ats/types/ScheduledInterviewOrganizer.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The user organizing the interview. diff --git a/src/api/resources/ats/types/ScheduledInterviewRequest.ts b/src/api/resources/ats/types/ScheduledInterviewRequest.ts index c90bb2121..a04b547db 100644 --- a/src/api/resources/ats/types/ScheduledInterviewRequest.ts +++ b/src/api/resources/ats/types/ScheduledInterviewRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The ScheduledInterview Object diff --git a/src/api/resources/ats/types/ScheduledInterviewRequestApplication.ts b/src/api/resources/ats/types/ScheduledInterviewRequestApplication.ts index e70690204..00b3efc24 100644 --- a/src/api/resources/ats/types/ScheduledInterviewRequestApplication.ts +++ b/src/api/resources/ats/types/ScheduledInterviewRequestApplication.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The application being interviewed. diff --git a/src/api/resources/ats/types/ScheduledInterviewRequestInterviewersItem.ts b/src/api/resources/ats/types/ScheduledInterviewRequestInterviewersItem.ts index ed6e5ca66..e8258bfa3 100644 --- a/src/api/resources/ats/types/ScheduledInterviewRequestInterviewersItem.ts +++ b/src/api/resources/ats/types/ScheduledInterviewRequestInterviewersItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type ScheduledInterviewRequestInterviewersItem = string | Merge.ats.RemoteUser; diff --git a/src/api/resources/ats/types/ScheduledInterviewRequestJobInterviewStage.ts b/src/api/resources/ats/types/ScheduledInterviewRequestJobInterviewStage.ts index 35b798a2d..c26651d70 100644 --- a/src/api/resources/ats/types/ScheduledInterviewRequestJobInterviewStage.ts +++ b/src/api/resources/ats/types/ScheduledInterviewRequestJobInterviewStage.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The stage of the interview. diff --git a/src/api/resources/ats/types/ScheduledInterviewRequestOrganizer.ts b/src/api/resources/ats/types/ScheduledInterviewRequestOrganizer.ts index 8cba8c509..69bcb1f41 100644 --- a/src/api/resources/ats/types/ScheduledInterviewRequestOrganizer.ts +++ b/src/api/resources/ats/types/ScheduledInterviewRequestOrganizer.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The user organizing the interview. diff --git a/src/api/resources/ats/types/ScheduledInterviewRequestStatus.ts b/src/api/resources/ats/types/ScheduledInterviewRequestStatus.ts index 961c14074..f8ec24a69 100644 --- a/src/api/resources/ats/types/ScheduledInterviewRequestStatus.ts +++ b/src/api/resources/ats/types/ScheduledInterviewRequestStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The interview's status. diff --git a/src/api/resources/ats/types/ScheduledInterviewResponse.ts b/src/api/resources/ats/types/ScheduledInterviewResponse.ts index 5a5f607e7..ff1b5e5e4 100644 --- a/src/api/resources/ats/types/ScheduledInterviewResponse.ts +++ b/src/api/resources/ats/types/ScheduledInterviewResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ScheduledInterviewResponse { model: Merge.ats.ScheduledInterview; diff --git a/src/api/resources/ats/types/ScheduledInterviewStatus.ts b/src/api/resources/ats/types/ScheduledInterviewStatus.ts index 7a792d97f..e9b3613e8 100644 --- a/src/api/resources/ats/types/ScheduledInterviewStatus.ts +++ b/src/api/resources/ats/types/ScheduledInterviewStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The interview's status. diff --git a/src/api/resources/ats/types/Scorecard.ts b/src/api/resources/ats/types/Scorecard.ts index e2649e289..e86ef9dda 100644 --- a/src/api/resources/ats/types/Scorecard.ts +++ b/src/api/resources/ats/types/Scorecard.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Scorecard Object diff --git a/src/api/resources/ats/types/ScorecardApplication.ts b/src/api/resources/ats/types/ScorecardApplication.ts index e68e0832e..16500a7c4 100644 --- a/src/api/resources/ats/types/ScorecardApplication.ts +++ b/src/api/resources/ats/types/ScorecardApplication.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The application being scored. diff --git a/src/api/resources/ats/types/ScorecardInterview.ts b/src/api/resources/ats/types/ScorecardInterview.ts index 0eb43c098..e6e289fad 100644 --- a/src/api/resources/ats/types/ScorecardInterview.ts +++ b/src/api/resources/ats/types/ScorecardInterview.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The interview being scored. diff --git a/src/api/resources/ats/types/ScorecardInterviewer.ts b/src/api/resources/ats/types/ScorecardInterviewer.ts index 6bc82bf2b..cd641ca4a 100644 --- a/src/api/resources/ats/types/ScorecardInterviewer.ts +++ b/src/api/resources/ats/types/ScorecardInterviewer.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The interviewer doing the scoring. diff --git a/src/api/resources/ats/types/ScorecardOverallRecommendation.ts b/src/api/resources/ats/types/ScorecardOverallRecommendation.ts index 93ed5cdf8..9505e18ea 100644 --- a/src/api/resources/ats/types/ScorecardOverallRecommendation.ts +++ b/src/api/resources/ats/types/ScorecardOverallRecommendation.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The inteviewer's recommendation. diff --git a/src/api/resources/ats/types/ScreeningQuestion.ts b/src/api/resources/ats/types/ScreeningQuestion.ts index 9a23ede9f..62150da79 100644 --- a/src/api/resources/ats/types/ScreeningQuestion.ts +++ b/src/api/resources/ats/types/ScreeningQuestion.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The ScreeningQuestion Object diff --git a/src/api/resources/ats/types/ScreeningQuestionAnswer.ts b/src/api/resources/ats/types/ScreeningQuestionAnswer.ts index 319d18247..1afae3ba9 100644 --- a/src/api/resources/ats/types/ScreeningQuestionAnswer.ts +++ b/src/api/resources/ats/types/ScreeningQuestionAnswer.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The ScreeningQuestionAnswer Object diff --git a/src/api/resources/ats/types/ScreeningQuestionAnswerQuestion.ts b/src/api/resources/ats/types/ScreeningQuestionAnswerQuestion.ts index 8e678f710..67fa3b64c 100644 --- a/src/api/resources/ats/types/ScreeningQuestionAnswerQuestion.ts +++ b/src/api/resources/ats/types/ScreeningQuestionAnswerQuestion.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The screening question associated with the candidate’s answer. To determine the data type of the answer, you can expand on the screening question by adding `screening_question_answers.question` to the `expand` query parameter. diff --git a/src/api/resources/ats/types/ScreeningQuestionAnswerRequest.ts b/src/api/resources/ats/types/ScreeningQuestionAnswerRequest.ts index 229bf7200..b622272f6 100644 --- a/src/api/resources/ats/types/ScreeningQuestionAnswerRequest.ts +++ b/src/api/resources/ats/types/ScreeningQuestionAnswerRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The ScreeningQuestionAnswer Object diff --git a/src/api/resources/ats/types/ScreeningQuestionAnswerRequestQuestion.ts b/src/api/resources/ats/types/ScreeningQuestionAnswerRequestQuestion.ts index 28e6d14d2..497cd166a 100644 --- a/src/api/resources/ats/types/ScreeningQuestionAnswerRequestQuestion.ts +++ b/src/api/resources/ats/types/ScreeningQuestionAnswerRequestQuestion.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The screening question associated with the candidate’s answer. To determine the data type of the answer, you can expand on the screening question by adding `screening_question_answers.question` to the `expand` query parameter. diff --git a/src/api/resources/ats/types/ScreeningQuestionJob.ts b/src/api/resources/ats/types/ScreeningQuestionJob.ts index 79424d30c..6dfe70289 100644 --- a/src/api/resources/ats/types/ScreeningQuestionJob.ts +++ b/src/api/resources/ats/types/ScreeningQuestionJob.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The job associated with the screening question. diff --git a/src/api/resources/ats/types/ScreeningQuestionType.ts b/src/api/resources/ats/types/ScreeningQuestionType.ts index a26ac3c6a..2314bdc62 100644 --- a/src/api/resources/ats/types/ScreeningQuestionType.ts +++ b/src/api/resources/ats/types/ScreeningQuestionType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The data type for the screening question. diff --git a/src/api/resources/ats/types/SyncStatus.ts b/src/api/resources/ats/types/SyncStatus.ts index 48485c160..dc8367822 100644 --- a/src/api/resources/ats/types/SyncStatus.ts +++ b/src/api/resources/ats/types/SyncStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The SyncStatus Object diff --git a/src/api/resources/ats/types/Url.ts b/src/api/resources/ats/types/Url.ts index dec230ac4..9766979b7 100644 --- a/src/api/resources/ats/types/Url.ts +++ b/src/api/resources/ats/types/Url.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Url Object diff --git a/src/api/resources/ats/types/UrlRequest.ts b/src/api/resources/ats/types/UrlRequest.ts index a7f43424a..37a997bb2 100644 --- a/src/api/resources/ats/types/UrlRequest.ts +++ b/src/api/resources/ats/types/UrlRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Url Object diff --git a/src/api/resources/ats/types/UrlRequestUrlType.ts b/src/api/resources/ats/types/UrlRequestUrlType.ts index e8c22434a..6a0116a78 100644 --- a/src/api/resources/ats/types/UrlRequestUrlType.ts +++ b/src/api/resources/ats/types/UrlRequestUrlType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The type of site. diff --git a/src/api/resources/ats/types/UrlUrlType.ts b/src/api/resources/ats/types/UrlUrlType.ts index 5d96b03fc..c5b94332a 100644 --- a/src/api/resources/ats/types/UrlUrlType.ts +++ b/src/api/resources/ats/types/UrlUrlType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The type of site. diff --git a/src/api/resources/ats/types/WarningValidationProblem.ts b/src/api/resources/ats/types/WarningValidationProblem.ts index 5506eba4e..c39d31c0c 100644 --- a/src/api/resources/ats/types/WarningValidationProblem.ts +++ b/src/api/resources/ats/types/WarningValidationProblem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface WarningValidationProblem { source?: Merge.ats.ValidationProblemSource; diff --git a/src/api/resources/crm/client/Client.ts b/src/api/resources/crm/client/Client.ts index 11510ae88..016202868 100644 --- a/src/api/resources/crm/client/Client.ts +++ b/src/api/resources/crm/client/Client.ts @@ -40,13 +40,22 @@ export declare namespace Crm { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } diff --git a/src/api/resources/crm/resources/accountDetails/client/Client.ts b/src/api/resources/crm/resources/accountDetails/client/Client.ts index ae4009ae5..80512877d 100644 --- a/src/api/resources/crm/resources/accountDetails/client/Client.ts +++ b/src/api/resources/crm/resources/accountDetails/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AccountDetails { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class AccountDetails { /** * Get details for a linked account. * + * @param {AccountDetails.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.accountDetails.retrieve() + * await client.crm.accountDetails.retrieve() */ public async retrieve(requestOptions?: AccountDetails.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class AccountDetails { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.AccountDetails.parseOrThrow(_response.body, { + return serializers.crm.AccountDetails.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class AccountDetails { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/account-details."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -85,7 +102,7 @@ export class AccountDetails { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/accountToken/client/Client.ts b/src/api/resources/crm/resources/accountToken/client/Client.ts index c5f41fd4f..1a1c949c7 100644 --- a/src/api/resources/crm/resources/accountToken/client/Client.ts +++ b/src/api/resources/crm/resources/accountToken/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AccountToken { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class AccountToken { /** * Returns the account token for the end user with the provided public token. * + * @param {string} publicToken + * @param {AccountToken.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.accountToken.retrieve("public_token") + * await client.crm.accountToken.retrieve("public_token") */ public async retrieve( publicToken: string, @@ -39,7 +51,7 @@ export class AccountToken { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/account-token/${publicToken}` + `crm/v1/account-token/${encodeURIComponent(publicToken)}` ), method: "GET", headers: { @@ -50,14 +62,20 @@ export class AccountToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.AccountToken.parseOrThrow(_response.body, { + return serializers.crm.AccountToken.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -80,7 +98,9 @@ export class AccountToken { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/account-token/{public_token}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -88,7 +108,7 @@ export class AccountToken { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/accounts/client/Client.ts b/src/api/resources/crm/resources/accounts/client/Client.ts index 70684a76a..fed3ba46e 100644 --- a/src/api/resources/crm/resources/accounts/client/Client.ts +++ b/src/api/resources/crm/resources/accounts/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Accounts { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Accounts { /** * Returns a list of `Account` objects. * + * @param {Merge.crm.AccountsListRequest} request + * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.accounts.list({}) + * await client.crm.accounts.list() */ public async list( request: Merge.crm.AccountsListRequest = {}, @@ -52,7 +64,7 @@ export class Accounts { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -123,15 +135,21 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedAccountList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedAccountList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Accounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/accounts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,8 +183,11 @@ export class Accounts { /** * Creates an `Account` object with the given values. * + * @param {Merge.crm.CrmAccountEndpointRequest} request + * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.accounts.create({ + * await client.crm.accounts.create({ * model: {} * }) */ @@ -175,7 +196,7 @@ export class Accounts { requestOptions?: Accounts.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -198,18 +219,22 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.crm.CrmAccountEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.crm.CrmAccountEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.CrmAccountResponse.parseOrThrow(_response.body, { + return serializers.crm.CrmAccountResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -232,7 +257,7 @@ export class Accounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/accounts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -243,8 +268,12 @@ export class Accounts { /** * Returns an `Account` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.AccountsRetrieveRequest} request + * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.accounts.retrieve("id", {}) + * await client.crm.accounts.retrieve("id") */ public async retrieve( id: string, @@ -252,7 +281,7 @@ export class Accounts { requestOptions?: Accounts.RequestOptions ): Promise { const { expand, includeRemoteData, includeRemoteFields } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -268,7 +297,7 @@ export class Accounts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/accounts/${id}` + `crm/v1/accounts/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -279,15 +308,21 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.Account.parseOrThrow(_response.body, { + return serializers.crm.Account.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -310,7 +345,7 @@ export class Accounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/accounts/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -321,8 +356,12 @@ export class Accounts { /** * Updates an `Account` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.PatchedCrmAccountEndpointRequest} request + * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.accounts.partialUpdate("id", { + * await client.crm.accounts.partialUpdate("id", { * model: {} * }) */ @@ -332,7 +371,7 @@ export class Accounts { requestOptions?: Accounts.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -344,7 +383,7 @@ export class Accounts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/accounts/${id}` + `crm/v1/accounts/${encodeURIComponent(id)}` ), method: "PATCH", headers: { @@ -355,18 +394,24 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.crm.PatchedCrmAccountEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.crm.PatchedCrmAccountEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.CrmAccountResponse.parseOrThrow(_response.body, { + return serializers.crm.CrmAccountResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -389,7 +434,7 @@ export class Accounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling PATCH /crm/v1/accounts/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -400,8 +445,11 @@ export class Accounts { /** * Returns metadata for `CRMAccount` PATCHs. * + * @param {string} id + * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.accounts.metaPatchRetrieve("id") + * await client.crm.accounts.metaPatchRetrieve("id") */ public async metaPatchRetrieve( id: string, @@ -410,7 +458,7 @@ export class Accounts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/accounts/meta/patch/${id}` + `crm/v1/accounts/meta/patch/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -421,14 +469,20 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.MetaResponse.parseOrThrow(_response.body, { + return serializers.crm.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -451,7 +505,9 @@ export class Accounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/accounts/meta/patch/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -462,8 +518,10 @@ export class Accounts { /** * Returns metadata for `CRMAccount` POSTs. * + * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.accounts.metaPostRetrieve() + * await client.crm.accounts.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Accounts.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -480,14 +538,20 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.MetaResponse.parseOrThrow(_response.body, { + return serializers.crm.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -510,7 +574,7 @@ export class Accounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/accounts/meta/post."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -521,8 +585,11 @@ export class Accounts { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.crm.AccountsRemoteFieldClassesListRequest} request + * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.accounts.remoteFieldClassesList({}) + * await client.crm.accounts.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.crm.AccountsRemoteFieldClassesListRequest = {}, @@ -537,7 +604,7 @@ export class Accounts { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -580,15 +647,21 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -611,7 +684,9 @@ export class Accounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/accounts/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -619,7 +694,7 @@ export class Accounts { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/accounts/client/requests/CrmAccountEndpointRequest.ts b/src/api/resources/crm/resources/accounts/client/requests/CrmAccountEndpointRequest.ts index 42c961a00..6f7a7c4e3 100644 --- a/src/api/resources/crm/resources/accounts/client/requests/CrmAccountEndpointRequest.ts +++ b/src/api/resources/crm/resources/accounts/client/requests/CrmAccountEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/accounts/client/requests/PatchedCrmAccountEndpointRequest.ts b/src/api/resources/crm/resources/accounts/client/requests/PatchedCrmAccountEndpointRequest.ts index aaec2db32..40921bfa8 100644 --- a/src/api/resources/crm/resources/accounts/client/requests/PatchedCrmAccountEndpointRequest.ts +++ b/src/api/resources/crm/resources/accounts/client/requests/PatchedCrmAccountEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/accounts/client/requests/index.ts b/src/api/resources/crm/resources/accounts/client/requests/index.ts index 2409f127c..b681e67a3 100644 --- a/src/api/resources/crm/resources/accounts/client/requests/index.ts +++ b/src/api/resources/crm/resources/accounts/client/requests/index.ts @@ -1,5 +1,5 @@ -export { AccountsListRequest } from "./AccountsListRequest"; -export { CrmAccountEndpointRequest } from "./CrmAccountEndpointRequest"; -export { AccountsRetrieveRequest } from "./AccountsRetrieveRequest"; -export { PatchedCrmAccountEndpointRequest } from "./PatchedCrmAccountEndpointRequest"; -export { AccountsRemoteFieldClassesListRequest } from "./AccountsRemoteFieldClassesListRequest"; +export { type AccountsListRequest } from "./AccountsListRequest"; +export { type CrmAccountEndpointRequest } from "./CrmAccountEndpointRequest"; +export { type AccountsRetrieveRequest } from "./AccountsRetrieveRequest"; +export { type PatchedCrmAccountEndpointRequest } from "./PatchedCrmAccountEndpointRequest"; +export { type AccountsRemoteFieldClassesListRequest } from "./AccountsRemoteFieldClassesListRequest"; diff --git a/src/api/resources/crm/resources/associationTypes/client/Client.ts b/src/api/resources/crm/resources/associationTypes/client/Client.ts index 6c010d1e0..595bd74f0 100644 --- a/src/api/resources/crm/resources/associationTypes/client/Client.ts +++ b/src/api/resources/crm/resources/associationTypes/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AssociationTypes { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,12 @@ export class AssociationTypes { /** * Returns a list of `AssociationType` objects. * + * @param {string} customObjectClassId + * @param {Merge.crm.CustomObjectClassesAssociationTypesListRequest} request + * @param {AssociationTypes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id", {}) + * await client.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id") */ public async customObjectClassesAssociationTypesList( customObjectClassId: string, @@ -50,7 +63,7 @@ export class AssociationTypes { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -98,7 +111,7 @@ export class AssociationTypes { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/custom-object-classes/${customObjectClassId}/association-types` + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/association-types` ), method: "GET", headers: { @@ -109,15 +122,21 @@ export class AssociationTypes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedAssociationTypeList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedAssociationTypeList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -140,7 +159,9 @@ export class AssociationTypes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/association-types." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -151,16 +172,20 @@ export class AssociationTypes { /** * Creates an `AssociationType` object with the given values. * + * @param {string} customObjectClassId + * @param {Merge.crm.CrmAssociationTypeEndpointRequest} request + * @param {AssociationTypes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.associationTypes.customObjectClassesAssociationTypesCreate("custom_object_class_id", { + * await client.crm.associationTypes.customObjectClassesAssociationTypesCreate("custom_object_class_id", { * model: { * sourceObjectClass: { * id: "id", - * originType: Merge.crm.OriginTypeEnum.CustomObject + * originType: "CUSTOM_OBJECT" * }, * targetObjectClasses: [{ * id: "id", - * originType: Merge.crm.OriginTypeEnum.CustomObject + * originType: "CUSTOM_OBJECT" * }], * remoteKeyName: "remote_key_name" * } @@ -172,7 +197,7 @@ export class AssociationTypes { requestOptions?: AssociationTypes.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -184,7 +209,7 @@ export class AssociationTypes { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/custom-object-classes/${customObjectClassId}/association-types` + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/association-types` ), method: "POST", headers: { @@ -195,18 +220,24 @@ export class AssociationTypes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.crm.CrmAssociationTypeEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.crm.CrmAssociationTypeEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.CrmAssociationTypeResponse.parseOrThrow(_response.body, { + return serializers.crm.CrmAssociationTypeResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -229,7 +260,9 @@ export class AssociationTypes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /crm/v1/custom-object-classes/{custom_object_class_id}/association-types." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -240,8 +273,13 @@ export class AssociationTypes { /** * Returns an `AssociationType` object with the given `id`. * + * @param {string} customObjectClassId + * @param {string} id + * @param {Merge.crm.CustomObjectClassesAssociationTypesRetrieveRequest} request + * @param {AssociationTypes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("custom_object_class_id", "id", {}) + * await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("custom_object_class_id", "id") */ public async customObjectClassesAssociationTypesRetrieve( customObjectClassId: string, @@ -250,7 +288,7 @@ export class AssociationTypes { requestOptions?: AssociationTypes.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -262,7 +300,9 @@ export class AssociationTypes { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/custom-object-classes/${customObjectClassId}/association-types/${id}` + `crm/v1/custom-object-classes/${encodeURIComponent( + customObjectClassId + )}/association-types/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -273,15 +313,21 @@ export class AssociationTypes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.AssociationType.parseOrThrow(_response.body, { + return serializers.crm.AssociationType.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -304,7 +350,9 @@ export class AssociationTypes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -315,8 +363,11 @@ export class AssociationTypes { /** * Returns metadata for `CRMAssociationType` POSTs. * + * @param {string} customObjectClassId + * @param {AssociationTypes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve("custom_object_class_id") + * await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve("custom_object_class_id") */ public async customObjectClassesAssociationTypesMetaPostRetrieve( customObjectClassId: string, @@ -325,7 +376,7 @@ export class AssociationTypes { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/custom-object-classes/${customObjectClassId}/association-types/meta/post` + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/association-types/meta/post` ), method: "GET", headers: { @@ -336,14 +387,20 @@ export class AssociationTypes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.MetaResponse.parseOrThrow(_response.body, { + return serializers.crm.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -366,7 +423,9 @@ export class AssociationTypes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -374,7 +433,7 @@ export class AssociationTypes { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/associationTypes/client/requests/CrmAssociationTypeEndpointRequest.ts b/src/api/resources/crm/resources/associationTypes/client/requests/CrmAssociationTypeEndpointRequest.ts index 68ece4e15..6108ef693 100644 --- a/src/api/resources/crm/resources/associationTypes/client/requests/CrmAssociationTypeEndpointRequest.ts +++ b/src/api/resources/crm/resources/associationTypes/client/requests/CrmAssociationTypeEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example @@ -10,11 +10,11 @@ import * as Merge from "../../../../../.."; * model: { * sourceObjectClass: { * id: "id", - * originType: Merge.crm.OriginTypeEnum.CustomObject + * originType: "CUSTOM_OBJECT" * }, * targetObjectClasses: [{ * id: "id", - * originType: Merge.crm.OriginTypeEnum.CustomObject + * originType: "CUSTOM_OBJECT" * }], * remoteKeyName: "remote_key_name" * } diff --git a/src/api/resources/crm/resources/associationTypes/client/requests/index.ts b/src/api/resources/crm/resources/associationTypes/client/requests/index.ts index b00b6fe7f..9c18d6525 100644 --- a/src/api/resources/crm/resources/associationTypes/client/requests/index.ts +++ b/src/api/resources/crm/resources/associationTypes/client/requests/index.ts @@ -1,3 +1,3 @@ -export { CustomObjectClassesAssociationTypesListRequest } from "./CustomObjectClassesAssociationTypesListRequest"; -export { CrmAssociationTypeEndpointRequest } from "./CrmAssociationTypeEndpointRequest"; -export { CustomObjectClassesAssociationTypesRetrieveRequest } from "./CustomObjectClassesAssociationTypesRetrieveRequest"; +export { type CustomObjectClassesAssociationTypesListRequest } from "./CustomObjectClassesAssociationTypesListRequest"; +export { type CrmAssociationTypeEndpointRequest } from "./CrmAssociationTypeEndpointRequest"; +export { type CustomObjectClassesAssociationTypesRetrieveRequest } from "./CustomObjectClassesAssociationTypesRetrieveRequest"; diff --git a/src/api/resources/crm/resources/associations/client/Client.ts b/src/api/resources/crm/resources/associations/client/Client.ts index 08c51aae4..354b6b775 100644 --- a/src/api/resources/crm/resources/associations/client/Client.ts +++ b/src/api/resources/crm/resources/associations/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Associations { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,13 @@ export class Associations { /** * Returns a list of `Association` objects. * + * @param {string} customObjectClassId + * @param {string} objectId + * @param {Merge.crm.CustomObjectClassesCustomObjectsAssociationsListRequest} request + * @param {Associations.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.associations.customObjectClassesCustomObjectsAssociationsList("custom_object_class_id", "object_id", {}) + * await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("custom_object_class_id", "object_id") */ public async customObjectClassesCustomObjectsAssociationsList( customObjectClassId: string, @@ -52,7 +66,7 @@ export class Associations { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (associationTypeId != null) { _queryParams["association_type_id"] = associationTypeId; } @@ -104,7 +118,9 @@ export class Associations { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/custom-object-classes/${customObjectClassId}/custom-objects/${objectId}/associations` + `crm/v1/custom-object-classes/${encodeURIComponent( + customObjectClassId + )}/custom-objects/${encodeURIComponent(objectId)}/associations` ), method: "GET", headers: { @@ -115,15 +131,21 @@ export class Associations { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedAssociationList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedAssociationList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -146,7 +168,9 @@ export class Associations { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{object_id}/associations." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -157,8 +181,16 @@ export class Associations { /** * Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`. * + * @param {string} associationTypeId + * @param {string} sourceClassId + * @param {string} sourceObjectId + * @param {string} targetClassId + * @param {string} targetObjectId + * @param {Merge.crm.CustomObjectClassesCustomObjectsAssociationsUpdateRequest} request + * @param {Associations.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate("association_type_id", "source_class_id", "source_object_id", "target_class_id", "target_object_id", {}) + * await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate("association_type_id", "source_class_id", "source_object_id", "target_class_id", "target_object_id") */ public async customObjectClassesCustomObjectsAssociationsUpdate( associationTypeId: string, @@ -170,7 +202,7 @@ export class Associations { requestOptions?: Associations.RequestOptions ): Promise { const { isDebugMode, runAsync } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -182,7 +214,11 @@ export class Associations { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/custom-object-classes/${sourceClassId}/custom-objects/${sourceObjectId}/associations/${targetClassId}/${targetObjectId}/${associationTypeId}` + `crm/v1/custom-object-classes/${encodeURIComponent(sourceClassId)}/custom-objects/${encodeURIComponent( + sourceObjectId + )}/associations/${encodeURIComponent(targetClassId)}/${encodeURIComponent( + targetObjectId + )}/${encodeURIComponent(associationTypeId)}` ), method: "PUT", headers: { @@ -193,15 +229,21 @@ export class Associations { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.Association.parseOrThrow(_response.body, { + return serializers.crm.Association.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -224,7 +266,9 @@ export class Associations { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling PUT /crm/v1/custom-object-classes/{source_class_id}/custom-objects/{source_object_id}/associations/{target_class_id}/{target_object_id}/{association_type_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -232,7 +276,7 @@ export class Associations { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/associations/client/requests/index.ts b/src/api/resources/crm/resources/associations/client/requests/index.ts index 161f0f457..4191c02a7 100644 --- a/src/api/resources/crm/resources/associations/client/requests/index.ts +++ b/src/api/resources/crm/resources/associations/client/requests/index.ts @@ -1,2 +1,2 @@ -export { CustomObjectClassesCustomObjectsAssociationsListRequest } from "./CustomObjectClassesCustomObjectsAssociationsListRequest"; -export { CustomObjectClassesCustomObjectsAssociationsUpdateRequest } from "./CustomObjectClassesCustomObjectsAssociationsUpdateRequest"; +export { type CustomObjectClassesCustomObjectsAssociationsListRequest } from "./CustomObjectClassesCustomObjectsAssociationsListRequest"; +export { type CustomObjectClassesCustomObjectsAssociationsUpdateRequest } from "./CustomObjectClassesCustomObjectsAssociationsUpdateRequest"; diff --git a/src/api/resources/crm/resources/asyncPassthrough/client/Client.ts b/src/api/resources/crm/resources/asyncPassthrough/client/Client.ts index 03aafbdae..e568b2769 100644 --- a/src/api/resources/crm/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/crm/resources/asyncPassthrough/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace AsyncPassthrough { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,9 +38,12 @@ export class AsyncPassthrough { /** * Asynchronously pull data from an endpoint not currently supported by Merge. * + * @param {Merge.crm.DataPassthroughRequest} request + * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.asyncPassthrough.create({ - * method: Merge.crm.MethodEnum.Get, + * await client.crm.asyncPassthrough.create({ + * method: "GET", * path: "/scooters" * }) */ @@ -53,17 +65,21 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.crm.DataPassthroughRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.crm.DataPassthroughRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.AsyncPassthroughReciept.parseOrThrow(_response.body, { + return serializers.crm.AsyncPassthroughReciept.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +102,7 @@ export class AsyncPassthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/async-passthrough."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -96,6 +112,12 @@ export class AsyncPassthrough { /** * Retrieves data from earlier async-passthrough POST request + * + * @param {string} asyncPassthroughReceiptId + * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id") */ public async retrieve( asyncPassthroughReceiptId: string, @@ -104,7 +126,7 @@ export class AsyncPassthrough { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/async-passthrough/${asyncPassthroughReceiptId}` + `crm/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}` ), method: "GET", headers: { @@ -115,14 +137,20 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { + return serializers.crm.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +173,9 @@ export class AsyncPassthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/async-passthrough/{async_passthrough_receipt_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -153,7 +183,7 @@ export class AsyncPassthrough { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/api/resources/crm/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts index e1980c4f5..a61180639 100644 --- a/src/api/resources/crm/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts +++ b/src/api/resources/crm/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; export type AsyncPassthroughRetrieveResponse = Merge.crm.RemoteResponse | string; diff --git a/src/api/resources/crm/resources/auditTrail/client/Client.ts b/src/api/resources/crm/resources/auditTrail/client/Client.ts index 9f8307250..4ef45ea94 100644 --- a/src/api/resources/crm/resources/auditTrail/client/Client.ts +++ b/src/api/resources/crm/resources/auditTrail/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AuditTrail { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,15 +38,18 @@ export class AuditTrail { /** * Gets a list of audit trail events. * + * @param {Merge.crm.AuditTrailListRequest} request + * @param {AuditTrail.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.auditTrail.list({}) + * await client.crm.auditTrail.list() */ public async list( request: Merge.crm.AuditTrailListRequest = {}, requestOptions?: AuditTrail.RequestOptions ): Promise { const { cursor, endDate, eventType, pageSize, startDate, userEmail } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -76,15 +88,21 @@ export class AuditTrail { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedAuditLogEventList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedAuditLogEventList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -107,7 +125,7 @@ export class AuditTrail { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/audit-trail."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -115,7 +133,7 @@ export class AuditTrail { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/auditTrail/client/requests/index.ts b/src/api/resources/crm/resources/auditTrail/client/requests/index.ts index ddce9e786..2c0762c28 100644 --- a/src/api/resources/crm/resources/auditTrail/client/requests/index.ts +++ b/src/api/resources/crm/resources/auditTrail/client/requests/index.ts @@ -1 +1 @@ -export { AuditTrailListRequest } from "./AuditTrailListRequest"; +export { type AuditTrailListRequest } from "./AuditTrailListRequest"; diff --git a/src/api/resources/crm/resources/availableActions/client/Client.ts b/src/api/resources/crm/resources/availableActions/client/Client.ts index 36d4353ca..2db3d98f5 100644 --- a/src/api/resources/crm/resources/availableActions/client/Client.ts +++ b/src/api/resources/crm/resources/availableActions/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AvailableActions { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class AvailableActions { /** * Returns a list of models and actions available for an account. * + * @param {AvailableActions.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.availableActions.retrieve() + * await client.crm.availableActions.retrieve() */ public async retrieve(requestOptions?: AvailableActions.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class AvailableActions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.AvailableActions.parseOrThrow(_response.body, { + return serializers.crm.AvailableActions.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class AvailableActions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/available-actions."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -85,7 +102,7 @@ export class AvailableActions { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/contacts/client/Client.ts b/src/api/resources/crm/resources/contacts/client/Client.ts index 07eab2804..a0971df6b 100644 --- a/src/api/resources/crm/resources/contacts/client/Client.ts +++ b/src/api/resources/crm/resources/contacts/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Contacts { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Contacts { /** * Returns a list of `Contact` objects. * + * @param {Merge.crm.ContactsListRequest} request + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.contacts.list({}) + * await client.crm.contacts.list() */ public async list( request: Merge.crm.ContactsListRequest = {}, @@ -53,7 +65,7 @@ export class Contacts { phoneNumbers, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountId != null) { _queryParams["account_id"] = accountId; } @@ -128,15 +140,21 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedContactList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedContactList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -159,7 +177,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/contacts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -170,8 +188,11 @@ export class Contacts { /** * Creates a `Contact` object with the given values. * + * @param {Merge.crm.CrmContactEndpointRequest} request + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.contacts.create({ + * await client.crm.contacts.create({ * model: {} * }) */ @@ -180,7 +201,7 @@ export class Contacts { requestOptions?: Contacts.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -203,18 +224,22 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.crm.CrmContactEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.crm.CrmContactEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.CrmContactResponse.parseOrThrow(_response.body, { + return serializers.crm.CrmContactResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -237,7 +262,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/contacts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -248,8 +273,12 @@ export class Contacts { /** * Returns a `Contact` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.ContactsRetrieveRequest} request + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.contacts.retrieve("id", {}) + * await client.crm.contacts.retrieve("id") */ public async retrieve( id: string, @@ -257,7 +286,7 @@ export class Contacts { requestOptions?: Contacts.RequestOptions ): Promise { const { expand, includeRemoteData, includeRemoteFields } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -273,7 +302,7 @@ export class Contacts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/contacts/${id}` + `crm/v1/contacts/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -284,15 +313,21 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.Contact.parseOrThrow(_response.body, { + return serializers.crm.Contact.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -315,7 +350,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/contacts/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -326,8 +361,12 @@ export class Contacts { /** * Updates a `Contact` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.PatchedCrmContactEndpointRequest} request + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.contacts.partialUpdate("id", { + * await client.crm.contacts.partialUpdate("id", { * model: {} * }) */ @@ -337,7 +376,7 @@ export class Contacts { requestOptions?: Contacts.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -349,7 +388,7 @@ export class Contacts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/contacts/${id}` + `crm/v1/contacts/${encodeURIComponent(id)}` ), method: "PATCH", headers: { @@ -360,18 +399,24 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.crm.PatchedCrmContactEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.crm.PatchedCrmContactEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.CrmContactResponse.parseOrThrow(_response.body, { + return serializers.crm.CrmContactResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -394,7 +439,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling PATCH /crm/v1/contacts/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -405,9 +450,13 @@ export class Contacts { /** * Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. * + * @param {string} modelId + * @param {Merge.crm.IgnoreCommonModelRequest} request + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.contacts.ignoreCreate("model_id", { - * reason: Merge.crm.ReasonEnum.GeneralCustomerRequest + * await client.crm.contacts.ignoreCreate("model_id", { + * reason: "GENERAL_CUSTOMER_REQUEST" * }) */ public async ignoreCreate( @@ -418,7 +467,7 @@ export class Contacts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/contacts/ignore/${modelId}` + `crm/v1/contacts/ignore/${encodeURIComponent(modelId)}` ), method: "POST", headers: { @@ -429,14 +478,18 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.crm.IgnoreCommonModelRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.crm.IgnoreCommonModelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -456,7 +509,9 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /crm/v1/contacts/ignore/{model_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -467,8 +522,11 @@ export class Contacts { /** * Returns metadata for `CRMContact` PATCHs. * + * @param {string} id + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.contacts.metaPatchRetrieve("id") + * await client.crm.contacts.metaPatchRetrieve("id") */ public async metaPatchRetrieve( id: string, @@ -477,7 +535,7 @@ export class Contacts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/contacts/meta/patch/${id}` + `crm/v1/contacts/meta/patch/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -488,14 +546,20 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.MetaResponse.parseOrThrow(_response.body, { + return serializers.crm.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -518,7 +582,9 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/contacts/meta/patch/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -529,8 +595,10 @@ export class Contacts { /** * Returns metadata for `CRMContact` POSTs. * + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.contacts.metaPostRetrieve() + * await client.crm.contacts.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Contacts.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -547,14 +615,20 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.MetaResponse.parseOrThrow(_response.body, { + return serializers.crm.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -577,7 +651,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/contacts/meta/post."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -588,8 +662,11 @@ export class Contacts { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.crm.ContactsRemoteFieldClassesListRequest} request + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.contacts.remoteFieldClassesList({}) + * await client.crm.contacts.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.crm.ContactsRemoteFieldClassesListRequest = {}, @@ -604,7 +681,7 @@ export class Contacts { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -647,15 +724,21 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -678,7 +761,9 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/contacts/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -686,7 +771,7 @@ export class Contacts { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/contacts/client/requests/ContactsListRequest.ts b/src/api/resources/crm/resources/contacts/client/requests/ContactsListRequest.ts index 2fd1e37b4..e6fa46302 100644 --- a/src/api/resources/crm/resources/contacts/client/requests/ContactsListRequest.ts +++ b/src/api/resources/crm/resources/contacts/client/requests/ContactsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/contacts/client/requests/ContactsRetrieveRequest.ts b/src/api/resources/crm/resources/contacts/client/requests/ContactsRetrieveRequest.ts index 26f41efe2..e3c545fbf 100644 --- a/src/api/resources/crm/resources/contacts/client/requests/ContactsRetrieveRequest.ts +++ b/src/api/resources/crm/resources/contacts/client/requests/ContactsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/contacts/client/requests/CrmContactEndpointRequest.ts b/src/api/resources/crm/resources/contacts/client/requests/CrmContactEndpointRequest.ts index cdd3d4183..38e2bd667 100644 --- a/src/api/resources/crm/resources/contacts/client/requests/CrmContactEndpointRequest.ts +++ b/src/api/resources/crm/resources/contacts/client/requests/CrmContactEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/contacts/client/requests/PatchedCrmContactEndpointRequest.ts b/src/api/resources/crm/resources/contacts/client/requests/PatchedCrmContactEndpointRequest.ts index 51a92fa30..f967c48ee 100644 --- a/src/api/resources/crm/resources/contacts/client/requests/PatchedCrmContactEndpointRequest.ts +++ b/src/api/resources/crm/resources/contacts/client/requests/PatchedCrmContactEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/contacts/client/requests/index.ts b/src/api/resources/crm/resources/contacts/client/requests/index.ts index f7ef3b9b9..75bed5b09 100644 --- a/src/api/resources/crm/resources/contacts/client/requests/index.ts +++ b/src/api/resources/crm/resources/contacts/client/requests/index.ts @@ -1,5 +1,5 @@ -export { ContactsListRequest } from "./ContactsListRequest"; -export { CrmContactEndpointRequest } from "./CrmContactEndpointRequest"; -export { ContactsRetrieveRequest } from "./ContactsRetrieveRequest"; -export { PatchedCrmContactEndpointRequest } from "./PatchedCrmContactEndpointRequest"; -export { ContactsRemoteFieldClassesListRequest } from "./ContactsRemoteFieldClassesListRequest"; +export { type ContactsListRequest } from "./ContactsListRequest"; +export { type CrmContactEndpointRequest } from "./CrmContactEndpointRequest"; +export { type ContactsRetrieveRequest } from "./ContactsRetrieveRequest"; +export { type PatchedCrmContactEndpointRequest } from "./PatchedCrmContactEndpointRequest"; +export { type ContactsRemoteFieldClassesListRequest } from "./ContactsRemoteFieldClassesListRequest"; diff --git a/src/api/resources/crm/resources/customObjectClasses/client/Client.ts b/src/api/resources/crm/resources/customObjectClasses/client/Client.ts index 20e6af80c..c87fdb2e1 100644 --- a/src/api/resources/crm/resources/customObjectClasses/client/Client.ts +++ b/src/api/resources/crm/resources/customObjectClasses/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace CustomObjectClasses { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class CustomObjectClasses { /** * Returns a list of `CustomObjectClass` objects. * + * @param {Merge.crm.CustomObjectClassesListRequest} request + * @param {CustomObjectClasses.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.customObjectClasses.list({}) + * await client.crm.customObjectClasses.list() */ public async list( request: Merge.crm.CustomObjectClassesListRequest = {}, @@ -49,7 +61,7 @@ export class CustomObjectClasses { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,15 +120,21 @@ export class CustomObjectClasses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedCustomObjectClassList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedCustomObjectClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -139,7 +157,7 @@ export class CustomObjectClasses { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/custom-object-classes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -150,8 +168,12 @@ export class CustomObjectClasses { /** * Returns a `CustomObjectClass` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.CustomObjectClassesRetrieveRequest} request + * @param {CustomObjectClasses.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.customObjectClasses.retrieve("id", {}) + * await client.crm.customObjectClasses.retrieve("id") */ public async retrieve( id: string, @@ -159,7 +181,7 @@ export class CustomObjectClasses { requestOptions?: CustomObjectClasses.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -171,7 +193,7 @@ export class CustomObjectClasses { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/custom-object-classes/${id}` + `crm/v1/custom-object-classes/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -182,15 +204,21 @@ export class CustomObjectClasses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.CustomObjectClass.parseOrThrow(_response.body, { + return serializers.crm.CustomObjectClass.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +241,9 @@ export class CustomObjectClasses { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -221,7 +251,7 @@ export class CustomObjectClasses { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/customObjectClasses/client/requests/index.ts b/src/api/resources/crm/resources/customObjectClasses/client/requests/index.ts index fd2d01e3c..1d676ab49 100644 --- a/src/api/resources/crm/resources/customObjectClasses/client/requests/index.ts +++ b/src/api/resources/crm/resources/customObjectClasses/client/requests/index.ts @@ -1,2 +1,2 @@ -export { CustomObjectClassesListRequest } from "./CustomObjectClassesListRequest"; -export { CustomObjectClassesRetrieveRequest } from "./CustomObjectClassesRetrieveRequest"; +export { type CustomObjectClassesListRequest } from "./CustomObjectClassesListRequest"; +export { type CustomObjectClassesRetrieveRequest } from "./CustomObjectClassesRetrieveRequest"; diff --git a/src/api/resources/crm/resources/customObjects/client/Client.ts b/src/api/resources/crm/resources/customObjects/client/Client.ts index 05b36004c..8ab4bd23b 100644 --- a/src/api/resources/crm/resources/customObjects/client/Client.ts +++ b/src/api/resources/crm/resources/customObjects/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace CustomObjects { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,12 @@ export class CustomObjects { /** * Returns a list of `CustomObject` objects. * + * @param {string} customObjectClassId + * @param {Merge.crm.CustomObjectClassesCustomObjectsListRequest} request + * @param {CustomObjects.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id", {}) + * await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id") */ public async customObjectClassesCustomObjectsList( customObjectClassId: string, @@ -50,7 +63,7 @@ export class CustomObjects { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -98,7 +111,7 @@ export class CustomObjects { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/custom-object-classes/${customObjectClassId}/custom-objects` + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/custom-objects` ), method: "GET", headers: { @@ -109,15 +122,21 @@ export class CustomObjects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedCustomObjectList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedCustomObjectList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -140,7 +159,9 @@ export class CustomObjects { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -151,8 +172,12 @@ export class CustomObjects { /** * Creates a `CustomObject` object with the given values. * + * @param {string} customObjectClassId + * @param {Merge.crm.CrmCustomObjectEndpointRequest} request + * @param {CustomObjects.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_object_class_id", { + * await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_object_class_id", { * model: { * fields: { * "test_field": "hello" @@ -166,7 +191,7 @@ export class CustomObjects { requestOptions?: CustomObjects.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -178,7 +203,7 @@ export class CustomObjects { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/custom-object-classes/${customObjectClassId}/custom-objects` + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/custom-objects` ), method: "POST", headers: { @@ -189,18 +214,24 @@ export class CustomObjects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.crm.CrmCustomObjectEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.crm.CrmCustomObjectEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.CrmCustomObjectResponse.parseOrThrow(_response.body, { + return serializers.crm.CrmCustomObjectResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -223,7 +254,9 @@ export class CustomObjects { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -234,8 +267,13 @@ export class CustomObjects { /** * Returns a `CustomObject` object with the given `id`. * + * @param {string} customObjectClassId + * @param {string} id + * @param {Merge.crm.CustomObjectClassesCustomObjectsRetrieveRequest} request + * @param {CustomObjects.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_object_class_id", "id", {}) + * await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_object_class_id", "id") */ public async customObjectClassesCustomObjectsRetrieve( customObjectClassId: string, @@ -244,7 +282,7 @@ export class CustomObjects { requestOptions?: CustomObjects.RequestOptions ): Promise { const { includeRemoteData, includeRemoteFields } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -256,7 +294,9 @@ export class CustomObjects { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/custom-object-classes/${customObjectClassId}/custom-objects/${id}` + `crm/v1/custom-object-classes/${encodeURIComponent( + customObjectClassId + )}/custom-objects/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -267,15 +307,21 @@ export class CustomObjects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.CustomObject.parseOrThrow(_response.body, { + return serializers.crm.CustomObject.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -298,7 +344,9 @@ export class CustomObjects { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -309,8 +357,11 @@ export class CustomObjects { /** * Returns metadata for `CRMCustomObject` POSTs. * + * @param {string} customObjectClassId + * @param {CustomObjects.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve("custom_object_class_id") + * await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve("custom_object_class_id") */ public async customObjectClassesCustomObjectsMetaPostRetrieve( customObjectClassId: string, @@ -319,7 +370,7 @@ export class CustomObjects { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/custom-object-classes/${customObjectClassId}/custom-objects/meta/post` + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/custom-objects/meta/post` ), method: "GET", headers: { @@ -330,14 +381,20 @@ export class CustomObjects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.MetaResponse.parseOrThrow(_response.body, { + return serializers.crm.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -360,7 +417,9 @@ export class CustomObjects { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -371,8 +430,11 @@ export class CustomObjects { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.crm.CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest} request + * @param {CustomObjects.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({}) + * await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList() */ public async customObjectClassesCustomObjectsRemoteFieldClassesList( request: Merge.crm.CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest = {}, @@ -387,7 +449,7 @@ export class CustomObjects { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -430,15 +492,21 @@ export class CustomObjects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -461,7 +529,9 @@ export class CustomObjects { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/custom-objects/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -469,7 +539,7 @@ export class CustomObjects { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/customObjects/client/requests/CrmCustomObjectEndpointRequest.ts b/src/api/resources/crm/resources/customObjects/client/requests/CrmCustomObjectEndpointRequest.ts index cdc50c769..e90f5d4b6 100644 --- a/src/api/resources/crm/resources/customObjects/client/requests/CrmCustomObjectEndpointRequest.ts +++ b/src/api/resources/crm/resources/customObjects/client/requests/CrmCustomObjectEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/customObjects/client/requests/index.ts b/src/api/resources/crm/resources/customObjects/client/requests/index.ts index 8c01d1317..09e91a2d9 100644 --- a/src/api/resources/crm/resources/customObjects/client/requests/index.ts +++ b/src/api/resources/crm/resources/customObjects/client/requests/index.ts @@ -1,4 +1,4 @@ -export { CustomObjectClassesCustomObjectsListRequest } from "./CustomObjectClassesCustomObjectsListRequest"; -export { CrmCustomObjectEndpointRequest } from "./CrmCustomObjectEndpointRequest"; -export { CustomObjectClassesCustomObjectsRetrieveRequest } from "./CustomObjectClassesCustomObjectsRetrieveRequest"; -export { CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest } from "./CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest"; +export { type CustomObjectClassesCustomObjectsListRequest } from "./CustomObjectClassesCustomObjectsListRequest"; +export { type CrmCustomObjectEndpointRequest } from "./CrmCustomObjectEndpointRequest"; +export { type CustomObjectClassesCustomObjectsRetrieveRequest } from "./CustomObjectClassesCustomObjectsRetrieveRequest"; +export { type CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest } from "./CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest"; diff --git a/src/api/resources/crm/resources/deleteAccount/client/Client.ts b/src/api/resources/crm/resources/deleteAccount/client/Client.ts index 5f8492d8b..482388dcf 100644 --- a/src/api/resources/crm/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/crm/resources/deleteAccount/client/Client.ts @@ -5,19 +5,28 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace DeleteAccount { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -27,8 +36,10 @@ export class DeleteAccount { /** * Delete a linked account. * + * @param {DeleteAccount.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.deleteAccount.delete() + * await client.crm.deleteAccount.delete() */ public async delete(requestOptions?: DeleteAccount.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -45,11 +56,17 @@ export class DeleteAccount { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -69,7 +86,7 @@ export class DeleteAccount { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/delete-account."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -77,7 +94,7 @@ export class DeleteAccount { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/engagementTypes/client/Client.ts b/src/api/resources/crm/resources/engagementTypes/client/Client.ts index adc1d36e6..e12ba7321 100644 --- a/src/api/resources/crm/resources/engagementTypes/client/Client.ts +++ b/src/api/resources/crm/resources/engagementTypes/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace EngagementTypes { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class EngagementTypes { /** * Returns a list of `EngagementType` objects. * + * @param {Merge.crm.EngagementTypesListRequest} request + * @param {EngagementTypes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.engagementTypes.list({}) + * await client.crm.engagementTypes.list() */ public async list( request: Merge.crm.EngagementTypesListRequest = {}, @@ -49,7 +61,7 @@ export class EngagementTypes { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,15 +120,21 @@ export class EngagementTypes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedEngagementTypeList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedEngagementTypeList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -139,7 +157,7 @@ export class EngagementTypes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/engagement-types."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -150,8 +168,12 @@ export class EngagementTypes { /** * Returns an `EngagementType` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.EngagementTypesRetrieveRequest} request + * @param {EngagementTypes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.engagementTypes.retrieve("id", {}) + * await client.crm.engagementTypes.retrieve("id") */ public async retrieve( id: string, @@ -159,7 +181,7 @@ export class EngagementTypes { requestOptions?: EngagementTypes.RequestOptions ): Promise { const { includeRemoteData, includeRemoteFields } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -171,7 +193,7 @@ export class EngagementTypes { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/engagement-types/${id}` + `crm/v1/engagement-types/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -182,15 +204,21 @@ export class EngagementTypes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.EngagementType.parseOrThrow(_response.body, { + return serializers.crm.EngagementType.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +241,7 @@ export class EngagementTypes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/engagement-types/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -224,8 +252,11 @@ export class EngagementTypes { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.crm.EngagementTypesRemoteFieldClassesListRequest} request + * @param {EngagementTypes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.engagementTypes.remoteFieldClassesList({}) + * await client.crm.engagementTypes.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.crm.EngagementTypesRemoteFieldClassesListRequest = {}, @@ -240,7 +271,7 @@ export class EngagementTypes { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -283,15 +314,21 @@ export class EngagementTypes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -314,7 +351,9 @@ export class EngagementTypes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/engagement-types/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -322,7 +361,7 @@ export class EngagementTypes { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/engagementTypes/client/requests/index.ts b/src/api/resources/crm/resources/engagementTypes/client/requests/index.ts index 2f5bf980e..db4b9e402 100644 --- a/src/api/resources/crm/resources/engagementTypes/client/requests/index.ts +++ b/src/api/resources/crm/resources/engagementTypes/client/requests/index.ts @@ -1,3 +1,3 @@ -export { EngagementTypesListRequest } from "./EngagementTypesListRequest"; -export { EngagementTypesRetrieveRequest } from "./EngagementTypesRetrieveRequest"; -export { EngagementTypesRemoteFieldClassesListRequest } from "./EngagementTypesRemoteFieldClassesListRequest"; +export { type EngagementTypesListRequest } from "./EngagementTypesListRequest"; +export { type EngagementTypesRetrieveRequest } from "./EngagementTypesRetrieveRequest"; +export { type EngagementTypesRemoteFieldClassesListRequest } from "./EngagementTypesRemoteFieldClassesListRequest"; diff --git a/src/api/resources/crm/resources/engagements/client/Client.ts b/src/api/resources/crm/resources/engagements/client/Client.ts index db491c182..7b2fece8b 100644 --- a/src/api/resources/crm/resources/engagements/client/Client.ts +++ b/src/api/resources/crm/resources/engagements/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Engagements { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Engagements { /** * Returns a list of `Engagement` objects. * + * @param {Merge.crm.EngagementsListRequest} request + * @param {Engagements.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.engagements.list({}) + * await client.crm.engagements.list() */ public async list( request: Merge.crm.EngagementsListRequest = {}, @@ -52,7 +64,7 @@ export class Engagements { startedAfter, startedBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -123,15 +135,21 @@ export class Engagements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedEngagementList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedEngagementList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Engagements { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/engagements."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,8 +183,11 @@ export class Engagements { /** * Creates an `Engagement` object with the given values. * + * @param {Merge.crm.EngagementEndpointRequest} request + * @param {Engagements.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.engagements.create({ + * await client.crm.engagements.create({ * model: {} * }) */ @@ -175,7 +196,7 @@ export class Engagements { requestOptions?: Engagements.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -198,18 +219,22 @@ export class Engagements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.crm.EngagementEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.crm.EngagementEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.EngagementResponse.parseOrThrow(_response.body, { + return serializers.crm.EngagementResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -232,7 +257,7 @@ export class Engagements { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/engagements."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -243,8 +268,12 @@ export class Engagements { /** * Returns an `Engagement` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.EngagementsRetrieveRequest} request + * @param {Engagements.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.engagements.retrieve("id", {}) + * await client.crm.engagements.retrieve("id") */ public async retrieve( id: string, @@ -252,7 +281,7 @@ export class Engagements { requestOptions?: Engagements.RequestOptions ): Promise { const { expand, includeRemoteData, includeRemoteFields } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -268,7 +297,7 @@ export class Engagements { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/engagements/${id}` + `crm/v1/engagements/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -279,15 +308,21 @@ export class Engagements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.Engagement.parseOrThrow(_response.body, { + return serializers.crm.Engagement.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -310,7 +345,7 @@ export class Engagements { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/engagements/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -321,8 +356,12 @@ export class Engagements { /** * Updates an `Engagement` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.PatchedEngagementEndpointRequest} request + * @param {Engagements.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.engagements.partialUpdate("id", { + * await client.crm.engagements.partialUpdate("id", { * model: {} * }) */ @@ -332,7 +371,7 @@ export class Engagements { requestOptions?: Engagements.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -344,7 +383,7 @@ export class Engagements { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/engagements/${id}` + `crm/v1/engagements/${encodeURIComponent(id)}` ), method: "PATCH", headers: { @@ -355,18 +394,24 @@ export class Engagements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.crm.PatchedEngagementEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.crm.PatchedEngagementEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.EngagementResponse.parseOrThrow(_response.body, { + return serializers.crm.EngagementResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -389,7 +434,7 @@ export class Engagements { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling PATCH /crm/v1/engagements/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -400,8 +445,11 @@ export class Engagements { /** * Returns metadata for `Engagement` PATCHs. * + * @param {string} id + * @param {Engagements.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.engagements.metaPatchRetrieve("id") + * await client.crm.engagements.metaPatchRetrieve("id") */ public async metaPatchRetrieve( id: string, @@ -410,7 +458,7 @@ export class Engagements { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/engagements/meta/patch/${id}` + `crm/v1/engagements/meta/patch/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -421,14 +469,20 @@ export class Engagements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.MetaResponse.parseOrThrow(_response.body, { + return serializers.crm.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -451,7 +505,9 @@ export class Engagements { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/engagements/meta/patch/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -462,8 +518,10 @@ export class Engagements { /** * Returns metadata for `Engagement` POSTs. * + * @param {Engagements.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.engagements.metaPostRetrieve() + * await client.crm.engagements.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Engagements.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -480,14 +538,20 @@ export class Engagements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.MetaResponse.parseOrThrow(_response.body, { + return serializers.crm.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -510,7 +574,7 @@ export class Engagements { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/engagements/meta/post."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -521,8 +585,11 @@ export class Engagements { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.crm.EngagementsRemoteFieldClassesListRequest} request + * @param {Engagements.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.engagements.remoteFieldClassesList({}) + * await client.crm.engagements.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.crm.EngagementsRemoteFieldClassesListRequest = {}, @@ -537,7 +604,7 @@ export class Engagements { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -580,15 +647,21 @@ export class Engagements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -611,7 +684,9 @@ export class Engagements { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/engagements/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -619,7 +694,7 @@ export class Engagements { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/engagements/client/requests/EngagementEndpointRequest.ts b/src/api/resources/crm/resources/engagements/client/requests/EngagementEndpointRequest.ts index 2afb34ac6..581d0e1e3 100644 --- a/src/api/resources/crm/resources/engagements/client/requests/EngagementEndpointRequest.ts +++ b/src/api/resources/crm/resources/engagements/client/requests/EngagementEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/engagements/client/requests/EngagementsListRequest.ts b/src/api/resources/crm/resources/engagements/client/requests/EngagementsListRequest.ts index 1f4452c4f..3b5a3247a 100644 --- a/src/api/resources/crm/resources/engagements/client/requests/EngagementsListRequest.ts +++ b/src/api/resources/crm/resources/engagements/client/requests/EngagementsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/engagements/client/requests/EngagementsRetrieveRequest.ts b/src/api/resources/crm/resources/engagements/client/requests/EngagementsRetrieveRequest.ts index 8ca6a7637..16675180e 100644 --- a/src/api/resources/crm/resources/engagements/client/requests/EngagementsRetrieveRequest.ts +++ b/src/api/resources/crm/resources/engagements/client/requests/EngagementsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/engagements/client/requests/PatchedEngagementEndpointRequest.ts b/src/api/resources/crm/resources/engagements/client/requests/PatchedEngagementEndpointRequest.ts index c61159777..1939d0033 100644 --- a/src/api/resources/crm/resources/engagements/client/requests/PatchedEngagementEndpointRequest.ts +++ b/src/api/resources/crm/resources/engagements/client/requests/PatchedEngagementEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/engagements/client/requests/index.ts b/src/api/resources/crm/resources/engagements/client/requests/index.ts index 78cc6c54b..9842a7311 100644 --- a/src/api/resources/crm/resources/engagements/client/requests/index.ts +++ b/src/api/resources/crm/resources/engagements/client/requests/index.ts @@ -1,5 +1,5 @@ -export { EngagementsListRequest } from "./EngagementsListRequest"; -export { EngagementEndpointRequest } from "./EngagementEndpointRequest"; -export { EngagementsRetrieveRequest } from "./EngagementsRetrieveRequest"; -export { PatchedEngagementEndpointRequest } from "./PatchedEngagementEndpointRequest"; -export { EngagementsRemoteFieldClassesListRequest } from "./EngagementsRemoteFieldClassesListRequest"; +export { type EngagementsListRequest } from "./EngagementsListRequest"; +export { type EngagementEndpointRequest } from "./EngagementEndpointRequest"; +export { type EngagementsRetrieveRequest } from "./EngagementsRetrieveRequest"; +export { type PatchedEngagementEndpointRequest } from "./PatchedEngagementEndpointRequest"; +export { type EngagementsRemoteFieldClassesListRequest } from "./EngagementsRemoteFieldClassesListRequest"; diff --git a/src/api/resources/crm/resources/fieldMapping/client/Client.ts b/src/api/resources/crm/resources/fieldMapping/client/Client.ts index d08e864c1..42ee5e94b 100644 --- a/src/api/resources/crm/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/crm/resources/fieldMapping/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace FieldMapping { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class FieldMapping { /** * Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). * + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.fieldMapping.fieldMappingsRetrieve() + * await client.crm.fieldMapping.fieldMappingsRetrieve() */ public async fieldMappingsRetrieve( requestOptions?: FieldMapping.RequestOptions @@ -49,14 +60,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { + return serializers.crm.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +96,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/field-mappings."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -90,8 +107,11 @@ export class FieldMapping { /** * Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {Merge.crm.CreateFieldMappingRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.fieldMapping.fieldMappingsCreate({ + * await client.crm.fieldMapping.fieldMappingsCreate({ * targetFieldName: "example_target_field_name", * targetFieldDescription: "this is a example description of the target field", * remoteFieldTraversalPath: ["example_remote_field"], @@ -118,17 +138,21 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.crm.CreateFieldMappingRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.crm.CreateFieldMappingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.crm.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -151,7 +175,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/field-mappings."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -162,8 +186,11 @@ export class FieldMapping { /** * Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {string} fieldMappingId + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id") + * await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id") */ public async fieldMappingsDestroy( fieldMappingId: string, @@ -172,7 +199,7 @@ export class FieldMapping { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/field-mappings/${fieldMappingId}` + `crm/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` ), method: "DELETE", headers: { @@ -183,14 +210,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.crm.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +246,9 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling DELETE /crm/v1/field-mappings/{field_mapping_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -224,8 +259,12 @@ export class FieldMapping { /** * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {string} fieldMappingId + * @param {Merge.crm.PatchedEditFieldMappingRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id", {}) + * await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id") */ public async fieldMappingsPartialUpdate( fieldMappingId: string, @@ -235,7 +274,7 @@ export class FieldMapping { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/field-mappings/${fieldMappingId}` + `crm/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` ), method: "PATCH", headers: { @@ -246,17 +285,23 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.crm.PatchedEditFieldMappingRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.crm.PatchedEditFieldMappingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.crm.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -279,7 +324,9 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling PATCH /crm/v1/field-mappings/{field_mapping_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -290,15 +337,18 @@ export class FieldMapping { /** * Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). * + * @param {Merge.crm.RemoteFieldsRetrieveRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.fieldMapping.remoteFieldsRetrieve({}) + * await client.crm.fieldMapping.remoteFieldsRetrieve() */ public async remoteFieldsRetrieve( request: Merge.crm.RemoteFieldsRetrieveRequest = {}, requestOptions?: FieldMapping.RequestOptions ): Promise { const { commonModels, includeExampleValues } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (commonModels != null) { _queryParams["common_models"] = commonModels; } @@ -321,15 +371,21 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.RemoteFieldApiResponse.parseOrThrow(_response.body, { + return serializers.crm.RemoteFieldApiResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -352,7 +408,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/remote-fields."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -363,8 +419,10 @@ export class FieldMapping { /** * Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). * + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.fieldMapping.targetFieldsRetrieve() + * await client.crm.fieldMapping.targetFieldsRetrieve() */ public async targetFieldsRetrieve( requestOptions?: FieldMapping.RequestOptions @@ -383,14 +441,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { + return serializers.crm.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -413,7 +477,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/target-fields."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -421,7 +485,7 @@ export class FieldMapping { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/fieldMapping/client/requests/index.ts b/src/api/resources/crm/resources/fieldMapping/client/requests/index.ts index cb93982a7..450f54c2b 100644 --- a/src/api/resources/crm/resources/fieldMapping/client/requests/index.ts +++ b/src/api/resources/crm/resources/fieldMapping/client/requests/index.ts @@ -1,3 +1,3 @@ -export { CreateFieldMappingRequest } from "./CreateFieldMappingRequest"; -export { PatchedEditFieldMappingRequest } from "./PatchedEditFieldMappingRequest"; -export { RemoteFieldsRetrieveRequest } from "./RemoteFieldsRetrieveRequest"; +export { type CreateFieldMappingRequest } from "./CreateFieldMappingRequest"; +export { type PatchedEditFieldMappingRequest } from "./PatchedEditFieldMappingRequest"; +export { type RemoteFieldsRetrieveRequest } from "./RemoteFieldsRetrieveRequest"; diff --git a/src/api/resources/crm/resources/forceResync/client/Client.ts b/src/api/resources/crm/resources/forceResync/client/Client.ts index 470a19014..973412185 100644 --- a/src/api/resources/crm/resources/forceResync/client/Client.ts +++ b/src/api/resources/crm/resources/forceResync/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace ForceResync { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class ForceResync { /** * Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. * + * @param {ForceResync.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.forceResync.syncStatusResyncCreate() + * await client.crm.forceResync.syncStatusResyncCreate() */ public async syncStatusResyncCreate(requestOptions?: ForceResync.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class ForceResync { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { + return serializers.crm.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class ForceResync { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/sync-status/resync."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -85,7 +102,7 @@ export class ForceResync { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/generateKey/client/Client.ts b/src/api/resources/crm/resources/generateKey/client/Client.ts index 7bc7b8524..a80cb81b9 100644 --- a/src/api/resources/crm/resources/generateKey/client/Client.ts +++ b/src/api/resources/crm/resources/generateKey/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace GenerateKey { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class GenerateKey { /** * Create a remote key. * + * @param {Merge.crm.GenerateRemoteKeyRequest} request + * @param {GenerateKey.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.generateKey.create({ + * await client.crm.generateKey.create({ * name: "Remote Deployment Key 1" * }) */ @@ -52,17 +64,21 @@ export class GenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.crm.GenerateRemoteKeyRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.crm.GenerateRemoteKeyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.RemoteKey.parseOrThrow(_response.body, { + return serializers.crm.RemoteKey.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +101,7 @@ export class GenerateKey { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/generate-key."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -93,7 +109,7 @@ export class GenerateKey { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/generateKey/client/requests/index.ts b/src/api/resources/crm/resources/generateKey/client/requests/index.ts index 0df6e7c8b..d8255223c 100644 --- a/src/api/resources/crm/resources/generateKey/client/requests/index.ts +++ b/src/api/resources/crm/resources/generateKey/client/requests/index.ts @@ -1 +1 @@ -export { GenerateRemoteKeyRequest } from "./GenerateRemoteKeyRequest"; +export { type GenerateRemoteKeyRequest } from "./GenerateRemoteKeyRequest"; diff --git a/src/api/resources/crm/resources/issues/client/Client.ts b/src/api/resources/crm/resources/issues/client/Client.ts index da829da2d..fd1f9ddcb 100644 --- a/src/api/resources/crm/resources/issues/client/Client.ts +++ b/src/api/resources/crm/resources/issues/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Issues { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Issues { /** * Gets all issues for Organization. * + * @param {Merge.crm.IssuesListRequest} request + * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.issues.list({}) + * await client.crm.issues.list() */ public async list( request: Merge.crm.IssuesListRequest = {}, @@ -52,7 +64,7 @@ export class Issues { startDate, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountToken != null) { _queryParams["account_token"] = accountToken; } @@ -123,15 +135,21 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedIssueList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedIssueList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Issues { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/issues."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,14 +183,17 @@ export class Issues { /** * Get a specific issue. * + * @param {string} id + * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.issues.retrieve("id") + * await client.crm.issues.retrieve("id") */ public async retrieve(id: string, requestOptions?: Issues.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/issues/${id}` + `crm/v1/issues/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -183,14 +204,20 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.Issue.parseOrThrow(_response.body, { + return serializers.crm.Issue.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +240,7 @@ export class Issues { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/issues/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -221,7 +248,7 @@ export class Issues { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/issues/client/requests/IssuesListRequest.ts b/src/api/resources/crm/resources/issues/client/requests/IssuesListRequest.ts index 46404019a..7f023b54a 100644 --- a/src/api/resources/crm/resources/issues/client/requests/IssuesListRequest.ts +++ b/src/api/resources/crm/resources/issues/client/requests/IssuesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/issues/client/requests/index.ts b/src/api/resources/crm/resources/issues/client/requests/index.ts index 278763f77..ad215d907 100644 --- a/src/api/resources/crm/resources/issues/client/requests/index.ts +++ b/src/api/resources/crm/resources/issues/client/requests/index.ts @@ -1 +1 @@ -export { IssuesListRequest } from "./IssuesListRequest"; +export { type IssuesListRequest } from "./IssuesListRequest"; diff --git a/src/api/resources/crm/resources/leads/client/Client.ts b/src/api/resources/crm/resources/leads/client/Client.ts index 559e41748..badd5313c 100644 --- a/src/api/resources/crm/resources/leads/client/Client.ts +++ b/src/api/resources/crm/resources/leads/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Leads { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Leads { /** * Returns a list of `Lead` objects. * + * @param {Merge.crm.LeadsListRequest} request + * @param {Leads.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.leads.list({}) + * await client.crm.leads.list() */ public async list( request: Merge.crm.LeadsListRequest = {}, @@ -55,7 +67,7 @@ export class Leads { phoneNumbers, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (convertedAccountId != null) { _queryParams["converted_account_id"] = convertedAccountId; } @@ -138,15 +150,21 @@ export class Leads { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedLeadList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedLeadList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -169,7 +187,7 @@ export class Leads { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/leads."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -180,8 +198,11 @@ export class Leads { /** * Creates a `Lead` object with the given values. * + * @param {Merge.crm.LeadEndpointRequest} request + * @param {Leads.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.leads.create({ + * await client.crm.leads.create({ * model: {} * }) */ @@ -190,7 +211,7 @@ export class Leads { requestOptions?: Leads.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -213,16 +234,22 @@ export class Leads { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.crm.LeadEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.crm.LeadEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.LeadResponse.parseOrThrow(_response.body, { + return serializers.crm.LeadResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -245,7 +272,7 @@ export class Leads { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/leads."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -256,8 +283,12 @@ export class Leads { /** * Returns a `Lead` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.LeadsRetrieveRequest} request + * @param {Leads.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.leads.retrieve("id", {}) + * await client.crm.leads.retrieve("id") */ public async retrieve( id: string, @@ -265,7 +296,7 @@ export class Leads { requestOptions?: Leads.RequestOptions ): Promise { const { expand, includeRemoteData, includeRemoteFields } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -281,7 +312,7 @@ export class Leads { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/leads/${id}` + `crm/v1/leads/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -292,15 +323,21 @@ export class Leads { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.Lead.parseOrThrow(_response.body, { + return serializers.crm.Lead.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -323,7 +360,7 @@ export class Leads { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/leads/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -334,8 +371,10 @@ export class Leads { /** * Returns metadata for `Lead` POSTs. * + * @param {Leads.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.leads.metaPostRetrieve() + * await client.crm.leads.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Leads.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -352,14 +391,20 @@ export class Leads { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.MetaResponse.parseOrThrow(_response.body, { + return serializers.crm.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -382,7 +427,7 @@ export class Leads { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/leads/meta/post."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -393,8 +438,11 @@ export class Leads { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.crm.LeadsRemoteFieldClassesListRequest} request + * @param {Leads.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.leads.remoteFieldClassesList({}) + * await client.crm.leads.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.crm.LeadsRemoteFieldClassesListRequest = {}, @@ -409,7 +457,7 @@ export class Leads { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -452,15 +500,21 @@ export class Leads { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -483,7 +537,9 @@ export class Leads { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/leads/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -491,7 +547,7 @@ export class Leads { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/leads/client/requests/LeadEndpointRequest.ts b/src/api/resources/crm/resources/leads/client/requests/LeadEndpointRequest.ts index 1b92a0c6b..e98a38ddd 100644 --- a/src/api/resources/crm/resources/leads/client/requests/LeadEndpointRequest.ts +++ b/src/api/resources/crm/resources/leads/client/requests/LeadEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/leads/client/requests/LeadsListRequest.ts b/src/api/resources/crm/resources/leads/client/requests/LeadsListRequest.ts index b4bc5df88..a4fc22b26 100644 --- a/src/api/resources/crm/resources/leads/client/requests/LeadsListRequest.ts +++ b/src/api/resources/crm/resources/leads/client/requests/LeadsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/leads/client/requests/LeadsRetrieveRequest.ts b/src/api/resources/crm/resources/leads/client/requests/LeadsRetrieveRequest.ts index 79fbe5a24..51fd64072 100644 --- a/src/api/resources/crm/resources/leads/client/requests/LeadsRetrieveRequest.ts +++ b/src/api/resources/crm/resources/leads/client/requests/LeadsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/leads/client/requests/index.ts b/src/api/resources/crm/resources/leads/client/requests/index.ts index b45ce60ee..d8ab884f0 100644 --- a/src/api/resources/crm/resources/leads/client/requests/index.ts +++ b/src/api/resources/crm/resources/leads/client/requests/index.ts @@ -1,4 +1,4 @@ -export { LeadsListRequest } from "./LeadsListRequest"; -export { LeadEndpointRequest } from "./LeadEndpointRequest"; -export { LeadsRetrieveRequest } from "./LeadsRetrieveRequest"; -export { LeadsRemoteFieldClassesListRequest } from "./LeadsRemoteFieldClassesListRequest"; +export { type LeadsListRequest } from "./LeadsListRequest"; +export { type LeadEndpointRequest } from "./LeadEndpointRequest"; +export { type LeadsRetrieveRequest } from "./LeadsRetrieveRequest"; +export { type LeadsRemoteFieldClassesListRequest } from "./LeadsRemoteFieldClassesListRequest"; diff --git a/src/api/resources/crm/resources/linkToken/client/Client.ts b/src/api/resources/crm/resources/linkToken/client/Client.ts index 27e5e0db3..029c0bd1c 100644 --- a/src/api/resources/crm/resources/linkToken/client/Client.ts +++ b/src/api/resources/crm/resources/linkToken/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace LinkToken { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,12 +38,15 @@ export class LinkToken { /** * Creates a link token to be used when linking a new end user. * + * @param {Merge.crm.EndUserDetailsRequest} request + * @param {LinkToken.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.linkToken.create({ + * await client.crm.linkToken.create({ * endUserEmailAddress: "example@gmail.com", * endUserOrganizationName: "Test Organization", * endUserOriginId: "12345", - * categories: [Merge.crm.CategoriesEnum.Hris, Merge.crm.CategoriesEnum.Ats] + * categories: ["hris", "ats"] * }) */ public async create( @@ -55,15 +67,21 @@ export class LinkToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.crm.EndUserDetailsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.crm.EndUserDetailsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.LinkToken.parseOrThrow(_response.body, { + return serializers.crm.LinkToken.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +104,7 @@ export class LinkToken { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/link-token."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -94,7 +112,7 @@ export class LinkToken { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/linkToken/client/requests/EndUserDetailsRequest.ts b/src/api/resources/crm/resources/linkToken/client/requests/EndUserDetailsRequest.ts index 69dc74ee0..fa100423f 100644 --- a/src/api/resources/crm/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/api/resources/crm/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example @@ -10,7 +10,7 @@ import * as Merge from "../../../../../.."; * endUserEmailAddress: "example@gmail.com", * endUserOrganizationName: "Test Organization", * endUserOriginId: "12345", - * categories: [Merge.crm.CategoriesEnum.Hris, Merge.crm.CategoriesEnum.Ats] + * categories: ["hris", "ats"] * } */ export interface EndUserDetailsRequest { diff --git a/src/api/resources/crm/resources/linkToken/client/requests/index.ts b/src/api/resources/crm/resources/linkToken/client/requests/index.ts index d94b44a3e..de1b7e67d 100644 --- a/src/api/resources/crm/resources/linkToken/client/requests/index.ts +++ b/src/api/resources/crm/resources/linkToken/client/requests/index.ts @@ -1 +1 @@ -export { EndUserDetailsRequest } from "./EndUserDetailsRequest"; +export { type EndUserDetailsRequest } from "./EndUserDetailsRequest"; diff --git a/src/api/resources/crm/resources/linkedAccounts/client/Client.ts b/src/api/resources/crm/resources/linkedAccounts/client/Client.ts index f193ef966..1b5417f87 100644 --- a/src/api/resources/crm/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/crm/resources/linkedAccounts/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace LinkedAccounts { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class LinkedAccounts { /** * List linked accounts for your organization. * + * @param {Merge.crm.LinkedAccountsListRequest} request + * @param {LinkedAccounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.linkedAccounts.list({}) + * await client.crm.linkedAccounts.list() */ public async list( request: Merge.crm.LinkedAccountsListRequest = {}, @@ -51,7 +63,7 @@ export class LinkedAccounts { pageSize, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (category != null) { _queryParams["category"] = category; } @@ -118,15 +130,21 @@ export class LinkedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -149,7 +167,7 @@ export class LinkedAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/linked-accounts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -157,7 +175,7 @@ export class LinkedAccounts { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts b/src/api/resources/crm/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts index d90ab02e5..f29675811 100644 --- a/src/api/resources/crm/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts +++ b/src/api/resources/crm/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/linkedAccounts/client/requests/index.ts b/src/api/resources/crm/resources/linkedAccounts/client/requests/index.ts index ef755b09f..d28d7a17d 100644 --- a/src/api/resources/crm/resources/linkedAccounts/client/requests/index.ts +++ b/src/api/resources/crm/resources/linkedAccounts/client/requests/index.ts @@ -1 +1 @@ -export { LinkedAccountsListRequest } from "./LinkedAccountsListRequest"; +export { type LinkedAccountsListRequest } from "./LinkedAccountsListRequest"; diff --git a/src/api/resources/crm/resources/notes/client/Client.ts b/src/api/resources/crm/resources/notes/client/Client.ts index d651a620e..cb0a00967 100644 --- a/src/api/resources/crm/resources/notes/client/Client.ts +++ b/src/api/resources/crm/resources/notes/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Notes { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Notes { /** * Returns a list of `Note` objects. * + * @param {Merge.crm.NotesListRequest} request + * @param {Notes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.notes.list({}) + * await client.crm.notes.list() */ public async list( request: Merge.crm.NotesListRequest = {}, @@ -54,7 +66,7 @@ export class Notes { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountId != null) { _queryParams["account_id"] = accountId; } @@ -133,15 +145,21 @@ export class Notes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedNoteList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedNoteList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -164,7 +182,7 @@ export class Notes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/notes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -175,8 +193,11 @@ export class Notes { /** * Creates a `Note` object with the given values. * + * @param {Merge.crm.NoteEndpointRequest} request + * @param {Notes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.notes.create({ + * await client.crm.notes.create({ * model: {} * }) */ @@ -185,7 +206,7 @@ export class Notes { requestOptions?: Notes.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -208,16 +229,22 @@ export class Notes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.crm.NoteEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.crm.NoteEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.NoteResponse.parseOrThrow(_response.body, { + return serializers.crm.NoteResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -240,7 +267,7 @@ export class Notes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/notes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -251,8 +278,12 @@ export class Notes { /** * Returns a `Note` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.NotesRetrieveRequest} request + * @param {Notes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.notes.retrieve("id", {}) + * await client.crm.notes.retrieve("id") */ public async retrieve( id: string, @@ -260,7 +291,7 @@ export class Notes { requestOptions?: Notes.RequestOptions ): Promise { const { expand, includeRemoteData, includeRemoteFields } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -276,7 +307,7 @@ export class Notes { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/notes/${id}` + `crm/v1/notes/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -287,15 +318,21 @@ export class Notes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.Note.parseOrThrow(_response.body, { + return serializers.crm.Note.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -318,7 +355,7 @@ export class Notes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/notes/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -329,8 +366,10 @@ export class Notes { /** * Returns metadata for `Note` POSTs. * + * @param {Notes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.notes.metaPostRetrieve() + * await client.crm.notes.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Notes.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -347,14 +386,20 @@ export class Notes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.MetaResponse.parseOrThrow(_response.body, { + return serializers.crm.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -377,7 +422,7 @@ export class Notes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/notes/meta/post."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -388,8 +433,11 @@ export class Notes { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.crm.NotesRemoteFieldClassesListRequest} request + * @param {Notes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.notes.remoteFieldClassesList({}) + * await client.crm.notes.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.crm.NotesRemoteFieldClassesListRequest = {}, @@ -404,7 +452,7 @@ export class Notes { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -447,15 +495,21 @@ export class Notes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -478,7 +532,9 @@ export class Notes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/notes/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -486,7 +542,7 @@ export class Notes { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/notes/client/requests/NoteEndpointRequest.ts b/src/api/resources/crm/resources/notes/client/requests/NoteEndpointRequest.ts index 52cc88f77..90b3e30e7 100644 --- a/src/api/resources/crm/resources/notes/client/requests/NoteEndpointRequest.ts +++ b/src/api/resources/crm/resources/notes/client/requests/NoteEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/notes/client/requests/NotesListRequest.ts b/src/api/resources/crm/resources/notes/client/requests/NotesListRequest.ts index d32bf1b67..8cc6fc71f 100644 --- a/src/api/resources/crm/resources/notes/client/requests/NotesListRequest.ts +++ b/src/api/resources/crm/resources/notes/client/requests/NotesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/notes/client/requests/NotesRetrieveRequest.ts b/src/api/resources/crm/resources/notes/client/requests/NotesRetrieveRequest.ts index e159c1fdf..6b38d37ce 100644 --- a/src/api/resources/crm/resources/notes/client/requests/NotesRetrieveRequest.ts +++ b/src/api/resources/crm/resources/notes/client/requests/NotesRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/notes/client/requests/index.ts b/src/api/resources/crm/resources/notes/client/requests/index.ts index 4f5190cbe..64b89155e 100644 --- a/src/api/resources/crm/resources/notes/client/requests/index.ts +++ b/src/api/resources/crm/resources/notes/client/requests/index.ts @@ -1,4 +1,4 @@ -export { NotesListRequest } from "./NotesListRequest"; -export { NoteEndpointRequest } from "./NoteEndpointRequest"; -export { NotesRetrieveRequest } from "./NotesRetrieveRequest"; -export { NotesRemoteFieldClassesListRequest } from "./NotesRemoteFieldClassesListRequest"; +export { type NotesListRequest } from "./NotesListRequest"; +export { type NoteEndpointRequest } from "./NoteEndpointRequest"; +export { type NotesRetrieveRequest } from "./NotesRetrieveRequest"; +export { type NotesRemoteFieldClassesListRequest } from "./NotesRemoteFieldClassesListRequest"; diff --git a/src/api/resources/crm/resources/opportunities/client/Client.ts b/src/api/resources/crm/resources/opportunities/client/Client.ts index c68185f91..fef00efe5 100644 --- a/src/api/resources/crm/resources/opportunities/client/Client.ts +++ b/src/api/resources/crm/resources/opportunities/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Opportunities { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Opportunities { /** * Returns a list of `Opportunity` objects. * + * @param {Merge.crm.OpportunitiesListRequest} request + * @param {Opportunities.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.opportunities.list({}) + * await client.crm.opportunities.list() */ public async list( request: Merge.crm.OpportunitiesListRequest = {}, @@ -57,7 +69,7 @@ export class Opportunities { stageId, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountId != null) { _queryParams["account_id"] = accountId; } @@ -148,15 +160,21 @@ export class Opportunities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedOpportunityList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedOpportunityList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -179,7 +197,7 @@ export class Opportunities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/opportunities."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -190,8 +208,11 @@ export class Opportunities { /** * Creates an `Opportunity` object with the given values. * + * @param {Merge.crm.OpportunityEndpointRequest} request + * @param {Opportunities.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.opportunities.create({ + * await client.crm.opportunities.create({ * model: {} * }) */ @@ -200,7 +221,7 @@ export class Opportunities { requestOptions?: Opportunities.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -223,18 +244,22 @@ export class Opportunities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.crm.OpportunityEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.crm.OpportunityEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.OpportunityResponse.parseOrThrow(_response.body, { + return serializers.crm.OpportunityResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -257,7 +282,7 @@ export class Opportunities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/opportunities."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -268,8 +293,12 @@ export class Opportunities { /** * Returns an `Opportunity` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.OpportunitiesRetrieveRequest} request + * @param {Opportunities.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.opportunities.retrieve("id", {}) + * await client.crm.opportunities.retrieve("id") */ public async retrieve( id: string, @@ -277,7 +306,7 @@ export class Opportunities { requestOptions?: Opportunities.RequestOptions ): Promise { const { expand, includeRemoteData, includeRemoteFields, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -301,7 +330,7 @@ export class Opportunities { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/opportunities/${id}` + `crm/v1/opportunities/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -312,15 +341,21 @@ export class Opportunities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.Opportunity.parseOrThrow(_response.body, { + return serializers.crm.Opportunity.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -343,7 +378,7 @@ export class Opportunities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/opportunities/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -354,8 +389,12 @@ export class Opportunities { /** * Updates an `Opportunity` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.PatchedOpportunityEndpointRequest} request + * @param {Opportunities.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.opportunities.partialUpdate("id", { + * await client.crm.opportunities.partialUpdate("id", { * model: {} * }) */ @@ -365,7 +404,7 @@ export class Opportunities { requestOptions?: Opportunities.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -377,7 +416,7 @@ export class Opportunities { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/opportunities/${id}` + `crm/v1/opportunities/${encodeURIComponent(id)}` ), method: "PATCH", headers: { @@ -388,18 +427,24 @@ export class Opportunities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.crm.PatchedOpportunityEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.crm.PatchedOpportunityEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.OpportunityResponse.parseOrThrow(_response.body, { + return serializers.crm.OpportunityResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -422,7 +467,7 @@ export class Opportunities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling PATCH /crm/v1/opportunities/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -433,8 +478,11 @@ export class Opportunities { /** * Returns metadata for `Opportunity` PATCHs. * + * @param {string} id + * @param {Opportunities.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.opportunities.metaPatchRetrieve("id") + * await client.crm.opportunities.metaPatchRetrieve("id") */ public async metaPatchRetrieve( id: string, @@ -443,7 +491,7 @@ export class Opportunities { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/opportunities/meta/patch/${id}` + `crm/v1/opportunities/meta/patch/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -454,14 +502,20 @@ export class Opportunities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.MetaResponse.parseOrThrow(_response.body, { + return serializers.crm.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -484,7 +538,9 @@ export class Opportunities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/opportunities/meta/patch/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -495,8 +551,10 @@ export class Opportunities { /** * Returns metadata for `Opportunity` POSTs. * + * @param {Opportunities.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.opportunities.metaPostRetrieve() + * await client.crm.opportunities.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Opportunities.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -513,14 +571,20 @@ export class Opportunities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.MetaResponse.parseOrThrow(_response.body, { + return serializers.crm.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -543,7 +607,9 @@ export class Opportunities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/opportunities/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -554,8 +620,11 @@ export class Opportunities { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.crm.OpportunitiesRemoteFieldClassesListRequest} request + * @param {Opportunities.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.opportunities.remoteFieldClassesList({}) + * await client.crm.opportunities.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.crm.OpportunitiesRemoteFieldClassesListRequest = {}, @@ -570,7 +639,7 @@ export class Opportunities { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -613,15 +682,21 @@ export class Opportunities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -644,7 +719,9 @@ export class Opportunities { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/opportunities/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -652,7 +729,7 @@ export class Opportunities { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesListRequest.ts b/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesListRequest.ts index 5e2df337d..3e1795884 100644 --- a/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesListRequest.ts +++ b/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesRetrieveRequest.ts b/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesRetrieveRequest.ts index 1e81d4114..a5db52448 100644 --- a/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesRetrieveRequest.ts +++ b/src/api/resources/crm/resources/opportunities/client/requests/OpportunitiesRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/opportunities/client/requests/OpportunityEndpointRequest.ts b/src/api/resources/crm/resources/opportunities/client/requests/OpportunityEndpointRequest.ts index df0491dd5..af7edcae0 100644 --- a/src/api/resources/crm/resources/opportunities/client/requests/OpportunityEndpointRequest.ts +++ b/src/api/resources/crm/resources/opportunities/client/requests/OpportunityEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/opportunities/client/requests/PatchedOpportunityEndpointRequest.ts b/src/api/resources/crm/resources/opportunities/client/requests/PatchedOpportunityEndpointRequest.ts index 6117fae4d..b108a2d01 100644 --- a/src/api/resources/crm/resources/opportunities/client/requests/PatchedOpportunityEndpointRequest.ts +++ b/src/api/resources/crm/resources/opportunities/client/requests/PatchedOpportunityEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/opportunities/client/requests/index.ts b/src/api/resources/crm/resources/opportunities/client/requests/index.ts index 91146a173..6753f1586 100644 --- a/src/api/resources/crm/resources/opportunities/client/requests/index.ts +++ b/src/api/resources/crm/resources/opportunities/client/requests/index.ts @@ -1,5 +1,5 @@ -export { OpportunitiesListRequest } from "./OpportunitiesListRequest"; -export { OpportunityEndpointRequest } from "./OpportunityEndpointRequest"; -export { OpportunitiesRetrieveRequest } from "./OpportunitiesRetrieveRequest"; -export { PatchedOpportunityEndpointRequest } from "./PatchedOpportunityEndpointRequest"; -export { OpportunitiesRemoteFieldClassesListRequest } from "./OpportunitiesRemoteFieldClassesListRequest"; +export { type OpportunitiesListRequest } from "./OpportunitiesListRequest"; +export { type OpportunityEndpointRequest } from "./OpportunityEndpointRequest"; +export { type OpportunitiesRetrieveRequest } from "./OpportunitiesRetrieveRequest"; +export { type PatchedOpportunityEndpointRequest } from "./PatchedOpportunityEndpointRequest"; +export { type OpportunitiesRemoteFieldClassesListRequest } from "./OpportunitiesRemoteFieldClassesListRequest"; diff --git a/src/api/resources/crm/resources/passthrough/client/Client.ts b/src/api/resources/crm/resources/passthrough/client/Client.ts index 515e917b0..68f75f374 100644 --- a/src/api/resources/crm/resources/passthrough/client/Client.ts +++ b/src/api/resources/crm/resources/passthrough/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace Passthrough { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,9 +38,12 @@ export class Passthrough { /** * Pull data from an endpoint not currently supported by Merge. * + * @param {Merge.crm.DataPassthroughRequest} request + * @param {Passthrough.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.passthrough.create({ - * method: Merge.crm.MethodEnum.Get, + * await client.crm.passthrough.create({ + * method: "GET", * path: "/scooters" * }) */ @@ -53,17 +65,21 @@ export class Passthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.crm.DataPassthroughRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.crm.DataPassthroughRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.RemoteResponse.parseOrThrow(_response.body, { + return serializers.crm.RemoteResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +102,7 @@ export class Passthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/passthrough."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -94,7 +110,7 @@ export class Passthrough { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/regenerateKey/client/Client.ts b/src/api/resources/crm/resources/regenerateKey/client/Client.ts index bba02a1bc..3e6dd4c8e 100644 --- a/src/api/resources/crm/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/crm/resources/regenerateKey/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace RegenerateKey { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class RegenerateKey { /** * Exchange remote keys. * + * @param {Merge.crm.RemoteKeyForRegenerationRequest} request + * @param {RegenerateKey.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.regenerateKey.create({ + * await client.crm.regenerateKey.create({ * name: "Remote Deployment Key 1" * }) */ @@ -52,17 +64,23 @@ export class RegenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.crm.RemoteKeyForRegenerationRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.crm.RemoteKeyForRegenerationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.RemoteKey.parseOrThrow(_response.body, { + return serializers.crm.RemoteKey.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +103,7 @@ export class RegenerateKey { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/regenerate-key."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -93,7 +111,7 @@ export class RegenerateKey { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/regenerateKey/client/requests/index.ts b/src/api/resources/crm/resources/regenerateKey/client/requests/index.ts index 2987ef933..09bb5dbd0 100644 --- a/src/api/resources/crm/resources/regenerateKey/client/requests/index.ts +++ b/src/api/resources/crm/resources/regenerateKey/client/requests/index.ts @@ -1 +1 @@ -export { RemoteKeyForRegenerationRequest } from "./RemoteKeyForRegenerationRequest"; +export { type RemoteKeyForRegenerationRequest } from "./RemoteKeyForRegenerationRequest"; diff --git a/src/api/resources/crm/resources/scopes/client/Client.ts b/src/api/resources/crm/resources/scopes/client/Client.ts index dccc5a882..ba4eb74ed 100644 --- a/src/api/resources/crm/resources/scopes/client/Client.ts +++ b/src/api/resources/crm/resources/scopes/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Scopes { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class Scopes { /** * Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). * + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.scopes.defaultScopesRetrieve() + * await client.crm.scopes.defaultScopesRetrieve() */ public async defaultScopesRetrieve(requestOptions?: Scopes.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.crm.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/default-scopes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -88,8 +105,10 @@ export class Scopes { /** * Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). * + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.scopes.linkedAccountScopesRetrieve() + * await client.crm.scopes.linkedAccountScopesRetrieve() */ public async linkedAccountScopesRetrieve( requestOptions?: Scopes.RequestOptions @@ -108,14 +127,20 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.crm.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -138,7 +163,7 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/linked-account-scopes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -149,8 +174,11 @@ export class Scopes { /** * Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) * + * @param {Merge.crm.LinkedAccountCommonModelScopeDeserializerRequest} request + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.scopes.linkedAccountScopesCreate({ + * await client.crm.scopes.linkedAccountScopesCreate({ * commonModels: [{ * modelName: "Employee", * modelPermissions: { @@ -189,17 +217,23 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.crm.LinkedAccountCommonModelScopeDeserializerRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.crm.LinkedAccountCommonModelScopeDeserializerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.crm.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -222,7 +256,7 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/linked-account-scopes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -230,7 +264,7 @@ export class Scopes { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts b/src/api/resources/crm/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts index d887a258a..cc1970759 100644 --- a/src/api/resources/crm/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/api/resources/crm/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/scopes/client/requests/index.ts b/src/api/resources/crm/resources/scopes/client/requests/index.ts index 28d8d7974..d193f008e 100644 --- a/src/api/resources/crm/resources/scopes/client/requests/index.ts +++ b/src/api/resources/crm/resources/scopes/client/requests/index.ts @@ -1 +1 @@ -export { LinkedAccountCommonModelScopeDeserializerRequest } from "./LinkedAccountCommonModelScopeDeserializerRequest"; +export { type LinkedAccountCommonModelScopeDeserializerRequest } from "./LinkedAccountCommonModelScopeDeserializerRequest"; diff --git a/src/api/resources/crm/resources/stages/client/Client.ts b/src/api/resources/crm/resources/stages/client/Client.ts index 33fb5a9d7..40b1c5865 100644 --- a/src/api/resources/crm/resources/stages/client/Client.ts +++ b/src/api/resources/crm/resources/stages/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Stages { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Stages { /** * Returns a list of `Stage` objects. * + * @param {Merge.crm.StagesListRequest} request + * @param {Stages.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.stages.list({}) + * await client.crm.stages.list() */ public async list( request: Merge.crm.StagesListRequest = {}, @@ -49,7 +61,7 @@ export class Stages { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,15 +120,21 @@ export class Stages { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedStageList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedStageList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -139,7 +157,7 @@ export class Stages { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/stages."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -150,8 +168,12 @@ export class Stages { /** * Returns a `Stage` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.StagesRetrieveRequest} request + * @param {Stages.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.stages.retrieve("id", {}) + * await client.crm.stages.retrieve("id") */ public async retrieve( id: string, @@ -159,7 +181,7 @@ export class Stages { requestOptions?: Stages.RequestOptions ): Promise { const { includeRemoteData, includeRemoteFields } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -171,7 +193,7 @@ export class Stages { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/stages/${id}` + `crm/v1/stages/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -182,15 +204,21 @@ export class Stages { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.Stage.parseOrThrow(_response.body, { + return serializers.crm.Stage.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +241,7 @@ export class Stages { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/stages/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -224,8 +252,11 @@ export class Stages { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.crm.StagesRemoteFieldClassesListRequest} request + * @param {Stages.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.stages.remoteFieldClassesList({}) + * await client.crm.stages.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.crm.StagesRemoteFieldClassesListRequest = {}, @@ -240,7 +271,7 @@ export class Stages { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -283,15 +314,21 @@ export class Stages { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -314,7 +351,9 @@ export class Stages { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/stages/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -322,7 +361,7 @@ export class Stages { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/stages/client/requests/index.ts b/src/api/resources/crm/resources/stages/client/requests/index.ts index 92fe1d026..eb191e98e 100644 --- a/src/api/resources/crm/resources/stages/client/requests/index.ts +++ b/src/api/resources/crm/resources/stages/client/requests/index.ts @@ -1,3 +1,3 @@ -export { StagesListRequest } from "./StagesListRequest"; -export { StagesRetrieveRequest } from "./StagesRetrieveRequest"; -export { StagesRemoteFieldClassesListRequest } from "./StagesRemoteFieldClassesListRequest"; +export { type StagesListRequest } from "./StagesListRequest"; +export { type StagesRetrieveRequest } from "./StagesRetrieveRequest"; +export { type StagesRemoteFieldClassesListRequest } from "./StagesRemoteFieldClassesListRequest"; diff --git a/src/api/resources/crm/resources/syncStatus/client/Client.ts b/src/api/resources/crm/resources/syncStatus/client/Client.ts index 5d80d3792..8d9452e56 100644 --- a/src/api/resources/crm/resources/syncStatus/client/Client.ts +++ b/src/api/resources/crm/resources/syncStatus/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace SyncStatus { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,15 +38,18 @@ export class SyncStatus { /** * Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). * + * @param {Merge.crm.SyncStatusListRequest} request + * @param {SyncStatus.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.syncStatus.list({}) + * await client.crm.syncStatus.list() */ public async list( request: Merge.crm.SyncStatusListRequest = {}, requestOptions?: SyncStatus.RequestOptions ): Promise { const { cursor, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -60,15 +72,21 @@ export class SyncStatus { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedSyncStatusList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedSyncStatusList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -91,7 +109,7 @@ export class SyncStatus { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/sync-status."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -99,7 +117,7 @@ export class SyncStatus { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/syncStatus/client/requests/index.ts b/src/api/resources/crm/resources/syncStatus/client/requests/index.ts index 58e9548fe..ef4f7c855 100644 --- a/src/api/resources/crm/resources/syncStatus/client/requests/index.ts +++ b/src/api/resources/crm/resources/syncStatus/client/requests/index.ts @@ -1 +1 @@ -export { SyncStatusListRequest } from "./SyncStatusListRequest"; +export { type SyncStatusListRequest } from "./SyncStatusListRequest"; diff --git a/src/api/resources/crm/resources/tasks/client/Client.ts b/src/api/resources/crm/resources/tasks/client/Client.ts index cc8aecc7d..b3b842e38 100644 --- a/src/api/resources/crm/resources/tasks/client/Client.ts +++ b/src/api/resources/crm/resources/tasks/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Tasks { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Tasks { /** * Returns a list of `Task` objects. * + * @param {Merge.crm.TasksListRequest} request + * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.tasks.list({}) + * await client.crm.tasks.list() */ public async list( request: Merge.crm.TasksListRequest = {}, @@ -50,7 +62,7 @@ export class Tasks { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -113,15 +125,21 @@ export class Tasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedTaskList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedTaskList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -144,7 +162,7 @@ export class Tasks { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/tasks."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -155,8 +173,11 @@ export class Tasks { /** * Creates a `Task` object with the given values. * + * @param {Merge.crm.TaskEndpointRequest} request + * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.tasks.create({ + * await client.crm.tasks.create({ * model: {} * }) */ @@ -165,7 +186,7 @@ export class Tasks { requestOptions?: Tasks.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -188,16 +209,22 @@ export class Tasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.crm.TaskEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.crm.TaskEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.TaskResponse.parseOrThrow(_response.body, { + return serializers.crm.TaskResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -220,7 +247,7 @@ export class Tasks { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/tasks."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -231,8 +258,12 @@ export class Tasks { /** * Returns a `Task` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.TasksRetrieveRequest} request + * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.tasks.retrieve("id", {}) + * await client.crm.tasks.retrieve("id") */ public async retrieve( id: string, @@ -240,7 +271,7 @@ export class Tasks { requestOptions?: Tasks.RequestOptions ): Promise { const { expand, includeRemoteData, includeRemoteFields } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -256,7 +287,7 @@ export class Tasks { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/tasks/${id}` + `crm/v1/tasks/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -267,15 +298,21 @@ export class Tasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.Task.parseOrThrow(_response.body, { + return serializers.crm.Task.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -298,7 +335,7 @@ export class Tasks { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/tasks/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -309,8 +346,12 @@ export class Tasks { /** * Updates a `Task` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.PatchedTaskEndpointRequest} request + * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.tasks.partialUpdate("id", { + * await client.crm.tasks.partialUpdate("id", { * model: {} * }) */ @@ -320,7 +361,7 @@ export class Tasks { requestOptions?: Tasks.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -332,7 +373,7 @@ export class Tasks { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/tasks/${id}` + `crm/v1/tasks/${encodeURIComponent(id)}` ), method: "PATCH", headers: { @@ -343,18 +384,22 @@ export class Tasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.crm.PatchedTaskEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.crm.PatchedTaskEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.TaskResponse.parseOrThrow(_response.body, { + return serializers.crm.TaskResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -377,7 +422,7 @@ export class Tasks { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling PATCH /crm/v1/tasks/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -388,14 +433,17 @@ export class Tasks { /** * Returns metadata for `Task` PATCHs. * + * @param {string} id + * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.tasks.metaPatchRetrieve("id") + * await client.crm.tasks.metaPatchRetrieve("id") */ public async metaPatchRetrieve(id: string, requestOptions?: Tasks.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/tasks/meta/patch/${id}` + `crm/v1/tasks/meta/patch/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -406,14 +454,20 @@ export class Tasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.MetaResponse.parseOrThrow(_response.body, { + return serializers.crm.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -436,7 +490,7 @@ export class Tasks { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/tasks/meta/patch/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -447,8 +501,10 @@ export class Tasks { /** * Returns metadata for `Task` POSTs. * + * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.tasks.metaPostRetrieve() + * await client.crm.tasks.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Tasks.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -465,14 +521,20 @@ export class Tasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.MetaResponse.parseOrThrow(_response.body, { + return serializers.crm.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -495,7 +557,7 @@ export class Tasks { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/tasks/meta/post."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -506,8 +568,11 @@ export class Tasks { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.crm.TasksRemoteFieldClassesListRequest} request + * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.tasks.remoteFieldClassesList({}) + * await client.crm.tasks.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.crm.TasksRemoteFieldClassesListRequest = {}, @@ -522,7 +587,7 @@ export class Tasks { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -565,15 +630,21 @@ export class Tasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -596,7 +667,9 @@ export class Tasks { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/tasks/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -604,7 +677,7 @@ export class Tasks { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/tasks/client/requests/PatchedTaskEndpointRequest.ts b/src/api/resources/crm/resources/tasks/client/requests/PatchedTaskEndpointRequest.ts index cdacda35a..cb81cff51 100644 --- a/src/api/resources/crm/resources/tasks/client/requests/PatchedTaskEndpointRequest.ts +++ b/src/api/resources/crm/resources/tasks/client/requests/PatchedTaskEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/tasks/client/requests/TaskEndpointRequest.ts b/src/api/resources/crm/resources/tasks/client/requests/TaskEndpointRequest.ts index a5758252a..7ae2cf800 100644 --- a/src/api/resources/crm/resources/tasks/client/requests/TaskEndpointRequest.ts +++ b/src/api/resources/crm/resources/tasks/client/requests/TaskEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/tasks/client/requests/TasksListRequest.ts b/src/api/resources/crm/resources/tasks/client/requests/TasksListRequest.ts index 997fe27f1..bf8ec1855 100644 --- a/src/api/resources/crm/resources/tasks/client/requests/TasksListRequest.ts +++ b/src/api/resources/crm/resources/tasks/client/requests/TasksListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/tasks/client/requests/TasksRetrieveRequest.ts b/src/api/resources/crm/resources/tasks/client/requests/TasksRetrieveRequest.ts index 42045908d..cc9c9afdf 100644 --- a/src/api/resources/crm/resources/tasks/client/requests/TasksRetrieveRequest.ts +++ b/src/api/resources/crm/resources/tasks/client/requests/TasksRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/crm/resources/tasks/client/requests/index.ts b/src/api/resources/crm/resources/tasks/client/requests/index.ts index ebc6fd19e..82f469b5b 100644 --- a/src/api/resources/crm/resources/tasks/client/requests/index.ts +++ b/src/api/resources/crm/resources/tasks/client/requests/index.ts @@ -1,5 +1,5 @@ -export { TasksListRequest } from "./TasksListRequest"; -export { TaskEndpointRequest } from "./TaskEndpointRequest"; -export { TasksRetrieveRequest } from "./TasksRetrieveRequest"; -export { PatchedTaskEndpointRequest } from "./PatchedTaskEndpointRequest"; -export { TasksRemoteFieldClassesListRequest } from "./TasksRemoteFieldClassesListRequest"; +export { type TasksListRequest } from "./TasksListRequest"; +export { type TaskEndpointRequest } from "./TaskEndpointRequest"; +export { type TasksRetrieveRequest } from "./TasksRetrieveRequest"; +export { type PatchedTaskEndpointRequest } from "./PatchedTaskEndpointRequest"; +export { type TasksRemoteFieldClassesListRequest } from "./TasksRemoteFieldClassesListRequest"; diff --git a/src/api/resources/crm/resources/users/client/Client.ts b/src/api/resources/crm/resources/users/client/Client.ts index 89d076c24..c8c933a58 100644 --- a/src/api/resources/crm/resources/users/client/Client.ts +++ b/src/api/resources/crm/resources/users/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Users { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Users { /** * Returns a list of `User` objects. * + * @param {Merge.crm.UsersListRequest} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.users.list({}) + * await client.crm.users.list() */ public async list( request: Merge.crm.UsersListRequest = {}, @@ -49,7 +61,7 @@ export class Users { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,15 +120,21 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedUserList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedUserList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -139,7 +157,7 @@ export class Users { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/users."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -150,8 +168,12 @@ export class Users { /** * Returns a `User` object with the given `id`. * + * @param {string} id + * @param {Merge.crm.UsersRetrieveRequest} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.users.retrieve("id", {}) + * await client.crm.users.retrieve("id") */ public async retrieve( id: string, @@ -159,7 +181,7 @@ export class Users { requestOptions?: Users.RequestOptions ): Promise { const { includeRemoteData, includeRemoteFields } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -171,7 +193,7 @@ export class Users { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/users/${id}` + `crm/v1/users/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -182,15 +204,21 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.User.parseOrThrow(_response.body, { + return serializers.crm.User.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +241,7 @@ export class Users { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/users/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -224,9 +252,13 @@ export class Users { /** * Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. * + * @param {string} modelId + * @param {Merge.crm.IgnoreCommonModelRequest} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.users.ignoreCreate("model_id", { - * reason: Merge.crm.ReasonEnum.GeneralCustomerRequest + * await client.crm.users.ignoreCreate("model_id", { + * reason: "GENERAL_CUSTOMER_REQUEST" * }) */ public async ignoreCreate( @@ -237,7 +269,7 @@ export class Users { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/users/ignore/${modelId}` + `crm/v1/users/ignore/${encodeURIComponent(modelId)}` ), method: "POST", headers: { @@ -248,14 +280,18 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.crm.IgnoreCommonModelRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.crm.IgnoreCommonModelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -275,7 +311,9 @@ export class Users { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /crm/v1/users/ignore/{model_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -286,8 +324,11 @@ export class Users { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.crm.UsersRemoteFieldClassesListRequest} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.users.remoteFieldClassesList({}) + * await client.crm.users.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.crm.UsersRemoteFieldClassesListRequest = {}, @@ -302,7 +343,7 @@ export class Users { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -345,15 +386,21 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -376,7 +423,9 @@ export class Users { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /crm/v1/users/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -384,7 +433,7 @@ export class Users { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/users/client/requests/index.ts b/src/api/resources/crm/resources/users/client/requests/index.ts index 114306fe6..c45ed0334 100644 --- a/src/api/resources/crm/resources/users/client/requests/index.ts +++ b/src/api/resources/crm/resources/users/client/requests/index.ts @@ -1,3 +1,3 @@ -export { UsersListRequest } from "./UsersListRequest"; -export { UsersRetrieveRequest } from "./UsersRetrieveRequest"; -export { UsersRemoteFieldClassesListRequest } from "./UsersRemoteFieldClassesListRequest"; +export { type UsersListRequest } from "./UsersListRequest"; +export { type UsersRetrieveRequest } from "./UsersRetrieveRequest"; +export { type UsersRemoteFieldClassesListRequest } from "./UsersRemoteFieldClassesListRequest"; diff --git a/src/api/resources/crm/resources/webhookReceivers/client/Client.ts b/src/api/resources/crm/resources/webhookReceivers/client/Client.ts index 3adbcd456..ee9b8c8d7 100644 --- a/src/api/resources/crm/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/crm/resources/webhookReceivers/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace WebhookReceivers { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class WebhookReceivers { /** * Returns a list of `WebhookReceiver` objects. * + * @param {WebhookReceivers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.webhookReceivers.list() + * await client.crm.webhookReceivers.list() */ public async list(requestOptions?: WebhookReceivers.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.webhookReceivers.list.Response.parseOrThrow(_response.body, { + return serializers.crm.webhookReceivers.list.Response.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class WebhookReceivers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /crm/v1/webhook-receivers."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -88,8 +105,11 @@ export class WebhookReceivers { /** * Creates a `WebhookReceiver` object with the given values. * + * @param {Merge.crm.WebhookReceiverRequest} request + * @param {WebhookReceivers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.crm.webhookReceivers.create({ + * await client.crm.webhookReceivers.create({ * event: "event", * isActive: true * }) @@ -112,17 +132,21 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.crm.WebhookReceiverRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.crm.WebhookReceiverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.crm.WebhookReceiver.parseOrThrow(_response.body, { + return serializers.crm.WebhookReceiver.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +169,7 @@ export class WebhookReceivers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /crm/v1/webhook-receivers."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -153,7 +177,7 @@ export class WebhookReceivers { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/crm/resources/webhookReceivers/client/requests/index.ts b/src/api/resources/crm/resources/webhookReceivers/client/requests/index.ts index 29f534250..1df76ea53 100644 --- a/src/api/resources/crm/resources/webhookReceivers/client/requests/index.ts +++ b/src/api/resources/crm/resources/webhookReceivers/client/requests/index.ts @@ -1 +1 @@ -export { WebhookReceiverRequest } from "./WebhookReceiverRequest"; +export { type WebhookReceiverRequest } from "./WebhookReceiverRequest"; diff --git a/src/api/resources/crm/types/Account.ts b/src/api/resources/crm/types/Account.ts index f32d24e38..34eef1807 100644 --- a/src/api/resources/crm/types/Account.ts +++ b/src/api/resources/crm/types/Account.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Account Object diff --git a/src/api/resources/crm/types/AccountDetails.ts b/src/api/resources/crm/types/AccountDetails.ts index 134abff06..93f70c845 100644 --- a/src/api/resources/crm/types/AccountDetails.ts +++ b/src/api/resources/crm/types/AccountDetails.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountDetails { id?: string; diff --git a/src/api/resources/crm/types/AccountDetailsAndActions.ts b/src/api/resources/crm/types/AccountDetailsAndActions.ts index 58f7feb19..e77dab556 100644 --- a/src/api/resources/crm/types/AccountDetailsAndActions.ts +++ b/src/api/resources/crm/types/AccountDetailsAndActions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The LinkedAccount Object diff --git a/src/api/resources/crm/types/AccountDetailsAndActionsIntegration.ts b/src/api/resources/crm/types/AccountDetailsAndActionsIntegration.ts index cbad756a9..97aa8e66c 100644 --- a/src/api/resources/crm/types/AccountDetailsAndActionsIntegration.ts +++ b/src/api/resources/crm/types/AccountDetailsAndActionsIntegration.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountDetailsAndActionsIntegration { name: string; diff --git a/src/api/resources/crm/types/AccountIntegration.ts b/src/api/resources/crm/types/AccountIntegration.ts index 3528d498d..cd20233f1 100644 --- a/src/api/resources/crm/types/AccountIntegration.ts +++ b/src/api/resources/crm/types/AccountIntegration.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountIntegration { /** Company name. */ diff --git a/src/api/resources/crm/types/AccountOwner.ts b/src/api/resources/crm/types/AccountOwner.ts index 6bf1ffbd3..c886bedea 100644 --- a/src/api/resources/crm/types/AccountOwner.ts +++ b/src/api/resources/crm/types/AccountOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account's owner. diff --git a/src/api/resources/crm/types/AccountRequest.ts b/src/api/resources/crm/types/AccountRequest.ts index aa3edd9c7..b4075ff3a 100644 --- a/src/api/resources/crm/types/AccountRequest.ts +++ b/src/api/resources/crm/types/AccountRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Account Object diff --git a/src/api/resources/crm/types/AccountRequestOwner.ts b/src/api/resources/crm/types/AccountRequestOwner.ts index 78133c567..9e49345d8 100644 --- a/src/api/resources/crm/types/AccountRequestOwner.ts +++ b/src/api/resources/crm/types/AccountRequestOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account's owner. diff --git a/src/api/resources/crm/types/AccountToken.ts b/src/api/resources/crm/types/AccountToken.ts index 5f1dd90de..d76adee78 100644 --- a/src/api/resources/crm/types/AccountToken.ts +++ b/src/api/resources/crm/types/AccountToken.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountToken { accountToken: string; diff --git a/src/api/resources/crm/types/Address.ts b/src/api/resources/crm/types/Address.ts index b04f528e3..f8bbdef63 100644 --- a/src/api/resources/crm/types/Address.ts +++ b/src/api/resources/crm/types/Address.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Address Object diff --git a/src/api/resources/crm/types/AddressAddressType.ts b/src/api/resources/crm/types/AddressAddressType.ts index 66126eab6..ae00573c7 100644 --- a/src/api/resources/crm/types/AddressAddressType.ts +++ b/src/api/resources/crm/types/AddressAddressType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The address type. diff --git a/src/api/resources/crm/types/AddressCountry.ts b/src/api/resources/crm/types/AddressCountry.ts index 303a09391..2dcbd63b7 100644 --- a/src/api/resources/crm/types/AddressCountry.ts +++ b/src/api/resources/crm/types/AddressCountry.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The address's country. diff --git a/src/api/resources/crm/types/AddressRequest.ts b/src/api/resources/crm/types/AddressRequest.ts index 91345588d..4aafa3f0a 100644 --- a/src/api/resources/crm/types/AddressRequest.ts +++ b/src/api/resources/crm/types/AddressRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Address Object diff --git a/src/api/resources/crm/types/AddressRequestAddressType.ts b/src/api/resources/crm/types/AddressRequestAddressType.ts index 1a95b03dd..e3f05311c 100644 --- a/src/api/resources/crm/types/AddressRequestAddressType.ts +++ b/src/api/resources/crm/types/AddressRequestAddressType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The address type. diff --git a/src/api/resources/crm/types/AddressRequestCountry.ts b/src/api/resources/crm/types/AddressRequestCountry.ts index 5a1576aa4..a6d0c1be3 100644 --- a/src/api/resources/crm/types/AddressRequestCountry.ts +++ b/src/api/resources/crm/types/AddressRequestCountry.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The address's country. diff --git a/src/api/resources/crm/types/Association.ts b/src/api/resources/crm/types/Association.ts index 982ed73da..ba183b605 100644 --- a/src/api/resources/crm/types/Association.ts +++ b/src/api/resources/crm/types/Association.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Association Object diff --git a/src/api/resources/crm/types/AssociationAssociationType.ts b/src/api/resources/crm/types/AssociationAssociationType.ts index a5ce7d5b1..ead491fa5 100644 --- a/src/api/resources/crm/types/AssociationAssociationType.ts +++ b/src/api/resources/crm/types/AssociationAssociationType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The association type the association belongs to. diff --git a/src/api/resources/crm/types/AssociationType.ts b/src/api/resources/crm/types/AssociationType.ts index 418422962..54a31570a 100644 --- a/src/api/resources/crm/types/AssociationType.ts +++ b/src/api/resources/crm/types/AssociationType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The AssociationType Object diff --git a/src/api/resources/crm/types/AssociationTypeCardinality.ts b/src/api/resources/crm/types/AssociationTypeCardinality.ts index 4baf3f754..e0a74d000 100644 --- a/src/api/resources/crm/types/AssociationTypeCardinality.ts +++ b/src/api/resources/crm/types/AssociationTypeCardinality.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type AssociationTypeCardinality = Merge.crm.CardinalityEnum | string; diff --git a/src/api/resources/crm/types/AssociationTypeRequestRequest.ts b/src/api/resources/crm/types/AssociationTypeRequestRequest.ts index 7067b7eab..b301266c3 100644 --- a/src/api/resources/crm/types/AssociationTypeRequestRequest.ts +++ b/src/api/resources/crm/types/AssociationTypeRequestRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AssociationTypeRequestRequest { sourceObjectClass: Merge.crm.ObjectClassDescriptionRequest; diff --git a/src/api/resources/crm/types/AuditLogEvent.ts b/src/api/resources/crm/types/AuditLogEvent.ts index 3cf456158..efc921f88 100644 --- a/src/api/resources/crm/types/AuditLogEvent.ts +++ b/src/api/resources/crm/types/AuditLogEvent.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AuditLogEvent { id?: string; diff --git a/src/api/resources/crm/types/AuditLogEventEventType.ts b/src/api/resources/crm/types/AuditLogEventEventType.ts index eb0b186bc..3eafcf265 100644 --- a/src/api/resources/crm/types/AuditLogEventEventType.ts +++ b/src/api/resources/crm/types/AuditLogEventEventType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Designates the type of event that occurred. diff --git a/src/api/resources/crm/types/AuditLogEventRole.ts b/src/api/resources/crm/types/AuditLogEventRole.ts index 24be16ed6..ebec514db 100644 --- a/src/api/resources/crm/types/AuditLogEventRole.ts +++ b/src/api/resources/crm/types/AuditLogEventRole.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. diff --git a/src/api/resources/crm/types/AvailableActions.ts b/src/api/resources/crm/types/AvailableActions.ts index 269c4ad05..b2d66176c 100644 --- a/src/api/resources/crm/types/AvailableActions.ts +++ b/src/api/resources/crm/types/AvailableActions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The AvailableActions Object diff --git a/src/api/resources/crm/types/CommonModelScopeApi.ts b/src/api/resources/crm/types/CommonModelScopeApi.ts index 657552dac..c13b9ca27 100644 --- a/src/api/resources/crm/types/CommonModelScopeApi.ts +++ b/src/api/resources/crm/types/CommonModelScopeApi.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CommonModelScopeApi { /** The common models you want to update the scopes for */ diff --git a/src/api/resources/crm/types/CommonModelScopesBodyRequest.ts b/src/api/resources/crm/types/CommonModelScopesBodyRequest.ts index 1f8c40387..19276bf6d 100644 --- a/src/api/resources/crm/types/CommonModelScopesBodyRequest.ts +++ b/src/api/resources/crm/types/CommonModelScopesBodyRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CommonModelScopesBodyRequest { modelId: string; diff --git a/src/api/resources/crm/types/Contact.ts b/src/api/resources/crm/types/Contact.ts index 15aa82df2..d388d4ea7 100644 --- a/src/api/resources/crm/types/Contact.ts +++ b/src/api/resources/crm/types/Contact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Contact Object diff --git a/src/api/resources/crm/types/ContactAccount.ts b/src/api/resources/crm/types/ContactAccount.ts index 517ee976c..82bf31527 100644 --- a/src/api/resources/crm/types/ContactAccount.ts +++ b/src/api/resources/crm/types/ContactAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The contact's account. diff --git a/src/api/resources/crm/types/ContactOwner.ts b/src/api/resources/crm/types/ContactOwner.ts index b2ac3573c..b37e960f0 100644 --- a/src/api/resources/crm/types/ContactOwner.ts +++ b/src/api/resources/crm/types/ContactOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The contact's owner. diff --git a/src/api/resources/crm/types/ContactRequest.ts b/src/api/resources/crm/types/ContactRequest.ts index 5e463b796..68bf2f6c1 100644 --- a/src/api/resources/crm/types/ContactRequest.ts +++ b/src/api/resources/crm/types/ContactRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Contact Object diff --git a/src/api/resources/crm/types/ContactRequestAccount.ts b/src/api/resources/crm/types/ContactRequestAccount.ts index 3eb01218c..b2963ee15 100644 --- a/src/api/resources/crm/types/ContactRequestAccount.ts +++ b/src/api/resources/crm/types/ContactRequestAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The contact's account. diff --git a/src/api/resources/crm/types/ContactRequestOwner.ts b/src/api/resources/crm/types/ContactRequestOwner.ts index cb2607fe0..a3d17bd17 100644 --- a/src/api/resources/crm/types/ContactRequestOwner.ts +++ b/src/api/resources/crm/types/ContactRequestOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The contact's owner. diff --git a/src/api/resources/crm/types/CrmAccountResponse.ts b/src/api/resources/crm/types/CrmAccountResponse.ts index 4507af083..d1380627b 100644 --- a/src/api/resources/crm/types/CrmAccountResponse.ts +++ b/src/api/resources/crm/types/CrmAccountResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CrmAccountResponse { model: Merge.crm.Account; diff --git a/src/api/resources/crm/types/CrmAssociationTypeResponse.ts b/src/api/resources/crm/types/CrmAssociationTypeResponse.ts index 67698f1ae..41eb42b11 100644 --- a/src/api/resources/crm/types/CrmAssociationTypeResponse.ts +++ b/src/api/resources/crm/types/CrmAssociationTypeResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CrmAssociationTypeResponse { model: Merge.crm.AssociationType; diff --git a/src/api/resources/crm/types/CrmContactResponse.ts b/src/api/resources/crm/types/CrmContactResponse.ts index 2105749bd..eeaabbfb7 100644 --- a/src/api/resources/crm/types/CrmContactResponse.ts +++ b/src/api/resources/crm/types/CrmContactResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CrmContactResponse { model: Merge.crm.Contact; diff --git a/src/api/resources/crm/types/CrmCustomObjectResponse.ts b/src/api/resources/crm/types/CrmCustomObjectResponse.ts index 9f88d455e..9bd3aa4b3 100644 --- a/src/api/resources/crm/types/CrmCustomObjectResponse.ts +++ b/src/api/resources/crm/types/CrmCustomObjectResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CrmCustomObjectResponse { model: Merge.crm.CustomObject; diff --git a/src/api/resources/crm/types/CustomObject.ts b/src/api/resources/crm/types/CustomObject.ts index a9a998d89..ca7138b84 100644 --- a/src/api/resources/crm/types/CustomObject.ts +++ b/src/api/resources/crm/types/CustomObject.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The CustomObject Object diff --git a/src/api/resources/crm/types/CustomObjectClass.ts b/src/api/resources/crm/types/CustomObjectClass.ts index 116786ca2..e83aa1fb7 100644 --- a/src/api/resources/crm/types/CustomObjectClass.ts +++ b/src/api/resources/crm/types/CustomObjectClass.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Custom Object Class Object diff --git a/src/api/resources/crm/types/DataPassthroughRequest.ts b/src/api/resources/crm/types/DataPassthroughRequest.ts index e2c58528e..1ae2af19e 100644 --- a/src/api/resources/crm/types/DataPassthroughRequest.ts +++ b/src/api/resources/crm/types/DataPassthroughRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The DataPassthrough Object diff --git a/src/api/resources/crm/types/DebugModeLog.ts b/src/api/resources/crm/types/DebugModeLog.ts index 8f10f9a24..87ce54274 100644 --- a/src/api/resources/crm/types/DebugModeLog.ts +++ b/src/api/resources/crm/types/DebugModeLog.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface DebugModeLog { logId: string; diff --git a/src/api/resources/crm/types/Engagement.ts b/src/api/resources/crm/types/Engagement.ts index fc6f0e690..7e0fd6f03 100644 --- a/src/api/resources/crm/types/Engagement.ts +++ b/src/api/resources/crm/types/Engagement.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Engagement Object diff --git a/src/api/resources/crm/types/EngagementAccount.ts b/src/api/resources/crm/types/EngagementAccount.ts index c992868ce..bd92dd581 100644 --- a/src/api/resources/crm/types/EngagementAccount.ts +++ b/src/api/resources/crm/types/EngagementAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account of the engagement. diff --git a/src/api/resources/crm/types/EngagementContactsItem.ts b/src/api/resources/crm/types/EngagementContactsItem.ts index 2ff976d59..5ed7ca1a9 100644 --- a/src/api/resources/crm/types/EngagementContactsItem.ts +++ b/src/api/resources/crm/types/EngagementContactsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type EngagementContactsItem = string | Merge.crm.Contact; diff --git a/src/api/resources/crm/types/EngagementDirection.ts b/src/api/resources/crm/types/EngagementDirection.ts index 59adb51dc..66094afcc 100644 --- a/src/api/resources/crm/types/EngagementDirection.ts +++ b/src/api/resources/crm/types/EngagementDirection.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The engagement's direction. diff --git a/src/api/resources/crm/types/EngagementEngagementType.ts b/src/api/resources/crm/types/EngagementEngagementType.ts index bfbd28879..b28acfe78 100644 --- a/src/api/resources/crm/types/EngagementEngagementType.ts +++ b/src/api/resources/crm/types/EngagementEngagementType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The engagement type of the engagement. diff --git a/src/api/resources/crm/types/EngagementOwner.ts b/src/api/resources/crm/types/EngagementOwner.ts index 5af89bb2e..51631d2bb 100644 --- a/src/api/resources/crm/types/EngagementOwner.ts +++ b/src/api/resources/crm/types/EngagementOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The engagement's owner. diff --git a/src/api/resources/crm/types/EngagementRequest.ts b/src/api/resources/crm/types/EngagementRequest.ts index b5de4329a..333544c3c 100644 --- a/src/api/resources/crm/types/EngagementRequest.ts +++ b/src/api/resources/crm/types/EngagementRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Engagement Object diff --git a/src/api/resources/crm/types/EngagementRequestAccount.ts b/src/api/resources/crm/types/EngagementRequestAccount.ts index e7ace6943..e3ba09c95 100644 --- a/src/api/resources/crm/types/EngagementRequestAccount.ts +++ b/src/api/resources/crm/types/EngagementRequestAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account of the engagement. diff --git a/src/api/resources/crm/types/EngagementRequestContactsItem.ts b/src/api/resources/crm/types/EngagementRequestContactsItem.ts index cdcfd72ed..1a6b38d58 100644 --- a/src/api/resources/crm/types/EngagementRequestContactsItem.ts +++ b/src/api/resources/crm/types/EngagementRequestContactsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type EngagementRequestContactsItem = string | Merge.crm.Contact; diff --git a/src/api/resources/crm/types/EngagementRequestDirection.ts b/src/api/resources/crm/types/EngagementRequestDirection.ts index dc5001c2f..fb1308fc5 100644 --- a/src/api/resources/crm/types/EngagementRequestDirection.ts +++ b/src/api/resources/crm/types/EngagementRequestDirection.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The engagement's direction. diff --git a/src/api/resources/crm/types/EngagementRequestEngagementType.ts b/src/api/resources/crm/types/EngagementRequestEngagementType.ts index c0b0f57bd..dd810260b 100644 --- a/src/api/resources/crm/types/EngagementRequestEngagementType.ts +++ b/src/api/resources/crm/types/EngagementRequestEngagementType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The engagement type of the engagement. diff --git a/src/api/resources/crm/types/EngagementRequestOwner.ts b/src/api/resources/crm/types/EngagementRequestOwner.ts index e737575ec..0c6a24b1d 100644 --- a/src/api/resources/crm/types/EngagementRequestOwner.ts +++ b/src/api/resources/crm/types/EngagementRequestOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The engagement's owner. diff --git a/src/api/resources/crm/types/EngagementResponse.ts b/src/api/resources/crm/types/EngagementResponse.ts index 3de1b45fe..e26a5e408 100644 --- a/src/api/resources/crm/types/EngagementResponse.ts +++ b/src/api/resources/crm/types/EngagementResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface EngagementResponse { model: Merge.crm.Engagement; diff --git a/src/api/resources/crm/types/EngagementType.ts b/src/api/resources/crm/types/EngagementType.ts index d5236ef7a..a60a005c6 100644 --- a/src/api/resources/crm/types/EngagementType.ts +++ b/src/api/resources/crm/types/EngagementType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Engagement Type Object diff --git a/src/api/resources/crm/types/EngagementTypeActivityType.ts b/src/api/resources/crm/types/EngagementTypeActivityType.ts index aa722c051..cee2c6b7d 100644 --- a/src/api/resources/crm/types/EngagementTypeActivityType.ts +++ b/src/api/resources/crm/types/EngagementTypeActivityType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The engagement type's activity type. diff --git a/src/api/resources/crm/types/ErrorValidationProblem.ts b/src/api/resources/crm/types/ErrorValidationProblem.ts index 218a81bdc..f8e5c0d90 100644 --- a/src/api/resources/crm/types/ErrorValidationProblem.ts +++ b/src/api/resources/crm/types/ErrorValidationProblem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ErrorValidationProblem { source?: Merge.crm.ValidationProblemSource; diff --git a/src/api/resources/crm/types/ExternalTargetFieldApiResponse.ts b/src/api/resources/crm/types/ExternalTargetFieldApiResponse.ts index 8eee390a8..0112e1205 100644 --- a/src/api/resources/crm/types/ExternalTargetFieldApiResponse.ts +++ b/src/api/resources/crm/types/ExternalTargetFieldApiResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ExternalTargetFieldApiResponse { account?: Merge.crm.ExternalTargetFieldApi[]; diff --git a/src/api/resources/crm/types/FieldMappingApiInstance.ts b/src/api/resources/crm/types/FieldMappingApiInstance.ts index dbbf35109..672c8c877 100644 --- a/src/api/resources/crm/types/FieldMappingApiInstance.ts +++ b/src/api/resources/crm/types/FieldMappingApiInstance.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstance { id?: string; diff --git a/src/api/resources/crm/types/FieldMappingApiInstanceRemoteField.ts b/src/api/resources/crm/types/FieldMappingApiInstanceRemoteField.ts index 40cd0c8eb..9fb476416 100644 --- a/src/api/resources/crm/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/api/resources/crm/types/FieldMappingApiInstanceRemoteField.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstanceRemoteField { remoteKeyName: string; diff --git a/src/api/resources/crm/types/FieldMappingApiInstanceResponse.ts b/src/api/resources/crm/types/FieldMappingApiInstanceResponse.ts index 1cf98274f..407b4e4dc 100644 --- a/src/api/resources/crm/types/FieldMappingApiInstanceResponse.ts +++ b/src/api/resources/crm/types/FieldMappingApiInstanceResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstanceResponse { account?: Merge.crm.FieldMappingApiInstance[]; diff --git a/src/api/resources/crm/types/FieldMappingInstanceResponse.ts b/src/api/resources/crm/types/FieldMappingInstanceResponse.ts index 2cc900e5f..09e10a4f0 100644 --- a/src/api/resources/crm/types/FieldMappingInstanceResponse.ts +++ b/src/api/resources/crm/types/FieldMappingInstanceResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingInstanceResponse { model: Merge.crm.FieldMappingApiInstance; diff --git a/src/api/resources/crm/types/IgnoreCommonModelRequest.ts b/src/api/resources/crm/types/IgnoreCommonModelRequest.ts index 8d348e985..463fc306f 100644 --- a/src/api/resources/crm/types/IgnoreCommonModelRequest.ts +++ b/src/api/resources/crm/types/IgnoreCommonModelRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface IgnoreCommonModelRequest { reason: Merge.crm.ReasonEnum; diff --git a/src/api/resources/crm/types/IndividualCommonModelScopeDeserializer.ts b/src/api/resources/crm/types/IndividualCommonModelScopeDeserializer.ts index c00bdd02d..e2a9abe07 100644 --- a/src/api/resources/crm/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/api/resources/crm/types/IndividualCommonModelScopeDeserializer.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface IndividualCommonModelScopeDeserializer { modelName: string; diff --git a/src/api/resources/crm/types/IndividualCommonModelScopeDeserializerRequest.ts b/src/api/resources/crm/types/IndividualCommonModelScopeDeserializerRequest.ts index 17f76291e..a2d732d33 100644 --- a/src/api/resources/crm/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/api/resources/crm/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface IndividualCommonModelScopeDeserializerRequest { modelName: string; diff --git a/src/api/resources/crm/types/Issue.ts b/src/api/resources/crm/types/Issue.ts index 5ade8240d..b638381a1 100644 --- a/src/api/resources/crm/types/Issue.ts +++ b/src/api/resources/crm/types/Issue.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface Issue { id?: string; diff --git a/src/api/resources/crm/types/IssueStatus.ts b/src/api/resources/crm/types/IssueStatus.ts index 26c565a03..8cc4e32ed 100644 --- a/src/api/resources/crm/types/IssueStatus.ts +++ b/src/api/resources/crm/types/IssueStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Status of the issue. Options: ('ONGOING', 'RESOLVED') diff --git a/src/api/resources/crm/types/ItemSchema.ts b/src/api/resources/crm/types/ItemSchema.ts index f6aa4dd5d..a846766d5 100644 --- a/src/api/resources/crm/types/ItemSchema.ts +++ b/src/api/resources/crm/types/ItemSchema.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ItemSchema { itemType?: Merge.crm.ItemTypeEnum; diff --git a/src/api/resources/crm/types/Lead.ts b/src/api/resources/crm/types/Lead.ts index 0951fbac8..9fb2baeb0 100644 --- a/src/api/resources/crm/types/Lead.ts +++ b/src/api/resources/crm/types/Lead.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Lead Object diff --git a/src/api/resources/crm/types/LeadConvertedAccount.ts b/src/api/resources/crm/types/LeadConvertedAccount.ts index 5a4f73152..74082a4f1 100644 --- a/src/api/resources/crm/types/LeadConvertedAccount.ts +++ b/src/api/resources/crm/types/LeadConvertedAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account of the converted lead. diff --git a/src/api/resources/crm/types/LeadConvertedContact.ts b/src/api/resources/crm/types/LeadConvertedContact.ts index c4c2dbf82..118947d64 100644 --- a/src/api/resources/crm/types/LeadConvertedContact.ts +++ b/src/api/resources/crm/types/LeadConvertedContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The contact of the converted lead. diff --git a/src/api/resources/crm/types/LeadOwner.ts b/src/api/resources/crm/types/LeadOwner.ts index d62e0c9d0..7676bc159 100644 --- a/src/api/resources/crm/types/LeadOwner.ts +++ b/src/api/resources/crm/types/LeadOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The lead's owner. diff --git a/src/api/resources/crm/types/LeadRequest.ts b/src/api/resources/crm/types/LeadRequest.ts index 552fc31bc..d5141dacf 100644 --- a/src/api/resources/crm/types/LeadRequest.ts +++ b/src/api/resources/crm/types/LeadRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Lead Object diff --git a/src/api/resources/crm/types/LeadRequestConvertedAccount.ts b/src/api/resources/crm/types/LeadRequestConvertedAccount.ts index e1bb610a8..707a45bb5 100644 --- a/src/api/resources/crm/types/LeadRequestConvertedAccount.ts +++ b/src/api/resources/crm/types/LeadRequestConvertedAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account of the converted lead. diff --git a/src/api/resources/crm/types/LeadRequestConvertedContact.ts b/src/api/resources/crm/types/LeadRequestConvertedContact.ts index 726ca301c..fd3342c49 100644 --- a/src/api/resources/crm/types/LeadRequestConvertedContact.ts +++ b/src/api/resources/crm/types/LeadRequestConvertedContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The contact of the converted lead. diff --git a/src/api/resources/crm/types/LeadRequestOwner.ts b/src/api/resources/crm/types/LeadRequestOwner.ts index e4d0aa506..9ba1556e2 100644 --- a/src/api/resources/crm/types/LeadRequestOwner.ts +++ b/src/api/resources/crm/types/LeadRequestOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The lead's owner. diff --git a/src/api/resources/crm/types/LeadResponse.ts b/src/api/resources/crm/types/LeadResponse.ts index efde782a3..17dac22de 100644 --- a/src/api/resources/crm/types/LeadResponse.ts +++ b/src/api/resources/crm/types/LeadResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface LeadResponse { model: Merge.crm.Lead; diff --git a/src/api/resources/crm/types/MetaResponse.ts b/src/api/resources/crm/types/MetaResponse.ts index 19b24df67..a8e01aec5 100644 --- a/src/api/resources/crm/types/MetaResponse.ts +++ b/src/api/resources/crm/types/MetaResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface MetaResponse { requestSchema: Record; diff --git a/src/api/resources/crm/types/MultipartFormFieldRequest.ts b/src/api/resources/crm/types/MultipartFormFieldRequest.ts index c7850171f..856adf502 100644 --- a/src/api/resources/crm/types/MultipartFormFieldRequest.ts +++ b/src/api/resources/crm/types/MultipartFormFieldRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The MultipartFormField Object diff --git a/src/api/resources/crm/types/MultipartFormFieldRequestEncoding.ts b/src/api/resources/crm/types/MultipartFormFieldRequestEncoding.ts index 5f05fcaeb..fbfcc3e92 100644 --- a/src/api/resources/crm/types/MultipartFormFieldRequestEncoding.ts +++ b/src/api/resources/crm/types/MultipartFormFieldRequestEncoding.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The encoding of the value of `data`. Defaults to `RAW` if not defined. diff --git a/src/api/resources/crm/types/Note.ts b/src/api/resources/crm/types/Note.ts index 9e61c2d07..4116653d3 100644 --- a/src/api/resources/crm/types/Note.ts +++ b/src/api/resources/crm/types/Note.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Note Object diff --git a/src/api/resources/crm/types/NoteAccount.ts b/src/api/resources/crm/types/NoteAccount.ts index 364619fa5..e0c7c2fde 100644 --- a/src/api/resources/crm/types/NoteAccount.ts +++ b/src/api/resources/crm/types/NoteAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The note's account. diff --git a/src/api/resources/crm/types/NoteContact.ts b/src/api/resources/crm/types/NoteContact.ts index 0305d6154..91e177a5d 100644 --- a/src/api/resources/crm/types/NoteContact.ts +++ b/src/api/resources/crm/types/NoteContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The note's contact. diff --git a/src/api/resources/crm/types/NoteOpportunity.ts b/src/api/resources/crm/types/NoteOpportunity.ts index 8424df888..b24bcad1d 100644 --- a/src/api/resources/crm/types/NoteOpportunity.ts +++ b/src/api/resources/crm/types/NoteOpportunity.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The note's opportunity. diff --git a/src/api/resources/crm/types/NoteOwner.ts b/src/api/resources/crm/types/NoteOwner.ts index 1cdd7aa9d..21d9416df 100644 --- a/src/api/resources/crm/types/NoteOwner.ts +++ b/src/api/resources/crm/types/NoteOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The note's owner. diff --git a/src/api/resources/crm/types/NoteRequest.ts b/src/api/resources/crm/types/NoteRequest.ts index a3b99aeec..c01cd5307 100644 --- a/src/api/resources/crm/types/NoteRequest.ts +++ b/src/api/resources/crm/types/NoteRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Note Object diff --git a/src/api/resources/crm/types/NoteRequestAccount.ts b/src/api/resources/crm/types/NoteRequestAccount.ts index 588001006..933776063 100644 --- a/src/api/resources/crm/types/NoteRequestAccount.ts +++ b/src/api/resources/crm/types/NoteRequestAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The note's account. diff --git a/src/api/resources/crm/types/NoteRequestContact.ts b/src/api/resources/crm/types/NoteRequestContact.ts index fb054e748..81d593eef 100644 --- a/src/api/resources/crm/types/NoteRequestContact.ts +++ b/src/api/resources/crm/types/NoteRequestContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The note's contact. diff --git a/src/api/resources/crm/types/NoteRequestOpportunity.ts b/src/api/resources/crm/types/NoteRequestOpportunity.ts index 9acfbe189..6d59bd923 100644 --- a/src/api/resources/crm/types/NoteRequestOpportunity.ts +++ b/src/api/resources/crm/types/NoteRequestOpportunity.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The note's opportunity. diff --git a/src/api/resources/crm/types/NoteRequestOwner.ts b/src/api/resources/crm/types/NoteRequestOwner.ts index d047ecc66..ec838ee52 100644 --- a/src/api/resources/crm/types/NoteRequestOwner.ts +++ b/src/api/resources/crm/types/NoteRequestOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The note's owner. diff --git a/src/api/resources/crm/types/NoteResponse.ts b/src/api/resources/crm/types/NoteResponse.ts index 59773f44f..b12288dd1 100644 --- a/src/api/resources/crm/types/NoteResponse.ts +++ b/src/api/resources/crm/types/NoteResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface NoteResponse { model: Merge.crm.Note; diff --git a/src/api/resources/crm/types/ObjectClassDescriptionRequest.ts b/src/api/resources/crm/types/ObjectClassDescriptionRequest.ts index 99141a764..7c8d029de 100644 --- a/src/api/resources/crm/types/ObjectClassDescriptionRequest.ts +++ b/src/api/resources/crm/types/ObjectClassDescriptionRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ObjectClassDescriptionRequest { id: string; diff --git a/src/api/resources/crm/types/Opportunity.ts b/src/api/resources/crm/types/Opportunity.ts index 8ecf45ce7..698bf438c 100644 --- a/src/api/resources/crm/types/Opportunity.ts +++ b/src/api/resources/crm/types/Opportunity.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Opportunity Object diff --git a/src/api/resources/crm/types/OpportunityAccount.ts b/src/api/resources/crm/types/OpportunityAccount.ts index 52654554e..1f8b53f01 100644 --- a/src/api/resources/crm/types/OpportunityAccount.ts +++ b/src/api/resources/crm/types/OpportunityAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account of the opportunity. diff --git a/src/api/resources/crm/types/OpportunityOwner.ts b/src/api/resources/crm/types/OpportunityOwner.ts index 9258e8d29..b1128ca8c 100644 --- a/src/api/resources/crm/types/OpportunityOwner.ts +++ b/src/api/resources/crm/types/OpportunityOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The opportunity's owner. diff --git a/src/api/resources/crm/types/OpportunityRequest.ts b/src/api/resources/crm/types/OpportunityRequest.ts index feccc5fec..82b28b355 100644 --- a/src/api/resources/crm/types/OpportunityRequest.ts +++ b/src/api/resources/crm/types/OpportunityRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Opportunity Object diff --git a/src/api/resources/crm/types/OpportunityRequestAccount.ts b/src/api/resources/crm/types/OpportunityRequestAccount.ts index 8cd6ba149..381b89d26 100644 --- a/src/api/resources/crm/types/OpportunityRequestAccount.ts +++ b/src/api/resources/crm/types/OpportunityRequestAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account of the opportunity. diff --git a/src/api/resources/crm/types/OpportunityRequestOwner.ts b/src/api/resources/crm/types/OpportunityRequestOwner.ts index b75248f87..df8c61447 100644 --- a/src/api/resources/crm/types/OpportunityRequestOwner.ts +++ b/src/api/resources/crm/types/OpportunityRequestOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The opportunity's owner. diff --git a/src/api/resources/crm/types/OpportunityRequestStage.ts b/src/api/resources/crm/types/OpportunityRequestStage.ts index bd5fe78a1..d8a8d999b 100644 --- a/src/api/resources/crm/types/OpportunityRequestStage.ts +++ b/src/api/resources/crm/types/OpportunityRequestStage.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The stage of the opportunity. diff --git a/src/api/resources/crm/types/OpportunityRequestStatus.ts b/src/api/resources/crm/types/OpportunityRequestStatus.ts index 036f4427e..f06819c68 100644 --- a/src/api/resources/crm/types/OpportunityRequestStatus.ts +++ b/src/api/resources/crm/types/OpportunityRequestStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The opportunity's status. diff --git a/src/api/resources/crm/types/OpportunityResponse.ts b/src/api/resources/crm/types/OpportunityResponse.ts index a4a05150c..ae8dd3963 100644 --- a/src/api/resources/crm/types/OpportunityResponse.ts +++ b/src/api/resources/crm/types/OpportunityResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface OpportunityResponse { model: Merge.crm.Opportunity; diff --git a/src/api/resources/crm/types/OpportunityStage.ts b/src/api/resources/crm/types/OpportunityStage.ts index d4bf23789..849692aad 100644 --- a/src/api/resources/crm/types/OpportunityStage.ts +++ b/src/api/resources/crm/types/OpportunityStage.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The stage of the opportunity. diff --git a/src/api/resources/crm/types/OpportunityStatus.ts b/src/api/resources/crm/types/OpportunityStatus.ts index 471a02099..1eecfd426 100644 --- a/src/api/resources/crm/types/OpportunityStatus.ts +++ b/src/api/resources/crm/types/OpportunityStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The opportunity's status. diff --git a/src/api/resources/crm/types/PaginatedAccountDetailsAndActionsList.ts b/src/api/resources/crm/types/PaginatedAccountDetailsAndActionsList.ts index d8607aa88..f4ae42ab0 100644 --- a/src/api/resources/crm/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/api/resources/crm/types/PaginatedAccountDetailsAndActionsList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAccountDetailsAndActionsList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedAccountList.ts b/src/api/resources/crm/types/PaginatedAccountList.ts index 7df0ddf4f..3a9721f73 100644 --- a/src/api/resources/crm/types/PaginatedAccountList.ts +++ b/src/api/resources/crm/types/PaginatedAccountList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAccountList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedAssociationList.ts b/src/api/resources/crm/types/PaginatedAssociationList.ts index dc7ab7727..5705b0765 100644 --- a/src/api/resources/crm/types/PaginatedAssociationList.ts +++ b/src/api/resources/crm/types/PaginatedAssociationList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAssociationList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedAssociationTypeList.ts b/src/api/resources/crm/types/PaginatedAssociationTypeList.ts index 8d2ef766c..cc4419a1f 100644 --- a/src/api/resources/crm/types/PaginatedAssociationTypeList.ts +++ b/src/api/resources/crm/types/PaginatedAssociationTypeList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAssociationTypeList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedAuditLogEventList.ts b/src/api/resources/crm/types/PaginatedAuditLogEventList.ts index 882be917b..e564521f6 100644 --- a/src/api/resources/crm/types/PaginatedAuditLogEventList.ts +++ b/src/api/resources/crm/types/PaginatedAuditLogEventList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAuditLogEventList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedContactList.ts b/src/api/resources/crm/types/PaginatedContactList.ts index 43923dbc6..175e5acb8 100644 --- a/src/api/resources/crm/types/PaginatedContactList.ts +++ b/src/api/resources/crm/types/PaginatedContactList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedContactList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedCustomObjectClassList.ts b/src/api/resources/crm/types/PaginatedCustomObjectClassList.ts index 57b977f34..8419e01ad 100644 --- a/src/api/resources/crm/types/PaginatedCustomObjectClassList.ts +++ b/src/api/resources/crm/types/PaginatedCustomObjectClassList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedCustomObjectClassList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedCustomObjectList.ts b/src/api/resources/crm/types/PaginatedCustomObjectList.ts index 9ae456795..437b8b309 100644 --- a/src/api/resources/crm/types/PaginatedCustomObjectList.ts +++ b/src/api/resources/crm/types/PaginatedCustomObjectList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedCustomObjectList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedEngagementList.ts b/src/api/resources/crm/types/PaginatedEngagementList.ts index f394eaac6..ebe7325e4 100644 --- a/src/api/resources/crm/types/PaginatedEngagementList.ts +++ b/src/api/resources/crm/types/PaginatedEngagementList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedEngagementList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedEngagementTypeList.ts b/src/api/resources/crm/types/PaginatedEngagementTypeList.ts index 6623374e0..2456b9250 100644 --- a/src/api/resources/crm/types/PaginatedEngagementTypeList.ts +++ b/src/api/resources/crm/types/PaginatedEngagementTypeList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedEngagementTypeList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedIssueList.ts b/src/api/resources/crm/types/PaginatedIssueList.ts index f0b85a5d6..fa64a61f2 100644 --- a/src/api/resources/crm/types/PaginatedIssueList.ts +++ b/src/api/resources/crm/types/PaginatedIssueList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedIssueList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedLeadList.ts b/src/api/resources/crm/types/PaginatedLeadList.ts index 31926719e..74d73d4aa 100644 --- a/src/api/resources/crm/types/PaginatedLeadList.ts +++ b/src/api/resources/crm/types/PaginatedLeadList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedLeadList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedNoteList.ts b/src/api/resources/crm/types/PaginatedNoteList.ts index d83af0fab..fbad8e53f 100644 --- a/src/api/resources/crm/types/PaginatedNoteList.ts +++ b/src/api/resources/crm/types/PaginatedNoteList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedNoteList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedOpportunityList.ts b/src/api/resources/crm/types/PaginatedOpportunityList.ts index befdbf962..cc2c559cd 100644 --- a/src/api/resources/crm/types/PaginatedOpportunityList.ts +++ b/src/api/resources/crm/types/PaginatedOpportunityList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedOpportunityList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedRemoteFieldClassList.ts b/src/api/resources/crm/types/PaginatedRemoteFieldClassList.ts index adcabafbc..9528a5dea 100644 --- a/src/api/resources/crm/types/PaginatedRemoteFieldClassList.ts +++ b/src/api/resources/crm/types/PaginatedRemoteFieldClassList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedRemoteFieldClassList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedStageList.ts b/src/api/resources/crm/types/PaginatedStageList.ts index 7f1a42abd..99630365d 100644 --- a/src/api/resources/crm/types/PaginatedStageList.ts +++ b/src/api/resources/crm/types/PaginatedStageList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedStageList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedSyncStatusList.ts b/src/api/resources/crm/types/PaginatedSyncStatusList.ts index cf7b64a37..5ecb7ca70 100644 --- a/src/api/resources/crm/types/PaginatedSyncStatusList.ts +++ b/src/api/resources/crm/types/PaginatedSyncStatusList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedSyncStatusList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedTaskList.ts b/src/api/resources/crm/types/PaginatedTaskList.ts index aaacfd31f..38c0a9926 100644 --- a/src/api/resources/crm/types/PaginatedTaskList.ts +++ b/src/api/resources/crm/types/PaginatedTaskList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedTaskList { next?: string; diff --git a/src/api/resources/crm/types/PaginatedUserList.ts b/src/api/resources/crm/types/PaginatedUserList.ts index 7504e0fed..c807773a7 100644 --- a/src/api/resources/crm/types/PaginatedUserList.ts +++ b/src/api/resources/crm/types/PaginatedUserList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedUserList { next?: string; diff --git a/src/api/resources/crm/types/PatchedAccountRequest.ts b/src/api/resources/crm/types/PatchedAccountRequest.ts index cebf3d668..de6db6f6d 100644 --- a/src/api/resources/crm/types/PatchedAccountRequest.ts +++ b/src/api/resources/crm/types/PatchedAccountRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Account Object diff --git a/src/api/resources/crm/types/PatchedContactRequest.ts b/src/api/resources/crm/types/PatchedContactRequest.ts index 18fc949b6..0fefe860b 100644 --- a/src/api/resources/crm/types/PatchedContactRequest.ts +++ b/src/api/resources/crm/types/PatchedContactRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Contact Object diff --git a/src/api/resources/crm/types/PatchedContactRequestOwner.ts b/src/api/resources/crm/types/PatchedContactRequestOwner.ts index cfe91aa71..47f59e827 100644 --- a/src/api/resources/crm/types/PatchedContactRequestOwner.ts +++ b/src/api/resources/crm/types/PatchedContactRequestOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The contact's owner. diff --git a/src/api/resources/crm/types/PatchedEngagementRequest.ts b/src/api/resources/crm/types/PatchedEngagementRequest.ts index ac18f8299..f1b1e1b26 100644 --- a/src/api/resources/crm/types/PatchedEngagementRequest.ts +++ b/src/api/resources/crm/types/PatchedEngagementRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Engagement Object diff --git a/src/api/resources/crm/types/PatchedEngagementRequestDirection.ts b/src/api/resources/crm/types/PatchedEngagementRequestDirection.ts index 0f12e6012..b83adc131 100644 --- a/src/api/resources/crm/types/PatchedEngagementRequestDirection.ts +++ b/src/api/resources/crm/types/PatchedEngagementRequestDirection.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The engagement's direction. diff --git a/src/api/resources/crm/types/PatchedOpportunityRequest.ts b/src/api/resources/crm/types/PatchedOpportunityRequest.ts index 8c0a7944a..623ab6fe5 100644 --- a/src/api/resources/crm/types/PatchedOpportunityRequest.ts +++ b/src/api/resources/crm/types/PatchedOpportunityRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Opportunity Object diff --git a/src/api/resources/crm/types/PatchedOpportunityRequestStatus.ts b/src/api/resources/crm/types/PatchedOpportunityRequestStatus.ts index d0892b11d..cc5f39648 100644 --- a/src/api/resources/crm/types/PatchedOpportunityRequestStatus.ts +++ b/src/api/resources/crm/types/PatchedOpportunityRequestStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The opportunity's status. diff --git a/src/api/resources/crm/types/PatchedTaskRequest.ts b/src/api/resources/crm/types/PatchedTaskRequest.ts index 3f9f25a35..15ff61a05 100644 --- a/src/api/resources/crm/types/PatchedTaskRequest.ts +++ b/src/api/resources/crm/types/PatchedTaskRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Task Object diff --git a/src/api/resources/crm/types/PatchedTaskRequestStatus.ts b/src/api/resources/crm/types/PatchedTaskRequestStatus.ts index 5e557ff4d..0e4e5df89 100644 --- a/src/api/resources/crm/types/PatchedTaskRequestStatus.ts +++ b/src/api/resources/crm/types/PatchedTaskRequestStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The task's status. diff --git a/src/api/resources/crm/types/RemoteField.ts b/src/api/resources/crm/types/RemoteField.ts index 7c1db8d1a..490136788 100644 --- a/src/api/resources/crm/types/RemoteField.ts +++ b/src/api/resources/crm/types/RemoteField.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteField { remoteFieldClass: Merge.crm.RemoteFieldRemoteFieldClass; diff --git a/src/api/resources/crm/types/RemoteFieldApi.ts b/src/api/resources/crm/types/RemoteFieldApi.ts index 3371c57f5..471eac1d2 100644 --- a/src/api/resources/crm/types/RemoteFieldApi.ts +++ b/src/api/resources/crm/types/RemoteFieldApi.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldApi { schema: Record; diff --git a/src/api/resources/crm/types/RemoteFieldApiResponse.ts b/src/api/resources/crm/types/RemoteFieldApiResponse.ts index 55ea9a9a8..ee61e0195 100644 --- a/src/api/resources/crm/types/RemoteFieldApiResponse.ts +++ b/src/api/resources/crm/types/RemoteFieldApiResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldApiResponse { account?: Merge.crm.RemoteFieldApi[]; diff --git a/src/api/resources/crm/types/RemoteFieldClass.ts b/src/api/resources/crm/types/RemoteFieldClass.ts index 6b5b49ea9..690ebf3b3 100644 --- a/src/api/resources/crm/types/RemoteFieldClass.ts +++ b/src/api/resources/crm/types/RemoteFieldClass.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldClass { id?: string; diff --git a/src/api/resources/crm/types/RemoteFieldClassFieldFormat.ts b/src/api/resources/crm/types/RemoteFieldClassFieldFormat.ts index b98312a7c..495eefd36 100644 --- a/src/api/resources/crm/types/RemoteFieldClassFieldFormat.ts +++ b/src/api/resources/crm/types/RemoteFieldClassFieldFormat.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type RemoteFieldClassFieldFormat = Merge.crm.FieldFormatEnum | string; diff --git a/src/api/resources/crm/types/RemoteFieldClassFieldType.ts b/src/api/resources/crm/types/RemoteFieldClassFieldType.ts index bccac41b7..36b96613b 100644 --- a/src/api/resources/crm/types/RemoteFieldClassFieldType.ts +++ b/src/api/resources/crm/types/RemoteFieldClassFieldType.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type RemoteFieldClassFieldType = Merge.crm.FieldTypeEnum | string; diff --git a/src/api/resources/crm/types/RemoteFieldClassForCustomObjectClass.ts b/src/api/resources/crm/types/RemoteFieldClassForCustomObjectClass.ts index 378e2ab5e..77c9c64d4 100644 --- a/src/api/resources/crm/types/RemoteFieldClassForCustomObjectClass.ts +++ b/src/api/resources/crm/types/RemoteFieldClassForCustomObjectClass.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldClassForCustomObjectClass { /** The datetime that this object was created by Merge. */ diff --git a/src/api/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.ts b/src/api/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.ts index ee7be16a0..7e79d68c0 100644 --- a/src/api/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.ts +++ b/src/api/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type RemoteFieldClassForCustomObjectClassFieldFormat = Merge.crm.FieldFormatEnum | string; diff --git a/src/api/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldType.ts b/src/api/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldType.ts index 3d699c341..8d63c12a4 100644 --- a/src/api/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldType.ts +++ b/src/api/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldType.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type RemoteFieldClassForCustomObjectClassFieldType = Merge.crm.FieldTypeEnum | string; diff --git a/src/api/resources/crm/types/RemoteFieldRemoteFieldClass.ts b/src/api/resources/crm/types/RemoteFieldRemoteFieldClass.ts index 246abd5ef..1e0fe95ba 100644 --- a/src/api/resources/crm/types/RemoteFieldRemoteFieldClass.ts +++ b/src/api/resources/crm/types/RemoteFieldRemoteFieldClass.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type RemoteFieldRemoteFieldClass = string | Merge.crm.RemoteFieldClass; diff --git a/src/api/resources/crm/types/RemoteFieldRequest.ts b/src/api/resources/crm/types/RemoteFieldRequest.ts index 3ed30d8d8..6fa455863 100644 --- a/src/api/resources/crm/types/RemoteFieldRequest.ts +++ b/src/api/resources/crm/types/RemoteFieldRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldRequest { remoteFieldClass: Merge.crm.RemoteFieldRequestRemoteFieldClass; diff --git a/src/api/resources/crm/types/RemoteFieldRequestRemoteFieldClass.ts b/src/api/resources/crm/types/RemoteFieldRequestRemoteFieldClass.ts index 29d189ab9..1c5b07efc 100644 --- a/src/api/resources/crm/types/RemoteFieldRequestRemoteFieldClass.ts +++ b/src/api/resources/crm/types/RemoteFieldRequestRemoteFieldClass.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type RemoteFieldRequestRemoteFieldClass = string | Merge.crm.RemoteFieldClass; diff --git a/src/api/resources/crm/types/RemoteResponse.ts b/src/api/resources/crm/types/RemoteResponse.ts index 027421003..15e6bac87 100644 --- a/src/api/resources/crm/types/RemoteResponse.ts +++ b/src/api/resources/crm/types/RemoteResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The RemoteResponse Object diff --git a/src/api/resources/crm/types/Stage.ts b/src/api/resources/crm/types/Stage.ts index 2eec93baa..bb7a3e9dc 100644 --- a/src/api/resources/crm/types/Stage.ts +++ b/src/api/resources/crm/types/Stage.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Stage Object diff --git a/src/api/resources/crm/types/SyncStatus.ts b/src/api/resources/crm/types/SyncStatus.ts index 2036fa3a5..38317c135 100644 --- a/src/api/resources/crm/types/SyncStatus.ts +++ b/src/api/resources/crm/types/SyncStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The SyncStatus Object diff --git a/src/api/resources/crm/types/Task.ts b/src/api/resources/crm/types/Task.ts index 12cf66193..a1660cbd7 100644 --- a/src/api/resources/crm/types/Task.ts +++ b/src/api/resources/crm/types/Task.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Task Object diff --git a/src/api/resources/crm/types/TaskAccount.ts b/src/api/resources/crm/types/TaskAccount.ts index 291759e34..993ce748e 100644 --- a/src/api/resources/crm/types/TaskAccount.ts +++ b/src/api/resources/crm/types/TaskAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The task's account. diff --git a/src/api/resources/crm/types/TaskOpportunity.ts b/src/api/resources/crm/types/TaskOpportunity.ts index 929223316..415f4e9e0 100644 --- a/src/api/resources/crm/types/TaskOpportunity.ts +++ b/src/api/resources/crm/types/TaskOpportunity.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The task's opportunity. diff --git a/src/api/resources/crm/types/TaskOwner.ts b/src/api/resources/crm/types/TaskOwner.ts index 14e9c6e5c..822a54007 100644 --- a/src/api/resources/crm/types/TaskOwner.ts +++ b/src/api/resources/crm/types/TaskOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The task's owner. diff --git a/src/api/resources/crm/types/TaskRequest.ts b/src/api/resources/crm/types/TaskRequest.ts index af0417b7a..caf11552e 100644 --- a/src/api/resources/crm/types/TaskRequest.ts +++ b/src/api/resources/crm/types/TaskRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Task Object diff --git a/src/api/resources/crm/types/TaskRequestAccount.ts b/src/api/resources/crm/types/TaskRequestAccount.ts index e39703d9b..5e4e30a35 100644 --- a/src/api/resources/crm/types/TaskRequestAccount.ts +++ b/src/api/resources/crm/types/TaskRequestAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The task's account. diff --git a/src/api/resources/crm/types/TaskRequestOpportunity.ts b/src/api/resources/crm/types/TaskRequestOpportunity.ts index 5b921e053..325af3ece 100644 --- a/src/api/resources/crm/types/TaskRequestOpportunity.ts +++ b/src/api/resources/crm/types/TaskRequestOpportunity.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The task's opportunity. diff --git a/src/api/resources/crm/types/TaskRequestOwner.ts b/src/api/resources/crm/types/TaskRequestOwner.ts index dab697b68..6ceb4b9c4 100644 --- a/src/api/resources/crm/types/TaskRequestOwner.ts +++ b/src/api/resources/crm/types/TaskRequestOwner.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The task's owner. diff --git a/src/api/resources/crm/types/TaskRequestStatus.ts b/src/api/resources/crm/types/TaskRequestStatus.ts index 987be0945..952f2dc78 100644 --- a/src/api/resources/crm/types/TaskRequestStatus.ts +++ b/src/api/resources/crm/types/TaskRequestStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The task's status. diff --git a/src/api/resources/crm/types/TaskResponse.ts b/src/api/resources/crm/types/TaskResponse.ts index eec788e7d..7f820a009 100644 --- a/src/api/resources/crm/types/TaskResponse.ts +++ b/src/api/resources/crm/types/TaskResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface TaskResponse { model: Merge.crm.Task; diff --git a/src/api/resources/crm/types/TaskStatus.ts b/src/api/resources/crm/types/TaskStatus.ts index 297d7a901..b1763a2b8 100644 --- a/src/api/resources/crm/types/TaskStatus.ts +++ b/src/api/resources/crm/types/TaskStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The task's status. diff --git a/src/api/resources/crm/types/User.ts b/src/api/resources/crm/types/User.ts index 5f2ed14b2..a29e95e07 100644 --- a/src/api/resources/crm/types/User.ts +++ b/src/api/resources/crm/types/User.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The User Object diff --git a/src/api/resources/crm/types/WarningValidationProblem.ts b/src/api/resources/crm/types/WarningValidationProblem.ts index d22ac1036..59a8d74ef 100644 --- a/src/api/resources/crm/types/WarningValidationProblem.ts +++ b/src/api/resources/crm/types/WarningValidationProblem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface WarningValidationProblem { source?: Merge.crm.ValidationProblemSource; diff --git a/src/api/resources/filestorage/client/Client.ts b/src/api/resources/filestorage/client/Client.ts index 4a3d9d7b7..b248db4a4 100644 --- a/src/api/resources/filestorage/client/Client.ts +++ b/src/api/resources/filestorage/client/Client.ts @@ -31,13 +31,22 @@ export declare namespace Filestorage { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } diff --git a/src/api/resources/filestorage/resources/accountDetails/client/Client.ts b/src/api/resources/filestorage/resources/accountDetails/client/Client.ts index 0beacb8b0..70cdcc1e4 100644 --- a/src/api/resources/filestorage/resources/accountDetails/client/Client.ts +++ b/src/api/resources/filestorage/resources/accountDetails/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AccountDetails { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class AccountDetails { /** * Get details for a linked account. * + * @param {AccountDetails.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.accountDetails.retrieve() + * await client.filestorage.accountDetails.retrieve() */ public async retrieve(requestOptions?: AccountDetails.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class AccountDetails { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.AccountDetails.parseOrThrow(_response.body, { + return serializers.filestorage.AccountDetails.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,9 @@ export class AccountDetails { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /filestorage/v1/account-details." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -85,7 +104,7 @@ export class AccountDetails { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/accountToken/client/Client.ts b/src/api/resources/filestorage/resources/accountToken/client/Client.ts index 5ba893606..d2d5fee9f 100644 --- a/src/api/resources/filestorage/resources/accountToken/client/Client.ts +++ b/src/api/resources/filestorage/resources/accountToken/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AccountToken { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class AccountToken { /** * Returns the account token for the end user with the provided public token. * + * @param {string} publicToken + * @param {AccountToken.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.accountToken.retrieve("public_token") + * await client.filestorage.accountToken.retrieve("public_token") */ public async retrieve( publicToken: string, @@ -39,7 +51,7 @@ export class AccountToken { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/account-token/${publicToken}` + `filestorage/v1/account-token/${encodeURIComponent(publicToken)}` ), method: "GET", headers: { @@ -50,14 +62,20 @@ export class AccountToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.AccountToken.parseOrThrow(_response.body, { + return serializers.filestorage.AccountToken.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -80,7 +98,9 @@ export class AccountToken { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /filestorage/v1/account-token/{public_token}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -88,7 +108,7 @@ export class AccountToken { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/asyncPassthrough/client/Client.ts b/src/api/resources/filestorage/resources/asyncPassthrough/client/Client.ts index 8afc3fddd..ee1cb8a53 100644 --- a/src/api/resources/filestorage/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/filestorage/resources/asyncPassthrough/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace AsyncPassthrough { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,9 +38,12 @@ export class AsyncPassthrough { /** * Asynchronously pull data from an endpoint not currently supported by Merge. * + * @param {Merge.filestorage.DataPassthroughRequest} request + * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.asyncPassthrough.create({ - * method: Merge.filestorage.MethodEnum.Get, + * await client.filestorage.asyncPassthrough.create({ + * method: "GET", * path: "/scooters" * }) */ @@ -53,17 +65,23 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.filestorage.DataPassthroughRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.filestorage.DataPassthroughRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.AsyncPassthroughReciept.parseOrThrow(_response.body, { + return serializers.filestorage.AsyncPassthroughReciept.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +104,9 @@ export class AsyncPassthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /filestorage/v1/async-passthrough." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -96,6 +116,12 @@ export class AsyncPassthrough { /** * Retrieves data from earlier async-passthrough POST request + * + * @param {string} asyncPassthroughReceiptId + * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id") */ public async retrieve( asyncPassthroughReceiptId: string, @@ -104,7 +130,7 @@ export class AsyncPassthrough { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/async-passthrough/${asyncPassthroughReceiptId}` + `filestorage/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}` ), method: "GET", headers: { @@ -115,14 +141,20 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { + return serializers.filestorage.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +177,9 @@ export class AsyncPassthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /filestorage/v1/async-passthrough/{async_passthrough_receipt_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -153,7 +187,7 @@ export class AsyncPassthrough { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/api/resources/filestorage/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts index 1984e9755..7dc89b2d0 100644 --- a/src/api/resources/filestorage/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts +++ b/src/api/resources/filestorage/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; export type AsyncPassthroughRetrieveResponse = Merge.filestorage.RemoteResponse | string; diff --git a/src/api/resources/filestorage/resources/auditTrail/client/Client.ts b/src/api/resources/filestorage/resources/auditTrail/client/Client.ts index efe2d08ba..4561d77a9 100644 --- a/src/api/resources/filestorage/resources/auditTrail/client/Client.ts +++ b/src/api/resources/filestorage/resources/auditTrail/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AuditTrail { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,15 +38,18 @@ export class AuditTrail { /** * Gets a list of audit trail events. * + * @param {Merge.filestorage.AuditTrailListRequest} request + * @param {AuditTrail.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.auditTrail.list({}) + * await client.filestorage.auditTrail.list() */ public async list( request: Merge.filestorage.AuditTrailListRequest = {}, requestOptions?: AuditTrail.RequestOptions ): Promise { const { cursor, endDate, eventType, pageSize, startDate, userEmail } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -76,15 +88,21 @@ export class AuditTrail { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.PaginatedAuditLogEventList.parseOrThrow(_response.body, { + return serializers.filestorage.PaginatedAuditLogEventList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -107,7 +125,7 @@ export class AuditTrail { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/audit-trail."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -115,7 +133,7 @@ export class AuditTrail { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/auditTrail/client/requests/index.ts b/src/api/resources/filestorage/resources/auditTrail/client/requests/index.ts index ddce9e786..2c0762c28 100644 --- a/src/api/resources/filestorage/resources/auditTrail/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/auditTrail/client/requests/index.ts @@ -1 +1 @@ -export { AuditTrailListRequest } from "./AuditTrailListRequest"; +export { type AuditTrailListRequest } from "./AuditTrailListRequest"; diff --git a/src/api/resources/filestorage/resources/availableActions/client/Client.ts b/src/api/resources/filestorage/resources/availableActions/client/Client.ts index bc3114998..63de9344d 100644 --- a/src/api/resources/filestorage/resources/availableActions/client/Client.ts +++ b/src/api/resources/filestorage/resources/availableActions/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AvailableActions { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class AvailableActions { /** * Returns a list of models and actions available for an account. * + * @param {AvailableActions.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.availableActions.retrieve() + * await client.filestorage.availableActions.retrieve() */ public async retrieve( requestOptions?: AvailableActions.RequestOptions @@ -49,14 +60,20 @@ export class AvailableActions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.AvailableActions.parseOrThrow(_response.body, { + return serializers.filestorage.AvailableActions.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +96,9 @@ export class AvailableActions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /filestorage/v1/available-actions." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -87,7 +106,7 @@ export class AvailableActions { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/deleteAccount/client/Client.ts b/src/api/resources/filestorage/resources/deleteAccount/client/Client.ts index 8d71a3b59..0bc21b101 100644 --- a/src/api/resources/filestorage/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/filestorage/resources/deleteAccount/client/Client.ts @@ -5,19 +5,28 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace DeleteAccount { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -27,8 +36,10 @@ export class DeleteAccount { /** * Delete a linked account. * + * @param {DeleteAccount.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.deleteAccount.delete() + * await client.filestorage.deleteAccount.delete() */ public async delete(requestOptions?: DeleteAccount.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -45,11 +56,17 @@ export class DeleteAccount { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -69,7 +86,9 @@ export class DeleteAccount { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /filestorage/v1/delete-account." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -77,7 +96,7 @@ export class DeleteAccount { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/drives/client/Client.ts b/src/api/resources/filestorage/resources/drives/client/Client.ts index 521e3aceb..4a80b8b80 100644 --- a/src/api/resources/filestorage/resources/drives/client/Client.ts +++ b/src/api/resources/filestorage/resources/drives/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Drives { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Drives { /** * Returns a list of `Drive` objects. * + * @param {Merge.filestorage.DrivesListRequest} request + * @param {Drives.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.drives.list({}) + * await client.filestorage.drives.list() */ public async list( request: Merge.filestorage.DrivesListRequest = {}, @@ -49,7 +61,7 @@ export class Drives { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,15 +120,21 @@ export class Drives { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.PaginatedDriveList.parseOrThrow(_response.body, { + return serializers.filestorage.PaginatedDriveList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -139,7 +157,7 @@ export class Drives { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/drives."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -150,8 +168,12 @@ export class Drives { /** * Returns a `Drive` object with the given `id`. * + * @param {string} id + * @param {Merge.filestorage.DrivesRetrieveRequest} request + * @param {Drives.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.drives.retrieve("id", {}) + * await client.filestorage.drives.retrieve("id") */ public async retrieve( id: string, @@ -159,7 +181,7 @@ export class Drives { requestOptions?: Drives.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -167,7 +189,7 @@ export class Drives { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/drives/${id}` + `filestorage/v1/drives/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -178,15 +200,21 @@ export class Drives { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.Drive.parseOrThrow(_response.body, { + return serializers.filestorage.Drive.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -209,7 +237,7 @@ export class Drives { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/drives/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -217,7 +245,7 @@ export class Drives { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/drives/client/requests/index.ts b/src/api/resources/filestorage/resources/drives/client/requests/index.ts index 162cee012..88f9c90f3 100644 --- a/src/api/resources/filestorage/resources/drives/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/drives/client/requests/index.ts @@ -1,2 +1,2 @@ -export { DrivesListRequest } from "./DrivesListRequest"; -export { DrivesRetrieveRequest } from "./DrivesRetrieveRequest"; +export { type DrivesListRequest } from "./DrivesListRequest"; +export { type DrivesRetrieveRequest } from "./DrivesRetrieveRequest"; diff --git a/src/api/resources/filestorage/resources/fieldMapping/client/Client.ts b/src/api/resources/filestorage/resources/fieldMapping/client/Client.ts index a20918d66..4845b7ba9 100644 --- a/src/api/resources/filestorage/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/filestorage/resources/fieldMapping/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace FieldMapping { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class FieldMapping { /** * Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). * + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.fieldMapping.fieldMappingsRetrieve() + * await client.filestorage.fieldMapping.fieldMappingsRetrieve() */ public async fieldMappingsRetrieve( requestOptions?: FieldMapping.RequestOptions @@ -49,14 +60,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { + return serializers.filestorage.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +96,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/field-mappings."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -90,8 +107,11 @@ export class FieldMapping { /** * Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {Merge.filestorage.CreateFieldMappingRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.fieldMapping.fieldMappingsCreate({ + * await client.filestorage.fieldMapping.fieldMappingsCreate({ * targetFieldName: "example_target_field_name", * targetFieldDescription: "this is a example description of the target field", * remoteFieldTraversalPath: ["example_remote_field"], @@ -118,17 +138,23 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.filestorage.CreateFieldMappingRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.filestorage.CreateFieldMappingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.filestorage.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -151,7 +177,9 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /filestorage/v1/field-mappings." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -162,8 +190,11 @@ export class FieldMapping { /** * Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {string} fieldMappingId + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id") + * await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id") */ public async fieldMappingsDestroy( fieldMappingId: string, @@ -172,7 +203,7 @@ export class FieldMapping { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/field-mappings/${fieldMappingId}` + `filestorage/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` ), method: "DELETE", headers: { @@ -183,14 +214,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.filestorage.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +250,9 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling DELETE /filestorage/v1/field-mappings/{field_mapping_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -224,8 +263,12 @@ export class FieldMapping { /** * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {string} fieldMappingId + * @param {Merge.filestorage.PatchedEditFieldMappingRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id", {}) + * await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id") */ public async fieldMappingsPartialUpdate( fieldMappingId: string, @@ -235,7 +278,7 @@ export class FieldMapping { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/field-mappings/${fieldMappingId}` + `filestorage/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` ), method: "PATCH", headers: { @@ -246,17 +289,23 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.filestorage.PatchedEditFieldMappingRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.filestorage.PatchedEditFieldMappingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.filestorage.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -279,7 +328,9 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling PATCH /filestorage/v1/field-mappings/{field_mapping_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -290,15 +341,18 @@ export class FieldMapping { /** * Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). * + * @param {Merge.filestorage.RemoteFieldsRetrieveRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.fieldMapping.remoteFieldsRetrieve({}) + * await client.filestorage.fieldMapping.remoteFieldsRetrieve() */ public async remoteFieldsRetrieve( request: Merge.filestorage.RemoteFieldsRetrieveRequest = {}, requestOptions?: FieldMapping.RequestOptions ): Promise { const { commonModels, includeExampleValues } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (commonModels != null) { _queryParams["common_models"] = commonModels; } @@ -321,15 +375,21 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.RemoteFieldApiResponse.parseOrThrow(_response.body, { + return serializers.filestorage.RemoteFieldApiResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -352,7 +412,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/remote-fields."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -363,8 +423,10 @@ export class FieldMapping { /** * Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). * + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.fieldMapping.targetFieldsRetrieve() + * await client.filestorage.fieldMapping.targetFieldsRetrieve() */ public async targetFieldsRetrieve( requestOptions?: FieldMapping.RequestOptions @@ -383,14 +445,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { + return serializers.filestorage.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -413,7 +481,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/target-fields."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -421,7 +489,7 @@ export class FieldMapping { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/fieldMapping/client/requests/index.ts b/src/api/resources/filestorage/resources/fieldMapping/client/requests/index.ts index cb93982a7..450f54c2b 100644 --- a/src/api/resources/filestorage/resources/fieldMapping/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/fieldMapping/client/requests/index.ts @@ -1,3 +1,3 @@ -export { CreateFieldMappingRequest } from "./CreateFieldMappingRequest"; -export { PatchedEditFieldMappingRequest } from "./PatchedEditFieldMappingRequest"; -export { RemoteFieldsRetrieveRequest } from "./RemoteFieldsRetrieveRequest"; +export { type CreateFieldMappingRequest } from "./CreateFieldMappingRequest"; +export { type PatchedEditFieldMappingRequest } from "./PatchedEditFieldMappingRequest"; +export { type RemoteFieldsRetrieveRequest } from "./RemoteFieldsRetrieveRequest"; diff --git a/src/api/resources/filestorage/resources/files/client/Client.ts b/src/api/resources/filestorage/resources/files/client/Client.ts index 2ef1600ec..2b78f3998 100644 --- a/src/api/resources/filestorage/resources/files/client/Client.ts +++ b/src/api/resources/filestorage/resources/files/client/Client.ts @@ -4,23 +4,32 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; import * as stream from "stream"; export declare namespace Files { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -30,8 +39,11 @@ export class Files { /** * Returns a list of `File` objects. * + * @param {Merge.filestorage.FilesListRequest} request + * @param {Files.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.files.list({}) + * await client.filestorage.files.list() */ public async list( request: Merge.filestorage.FilesListRequest = {}, @@ -54,7 +66,7 @@ export class Files { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -129,15 +141,21 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.PaginatedFileList.parseOrThrow(_response.body, { + return serializers.filestorage.PaginatedFileList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -160,7 +178,7 @@ export class Files { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/files."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -171,8 +189,11 @@ export class Files { /** * Creates a `File` object with the given values. * + * @param {Merge.filestorage.FileStorageFileEndpointRequest} request + * @param {Files.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.files.create({ + * await client.filestorage.files.create({ * model: {} * }) */ @@ -181,7 +202,7 @@ export class Files { requestOptions?: Files.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -204,18 +225,24 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.filestorage.FileStorageFileEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.filestorage.FileStorageFileEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.FileStorageFileResponse.parseOrThrow(_response.body, { + return serializers.filestorage.FileStorageFileResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -238,7 +265,7 @@ export class Files { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /filestorage/v1/files."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -249,8 +276,12 @@ export class Files { /** * Returns a `File` object with the given `id`. * + * @param {string} id + * @param {Merge.filestorage.FilesRetrieveRequest} request + * @param {Files.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.files.retrieve("id", {}) + * await client.filestorage.files.retrieve("id") */ public async retrieve( id: string, @@ -258,7 +289,7 @@ export class Files { requestOptions?: Files.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -270,7 +301,7 @@ export class Files { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/files/${id}` + `filestorage/v1/files/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -281,15 +312,21 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.File_.parseOrThrow(_response.body, { + return serializers.filestorage.File_.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -312,7 +349,7 @@ export class Files { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/files/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -329,7 +366,7 @@ export class Files { requestOptions?: Files.RequestOptions ): Promise { const { mimeType } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (mimeType != null) { _queryParams["mime_type"] = mimeType; } @@ -337,7 +374,7 @@ export class Files { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/files/${id}/download` + `filestorage/v1/files/${encodeURIComponent(id)}/download` ), method: "GET", headers: { @@ -348,13 +385,19 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", responseType: "streaming", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return _response.body; @@ -374,7 +417,9 @@ export class Files { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /filestorage/v1/files/{id}/download." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -385,8 +430,10 @@ export class Files { /** * Returns metadata for `FileStorageFile` POSTs. * + * @param {Files.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.files.metaPostRetrieve() + * await client.filestorage.files.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Files.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -403,14 +450,20 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.MetaResponse.parseOrThrow(_response.body, { + return serializers.filestorage.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -433,7 +486,9 @@ export class Files { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /filestorage/v1/files/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -441,7 +496,7 @@ export class Files { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/files/client/requests/FileStorageFileEndpointRequest.ts b/src/api/resources/filestorage/resources/files/client/requests/FileStorageFileEndpointRequest.ts index 1eca947f9..08e585532 100644 --- a/src/api/resources/filestorage/resources/files/client/requests/FileStorageFileEndpointRequest.ts +++ b/src/api/resources/filestorage/resources/files/client/requests/FileStorageFileEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRetrieveRequest.ts b/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRetrieveRequest.ts index 64c8f7e33..432ecb397 100644 --- a/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRetrieveRequest.ts +++ b/src/api/resources/filestorage/resources/files/client/requests/FilesDownloadRetrieveRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * mimeType: "string" + * } + */ export interface FilesDownloadRetrieveRequest { /** * If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article. diff --git a/src/api/resources/filestorage/resources/files/client/requests/FilesListRequest.ts b/src/api/resources/filestorage/resources/files/client/requests/FilesListRequest.ts index f14599fc6..240d2b2f2 100644 --- a/src/api/resources/filestorage/resources/files/client/requests/FilesListRequest.ts +++ b/src/api/resources/filestorage/resources/files/client/requests/FilesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/filestorage/resources/files/client/requests/FilesRetrieveRequest.ts b/src/api/resources/filestorage/resources/files/client/requests/FilesRetrieveRequest.ts index 4b559754f..893ef8f3b 100644 --- a/src/api/resources/filestorage/resources/files/client/requests/FilesRetrieveRequest.ts +++ b/src/api/resources/filestorage/resources/files/client/requests/FilesRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/filestorage/resources/files/client/requests/index.ts b/src/api/resources/filestorage/resources/files/client/requests/index.ts index cf43bf383..83c42e53e 100644 --- a/src/api/resources/filestorage/resources/files/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/files/client/requests/index.ts @@ -1,4 +1,4 @@ -export { FilesListRequest } from "./FilesListRequest"; -export { FileStorageFileEndpointRequest } from "./FileStorageFileEndpointRequest"; -export { FilesRetrieveRequest } from "./FilesRetrieveRequest"; -export { FilesDownloadRetrieveRequest } from "./FilesDownloadRetrieveRequest"; +export { type FilesListRequest } from "./FilesListRequest"; +export { type FileStorageFileEndpointRequest } from "./FileStorageFileEndpointRequest"; +export { type FilesRetrieveRequest } from "./FilesRetrieveRequest"; +export { type FilesDownloadRetrieveRequest } from "./FilesDownloadRetrieveRequest"; diff --git a/src/api/resources/filestorage/resources/folders/client/Client.ts b/src/api/resources/filestorage/resources/folders/client/Client.ts index af285d207..3fb5ef1b4 100644 --- a/src/api/resources/filestorage/resources/folders/client/Client.ts +++ b/src/api/resources/filestorage/resources/folders/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Folders { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Folders { /** * Returns a list of `Folder` objects. * + * @param {Merge.filestorage.FoldersListRequest} request + * @param {Folders.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.folders.list({}) + * await client.filestorage.folders.list() */ public async list( request: Merge.filestorage.FoldersListRequest = {}, @@ -52,7 +64,7 @@ export class Folders { parentFolderId, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -123,15 +135,21 @@ export class Folders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.PaginatedFolderList.parseOrThrow(_response.body, { + return serializers.filestorage.PaginatedFolderList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Folders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/folders."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,8 +183,11 @@ export class Folders { /** * Creates a `Folder` object with the given values. * + * @param {Merge.filestorage.FileStorageFolderEndpointRequest} request + * @param {Folders.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.folders.create({ + * await client.filestorage.folders.create({ * model: {} * }) */ @@ -175,7 +196,7 @@ export class Folders { requestOptions?: Folders.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -198,18 +219,24 @@ export class Folders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.filestorage.FileStorageFolderEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.filestorage.FileStorageFolderEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.FileStorageFolderResponse.parseOrThrow(_response.body, { + return serializers.filestorage.FileStorageFolderResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -232,7 +259,7 @@ export class Folders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /filestorage/v1/folders."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -243,8 +270,12 @@ export class Folders { /** * Returns a `Folder` object with the given `id`. * + * @param {string} id + * @param {Merge.filestorage.FoldersRetrieveRequest} request + * @param {Folders.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.folders.retrieve("id", {}) + * await client.filestorage.folders.retrieve("id") */ public async retrieve( id: string, @@ -252,7 +283,7 @@ export class Folders { requestOptions?: Folders.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -264,7 +295,7 @@ export class Folders { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/folders/${id}` + `filestorage/v1/folders/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -275,15 +306,21 @@ export class Folders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.Folder.parseOrThrow(_response.body, { + return serializers.filestorage.Folder.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -306,7 +343,7 @@ export class Folders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/folders/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -317,8 +354,10 @@ export class Folders { /** * Returns metadata for `FileStorageFolder` POSTs. * + * @param {Folders.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.folders.metaPostRetrieve() + * await client.filestorage.folders.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Folders.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -335,14 +374,20 @@ export class Folders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.MetaResponse.parseOrThrow(_response.body, { + return serializers.filestorage.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -365,7 +410,9 @@ export class Folders { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /filestorage/v1/folders/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -373,7 +420,7 @@ export class Folders { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/folders/client/requests/FileStorageFolderEndpointRequest.ts b/src/api/resources/filestorage/resources/folders/client/requests/FileStorageFolderEndpointRequest.ts index 7836f4971..965c541e4 100644 --- a/src/api/resources/filestorage/resources/folders/client/requests/FileStorageFolderEndpointRequest.ts +++ b/src/api/resources/filestorage/resources/folders/client/requests/FileStorageFolderEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/filestorage/resources/folders/client/requests/FoldersListRequest.ts b/src/api/resources/filestorage/resources/folders/client/requests/FoldersListRequest.ts index 7b41b30ff..71b0a35b8 100644 --- a/src/api/resources/filestorage/resources/folders/client/requests/FoldersListRequest.ts +++ b/src/api/resources/filestorage/resources/folders/client/requests/FoldersListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/filestorage/resources/folders/client/requests/FoldersRetrieveRequest.ts b/src/api/resources/filestorage/resources/folders/client/requests/FoldersRetrieveRequest.ts index 67c7c0d23..fce290a96 100644 --- a/src/api/resources/filestorage/resources/folders/client/requests/FoldersRetrieveRequest.ts +++ b/src/api/resources/filestorage/resources/folders/client/requests/FoldersRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/filestorage/resources/folders/client/requests/index.ts b/src/api/resources/filestorage/resources/folders/client/requests/index.ts index 4adecfda8..64dfab244 100644 --- a/src/api/resources/filestorage/resources/folders/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/folders/client/requests/index.ts @@ -1,3 +1,3 @@ -export { FoldersListRequest } from "./FoldersListRequest"; -export { FileStorageFolderEndpointRequest } from "./FileStorageFolderEndpointRequest"; -export { FoldersRetrieveRequest } from "./FoldersRetrieveRequest"; +export { type FoldersListRequest } from "./FoldersListRequest"; +export { type FileStorageFolderEndpointRequest } from "./FileStorageFolderEndpointRequest"; +export { type FoldersRetrieveRequest } from "./FoldersRetrieveRequest"; diff --git a/src/api/resources/filestorage/resources/forceResync/client/Client.ts b/src/api/resources/filestorage/resources/forceResync/client/Client.ts index 442e07614..1096dc88c 100644 --- a/src/api/resources/filestorage/resources/forceResync/client/Client.ts +++ b/src/api/resources/filestorage/resources/forceResync/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace ForceResync { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class ForceResync { /** * Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. * + * @param {ForceResync.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.forceResync.syncStatusResyncCreate() + * await client.filestorage.forceResync.syncStatusResyncCreate() */ public async syncStatusResyncCreate( requestOptions?: ForceResync.RequestOptions @@ -49,23 +60,26 @@ export class ForceResync { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.forceResync.syncStatusResyncCreate.Response.parseOrThrow( - _response.body, - { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - } - ); + return serializers.filestorage.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); } if (_response.error.reason === "status-code") { @@ -82,7 +96,9 @@ export class ForceResync { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /filestorage/v1/sync-status/resync." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -90,7 +106,7 @@ export class ForceResync { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/generateKey/client/Client.ts b/src/api/resources/filestorage/resources/generateKey/client/Client.ts index 04c047ff9..8d12f3ddd 100644 --- a/src/api/resources/filestorage/resources/generateKey/client/Client.ts +++ b/src/api/resources/filestorage/resources/generateKey/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace GenerateKey { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class GenerateKey { /** * Create a remote key. * + * @param {Merge.filestorage.GenerateRemoteKeyRequest} request + * @param {GenerateKey.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.generateKey.create({ + * await client.filestorage.generateKey.create({ * name: "Remote Deployment Key 1" * }) */ @@ -52,17 +64,23 @@ export class GenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.filestorage.GenerateRemoteKeyRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.filestorage.GenerateRemoteKeyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.RemoteKey.parseOrThrow(_response.body, { + return serializers.filestorage.RemoteKey.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +103,7 @@ export class GenerateKey { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /filestorage/v1/generate-key."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -93,7 +111,7 @@ export class GenerateKey { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/generateKey/client/requests/index.ts b/src/api/resources/filestorage/resources/generateKey/client/requests/index.ts index 0df6e7c8b..d8255223c 100644 --- a/src/api/resources/filestorage/resources/generateKey/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/generateKey/client/requests/index.ts @@ -1 +1 @@ -export { GenerateRemoteKeyRequest } from "./GenerateRemoteKeyRequest"; +export { type GenerateRemoteKeyRequest } from "./GenerateRemoteKeyRequest"; diff --git a/src/api/resources/filestorage/resources/groups/client/Client.ts b/src/api/resources/filestorage/resources/groups/client/Client.ts index f7620e464..b8c7ae4ab 100644 --- a/src/api/resources/filestorage/resources/groups/client/Client.ts +++ b/src/api/resources/filestorage/resources/groups/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Groups { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Groups { /** * Returns a list of `Group` objects. * + * @param {Merge.filestorage.GroupsListRequest} request + * @param {Groups.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.groups.list({}) + * await client.filestorage.groups.list() */ public async list( request: Merge.filestorage.GroupsListRequest = {}, @@ -48,7 +60,7 @@ export class Groups { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,15 +115,21 @@ export class Groups { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.PaginatedGroupList.parseOrThrow(_response.body, { + return serializers.filestorage.PaginatedGroupList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -134,7 +152,7 @@ export class Groups { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/groups."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -145,8 +163,12 @@ export class Groups { /** * Returns a `Group` object with the given `id`. * + * @param {string} id + * @param {Merge.filestorage.GroupsRetrieveRequest} request + * @param {Groups.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.groups.retrieve("id", {}) + * await client.filestorage.groups.retrieve("id") */ public async retrieve( id: string, @@ -154,7 +176,7 @@ export class Groups { requestOptions?: Groups.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -162,7 +184,7 @@ export class Groups { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/groups/${id}` + `filestorage/v1/groups/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -173,15 +195,21 @@ export class Groups { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.Group.parseOrThrow(_response.body, { + return serializers.filestorage.Group.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -204,7 +232,7 @@ export class Groups { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/groups/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -212,7 +240,7 @@ export class Groups { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/groups/client/requests/index.ts b/src/api/resources/filestorage/resources/groups/client/requests/index.ts index e70b6f852..7456e43a9 100644 --- a/src/api/resources/filestorage/resources/groups/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/groups/client/requests/index.ts @@ -1,2 +1,2 @@ -export { GroupsListRequest } from "./GroupsListRequest"; -export { GroupsRetrieveRequest } from "./GroupsRetrieveRequest"; +export { type GroupsListRequest } from "./GroupsListRequest"; +export { type GroupsRetrieveRequest } from "./GroupsRetrieveRequest"; diff --git a/src/api/resources/filestorage/resources/issues/client/Client.ts b/src/api/resources/filestorage/resources/issues/client/Client.ts index ec38f1240..89cb44ac4 100644 --- a/src/api/resources/filestorage/resources/issues/client/Client.ts +++ b/src/api/resources/filestorage/resources/issues/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Issues { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Issues { /** * Gets all issues for Organization. * + * @param {Merge.filestorage.IssuesListRequest} request + * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.issues.list({}) + * await client.filestorage.issues.list() */ public async list( request: Merge.filestorage.IssuesListRequest = {}, @@ -52,7 +64,7 @@ export class Issues { startDate, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountToken != null) { _queryParams["account_token"] = accountToken; } @@ -123,15 +135,21 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.PaginatedIssueList.parseOrThrow(_response.body, { + return serializers.filestorage.PaginatedIssueList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Issues { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/issues."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,14 +183,17 @@ export class Issues { /** * Get a specific issue. * + * @param {string} id + * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.issues.retrieve("id") + * await client.filestorage.issues.retrieve("id") */ public async retrieve(id: string, requestOptions?: Issues.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/issues/${id}` + `filestorage/v1/issues/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -183,14 +204,20 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.Issue.parseOrThrow(_response.body, { + return serializers.filestorage.Issue.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +240,7 @@ export class Issues { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/issues/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -221,7 +248,7 @@ export class Issues { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/issues/client/requests/IssuesListRequest.ts b/src/api/resources/filestorage/resources/issues/client/requests/IssuesListRequest.ts index 5ccad4ce4..bde8d014b 100644 --- a/src/api/resources/filestorage/resources/issues/client/requests/IssuesListRequest.ts +++ b/src/api/resources/filestorage/resources/issues/client/requests/IssuesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/filestorage/resources/issues/client/requests/index.ts b/src/api/resources/filestorage/resources/issues/client/requests/index.ts index 278763f77..ad215d907 100644 --- a/src/api/resources/filestorage/resources/issues/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/issues/client/requests/index.ts @@ -1 +1 @@ -export { IssuesListRequest } from "./IssuesListRequest"; +export { type IssuesListRequest } from "./IssuesListRequest"; diff --git a/src/api/resources/filestorage/resources/linkToken/client/Client.ts b/src/api/resources/filestorage/resources/linkToken/client/Client.ts index fdde904e6..b694f6b7b 100644 --- a/src/api/resources/filestorage/resources/linkToken/client/Client.ts +++ b/src/api/resources/filestorage/resources/linkToken/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace LinkToken { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,12 +38,15 @@ export class LinkToken { /** * Creates a link token to be used when linking a new end user. * + * @param {Merge.filestorage.EndUserDetailsRequest} request + * @param {LinkToken.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.linkToken.create({ + * await client.filestorage.linkToken.create({ * endUserEmailAddress: "example@gmail.com", * endUserOrganizationName: "Test Organization", * endUserOriginId: "12345", - * categories: [Merge.filestorage.CategoriesEnum.Hris, Merge.filestorage.CategoriesEnum.Ats] + * categories: ["hris", "ats"] * }) */ public async create( @@ -55,17 +67,23 @@ export class LinkToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.filestorage.EndUserDetailsRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.filestorage.EndUserDetailsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.LinkToken.parseOrThrow(_response.body, { + return serializers.filestorage.LinkToken.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -88,7 +106,7 @@ export class LinkToken { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /filestorage/v1/link-token."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -96,7 +114,7 @@ export class LinkToken { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/linkToken/client/requests/EndUserDetailsRequest.ts b/src/api/resources/filestorage/resources/linkToken/client/requests/EndUserDetailsRequest.ts index 1e79062bd..e5684ef0d 100644 --- a/src/api/resources/filestorage/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/api/resources/filestorage/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example @@ -10,7 +10,7 @@ import * as Merge from "../../../../../.."; * endUserEmailAddress: "example@gmail.com", * endUserOrganizationName: "Test Organization", * endUserOriginId: "12345", - * categories: [Merge.filestorage.CategoriesEnum.Hris, Merge.filestorage.CategoriesEnum.Ats] + * categories: ["hris", "ats"] * } */ export interface EndUserDetailsRequest { diff --git a/src/api/resources/filestorage/resources/linkToken/client/requests/index.ts b/src/api/resources/filestorage/resources/linkToken/client/requests/index.ts index d94b44a3e..de1b7e67d 100644 --- a/src/api/resources/filestorage/resources/linkToken/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/linkToken/client/requests/index.ts @@ -1 +1 @@ -export { EndUserDetailsRequest } from "./EndUserDetailsRequest"; +export { type EndUserDetailsRequest } from "./EndUserDetailsRequest"; diff --git a/src/api/resources/filestorage/resources/linkedAccounts/client/Client.ts b/src/api/resources/filestorage/resources/linkedAccounts/client/Client.ts index f6c3fc97d..00ff20c6d 100644 --- a/src/api/resources/filestorage/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/filestorage/resources/linkedAccounts/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace LinkedAccounts { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class LinkedAccounts { /** * List linked accounts for your organization. * + * @param {Merge.filestorage.LinkedAccountsListRequest} request + * @param {LinkedAccounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.linkedAccounts.list({}) + * await client.filestorage.linkedAccounts.list() */ public async list( request: Merge.filestorage.LinkedAccountsListRequest = {}, @@ -51,7 +63,7 @@ export class LinkedAccounts { pageSize, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (category != null) { _queryParams["category"] = category; } @@ -118,15 +130,21 @@ export class LinkedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { + return serializers.filestorage.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -149,7 +167,9 @@ export class LinkedAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /filestorage/v1/linked-accounts." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -157,7 +177,7 @@ export class LinkedAccounts { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts b/src/api/resources/filestorage/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts index a949f1f5f..b221ac5e6 100644 --- a/src/api/resources/filestorage/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts +++ b/src/api/resources/filestorage/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/filestorage/resources/linkedAccounts/client/requests/index.ts b/src/api/resources/filestorage/resources/linkedAccounts/client/requests/index.ts index ef755b09f..d28d7a17d 100644 --- a/src/api/resources/filestorage/resources/linkedAccounts/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/linkedAccounts/client/requests/index.ts @@ -1 +1 @@ -export { LinkedAccountsListRequest } from "./LinkedAccountsListRequest"; +export { type LinkedAccountsListRequest } from "./LinkedAccountsListRequest"; diff --git a/src/api/resources/filestorage/resources/passthrough/client/Client.ts b/src/api/resources/filestorage/resources/passthrough/client/Client.ts index 54b67cfbd..c1ce949a8 100644 --- a/src/api/resources/filestorage/resources/passthrough/client/Client.ts +++ b/src/api/resources/filestorage/resources/passthrough/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace Passthrough { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,9 +38,12 @@ export class Passthrough { /** * Pull data from an endpoint not currently supported by Merge. * + * @param {Merge.filestorage.DataPassthroughRequest} request + * @param {Passthrough.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.passthrough.create({ - * method: Merge.filestorage.MethodEnum.Get, + * await client.filestorage.passthrough.create({ + * method: "GET", * path: "/scooters" * }) */ @@ -53,17 +65,23 @@ export class Passthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.filestorage.DataPassthroughRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.filestorage.DataPassthroughRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.RemoteResponse.parseOrThrow(_response.body, { + return serializers.filestorage.RemoteResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +104,7 @@ export class Passthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /filestorage/v1/passthrough."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -94,7 +112,7 @@ export class Passthrough { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/regenerateKey/client/Client.ts b/src/api/resources/filestorage/resources/regenerateKey/client/Client.ts index 516105c56..579255897 100644 --- a/src/api/resources/filestorage/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/filestorage/resources/regenerateKey/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace RegenerateKey { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class RegenerateKey { /** * Exchange remote keys. * + * @param {Merge.filestorage.RemoteKeyForRegenerationRequest} request + * @param {RegenerateKey.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.regenerateKey.create({ + * await client.filestorage.regenerateKey.create({ * name: "Remote Deployment Key 1" * }) */ @@ -52,17 +64,23 @@ export class RegenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.filestorage.RemoteKeyForRegenerationRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.filestorage.RemoteKeyForRegenerationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.RemoteKey.parseOrThrow(_response.body, { + return serializers.filestorage.RemoteKey.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +103,9 @@ export class RegenerateKey { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /filestorage/v1/regenerate-key." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -93,7 +113,7 @@ export class RegenerateKey { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/regenerateKey/client/requests/index.ts b/src/api/resources/filestorage/resources/regenerateKey/client/requests/index.ts index 2987ef933..09bb5dbd0 100644 --- a/src/api/resources/filestorage/resources/regenerateKey/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/regenerateKey/client/requests/index.ts @@ -1 +1 @@ -export { RemoteKeyForRegenerationRequest } from "./RemoteKeyForRegenerationRequest"; +export { type RemoteKeyForRegenerationRequest } from "./RemoteKeyForRegenerationRequest"; diff --git a/src/api/resources/filestorage/resources/scopes/client/Client.ts b/src/api/resources/filestorage/resources/scopes/client/Client.ts index 4ef734f81..92db4b556 100644 --- a/src/api/resources/filestorage/resources/scopes/client/Client.ts +++ b/src/api/resources/filestorage/resources/scopes/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Scopes { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class Scopes { /** * Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). * + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.scopes.defaultScopesRetrieve() + * await client.filestorage.scopes.defaultScopesRetrieve() */ public async defaultScopesRetrieve( requestOptions?: Scopes.RequestOptions @@ -49,14 +60,20 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.filestorage.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +96,7 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/default-scopes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -90,8 +107,10 @@ export class Scopes { /** * Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). * + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.scopes.linkedAccountScopesRetrieve() + * await client.filestorage.scopes.linkedAccountScopesRetrieve() */ public async linkedAccountScopesRetrieve( requestOptions?: Scopes.RequestOptions @@ -110,14 +129,20 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.filestorage.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -140,7 +165,9 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /filestorage/v1/linked-account-scopes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -151,8 +178,11 @@ export class Scopes { /** * Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) * + * @param {Merge.filestorage.LinkedAccountCommonModelScopeDeserializerRequest} request + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.scopes.linkedAccountScopesCreate({ + * await client.filestorage.scopes.linkedAccountScopesCreate({ * commonModels: [{ * modelName: "Employee", * modelPermissions: { @@ -191,17 +221,23 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.filestorage.LinkedAccountCommonModelScopeDeserializerRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.filestorage.LinkedAccountCommonModelScopeDeserializerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.filestorage.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -224,7 +260,9 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /filestorage/v1/linked-account-scopes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -232,7 +270,7 @@ export class Scopes { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts b/src/api/resources/filestorage/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts index 71c3e8add..f0a601af6 100644 --- a/src/api/resources/filestorage/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/api/resources/filestorage/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/filestorage/resources/scopes/client/requests/index.ts b/src/api/resources/filestorage/resources/scopes/client/requests/index.ts index 28d8d7974..d193f008e 100644 --- a/src/api/resources/filestorage/resources/scopes/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/scopes/client/requests/index.ts @@ -1 +1 @@ -export { LinkedAccountCommonModelScopeDeserializerRequest } from "./LinkedAccountCommonModelScopeDeserializerRequest"; +export { type LinkedAccountCommonModelScopeDeserializerRequest } from "./LinkedAccountCommonModelScopeDeserializerRequest"; diff --git a/src/api/resources/filestorage/resources/syncStatus/client/Client.ts b/src/api/resources/filestorage/resources/syncStatus/client/Client.ts index 6ee0d43ec..954ebf1d0 100644 --- a/src/api/resources/filestorage/resources/syncStatus/client/Client.ts +++ b/src/api/resources/filestorage/resources/syncStatus/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace SyncStatus { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,15 +38,18 @@ export class SyncStatus { /** * Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). * + * @param {Merge.filestorage.SyncStatusListRequest} request + * @param {SyncStatus.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.syncStatus.list({}) + * await client.filestorage.syncStatus.list() */ public async list( request: Merge.filestorage.SyncStatusListRequest = {}, requestOptions?: SyncStatus.RequestOptions ): Promise { const { cursor, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -60,15 +72,21 @@ export class SyncStatus { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.PaginatedSyncStatusList.parseOrThrow(_response.body, { + return serializers.filestorage.PaginatedSyncStatusList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -91,7 +109,7 @@ export class SyncStatus { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/sync-status."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -99,7 +117,7 @@ export class SyncStatus { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/syncStatus/client/requests/index.ts b/src/api/resources/filestorage/resources/syncStatus/client/requests/index.ts index 58e9548fe..ef4f7c855 100644 --- a/src/api/resources/filestorage/resources/syncStatus/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/syncStatus/client/requests/index.ts @@ -1 +1 @@ -export { SyncStatusListRequest } from "./SyncStatusListRequest"; +export { type SyncStatusListRequest } from "./SyncStatusListRequest"; diff --git a/src/api/resources/filestorage/resources/users/client/Client.ts b/src/api/resources/filestorage/resources/users/client/Client.ts index 306f87cc0..112379816 100644 --- a/src/api/resources/filestorage/resources/users/client/Client.ts +++ b/src/api/resources/filestorage/resources/users/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Users { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Users { /** * Returns a list of `User` objects. * + * @param {Merge.filestorage.UsersListRequest} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.users.list({}) + * await client.filestorage.users.list() */ public async list( request: Merge.filestorage.UsersListRequest = {}, @@ -49,7 +61,7 @@ export class Users { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,15 +120,21 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.PaginatedUserList.parseOrThrow(_response.body, { + return serializers.filestorage.PaginatedUserList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -139,7 +157,7 @@ export class Users { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/users."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -150,8 +168,12 @@ export class Users { /** * Returns a `User` object with the given `id`. * + * @param {string} id + * @param {Merge.filestorage.UsersRetrieveRequest} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.users.retrieve("id", {}) + * await client.filestorage.users.retrieve("id") */ public async retrieve( id: string, @@ -159,7 +181,7 @@ export class Users { requestOptions?: Users.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -167,7 +189,7 @@ export class Users { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/users/${id}` + `filestorage/v1/users/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -178,15 +200,21 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.User.parseOrThrow(_response.body, { + return serializers.filestorage.User.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -209,7 +237,7 @@ export class Users { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /filestorage/v1/users/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -217,7 +245,7 @@ export class Users { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/users/client/requests/index.ts b/src/api/resources/filestorage/resources/users/client/requests/index.ts index df5bbab6e..7d1cf841a 100644 --- a/src/api/resources/filestorage/resources/users/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/users/client/requests/index.ts @@ -1,2 +1,2 @@ -export { UsersListRequest } from "./UsersListRequest"; -export { UsersRetrieveRequest } from "./UsersRetrieveRequest"; +export { type UsersListRequest } from "./UsersListRequest"; +export { type UsersRetrieveRequest } from "./UsersRetrieveRequest"; diff --git a/src/api/resources/filestorage/resources/webhookReceivers/client/Client.ts b/src/api/resources/filestorage/resources/webhookReceivers/client/Client.ts index 9aba3644f..4a778de0a 100644 --- a/src/api/resources/filestorage/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/filestorage/resources/webhookReceivers/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace WebhookReceivers { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class WebhookReceivers { /** * Returns a list of `WebhookReceiver` objects. * + * @param {WebhookReceivers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.webhookReceivers.list() + * await client.filestorage.webhookReceivers.list() */ public async list(requestOptions?: WebhookReceivers.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.webhookReceivers.list.Response.parseOrThrow(_response.body, { + return serializers.filestorage.webhookReceivers.list.Response.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,9 @@ export class WebhookReceivers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /filestorage/v1/webhook-receivers." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -88,8 +107,11 @@ export class WebhookReceivers { /** * Creates a `WebhookReceiver` object with the given values. * + * @param {Merge.filestorage.WebhookReceiverRequest} request + * @param {WebhookReceivers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.filestorage.webhookReceivers.create({ + * await client.filestorage.webhookReceivers.create({ * event: "event", * isActive: true * }) @@ -112,17 +134,23 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.filestorage.WebhookReceiverRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.filestorage.WebhookReceiverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.filestorage.WebhookReceiver.parseOrThrow(_response.body, { + return serializers.filestorage.WebhookReceiver.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +173,9 @@ export class WebhookReceivers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /filestorage/v1/webhook-receivers." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -153,7 +183,7 @@ export class WebhookReceivers { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/filestorage/resources/webhookReceivers/client/requests/index.ts b/src/api/resources/filestorage/resources/webhookReceivers/client/requests/index.ts index 29f534250..1df76ea53 100644 --- a/src/api/resources/filestorage/resources/webhookReceivers/client/requests/index.ts +++ b/src/api/resources/filestorage/resources/webhookReceivers/client/requests/index.ts @@ -1 +1 @@ -export { WebhookReceiverRequest } from "./WebhookReceiverRequest"; +export { type WebhookReceiverRequest } from "./WebhookReceiverRequest"; diff --git a/src/api/resources/filestorage/types/AccountDetails.ts b/src/api/resources/filestorage/types/AccountDetails.ts index 23aae1d76..aa01d25b3 100644 --- a/src/api/resources/filestorage/types/AccountDetails.ts +++ b/src/api/resources/filestorage/types/AccountDetails.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountDetails { id?: string; diff --git a/src/api/resources/filestorage/types/AccountDetailsAndActions.ts b/src/api/resources/filestorage/types/AccountDetailsAndActions.ts index d77565835..3803be869 100644 --- a/src/api/resources/filestorage/types/AccountDetailsAndActions.ts +++ b/src/api/resources/filestorage/types/AccountDetailsAndActions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The LinkedAccount Object diff --git a/src/api/resources/filestorage/types/AccountDetailsAndActionsIntegration.ts b/src/api/resources/filestorage/types/AccountDetailsAndActionsIntegration.ts index b156c7ea3..8e7bc975b 100644 --- a/src/api/resources/filestorage/types/AccountDetailsAndActionsIntegration.ts +++ b/src/api/resources/filestorage/types/AccountDetailsAndActionsIntegration.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountDetailsAndActionsIntegration { name: string; diff --git a/src/api/resources/filestorage/types/AccountIntegration.ts b/src/api/resources/filestorage/types/AccountIntegration.ts index 2bcd8c835..5e7d4e928 100644 --- a/src/api/resources/filestorage/types/AccountIntegration.ts +++ b/src/api/resources/filestorage/types/AccountIntegration.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountIntegration { /** Company name. */ diff --git a/src/api/resources/filestorage/types/AccountToken.ts b/src/api/resources/filestorage/types/AccountToken.ts index b35a3c6f1..1c0f59fa9 100644 --- a/src/api/resources/filestorage/types/AccountToken.ts +++ b/src/api/resources/filestorage/types/AccountToken.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountToken { accountToken: string; diff --git a/src/api/resources/filestorage/types/AuditLogEvent.ts b/src/api/resources/filestorage/types/AuditLogEvent.ts index bbf893da7..58b21337a 100644 --- a/src/api/resources/filestorage/types/AuditLogEvent.ts +++ b/src/api/resources/filestorage/types/AuditLogEvent.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AuditLogEvent { id?: string; diff --git a/src/api/resources/filestorage/types/AuditLogEventEventType.ts b/src/api/resources/filestorage/types/AuditLogEventEventType.ts index dbed8c978..509f92a19 100644 --- a/src/api/resources/filestorage/types/AuditLogEventEventType.ts +++ b/src/api/resources/filestorage/types/AuditLogEventEventType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Designates the type of event that occurred. diff --git a/src/api/resources/filestorage/types/AuditLogEventRole.ts b/src/api/resources/filestorage/types/AuditLogEventRole.ts index 7916b9843..bb02ac92b 100644 --- a/src/api/resources/filestorage/types/AuditLogEventRole.ts +++ b/src/api/resources/filestorage/types/AuditLogEventRole.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. diff --git a/src/api/resources/filestorage/types/AvailableActions.ts b/src/api/resources/filestorage/types/AvailableActions.ts index 4e69a2507..a69109446 100644 --- a/src/api/resources/filestorage/types/AvailableActions.ts +++ b/src/api/resources/filestorage/types/AvailableActions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The AvailableActions Object diff --git a/src/api/resources/filestorage/types/CommonModelScopeApi.ts b/src/api/resources/filestorage/types/CommonModelScopeApi.ts index d6fbdc08b..969cc65b0 100644 --- a/src/api/resources/filestorage/types/CommonModelScopeApi.ts +++ b/src/api/resources/filestorage/types/CommonModelScopeApi.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CommonModelScopeApi { /** The common models you want to update the scopes for */ diff --git a/src/api/resources/filestorage/types/CommonModelScopesBodyRequest.ts b/src/api/resources/filestorage/types/CommonModelScopesBodyRequest.ts index 1cac113f6..d8e56107c 100644 --- a/src/api/resources/filestorage/types/CommonModelScopesBodyRequest.ts +++ b/src/api/resources/filestorage/types/CommonModelScopesBodyRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CommonModelScopesBodyRequest { modelId: string; diff --git a/src/api/resources/filestorage/types/DataPassthroughRequest.ts b/src/api/resources/filestorage/types/DataPassthroughRequest.ts index 35070dba8..db30b40e1 100644 --- a/src/api/resources/filestorage/types/DataPassthroughRequest.ts +++ b/src/api/resources/filestorage/types/DataPassthroughRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The DataPassthrough Object diff --git a/src/api/resources/filestorage/types/DebugModeLog.ts b/src/api/resources/filestorage/types/DebugModeLog.ts index 483639e0d..b2d37579c 100644 --- a/src/api/resources/filestorage/types/DebugModeLog.ts +++ b/src/api/resources/filestorage/types/DebugModeLog.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface DebugModeLog { logId: string; diff --git a/src/api/resources/filestorage/types/ErrorValidationProblem.ts b/src/api/resources/filestorage/types/ErrorValidationProblem.ts index 4cf26c870..100548913 100644 --- a/src/api/resources/filestorage/types/ErrorValidationProblem.ts +++ b/src/api/resources/filestorage/types/ErrorValidationProblem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ErrorValidationProblem { source?: Merge.filestorage.ValidationProblemSource; diff --git a/src/api/resources/filestorage/types/ExternalTargetFieldApiResponse.ts b/src/api/resources/filestorage/types/ExternalTargetFieldApiResponse.ts index 1ab26e894..1f4648583 100644 --- a/src/api/resources/filestorage/types/ExternalTargetFieldApiResponse.ts +++ b/src/api/resources/filestorage/types/ExternalTargetFieldApiResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ExternalTargetFieldApiResponse { file?: Merge.filestorage.ExternalTargetFieldApi[]; diff --git a/src/api/resources/filestorage/types/FieldMappingApiInstance.ts b/src/api/resources/filestorage/types/FieldMappingApiInstance.ts index 94733aee9..cd1b0a9d0 100644 --- a/src/api/resources/filestorage/types/FieldMappingApiInstance.ts +++ b/src/api/resources/filestorage/types/FieldMappingApiInstance.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstance { id?: string; diff --git a/src/api/resources/filestorage/types/FieldMappingApiInstanceRemoteField.ts b/src/api/resources/filestorage/types/FieldMappingApiInstanceRemoteField.ts index b4c3c1b4e..b74f1b783 100644 --- a/src/api/resources/filestorage/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/api/resources/filestorage/types/FieldMappingApiInstanceRemoteField.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstanceRemoteField { remoteKeyName: string; diff --git a/src/api/resources/filestorage/types/FieldMappingApiInstanceResponse.ts b/src/api/resources/filestorage/types/FieldMappingApiInstanceResponse.ts index 257db2ce0..45fb783ff 100644 --- a/src/api/resources/filestorage/types/FieldMappingApiInstanceResponse.ts +++ b/src/api/resources/filestorage/types/FieldMappingApiInstanceResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstanceResponse { file?: Merge.filestorage.FieldMappingApiInstance[]; diff --git a/src/api/resources/filestorage/types/FieldMappingInstanceResponse.ts b/src/api/resources/filestorage/types/FieldMappingInstanceResponse.ts index 6fa262c82..6248ad992 100644 --- a/src/api/resources/filestorage/types/FieldMappingInstanceResponse.ts +++ b/src/api/resources/filestorage/types/FieldMappingInstanceResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingInstanceResponse { model: Merge.filestorage.FieldMappingApiInstance; diff --git a/src/api/resources/filestorage/types/FileDrive.ts b/src/api/resources/filestorage/types/FileDrive.ts index 2a3a0f31d..271fa4485 100644 --- a/src/api/resources/filestorage/types/FileDrive.ts +++ b/src/api/resources/filestorage/types/FileDrive.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The drive that the file belongs to. diff --git a/src/api/resources/filestorage/types/FileFolder.ts b/src/api/resources/filestorage/types/FileFolder.ts index 4ba043f9f..78daf9cf6 100644 --- a/src/api/resources/filestorage/types/FileFolder.ts +++ b/src/api/resources/filestorage/types/FileFolder.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The folder that the file belongs to. diff --git a/src/api/resources/filestorage/types/FilePermissions.ts b/src/api/resources/filestorage/types/FilePermissions.ts index f86aa3760..5d5636f69 100644 --- a/src/api/resources/filestorage/types/FilePermissions.ts +++ b/src/api/resources/filestorage/types/FilePermissions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /files`. diff --git a/src/api/resources/filestorage/types/FilePermissionsItem.ts b/src/api/resources/filestorage/types/FilePermissionsItem.ts index 8b959db3f..9caa71974 100644 --- a/src/api/resources/filestorage/types/FilePermissionsItem.ts +++ b/src/api/resources/filestorage/types/FilePermissionsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type FilePermissionsItem = string | Merge.filestorage.PermissionRequest; diff --git a/src/api/resources/filestorage/types/FileRequest.ts b/src/api/resources/filestorage/types/FileRequest.ts index 7e08e0c26..54df2ef83 100644 --- a/src/api/resources/filestorage/types/FileRequest.ts +++ b/src/api/resources/filestorage/types/FileRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The File Object diff --git a/src/api/resources/filestorage/types/FileRequestDrive.ts b/src/api/resources/filestorage/types/FileRequestDrive.ts index dfe4ed597..ee3a83be7 100644 --- a/src/api/resources/filestorage/types/FileRequestDrive.ts +++ b/src/api/resources/filestorage/types/FileRequestDrive.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The drive that the file belongs to. diff --git a/src/api/resources/filestorage/types/FileRequestFolder.ts b/src/api/resources/filestorage/types/FileRequestFolder.ts index fc4a83e2c..ba43de14c 100644 --- a/src/api/resources/filestorage/types/FileRequestFolder.ts +++ b/src/api/resources/filestorage/types/FileRequestFolder.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The folder that the file belongs to. diff --git a/src/api/resources/filestorage/types/FileRequestPermissions.ts b/src/api/resources/filestorage/types/FileRequestPermissions.ts index 23c427191..cdb02fa28 100644 --- a/src/api/resources/filestorage/types/FileRequestPermissions.ts +++ b/src/api/resources/filestorage/types/FileRequestPermissions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /files`. diff --git a/src/api/resources/filestorage/types/FileRequestPermissionsItem.ts b/src/api/resources/filestorage/types/FileRequestPermissionsItem.ts index c5ddde3ee..f5d2f641c 100644 --- a/src/api/resources/filestorage/types/FileRequestPermissionsItem.ts +++ b/src/api/resources/filestorage/types/FileRequestPermissionsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type FileRequestPermissionsItem = string | Merge.filestorage.PermissionRequest; diff --git a/src/api/resources/filestorage/types/FileStorageFileResponse.ts b/src/api/resources/filestorage/types/FileStorageFileResponse.ts index 624415f0f..1cedd0a04 100644 --- a/src/api/resources/filestorage/types/FileStorageFileResponse.ts +++ b/src/api/resources/filestorage/types/FileStorageFileResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FileStorageFileResponse { model: Merge.filestorage.File_; diff --git a/src/api/resources/filestorage/types/FileStorageFolderResponse.ts b/src/api/resources/filestorage/types/FileStorageFolderResponse.ts index d139ef254..66141cf2a 100644 --- a/src/api/resources/filestorage/types/FileStorageFolderResponse.ts +++ b/src/api/resources/filestorage/types/FileStorageFolderResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FileStorageFolderResponse { model: Merge.filestorage.Folder; diff --git a/src/api/resources/filestorage/types/File_.ts b/src/api/resources/filestorage/types/File_.ts index 8b80e0d11..3ef7467d2 100644 --- a/src/api/resources/filestorage/types/File_.ts +++ b/src/api/resources/filestorage/types/File_.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The File Object diff --git a/src/api/resources/filestorage/types/Folder.ts b/src/api/resources/filestorage/types/Folder.ts index f9d99e980..ade5492dc 100644 --- a/src/api/resources/filestorage/types/Folder.ts +++ b/src/api/resources/filestorage/types/Folder.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Folder Object diff --git a/src/api/resources/filestorage/types/FolderDrive.ts b/src/api/resources/filestorage/types/FolderDrive.ts index fcaf78f05..0674ae1e0 100644 --- a/src/api/resources/filestorage/types/FolderDrive.ts +++ b/src/api/resources/filestorage/types/FolderDrive.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The drive that the folder belongs to. diff --git a/src/api/resources/filestorage/types/FolderParentFolder.ts b/src/api/resources/filestorage/types/FolderParentFolder.ts index 00f4c0d76..0ae5c6cfd 100644 --- a/src/api/resources/filestorage/types/FolderParentFolder.ts +++ b/src/api/resources/filestorage/types/FolderParentFolder.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The folder that the folder belongs to. diff --git a/src/api/resources/filestorage/types/FolderPermissions.ts b/src/api/resources/filestorage/types/FolderPermissions.ts index dda26624f..e3be80ca9 100644 --- a/src/api/resources/filestorage/types/FolderPermissions.ts +++ b/src/api/resources/filestorage/types/FolderPermissions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /folders`. diff --git a/src/api/resources/filestorage/types/FolderPermissionsItem.ts b/src/api/resources/filestorage/types/FolderPermissionsItem.ts index 1ab0b70e9..18e37fa68 100644 --- a/src/api/resources/filestorage/types/FolderPermissionsItem.ts +++ b/src/api/resources/filestorage/types/FolderPermissionsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type FolderPermissionsItem = string | Merge.filestorage.PermissionRequest; diff --git a/src/api/resources/filestorage/types/FolderRequest.ts b/src/api/resources/filestorage/types/FolderRequest.ts index 3af5cdfca..f80cbd1d2 100644 --- a/src/api/resources/filestorage/types/FolderRequest.ts +++ b/src/api/resources/filestorage/types/FolderRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Folder Object diff --git a/src/api/resources/filestorage/types/FolderRequestDrive.ts b/src/api/resources/filestorage/types/FolderRequestDrive.ts index e3462a01b..3233f1c8f 100644 --- a/src/api/resources/filestorage/types/FolderRequestDrive.ts +++ b/src/api/resources/filestorage/types/FolderRequestDrive.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The drive that the folder belongs to. diff --git a/src/api/resources/filestorage/types/FolderRequestParentFolder.ts b/src/api/resources/filestorage/types/FolderRequestParentFolder.ts index a7fce64a4..0e802841a 100644 --- a/src/api/resources/filestorage/types/FolderRequestParentFolder.ts +++ b/src/api/resources/filestorage/types/FolderRequestParentFolder.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The folder that the folder belongs to. diff --git a/src/api/resources/filestorage/types/FolderRequestPermissions.ts b/src/api/resources/filestorage/types/FolderRequestPermissions.ts index f6757e45e..5d81fd5d6 100644 --- a/src/api/resources/filestorage/types/FolderRequestPermissions.ts +++ b/src/api/resources/filestorage/types/FolderRequestPermissions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /folders`. diff --git a/src/api/resources/filestorage/types/FolderRequestPermissionsItem.ts b/src/api/resources/filestorage/types/FolderRequestPermissionsItem.ts index 09139a514..0a0e8d1f4 100644 --- a/src/api/resources/filestorage/types/FolderRequestPermissionsItem.ts +++ b/src/api/resources/filestorage/types/FolderRequestPermissionsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type FolderRequestPermissionsItem = string | Merge.filestorage.PermissionRequest; diff --git a/src/api/resources/filestorage/types/IndividualCommonModelScopeDeserializer.ts b/src/api/resources/filestorage/types/IndividualCommonModelScopeDeserializer.ts index e7d2d8a63..7c3623e66 100644 --- a/src/api/resources/filestorage/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/api/resources/filestorage/types/IndividualCommonModelScopeDeserializer.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface IndividualCommonModelScopeDeserializer { modelName: string; diff --git a/src/api/resources/filestorage/types/IndividualCommonModelScopeDeserializerRequest.ts b/src/api/resources/filestorage/types/IndividualCommonModelScopeDeserializerRequest.ts index 0d4eaa3f8..84d8a5888 100644 --- a/src/api/resources/filestorage/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/api/resources/filestorage/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface IndividualCommonModelScopeDeserializerRequest { modelName: string; diff --git a/src/api/resources/filestorage/types/Issue.ts b/src/api/resources/filestorage/types/Issue.ts index bb579230e..28a5b0873 100644 --- a/src/api/resources/filestorage/types/Issue.ts +++ b/src/api/resources/filestorage/types/Issue.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface Issue { id?: string; diff --git a/src/api/resources/filestorage/types/IssueStatus.ts b/src/api/resources/filestorage/types/IssueStatus.ts index 3731f15e1..c9d8a90e9 100644 --- a/src/api/resources/filestorage/types/IssueStatus.ts +++ b/src/api/resources/filestorage/types/IssueStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Status of the issue. Options: ('ONGOING', 'RESOLVED') diff --git a/src/api/resources/filestorage/types/MetaResponse.ts b/src/api/resources/filestorage/types/MetaResponse.ts index b9f97cc50..a14493b0f 100644 --- a/src/api/resources/filestorage/types/MetaResponse.ts +++ b/src/api/resources/filestorage/types/MetaResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface MetaResponse { requestSchema: Record; diff --git a/src/api/resources/filestorage/types/MultipartFormFieldRequest.ts b/src/api/resources/filestorage/types/MultipartFormFieldRequest.ts index 3468d3b70..d80b889b5 100644 --- a/src/api/resources/filestorage/types/MultipartFormFieldRequest.ts +++ b/src/api/resources/filestorage/types/MultipartFormFieldRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The MultipartFormField Object diff --git a/src/api/resources/filestorage/types/MultipartFormFieldRequestEncoding.ts b/src/api/resources/filestorage/types/MultipartFormFieldRequestEncoding.ts index c3bf9f243..a73413789 100644 --- a/src/api/resources/filestorage/types/MultipartFormFieldRequestEncoding.ts +++ b/src/api/resources/filestorage/types/MultipartFormFieldRequestEncoding.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The encoding of the value of `data`. Defaults to `RAW` if not defined. diff --git a/src/api/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.ts b/src/api/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.ts index 89f81789e..6bd5a9259 100644 --- a/src/api/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/api/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAccountDetailsAndActionsList { next?: string; diff --git a/src/api/resources/filestorage/types/PaginatedAuditLogEventList.ts b/src/api/resources/filestorage/types/PaginatedAuditLogEventList.ts index 29d31048d..214c47b09 100644 --- a/src/api/resources/filestorage/types/PaginatedAuditLogEventList.ts +++ b/src/api/resources/filestorage/types/PaginatedAuditLogEventList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAuditLogEventList { next?: string; diff --git a/src/api/resources/filestorage/types/PaginatedDriveList.ts b/src/api/resources/filestorage/types/PaginatedDriveList.ts index 580ca719e..23f617fd1 100644 --- a/src/api/resources/filestorage/types/PaginatedDriveList.ts +++ b/src/api/resources/filestorage/types/PaginatedDriveList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedDriveList { next?: string; diff --git a/src/api/resources/filestorage/types/PaginatedFileList.ts b/src/api/resources/filestorage/types/PaginatedFileList.ts index bb93b36b8..96d8c66d2 100644 --- a/src/api/resources/filestorage/types/PaginatedFileList.ts +++ b/src/api/resources/filestorage/types/PaginatedFileList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedFileList { next?: string; diff --git a/src/api/resources/filestorage/types/PaginatedFolderList.ts b/src/api/resources/filestorage/types/PaginatedFolderList.ts index cbe9b5aa7..239f4ed49 100644 --- a/src/api/resources/filestorage/types/PaginatedFolderList.ts +++ b/src/api/resources/filestorage/types/PaginatedFolderList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedFolderList { next?: string; diff --git a/src/api/resources/filestorage/types/PaginatedGroupList.ts b/src/api/resources/filestorage/types/PaginatedGroupList.ts index 9586f76cc..819e7171c 100644 --- a/src/api/resources/filestorage/types/PaginatedGroupList.ts +++ b/src/api/resources/filestorage/types/PaginatedGroupList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedGroupList { next?: string; diff --git a/src/api/resources/filestorage/types/PaginatedIssueList.ts b/src/api/resources/filestorage/types/PaginatedIssueList.ts index 4bbd6b221..9369f2bbe 100644 --- a/src/api/resources/filestorage/types/PaginatedIssueList.ts +++ b/src/api/resources/filestorage/types/PaginatedIssueList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedIssueList { next?: string; diff --git a/src/api/resources/filestorage/types/PaginatedSyncStatusList.ts b/src/api/resources/filestorage/types/PaginatedSyncStatusList.ts index 72e446cd5..0b74fe1df 100644 --- a/src/api/resources/filestorage/types/PaginatedSyncStatusList.ts +++ b/src/api/resources/filestorage/types/PaginatedSyncStatusList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedSyncStatusList { next?: string; diff --git a/src/api/resources/filestorage/types/PaginatedUserList.ts b/src/api/resources/filestorage/types/PaginatedUserList.ts index cf0b1322d..663024cc2 100644 --- a/src/api/resources/filestorage/types/PaginatedUserList.ts +++ b/src/api/resources/filestorage/types/PaginatedUserList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedUserList { next?: string; diff --git a/src/api/resources/filestorage/types/Permission.ts b/src/api/resources/filestorage/types/Permission.ts index 8c70138a1..cfb7f2e85 100644 --- a/src/api/resources/filestorage/types/Permission.ts +++ b/src/api/resources/filestorage/types/Permission.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Permission Object diff --git a/src/api/resources/filestorage/types/PermissionGroup.ts b/src/api/resources/filestorage/types/PermissionGroup.ts index e2b9698c7..0042b57aa 100644 --- a/src/api/resources/filestorage/types/PermissionGroup.ts +++ b/src/api/resources/filestorage/types/PermissionGroup.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The group that is granted this permission. diff --git a/src/api/resources/filestorage/types/PermissionRequest.ts b/src/api/resources/filestorage/types/PermissionRequest.ts index 0e598d597..23ac57e44 100644 --- a/src/api/resources/filestorage/types/PermissionRequest.ts +++ b/src/api/resources/filestorage/types/PermissionRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Permission Object diff --git a/src/api/resources/filestorage/types/PermissionRequestGroup.ts b/src/api/resources/filestorage/types/PermissionRequestGroup.ts index 41c56781e..a4c853b7b 100644 --- a/src/api/resources/filestorage/types/PermissionRequestGroup.ts +++ b/src/api/resources/filestorage/types/PermissionRequestGroup.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The group that is granted this permission. diff --git a/src/api/resources/filestorage/types/PermissionRequestRolesItem.ts b/src/api/resources/filestorage/types/PermissionRequestRolesItem.ts index d3be4aede..67eae6198 100644 --- a/src/api/resources/filestorage/types/PermissionRequestRolesItem.ts +++ b/src/api/resources/filestorage/types/PermissionRequestRolesItem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The permissions that the user or group has for the File or Folder. diff --git a/src/api/resources/filestorage/types/PermissionRequestType.ts b/src/api/resources/filestorage/types/PermissionRequestType.ts index 5b8e9e592..99b7203dd 100644 --- a/src/api/resources/filestorage/types/PermissionRequestType.ts +++ b/src/api/resources/filestorage/types/PermissionRequestType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Denotes what type of people have access to the file. diff --git a/src/api/resources/filestorage/types/PermissionRequestUser.ts b/src/api/resources/filestorage/types/PermissionRequestUser.ts index 40c9d0c9d..0f9ad4f0d 100644 --- a/src/api/resources/filestorage/types/PermissionRequestUser.ts +++ b/src/api/resources/filestorage/types/PermissionRequestUser.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The user that is granted this permission. diff --git a/src/api/resources/filestorage/types/PermissionRolesItem.ts b/src/api/resources/filestorage/types/PermissionRolesItem.ts index 9706b03de..ac555d33e 100644 --- a/src/api/resources/filestorage/types/PermissionRolesItem.ts +++ b/src/api/resources/filestorage/types/PermissionRolesItem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The permissions that the user or group has for the File or Folder. diff --git a/src/api/resources/filestorage/types/PermissionType.ts b/src/api/resources/filestorage/types/PermissionType.ts index 500dc2e7b..166db7959 100644 --- a/src/api/resources/filestorage/types/PermissionType.ts +++ b/src/api/resources/filestorage/types/PermissionType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Denotes what type of people have access to the file. diff --git a/src/api/resources/filestorage/types/PermissionUser.ts b/src/api/resources/filestorage/types/PermissionUser.ts index 6466489c9..172ced0de 100644 --- a/src/api/resources/filestorage/types/PermissionUser.ts +++ b/src/api/resources/filestorage/types/PermissionUser.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The user that is granted this permission. diff --git a/src/api/resources/filestorage/types/RemoteFieldApi.ts b/src/api/resources/filestorage/types/RemoteFieldApi.ts index 00b91998d..d7f9432a0 100644 --- a/src/api/resources/filestorage/types/RemoteFieldApi.ts +++ b/src/api/resources/filestorage/types/RemoteFieldApi.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldApi { schema: Record; diff --git a/src/api/resources/filestorage/types/RemoteFieldApiResponse.ts b/src/api/resources/filestorage/types/RemoteFieldApiResponse.ts index 7d08b4451..e5c14a93a 100644 --- a/src/api/resources/filestorage/types/RemoteFieldApiResponse.ts +++ b/src/api/resources/filestorage/types/RemoteFieldApiResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldApiResponse { file?: Merge.filestorage.RemoteFieldApi[]; diff --git a/src/api/resources/filestorage/types/RemoteResponse.ts b/src/api/resources/filestorage/types/RemoteResponse.ts index 7d60ed41c..38180a016 100644 --- a/src/api/resources/filestorage/types/RemoteResponse.ts +++ b/src/api/resources/filestorage/types/RemoteResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The RemoteResponse Object diff --git a/src/api/resources/filestorage/types/SyncStatus.ts b/src/api/resources/filestorage/types/SyncStatus.ts index 479a39919..7d4a23780 100644 --- a/src/api/resources/filestorage/types/SyncStatus.ts +++ b/src/api/resources/filestorage/types/SyncStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The SyncStatus Object diff --git a/src/api/resources/filestorage/types/WarningValidationProblem.ts b/src/api/resources/filestorage/types/WarningValidationProblem.ts index 74ba7d2e8..4c4a51b94 100644 --- a/src/api/resources/filestorage/types/WarningValidationProblem.ts +++ b/src/api/resources/filestorage/types/WarningValidationProblem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface WarningValidationProblem { source?: Merge.filestorage.ValidationProblemSource; diff --git a/src/api/resources/hris/client/Client.ts b/src/api/resources/hris/client/Client.ts index fe7b513b4..6ede27395 100644 --- a/src/api/resources/hris/client/Client.ts +++ b/src/api/resources/hris/client/Client.ts @@ -42,13 +42,22 @@ export declare namespace Hris { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } diff --git a/src/api/resources/hris/resources/accountDetails/client/Client.ts b/src/api/resources/hris/resources/accountDetails/client/Client.ts index e120100fc..b0756331a 100644 --- a/src/api/resources/hris/resources/accountDetails/client/Client.ts +++ b/src/api/resources/hris/resources/accountDetails/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AccountDetails { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class AccountDetails { /** * Get details for a linked account. * + * @param {AccountDetails.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.accountDetails.retrieve() + * await client.hris.accountDetails.retrieve() */ public async retrieve(requestOptions?: AccountDetails.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class AccountDetails { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.AccountDetails.parseOrThrow(_response.body, { + return serializers.hris.AccountDetails.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class AccountDetails { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/account-details."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -85,7 +102,7 @@ export class AccountDetails { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/accountToken/client/Client.ts b/src/api/resources/hris/resources/accountToken/client/Client.ts index a0008357d..c66b7be29 100644 --- a/src/api/resources/hris/resources/accountToken/client/Client.ts +++ b/src/api/resources/hris/resources/accountToken/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AccountToken { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class AccountToken { /** * Returns the account token for the end user with the provided public token. * + * @param {string} publicToken + * @param {AccountToken.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.accountToken.retrieve("public_token") + * await client.hris.accountToken.retrieve("public_token") */ public async retrieve( publicToken: string, @@ -39,7 +51,7 @@ export class AccountToken { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/account-token/${publicToken}` + `hris/v1/account-token/${encodeURIComponent(publicToken)}` ), method: "GET", headers: { @@ -50,14 +62,20 @@ export class AccountToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.AccountToken.parseOrThrow(_response.body, { + return serializers.hris.AccountToken.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -80,7 +98,9 @@ export class AccountToken { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /hris/v1/account-token/{public_token}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -88,7 +108,7 @@ export class AccountToken { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/asyncPassthrough/client/Client.ts b/src/api/resources/hris/resources/asyncPassthrough/client/Client.ts index adca94986..5f2a65ecd 100644 --- a/src/api/resources/hris/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/hris/resources/asyncPassthrough/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace AsyncPassthrough { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,9 +38,12 @@ export class AsyncPassthrough { /** * Asynchronously pull data from an endpoint not currently supported by Merge. * + * @param {Merge.hris.DataPassthroughRequest} request + * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.asyncPassthrough.create({ - * method: Merge.hris.MethodEnum.Get, + * await client.hris.asyncPassthrough.create({ + * method: "GET", * path: "/scooters" * }) */ @@ -53,17 +65,21 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.hris.DataPassthroughRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.hris.DataPassthroughRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.AsyncPassthroughReciept.parseOrThrow(_response.body, { + return serializers.hris.AsyncPassthroughReciept.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +102,7 @@ export class AsyncPassthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /hris/v1/async-passthrough."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -96,6 +112,12 @@ export class AsyncPassthrough { /** * Retrieves data from earlier async-passthrough POST request + * + * @param {string} asyncPassthroughReceiptId + * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.hris.asyncPassthrough.retrieve("async_passthrough_receipt_id") */ public async retrieve( asyncPassthroughReceiptId: string, @@ -104,7 +126,7 @@ export class AsyncPassthrough { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/async-passthrough/${asyncPassthroughReceiptId}` + `hris/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}` ), method: "GET", headers: { @@ -115,14 +137,20 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { + return serializers.hris.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +173,9 @@ export class AsyncPassthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /hris/v1/async-passthrough/{async_passthrough_receipt_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -153,7 +183,7 @@ export class AsyncPassthrough { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/api/resources/hris/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts index e2f1ee75f..86a5759a7 100644 --- a/src/api/resources/hris/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts +++ b/src/api/resources/hris/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; export type AsyncPassthroughRetrieveResponse = Merge.hris.RemoteResponse | string; diff --git a/src/api/resources/hris/resources/auditTrail/client/Client.ts b/src/api/resources/hris/resources/auditTrail/client/Client.ts index 598ecc6d7..b22b85fb6 100644 --- a/src/api/resources/hris/resources/auditTrail/client/Client.ts +++ b/src/api/resources/hris/resources/auditTrail/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AuditTrail { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,15 +38,18 @@ export class AuditTrail { /** * Gets a list of audit trail events. * + * @param {Merge.hris.AuditTrailListRequest} request + * @param {AuditTrail.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.auditTrail.list({}) + * await client.hris.auditTrail.list() */ public async list( request: Merge.hris.AuditTrailListRequest = {}, requestOptions?: AuditTrail.RequestOptions ): Promise { const { cursor, endDate, eventType, pageSize, startDate, userEmail } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -76,15 +88,21 @@ export class AuditTrail { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedAuditLogEventList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedAuditLogEventList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -107,7 +125,7 @@ export class AuditTrail { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/audit-trail."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -115,7 +133,7 @@ export class AuditTrail { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/auditTrail/client/requests/index.ts b/src/api/resources/hris/resources/auditTrail/client/requests/index.ts index ddce9e786..2c0762c28 100644 --- a/src/api/resources/hris/resources/auditTrail/client/requests/index.ts +++ b/src/api/resources/hris/resources/auditTrail/client/requests/index.ts @@ -1 +1 @@ -export { AuditTrailListRequest } from "./AuditTrailListRequest"; +export { type AuditTrailListRequest } from "./AuditTrailListRequest"; diff --git a/src/api/resources/hris/resources/availableActions/client/Client.ts b/src/api/resources/hris/resources/availableActions/client/Client.ts index 16fafaf87..396c370c6 100644 --- a/src/api/resources/hris/resources/availableActions/client/Client.ts +++ b/src/api/resources/hris/resources/availableActions/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AvailableActions { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class AvailableActions { /** * Returns a list of models and actions available for an account. * + * @param {AvailableActions.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.availableActions.retrieve() + * await client.hris.availableActions.retrieve() */ public async retrieve(requestOptions?: AvailableActions.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class AvailableActions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.AvailableActions.parseOrThrow(_response.body, { + return serializers.hris.AvailableActions.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class AvailableActions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/available-actions."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -85,7 +102,7 @@ export class AvailableActions { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/bankInfo/client/Client.ts b/src/api/resources/hris/resources/bankInfo/client/Client.ts index 44ba45df7..9477c38b0 100644 --- a/src/api/resources/hris/resources/bankInfo/client/Client.ts +++ b/src/api/resources/hris/resources/bankInfo/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace BankInfo { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class BankInfo { /** * Returns a list of `BankInfo` objects. * + * @param {Merge.hris.BankInfoListRequest} request + * @param {BankInfo.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.bankInfo.list({}) + * await client.hris.bankInfo.list() */ public async list( request: Merge.hris.BankInfoListRequest = {}, @@ -55,7 +67,7 @@ export class BankInfo { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountType != null) { _queryParams["account_type"] = accountType; } @@ -138,15 +150,21 @@ export class BankInfo { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedBankInfoList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedBankInfoList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -169,7 +187,7 @@ export class BankInfo { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/bank-info."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -180,8 +198,12 @@ export class BankInfo { /** * Returns a `BankInfo` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.BankInfoRetrieveRequest} request + * @param {BankInfo.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.bankInfo.retrieve("id", {}) + * await client.hris.bankInfo.retrieve("id") */ public async retrieve( id: string, @@ -189,7 +211,7 @@ export class BankInfo { requestOptions?: BankInfo.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -209,7 +231,7 @@ export class BankInfo { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/bank-info/${id}` + `hris/v1/bank-info/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -220,15 +242,21 @@ export class BankInfo { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.BankInfo.parseOrThrow(_response.body, { + return serializers.hris.BankInfo.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -251,7 +279,7 @@ export class BankInfo { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/bank-info/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -259,7 +287,7 @@ export class BankInfo { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/bankInfo/client/requests/BankInfoListRequest.ts b/src/api/resources/hris/resources/bankInfo/client/requests/BankInfoListRequest.ts index 6019be535..21be0b6a1 100644 --- a/src/api/resources/hris/resources/bankInfo/client/requests/BankInfoListRequest.ts +++ b/src/api/resources/hris/resources/bankInfo/client/requests/BankInfoListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/bankInfo/client/requests/index.ts b/src/api/resources/hris/resources/bankInfo/client/requests/index.ts index 5dc6d3073..d0dd5bf05 100644 --- a/src/api/resources/hris/resources/bankInfo/client/requests/index.ts +++ b/src/api/resources/hris/resources/bankInfo/client/requests/index.ts @@ -1,2 +1,2 @@ -export { BankInfoListRequest } from "./BankInfoListRequest"; -export { BankInfoRetrieveRequest } from "./BankInfoRetrieveRequest"; +export { type BankInfoListRequest } from "./BankInfoListRequest"; +export { type BankInfoRetrieveRequest } from "./BankInfoRetrieveRequest"; diff --git a/src/api/resources/hris/resources/benefits/client/Client.ts b/src/api/resources/hris/resources/benefits/client/Client.ts index 963f7ab12..8f27a81af 100644 --- a/src/api/resources/hris/resources/benefits/client/Client.ts +++ b/src/api/resources/hris/resources/benefits/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Benefits { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Benefits { /** * Returns a list of `Benefit` objects. * + * @param {Merge.hris.BenefitsListRequest} request + * @param {Benefits.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.benefits.list({}) + * await client.hris.benefits.list() */ public async list( request: Merge.hris.BenefitsListRequest = {}, @@ -50,7 +62,7 @@ export class Benefits { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -113,15 +125,21 @@ export class Benefits { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedBenefitList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedBenefitList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -144,7 +162,7 @@ export class Benefits { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/benefits."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -155,8 +173,12 @@ export class Benefits { /** * Returns a `Benefit` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.BenefitsRetrieveRequest} request + * @param {Benefits.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.benefits.retrieve("id", {}) + * await client.hris.benefits.retrieve("id") */ public async retrieve( id: string, @@ -164,7 +186,7 @@ export class Benefits { requestOptions?: Benefits.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -176,7 +198,7 @@ export class Benefits { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/benefits/${id}` + `hris/v1/benefits/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -187,15 +209,21 @@ export class Benefits { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.Benefit.parseOrThrow(_response.body, { + return serializers.hris.Benefit.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -218,7 +246,7 @@ export class Benefits { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/benefits/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -226,7 +254,7 @@ export class Benefits { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/benefits/client/requests/index.ts b/src/api/resources/hris/resources/benefits/client/requests/index.ts index b2c4c7616..4fd62ac8b 100644 --- a/src/api/resources/hris/resources/benefits/client/requests/index.ts +++ b/src/api/resources/hris/resources/benefits/client/requests/index.ts @@ -1,2 +1,2 @@ -export { BenefitsListRequest } from "./BenefitsListRequest"; -export { BenefitsRetrieveRequest } from "./BenefitsRetrieveRequest"; +export { type BenefitsListRequest } from "./BenefitsListRequest"; +export { type BenefitsRetrieveRequest } from "./BenefitsRetrieveRequest"; diff --git a/src/api/resources/hris/resources/companies/client/Client.ts b/src/api/resources/hris/resources/companies/client/Client.ts index f81ada026..7544bb08d 100644 --- a/src/api/resources/hris/resources/companies/client/Client.ts +++ b/src/api/resources/hris/resources/companies/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Companies { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Companies { /** * Returns a list of `Company` objects. * + * @param {Merge.hris.CompaniesListRequest} request + * @param {Companies.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.companies.list({}) + * await client.hris.companies.list() */ public async list( request: Merge.hris.CompaniesListRequest = {}, @@ -48,7 +60,7 @@ export class Companies { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,15 +115,21 @@ export class Companies { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedCompanyList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedCompanyList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -134,7 +152,7 @@ export class Companies { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/companies."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -145,8 +163,12 @@ export class Companies { /** * Returns a `Company` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.CompaniesRetrieveRequest} request + * @param {Companies.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.companies.retrieve("id", {}) + * await client.hris.companies.retrieve("id") */ public async retrieve( id: string, @@ -154,7 +176,7 @@ export class Companies { requestOptions?: Companies.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -162,7 +184,7 @@ export class Companies { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/companies/${id}` + `hris/v1/companies/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -173,15 +195,21 @@ export class Companies { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.Company.parseOrThrow(_response.body, { + return serializers.hris.Company.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -204,7 +232,7 @@ export class Companies { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/companies/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -212,7 +240,7 @@ export class Companies { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/companies/client/requests/index.ts b/src/api/resources/hris/resources/companies/client/requests/index.ts index b32a4a773..6c0127e1e 100644 --- a/src/api/resources/hris/resources/companies/client/requests/index.ts +++ b/src/api/resources/hris/resources/companies/client/requests/index.ts @@ -1,2 +1,2 @@ -export { CompaniesListRequest } from "./CompaniesListRequest"; -export { CompaniesRetrieveRequest } from "./CompaniesRetrieveRequest"; +export { type CompaniesListRequest } from "./CompaniesListRequest"; +export { type CompaniesRetrieveRequest } from "./CompaniesRetrieveRequest"; diff --git a/src/api/resources/hris/resources/deleteAccount/client/Client.ts b/src/api/resources/hris/resources/deleteAccount/client/Client.ts index 8293d4da4..05f24ad65 100644 --- a/src/api/resources/hris/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/hris/resources/deleteAccount/client/Client.ts @@ -5,19 +5,28 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace DeleteAccount { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -27,8 +36,10 @@ export class DeleteAccount { /** * Delete a linked account. * + * @param {DeleteAccount.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.deleteAccount.delete() + * await client.hris.deleteAccount.delete() */ public async delete(requestOptions?: DeleteAccount.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -45,11 +56,17 @@ export class DeleteAccount { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -69,7 +86,7 @@ export class DeleteAccount { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /hris/v1/delete-account."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -77,7 +94,7 @@ export class DeleteAccount { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/dependents/client/Client.ts b/src/api/resources/hris/resources/dependents/client/Client.ts index 1929f9208..8c4671cbc 100644 --- a/src/api/resources/hris/resources/dependents/client/Client.ts +++ b/src/api/resources/hris/resources/dependents/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Dependents { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Dependents { /** * Returns a list of `Dependent` objects. * + * @param {Merge.hris.DependentsListRequest} request + * @param {Dependents.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.dependents.list({}) + * await client.hris.dependents.list() */ public async list( request: Merge.hris.DependentsListRequest = {}, @@ -49,7 +61,7 @@ export class Dependents { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,15 +120,21 @@ export class Dependents { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedDependentList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedDependentList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -139,7 +157,7 @@ export class Dependents { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/dependents."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -150,8 +168,12 @@ export class Dependents { /** * Returns a `Dependent` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.DependentsRetrieveRequest} request + * @param {Dependents.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.dependents.retrieve("id", {}) + * await client.hris.dependents.retrieve("id") */ public async retrieve( id: string, @@ -159,7 +181,7 @@ export class Dependents { requestOptions?: Dependents.RequestOptions ): Promise { const { includeRemoteData, includeSensitiveFields } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -171,7 +193,7 @@ export class Dependents { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/dependents/${id}` + `hris/v1/dependents/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -182,15 +204,21 @@ export class Dependents { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.Dependent.parseOrThrow(_response.body, { + return serializers.hris.Dependent.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +241,7 @@ export class Dependents { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/dependents/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -221,7 +249,7 @@ export class Dependents { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/dependents/client/requests/index.ts b/src/api/resources/hris/resources/dependents/client/requests/index.ts index cb4d9c089..6979d776f 100644 --- a/src/api/resources/hris/resources/dependents/client/requests/index.ts +++ b/src/api/resources/hris/resources/dependents/client/requests/index.ts @@ -1,2 +1,2 @@ -export { DependentsListRequest } from "./DependentsListRequest"; -export { DependentsRetrieveRequest } from "./DependentsRetrieveRequest"; +export { type DependentsListRequest } from "./DependentsListRequest"; +export { type DependentsRetrieveRequest } from "./DependentsRetrieveRequest"; diff --git a/src/api/resources/hris/resources/employeePayrollRuns/client/Client.ts b/src/api/resources/hris/resources/employeePayrollRuns/client/Client.ts index 65fa1543a..7c84118d1 100644 --- a/src/api/resources/hris/resources/employeePayrollRuns/client/Client.ts +++ b/src/api/resources/hris/resources/employeePayrollRuns/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace EmployeePayrollRuns { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class EmployeePayrollRuns { /** * Returns a list of `EmployeePayrollRun` objects. * + * @param {Merge.hris.EmployeePayrollRunsListRequest} request + * @param {EmployeePayrollRuns.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.employeePayrollRuns.list({}) + * await client.hris.employeePayrollRuns.list() */ public async list( request: Merge.hris.EmployeePayrollRunsListRequest = {}, @@ -55,7 +67,7 @@ export class EmployeePayrollRuns { startedAfter, startedBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -138,15 +150,21 @@ export class EmployeePayrollRuns { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedEmployeePayrollRunList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedEmployeePayrollRunList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -169,7 +187,7 @@ export class EmployeePayrollRuns { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/employee-payroll-runs."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -180,8 +198,12 @@ export class EmployeePayrollRuns { /** * Returns an `EmployeePayrollRun` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.EmployeePayrollRunsRetrieveRequest} request + * @param {EmployeePayrollRuns.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.employeePayrollRuns.retrieve("id", {}) + * await client.hris.employeePayrollRuns.retrieve("id") */ public async retrieve( id: string, @@ -189,7 +211,7 @@ export class EmployeePayrollRuns { requestOptions?: EmployeePayrollRuns.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -201,7 +223,7 @@ export class EmployeePayrollRuns { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/employee-payroll-runs/${id}` + `hris/v1/employee-payroll-runs/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -212,15 +234,21 @@ export class EmployeePayrollRuns { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.EmployeePayrollRun.parseOrThrow(_response.body, { + return serializers.hris.EmployeePayrollRun.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -243,7 +271,9 @@ export class EmployeePayrollRuns { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /hris/v1/employee-payroll-runs/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -251,7 +281,7 @@ export class EmployeePayrollRuns { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsListRequest.ts b/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsListRequest.ts index 553dc22b2..618fa06cc 100644 --- a/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsListRequest.ts +++ b/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsRetrieveRequest.ts b/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsRetrieveRequest.ts index 206a192d3..0b3c9f87e 100644 --- a/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/employeePayrollRuns/client/requests/EmployeePayrollRunsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/employeePayrollRuns/client/requests/index.ts b/src/api/resources/hris/resources/employeePayrollRuns/client/requests/index.ts index 0a85311ae..6f10c154d 100644 --- a/src/api/resources/hris/resources/employeePayrollRuns/client/requests/index.ts +++ b/src/api/resources/hris/resources/employeePayrollRuns/client/requests/index.ts @@ -1,2 +1,2 @@ -export { EmployeePayrollRunsListRequest } from "./EmployeePayrollRunsListRequest"; -export { EmployeePayrollRunsRetrieveRequest } from "./EmployeePayrollRunsRetrieveRequest"; +export { type EmployeePayrollRunsListRequest } from "./EmployeePayrollRunsListRequest"; +export { type EmployeePayrollRunsRetrieveRequest } from "./EmployeePayrollRunsRetrieveRequest"; diff --git a/src/api/resources/hris/resources/employees/client/Client.ts b/src/api/resources/hris/resources/employees/client/Client.ts index ea749dda9..6774aa476 100644 --- a/src/api/resources/hris/resources/employees/client/Client.ts +++ b/src/api/resources/hris/resources/employees/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Employees { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Employees { /** * Returns a list of `Employee` objects. * + * @param {Merge.hris.EmployeesListRequest} request + * @param {Employees.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.employees.list({}) + * await client.hris.employees.list() */ public async list( request: Merge.hris.EmployeesListRequest = {}, @@ -71,7 +83,7 @@ export class Employees { workEmail, workLocationId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -218,15 +230,21 @@ export class Employees { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedEmployeeList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedEmployeeList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -249,7 +267,7 @@ export class Employees { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/employees."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -260,8 +278,11 @@ export class Employees { /** * Creates an `Employee` object with the given values. * + * @param {Merge.hris.EmployeeEndpointRequest} request + * @param {Employees.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.employees.create({ + * await client.hris.employees.create({ * model: {} * }) */ @@ -270,7 +291,7 @@ export class Employees { requestOptions?: Employees.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -293,18 +314,22 @@ export class Employees { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.hris.EmployeeEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.hris.EmployeeEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.EmployeeResponse.parseOrThrow(_response.body, { + return serializers.hris.EmployeeResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -327,7 +352,7 @@ export class Employees { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /hris/v1/employees."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -338,8 +363,12 @@ export class Employees { /** * Returns an `Employee` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.EmployeesRetrieveRequest} request + * @param {Employees.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.employees.retrieve("id", {}) + * await client.hris.employees.retrieve("id") */ public async retrieve( id: string, @@ -347,7 +376,7 @@ export class Employees { requestOptions?: Employees.RequestOptions ): Promise { const { expand, includeRemoteData, includeSensitiveFields, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -371,7 +400,7 @@ export class Employees { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/employees/${id}` + `hris/v1/employees/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -382,15 +411,21 @@ export class Employees { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.Employee.parseOrThrow(_response.body, { + return serializers.hris.Employee.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -413,7 +448,7 @@ export class Employees { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/employees/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -424,8 +459,14 @@ export class Employees { /** * Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. * + * @param {string} modelId + * @param {Merge.hris.IgnoreCommonModelRequest} request + * @param {Employees.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.employees.ignoreCreate("model_id", {}) + * await client.hris.employees.ignoreCreate("model_id", { + * reason: "GENERAL_CUSTOMER_REQUEST" + * }) */ public async ignoreCreate( modelId: string, @@ -435,7 +476,7 @@ export class Employees { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/employees/ignore/${modelId}` + `hris/v1/employees/ignore/${encodeURIComponent(modelId)}` ), method: "POST", headers: { @@ -446,14 +487,18 @@ export class Employees { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.hris.IgnoreCommonModelRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.hris.IgnoreCommonModelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -473,7 +518,9 @@ export class Employees { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /hris/v1/employees/ignore/{model_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -484,8 +531,10 @@ export class Employees { /** * Returns metadata for `Employee` POSTs. * + * @param {Employees.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.employees.metaPostRetrieve() + * await client.hris.employees.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Employees.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -502,14 +551,20 @@ export class Employees { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.MetaResponse.parseOrThrow(_response.body, { + return serializers.hris.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -532,7 +587,7 @@ export class Employees { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/employees/meta/post."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -540,7 +595,7 @@ export class Employees { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/employees/client/requests/EmployeeEndpointRequest.ts b/src/api/resources/hris/resources/employees/client/requests/EmployeeEndpointRequest.ts index 050e4b1c6..b892f6d65 100644 --- a/src/api/resources/hris/resources/employees/client/requests/EmployeeEndpointRequest.ts +++ b/src/api/resources/hris/resources/employees/client/requests/EmployeeEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/employees/client/requests/EmployeesListRequest.ts b/src/api/resources/hris/resources/employees/client/requests/EmployeesListRequest.ts index ff919b9fd..1aa67b156 100644 --- a/src/api/resources/hris/resources/employees/client/requests/EmployeesListRequest.ts +++ b/src/api/resources/hris/resources/employees/client/requests/EmployeesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/employees/client/requests/EmployeesRetrieveRequest.ts b/src/api/resources/hris/resources/employees/client/requests/EmployeesRetrieveRequest.ts index ac81ff2f4..a4ab44abc 100644 --- a/src/api/resources/hris/resources/employees/client/requests/EmployeesRetrieveRequest.ts +++ b/src/api/resources/hris/resources/employees/client/requests/EmployeesRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/employees/client/requests/IgnoreCommonModelRequest.ts b/src/api/resources/hris/resources/employees/client/requests/IgnoreCommonModelRequest.ts index 3deb26079..1ea619e46 100644 --- a/src/api/resources/hris/resources/employees/client/requests/IgnoreCommonModelRequest.ts +++ b/src/api/resources/hris/resources/employees/client/requests/IgnoreCommonModelRequest.ts @@ -2,11 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example - * {} + * { + * reason: "GENERAL_CUSTOMER_REQUEST" + * } */ export interface IgnoreCommonModelRequest { reason: Merge.hris.IgnoreCommonModelRequestReason; diff --git a/src/api/resources/hris/resources/employees/client/requests/index.ts b/src/api/resources/hris/resources/employees/client/requests/index.ts index 449d55c1f..024e950ab 100644 --- a/src/api/resources/hris/resources/employees/client/requests/index.ts +++ b/src/api/resources/hris/resources/employees/client/requests/index.ts @@ -1,4 +1,4 @@ -export { EmployeesListRequest } from "./EmployeesListRequest"; -export { EmployeeEndpointRequest } from "./EmployeeEndpointRequest"; -export { EmployeesRetrieveRequest } from "./EmployeesRetrieveRequest"; -export { IgnoreCommonModelRequest } from "./IgnoreCommonModelRequest"; +export { type EmployeesListRequest } from "./EmployeesListRequest"; +export { type EmployeeEndpointRequest } from "./EmployeeEndpointRequest"; +export { type EmployeesRetrieveRequest } from "./EmployeesRetrieveRequest"; +export { type IgnoreCommonModelRequest } from "./IgnoreCommonModelRequest"; diff --git a/src/api/resources/hris/resources/employees/types/IgnoreCommonModelRequestReason.ts b/src/api/resources/hris/resources/employees/types/IgnoreCommonModelRequestReason.ts index 71e11c25b..2c921828f 100644 --- a/src/api/resources/hris/resources/employees/types/IgnoreCommonModelRequestReason.ts +++ b/src/api/resources/hris/resources/employees/types/IgnoreCommonModelRequestReason.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; export type IgnoreCommonModelRequestReason = Merge.hris.ReasonEnum | string; diff --git a/src/api/resources/hris/resources/employerBenefits/client/Client.ts b/src/api/resources/hris/resources/employerBenefits/client/Client.ts index 48f4afd32..e2d723408 100644 --- a/src/api/resources/hris/resources/employerBenefits/client/Client.ts +++ b/src/api/resources/hris/resources/employerBenefits/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace EmployerBenefits { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class EmployerBenefits { /** * Returns a list of `EmployerBenefit` objects. * + * @param {Merge.hris.EmployerBenefitsListRequest} request + * @param {EmployerBenefits.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.employerBenefits.list({}) + * await client.hris.employerBenefits.list() */ public async list( request: Merge.hris.EmployerBenefitsListRequest = {}, @@ -48,7 +60,7 @@ export class EmployerBenefits { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,15 +115,21 @@ export class EmployerBenefits { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedEmployerBenefitList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedEmployerBenefitList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -134,7 +152,7 @@ export class EmployerBenefits { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/employer-benefits."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -145,8 +163,12 @@ export class EmployerBenefits { /** * Returns an `EmployerBenefit` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.EmployerBenefitsRetrieveRequest} request + * @param {EmployerBenefits.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.employerBenefits.retrieve("id", {}) + * await client.hris.employerBenefits.retrieve("id") */ public async retrieve( id: string, @@ -154,7 +176,7 @@ export class EmployerBenefits { requestOptions?: EmployerBenefits.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -162,7 +184,7 @@ export class EmployerBenefits { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/employer-benefits/${id}` + `hris/v1/employer-benefits/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -173,15 +195,21 @@ export class EmployerBenefits { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.EmployerBenefit.parseOrThrow(_response.body, { + return serializers.hris.EmployerBenefit.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -204,7 +232,9 @@ export class EmployerBenefits { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /hris/v1/employer-benefits/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -212,7 +242,7 @@ export class EmployerBenefits { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/employerBenefits/client/requests/index.ts b/src/api/resources/hris/resources/employerBenefits/client/requests/index.ts index 805a06014..1c6affec7 100644 --- a/src/api/resources/hris/resources/employerBenefits/client/requests/index.ts +++ b/src/api/resources/hris/resources/employerBenefits/client/requests/index.ts @@ -1,2 +1,2 @@ -export { EmployerBenefitsListRequest } from "./EmployerBenefitsListRequest"; -export { EmployerBenefitsRetrieveRequest } from "./EmployerBenefitsRetrieveRequest"; +export { type EmployerBenefitsListRequest } from "./EmployerBenefitsListRequest"; +export { type EmployerBenefitsRetrieveRequest } from "./EmployerBenefitsRetrieveRequest"; diff --git a/src/api/resources/hris/resources/employments/client/Client.ts b/src/api/resources/hris/resources/employments/client/Client.ts index 38a531122..c3c7d062d 100644 --- a/src/api/resources/hris/resources/employments/client/Client.ts +++ b/src/api/resources/hris/resources/employments/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Employments { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Employments { /** * Returns a list of `Employment` objects. * + * @param {Merge.hris.EmploymentsListRequest} request + * @param {Employments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.employments.list({}) + * await client.hris.employments.list() */ public async list( request: Merge.hris.EmploymentsListRequest = {}, @@ -53,7 +65,7 @@ export class Employments { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -128,15 +140,21 @@ export class Employments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedEmploymentList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedEmploymentList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -159,7 +177,7 @@ export class Employments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/employments."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -170,8 +188,12 @@ export class Employments { /** * Returns an `Employment` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.EmploymentsRetrieveRequest} request + * @param {Employments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.employments.retrieve("id", {}) + * await client.hris.employments.retrieve("id") */ public async retrieve( id: string, @@ -179,7 +201,7 @@ export class Employments { requestOptions?: Employments.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -199,7 +221,7 @@ export class Employments { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/employments/${id}` + `hris/v1/employments/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -210,15 +232,21 @@ export class Employments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.Employment.parseOrThrow(_response.body, { + return serializers.hris.Employment.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -241,7 +269,7 @@ export class Employments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/employments/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -249,7 +277,7 @@ export class Employments { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/employments/client/requests/EmploymentsListRequest.ts b/src/api/resources/hris/resources/employments/client/requests/EmploymentsListRequest.ts index 373bcc166..44c6291df 100644 --- a/src/api/resources/hris/resources/employments/client/requests/EmploymentsListRequest.ts +++ b/src/api/resources/hris/resources/employments/client/requests/EmploymentsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/employments/client/requests/EmploymentsRetrieveRequest.ts b/src/api/resources/hris/resources/employments/client/requests/EmploymentsRetrieveRequest.ts index 92951b445..f768efefa 100644 --- a/src/api/resources/hris/resources/employments/client/requests/EmploymentsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/employments/client/requests/EmploymentsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/employments/client/requests/index.ts b/src/api/resources/hris/resources/employments/client/requests/index.ts index 81ce010e8..8147d269f 100644 --- a/src/api/resources/hris/resources/employments/client/requests/index.ts +++ b/src/api/resources/hris/resources/employments/client/requests/index.ts @@ -1,2 +1,2 @@ -export { EmploymentsListRequest } from "./EmploymentsListRequest"; -export { EmploymentsRetrieveRequest } from "./EmploymentsRetrieveRequest"; +export { type EmploymentsListRequest } from "./EmploymentsListRequest"; +export { type EmploymentsRetrieveRequest } from "./EmploymentsRetrieveRequest"; diff --git a/src/api/resources/hris/resources/fieldMapping/client/Client.ts b/src/api/resources/hris/resources/fieldMapping/client/Client.ts index 57764ed05..9d686fdd0 100644 --- a/src/api/resources/hris/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/hris/resources/fieldMapping/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace FieldMapping { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class FieldMapping { /** * Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). * + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.fieldMapping.fieldMappingsRetrieve() + * await client.hris.fieldMapping.fieldMappingsRetrieve() */ public async fieldMappingsRetrieve( requestOptions?: FieldMapping.RequestOptions @@ -49,14 +60,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { + return serializers.hris.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +96,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/field-mappings."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -90,8 +107,11 @@ export class FieldMapping { /** * Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {Merge.hris.CreateFieldMappingRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.fieldMapping.fieldMappingsCreate({ + * await client.hris.fieldMapping.fieldMappingsCreate({ * targetFieldName: "example_target_field_name", * targetFieldDescription: "this is a example description of the target field", * remoteFieldTraversalPath: ["example_remote_field"], @@ -118,17 +138,21 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.hris.CreateFieldMappingRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.hris.CreateFieldMappingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.hris.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -151,7 +175,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /hris/v1/field-mappings."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -162,8 +186,11 @@ export class FieldMapping { /** * Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {string} fieldMappingId + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.fieldMapping.fieldMappingsDestroy("field_mapping_id") + * await client.hris.fieldMapping.fieldMappingsDestroy("field_mapping_id") */ public async fieldMappingsDestroy( fieldMappingId: string, @@ -172,7 +199,7 @@ export class FieldMapping { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/field-mappings/${fieldMappingId}` + `hris/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` ), method: "DELETE", headers: { @@ -183,14 +210,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.hris.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +246,9 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling DELETE /hris/v1/field-mappings/{field_mapping_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -224,8 +259,12 @@ export class FieldMapping { /** * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {string} fieldMappingId + * @param {Merge.hris.PatchedEditFieldMappingRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id", {}) + * await client.hris.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id") */ public async fieldMappingsPartialUpdate( fieldMappingId: string, @@ -235,7 +274,7 @@ export class FieldMapping { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/field-mappings/${fieldMappingId}` + `hris/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` ), method: "PATCH", headers: { @@ -246,17 +285,23 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.hris.PatchedEditFieldMappingRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.hris.PatchedEditFieldMappingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.hris.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -279,7 +324,9 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling PATCH /hris/v1/field-mappings/{field_mapping_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -290,15 +337,18 @@ export class FieldMapping { /** * Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). * + * @param {Merge.hris.RemoteFieldsRetrieveRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.fieldMapping.remoteFieldsRetrieve({}) + * await client.hris.fieldMapping.remoteFieldsRetrieve() */ public async remoteFieldsRetrieve( request: Merge.hris.RemoteFieldsRetrieveRequest = {}, requestOptions?: FieldMapping.RequestOptions ): Promise { const { commonModels, includeExampleValues } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (commonModels != null) { _queryParams["common_models"] = commonModels; } @@ -321,15 +371,21 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.RemoteFieldApiResponse.parseOrThrow(_response.body, { + return serializers.hris.RemoteFieldApiResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -352,7 +408,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/remote-fields."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -363,8 +419,10 @@ export class FieldMapping { /** * Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). * + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.fieldMapping.targetFieldsRetrieve() + * await client.hris.fieldMapping.targetFieldsRetrieve() */ public async targetFieldsRetrieve( requestOptions?: FieldMapping.RequestOptions @@ -383,14 +441,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { + return serializers.hris.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -413,7 +477,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/target-fields."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -421,7 +485,7 @@ export class FieldMapping { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/fieldMapping/client/requests/index.ts b/src/api/resources/hris/resources/fieldMapping/client/requests/index.ts index cb93982a7..450f54c2b 100644 --- a/src/api/resources/hris/resources/fieldMapping/client/requests/index.ts +++ b/src/api/resources/hris/resources/fieldMapping/client/requests/index.ts @@ -1,3 +1,3 @@ -export { CreateFieldMappingRequest } from "./CreateFieldMappingRequest"; -export { PatchedEditFieldMappingRequest } from "./PatchedEditFieldMappingRequest"; -export { RemoteFieldsRetrieveRequest } from "./RemoteFieldsRetrieveRequest"; +export { type CreateFieldMappingRequest } from "./CreateFieldMappingRequest"; +export { type PatchedEditFieldMappingRequest } from "./PatchedEditFieldMappingRequest"; +export { type RemoteFieldsRetrieveRequest } from "./RemoteFieldsRetrieveRequest"; diff --git a/src/api/resources/hris/resources/forceResync/client/Client.ts b/src/api/resources/hris/resources/forceResync/client/Client.ts index 947fcd1f6..11f01fcb7 100644 --- a/src/api/resources/hris/resources/forceResync/client/Client.ts +++ b/src/api/resources/hris/resources/forceResync/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace ForceResync { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class ForceResync { /** * Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. * + * @param {ForceResync.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.forceResync.syncStatusResyncCreate() + * await client.hris.forceResync.syncStatusResyncCreate() */ public async syncStatusResyncCreate(requestOptions?: ForceResync.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class ForceResync { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { + return serializers.hris.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class ForceResync { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /hris/v1/sync-status/resync."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -85,7 +102,7 @@ export class ForceResync { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/generateKey/client/Client.ts b/src/api/resources/hris/resources/generateKey/client/Client.ts index fa6e97d14..dcd3a0d21 100644 --- a/src/api/resources/hris/resources/generateKey/client/Client.ts +++ b/src/api/resources/hris/resources/generateKey/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace GenerateKey { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class GenerateKey { /** * Create a remote key. * + * @param {Merge.hris.GenerateRemoteKeyRequest} request + * @param {GenerateKey.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.generateKey.create({ + * await client.hris.generateKey.create({ * name: "Remote Deployment Key 1" * }) */ @@ -52,17 +64,21 @@ export class GenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.hris.GenerateRemoteKeyRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.hris.GenerateRemoteKeyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.RemoteKey.parseOrThrow(_response.body, { + return serializers.hris.RemoteKey.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +101,7 @@ export class GenerateKey { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /hris/v1/generate-key."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -93,7 +109,7 @@ export class GenerateKey { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/generateKey/client/requests/index.ts b/src/api/resources/hris/resources/generateKey/client/requests/index.ts index 0df6e7c8b..d8255223c 100644 --- a/src/api/resources/hris/resources/generateKey/client/requests/index.ts +++ b/src/api/resources/hris/resources/generateKey/client/requests/index.ts @@ -1 +1 @@ -export { GenerateRemoteKeyRequest } from "./GenerateRemoteKeyRequest"; +export { type GenerateRemoteKeyRequest } from "./GenerateRemoteKeyRequest"; diff --git a/src/api/resources/hris/resources/groups/client/Client.ts b/src/api/resources/hris/resources/groups/client/Client.ts index 2ef7e97c8..77ef93b7a 100644 --- a/src/api/resources/hris/resources/groups/client/Client.ts +++ b/src/api/resources/hris/resources/groups/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Groups { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Groups { /** * Returns a list of `Group` objects. * + * @param {Merge.hris.GroupsListRequest} request + * @param {Groups.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.groups.list({}) + * await client.hris.groups.list() */ public async list( request: Merge.hris.GroupsListRequest = {}, @@ -53,7 +65,7 @@ export class Groups { showEnumOrigins, types, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -128,15 +140,21 @@ export class Groups { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedGroupList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedGroupList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -159,7 +177,7 @@ export class Groups { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/groups."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -170,8 +188,12 @@ export class Groups { /** * Returns a `Group` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.GroupsRetrieveRequest} request + * @param {Groups.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.groups.retrieve("id", {}) + * await client.hris.groups.retrieve("id") */ public async retrieve( id: string, @@ -179,7 +201,7 @@ export class Groups { requestOptions?: Groups.RequestOptions ): Promise { const { includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -195,7 +217,7 @@ export class Groups { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/groups/${id}` + `hris/v1/groups/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -206,15 +228,21 @@ export class Groups { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.Group.parseOrThrow(_response.body, { + return serializers.hris.Group.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -237,7 +265,7 @@ export class Groups { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/groups/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -245,7 +273,7 @@ export class Groups { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/groups/client/requests/index.ts b/src/api/resources/hris/resources/groups/client/requests/index.ts index e70b6f852..7456e43a9 100644 --- a/src/api/resources/hris/resources/groups/client/requests/index.ts +++ b/src/api/resources/hris/resources/groups/client/requests/index.ts @@ -1,2 +1,2 @@ -export { GroupsListRequest } from "./GroupsListRequest"; -export { GroupsRetrieveRequest } from "./GroupsRetrieveRequest"; +export { type GroupsListRequest } from "./GroupsListRequest"; +export { type GroupsRetrieveRequest } from "./GroupsRetrieveRequest"; diff --git a/src/api/resources/hris/resources/issues/client/Client.ts b/src/api/resources/hris/resources/issues/client/Client.ts index 10439653e..cd5762dde 100644 --- a/src/api/resources/hris/resources/issues/client/Client.ts +++ b/src/api/resources/hris/resources/issues/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Issues { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Issues { /** * Gets all issues for Organization. * + * @param {Merge.hris.IssuesListRequest} request + * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.issues.list({}) + * await client.hris.issues.list() */ public async list( request: Merge.hris.IssuesListRequest = {}, @@ -52,7 +64,7 @@ export class Issues { startDate, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountToken != null) { _queryParams["account_token"] = accountToken; } @@ -123,15 +135,21 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedIssueList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedIssueList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Issues { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/issues."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,14 +183,17 @@ export class Issues { /** * Get a specific issue. * + * @param {string} id + * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.issues.retrieve("id") + * await client.hris.issues.retrieve("id") */ public async retrieve(id: string, requestOptions?: Issues.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/issues/${id}` + `hris/v1/issues/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -183,14 +204,20 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.Issue.parseOrThrow(_response.body, { + return serializers.hris.Issue.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +240,7 @@ export class Issues { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/issues/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -221,7 +248,7 @@ export class Issues { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/issues/client/requests/IssuesListRequest.ts b/src/api/resources/hris/resources/issues/client/requests/IssuesListRequest.ts index 1d926b2a9..4c08d2cfc 100644 --- a/src/api/resources/hris/resources/issues/client/requests/IssuesListRequest.ts +++ b/src/api/resources/hris/resources/issues/client/requests/IssuesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/issues/client/requests/index.ts b/src/api/resources/hris/resources/issues/client/requests/index.ts index 278763f77..ad215d907 100644 --- a/src/api/resources/hris/resources/issues/client/requests/index.ts +++ b/src/api/resources/hris/resources/issues/client/requests/index.ts @@ -1 +1 @@ -export { IssuesListRequest } from "./IssuesListRequest"; +export { type IssuesListRequest } from "./IssuesListRequest"; diff --git a/src/api/resources/hris/resources/linkToken/client/Client.ts b/src/api/resources/hris/resources/linkToken/client/Client.ts index 13a47f0b9..fdf808ac9 100644 --- a/src/api/resources/hris/resources/linkToken/client/Client.ts +++ b/src/api/resources/hris/resources/linkToken/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace LinkToken { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,12 +38,15 @@ export class LinkToken { /** * Creates a link token to be used when linking a new end user. * + * @param {Merge.hris.EndUserDetailsRequest} request + * @param {LinkToken.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.linkToken.create({ + * await client.hris.linkToken.create({ * endUserEmailAddress: "example@gmail.com", * endUserOrganizationName: "Test Organization", * endUserOriginId: "12345", - * categories: [Merge.hris.CategoriesEnum.Hris, Merge.hris.CategoriesEnum.Ats] + * categories: ["hris", "ats"] * }) */ public async create( @@ -55,17 +67,21 @@ export class LinkToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.hris.EndUserDetailsRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.hris.EndUserDetailsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.LinkToken.parseOrThrow(_response.body, { + return serializers.hris.LinkToken.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -88,7 +104,7 @@ export class LinkToken { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /hris/v1/link-token."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -96,7 +112,7 @@ export class LinkToken { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/linkToken/client/requests/EndUserDetailsRequest.ts b/src/api/resources/hris/resources/linkToken/client/requests/EndUserDetailsRequest.ts index 286f828cc..f8c5b15a1 100644 --- a/src/api/resources/hris/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/api/resources/hris/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example @@ -10,7 +10,7 @@ import * as Merge from "../../../../../.."; * endUserEmailAddress: "example@gmail.com", * endUserOrganizationName: "Test Organization", * endUserOriginId: "12345", - * categories: [Merge.hris.CategoriesEnum.Hris, Merge.hris.CategoriesEnum.Ats] + * categories: ["hris", "ats"] * } */ export interface EndUserDetailsRequest { diff --git a/src/api/resources/hris/resources/linkToken/client/requests/index.ts b/src/api/resources/hris/resources/linkToken/client/requests/index.ts index d94b44a3e..de1b7e67d 100644 --- a/src/api/resources/hris/resources/linkToken/client/requests/index.ts +++ b/src/api/resources/hris/resources/linkToken/client/requests/index.ts @@ -1 +1 @@ -export { EndUserDetailsRequest } from "./EndUserDetailsRequest"; +export { type EndUserDetailsRequest } from "./EndUserDetailsRequest"; diff --git a/src/api/resources/hris/resources/linkedAccounts/client/Client.ts b/src/api/resources/hris/resources/linkedAccounts/client/Client.ts index ef1fe2e8a..2eaa7925c 100644 --- a/src/api/resources/hris/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/hris/resources/linkedAccounts/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace LinkedAccounts { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class LinkedAccounts { /** * List linked accounts for your organization. * + * @param {Merge.hris.LinkedAccountsListRequest} request + * @param {LinkedAccounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.linkedAccounts.list({}) + * await client.hris.linkedAccounts.list() */ public async list( request: Merge.hris.LinkedAccountsListRequest = {}, @@ -51,7 +63,7 @@ export class LinkedAccounts { pageSize, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (category != null) { _queryParams["category"] = category; } @@ -118,15 +130,21 @@ export class LinkedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -149,7 +167,7 @@ export class LinkedAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/linked-accounts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -157,7 +175,7 @@ export class LinkedAccounts { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts b/src/api/resources/hris/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts index 4c2a4864c..14e6c5190 100644 --- a/src/api/resources/hris/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts +++ b/src/api/resources/hris/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/linkedAccounts/client/requests/index.ts b/src/api/resources/hris/resources/linkedAccounts/client/requests/index.ts index ef755b09f..d28d7a17d 100644 --- a/src/api/resources/hris/resources/linkedAccounts/client/requests/index.ts +++ b/src/api/resources/hris/resources/linkedAccounts/client/requests/index.ts @@ -1 +1 @@ -export { LinkedAccountsListRequest } from "./LinkedAccountsListRequest"; +export { type LinkedAccountsListRequest } from "./LinkedAccountsListRequest"; diff --git a/src/api/resources/hris/resources/locations/client/Client.ts b/src/api/resources/hris/resources/locations/client/Client.ts index 0f21dd8ce..48c0d0c69 100644 --- a/src/api/resources/hris/resources/locations/client/Client.ts +++ b/src/api/resources/hris/resources/locations/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Locations { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Locations { /** * Returns a list of `Location` objects. * + * @param {Merge.hris.LocationsListRequest} request + * @param {Locations.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.locations.list({}) + * await client.hris.locations.list() */ public async list( request: Merge.hris.LocationsListRequest = {}, @@ -51,7 +63,7 @@ export class Locations { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -118,15 +130,21 @@ export class Locations { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedLocationList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedLocationList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -149,7 +167,7 @@ export class Locations { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/locations."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -160,8 +178,12 @@ export class Locations { /** * Returns a `Location` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.LocationsRetrieveRequest} request + * @param {Locations.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.locations.retrieve("id", {}) + * await client.hris.locations.retrieve("id") */ public async retrieve( id: string, @@ -169,7 +191,7 @@ export class Locations { requestOptions?: Locations.RequestOptions ): Promise { const { includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -185,7 +207,7 @@ export class Locations { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/locations/${id}` + `hris/v1/locations/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -196,15 +218,21 @@ export class Locations { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.Location.parseOrThrow(_response.body, { + return serializers.hris.Location.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -227,7 +255,7 @@ export class Locations { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/locations/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -235,7 +263,7 @@ export class Locations { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/locations/client/requests/LocationsListRequest.ts b/src/api/resources/hris/resources/locations/client/requests/LocationsListRequest.ts index 696d99b55..a5f680d66 100644 --- a/src/api/resources/hris/resources/locations/client/requests/LocationsListRequest.ts +++ b/src/api/resources/hris/resources/locations/client/requests/LocationsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/locations/client/requests/index.ts b/src/api/resources/hris/resources/locations/client/requests/index.ts index 30ed1a4ff..45fb4906a 100644 --- a/src/api/resources/hris/resources/locations/client/requests/index.ts +++ b/src/api/resources/hris/resources/locations/client/requests/index.ts @@ -1,2 +1,2 @@ -export { LocationsListRequest } from "./LocationsListRequest"; -export { LocationsRetrieveRequest } from "./LocationsRetrieveRequest"; +export { type LocationsListRequest } from "./LocationsListRequest"; +export { type LocationsRetrieveRequest } from "./LocationsRetrieveRequest"; diff --git a/src/api/resources/hris/resources/passthrough/client/Client.ts b/src/api/resources/hris/resources/passthrough/client/Client.ts index 4c0290b8e..a619bc083 100644 --- a/src/api/resources/hris/resources/passthrough/client/Client.ts +++ b/src/api/resources/hris/resources/passthrough/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace Passthrough { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,9 +38,12 @@ export class Passthrough { /** * Pull data from an endpoint not currently supported by Merge. * + * @param {Merge.hris.DataPassthroughRequest} request + * @param {Passthrough.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.passthrough.create({ - * method: Merge.hris.MethodEnum.Get, + * await client.hris.passthrough.create({ + * method: "GET", * path: "/scooters" * }) */ @@ -53,17 +65,21 @@ export class Passthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.hris.DataPassthroughRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.hris.DataPassthroughRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.RemoteResponse.parseOrThrow(_response.body, { + return serializers.hris.RemoteResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +102,7 @@ export class Passthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /hris/v1/passthrough."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -94,7 +110,7 @@ export class Passthrough { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/payGroups/client/Client.ts b/src/api/resources/hris/resources/payGroups/client/Client.ts index 4439898d3..b1d502f97 100644 --- a/src/api/resources/hris/resources/payGroups/client/Client.ts +++ b/src/api/resources/hris/resources/payGroups/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace PayGroups { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class PayGroups { /** * Returns a list of `PayGroup` objects. * + * @param {Merge.hris.PayGroupsListRequest} request + * @param {PayGroups.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.payGroups.list({}) + * await client.hris.payGroups.list() */ public async list( request: Merge.hris.PayGroupsListRequest = {}, @@ -48,7 +60,7 @@ export class PayGroups { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,15 +115,21 @@ export class PayGroups { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedPayGroupList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedPayGroupList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -134,7 +152,7 @@ export class PayGroups { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/pay-groups."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -145,8 +163,12 @@ export class PayGroups { /** * Returns a `PayGroup` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.PayGroupsRetrieveRequest} request + * @param {PayGroups.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.payGroups.retrieve("id", {}) + * await client.hris.payGroups.retrieve("id") */ public async retrieve( id: string, @@ -154,7 +176,7 @@ export class PayGroups { requestOptions?: PayGroups.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -162,7 +184,7 @@ export class PayGroups { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/pay-groups/${id}` + `hris/v1/pay-groups/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -173,15 +195,21 @@ export class PayGroups { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PayGroup.parseOrThrow(_response.body, { + return serializers.hris.PayGroup.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -204,7 +232,7 @@ export class PayGroups { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/pay-groups/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -212,7 +240,7 @@ export class PayGroups { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/payGroups/client/requests/index.ts b/src/api/resources/hris/resources/payGroups/client/requests/index.ts index 458caf21e..b530dd861 100644 --- a/src/api/resources/hris/resources/payGroups/client/requests/index.ts +++ b/src/api/resources/hris/resources/payGroups/client/requests/index.ts @@ -1,2 +1,2 @@ -export { PayGroupsListRequest } from "./PayGroupsListRequest"; -export { PayGroupsRetrieveRequest } from "./PayGroupsRetrieveRequest"; +export { type PayGroupsListRequest } from "./PayGroupsListRequest"; +export { type PayGroupsRetrieveRequest } from "./PayGroupsRetrieveRequest"; diff --git a/src/api/resources/hris/resources/payrollRuns/client/Client.ts b/src/api/resources/hris/resources/payrollRuns/client/Client.ts index bd2bd4362..908027539 100644 --- a/src/api/resources/hris/resources/payrollRuns/client/Client.ts +++ b/src/api/resources/hris/resources/payrollRuns/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace PayrollRuns { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class PayrollRuns { /** * Returns a list of `PayrollRun` objects. * + * @param {Merge.hris.PayrollRunsListRequest} request + * @param {PayrollRuns.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.payrollRuns.list({}) + * await client.hris.payrollRuns.list() */ public async list( request: Merge.hris.PayrollRunsListRequest = {}, @@ -55,7 +67,7 @@ export class PayrollRuns { startedAfter, startedBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -138,15 +150,21 @@ export class PayrollRuns { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedPayrollRunList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedPayrollRunList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -169,7 +187,7 @@ export class PayrollRuns { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/payroll-runs."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -180,8 +198,12 @@ export class PayrollRuns { /** * Returns a `PayrollRun` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.PayrollRunsRetrieveRequest} request + * @param {PayrollRuns.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.payrollRuns.retrieve("id", {}) + * await client.hris.payrollRuns.retrieve("id") */ public async retrieve( id: string, @@ -189,7 +211,7 @@ export class PayrollRuns { requestOptions?: PayrollRuns.RequestOptions ): Promise { const { includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -205,7 +227,7 @@ export class PayrollRuns { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/payroll-runs/${id}` + `hris/v1/payroll-runs/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -216,15 +238,21 @@ export class PayrollRuns { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PayrollRun.parseOrThrow(_response.body, { + return serializers.hris.PayrollRun.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -247,7 +275,7 @@ export class PayrollRuns { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/payroll-runs/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -255,7 +283,7 @@ export class PayrollRuns { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsListRequest.ts b/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsListRequest.ts index 96f5bb831..377e9925c 100644 --- a/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsListRequest.ts +++ b/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsRetrieveRequest.ts b/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsRetrieveRequest.ts index 25a068d3c..f3278dc19 100644 --- a/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsRetrieveRequest.ts +++ b/src/api/resources/hris/resources/payrollRuns/client/requests/PayrollRunsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/payrollRuns/client/requests/index.ts b/src/api/resources/hris/resources/payrollRuns/client/requests/index.ts index 0365484e7..040830a9c 100644 --- a/src/api/resources/hris/resources/payrollRuns/client/requests/index.ts +++ b/src/api/resources/hris/resources/payrollRuns/client/requests/index.ts @@ -1,2 +1,2 @@ -export { PayrollRunsListRequest } from "./PayrollRunsListRequest"; -export { PayrollRunsRetrieveRequest } from "./PayrollRunsRetrieveRequest"; +export { type PayrollRunsListRequest } from "./PayrollRunsListRequest"; +export { type PayrollRunsRetrieveRequest } from "./PayrollRunsRetrieveRequest"; diff --git a/src/api/resources/hris/resources/regenerateKey/client/Client.ts b/src/api/resources/hris/resources/regenerateKey/client/Client.ts index 1f4f98aa0..56cbbc586 100644 --- a/src/api/resources/hris/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/hris/resources/regenerateKey/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace RegenerateKey { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class RegenerateKey { /** * Exchange remote keys. * + * @param {Merge.hris.RemoteKeyForRegenerationRequest} request + * @param {RegenerateKey.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.regenerateKey.create({ + * await client.hris.regenerateKey.create({ * name: "Remote Deployment Key 1" * }) */ @@ -52,17 +64,23 @@ export class RegenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.hris.RemoteKeyForRegenerationRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.hris.RemoteKeyForRegenerationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.RemoteKey.parseOrThrow(_response.body, { + return serializers.hris.RemoteKey.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +103,7 @@ export class RegenerateKey { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /hris/v1/regenerate-key."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -93,7 +111,7 @@ export class RegenerateKey { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/regenerateKey/client/requests/index.ts b/src/api/resources/hris/resources/regenerateKey/client/requests/index.ts index 2987ef933..09bb5dbd0 100644 --- a/src/api/resources/hris/resources/regenerateKey/client/requests/index.ts +++ b/src/api/resources/hris/resources/regenerateKey/client/requests/index.ts @@ -1 +1 @@ -export { RemoteKeyForRegenerationRequest } from "./RemoteKeyForRegenerationRequest"; +export { type RemoteKeyForRegenerationRequest } from "./RemoteKeyForRegenerationRequest"; diff --git a/src/api/resources/hris/resources/scopes/client/Client.ts b/src/api/resources/hris/resources/scopes/client/Client.ts index 8c760fa99..2e0b8458f 100644 --- a/src/api/resources/hris/resources/scopes/client/Client.ts +++ b/src/api/resources/hris/resources/scopes/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Scopes { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class Scopes { /** * Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). * + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.scopes.defaultScopesRetrieve() + * await client.hris.scopes.defaultScopesRetrieve() */ public async defaultScopesRetrieve( requestOptions?: Scopes.RequestOptions @@ -49,14 +60,20 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.hris.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +96,7 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/default-scopes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -90,8 +107,10 @@ export class Scopes { /** * Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). * + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.scopes.linkedAccountScopesRetrieve() + * await client.hris.scopes.linkedAccountScopesRetrieve() */ public async linkedAccountScopesRetrieve( requestOptions?: Scopes.RequestOptions @@ -110,14 +129,20 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.hris.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -140,7 +165,7 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/linked-account-scopes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -151,8 +176,11 @@ export class Scopes { /** * Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) * + * @param {Merge.hris.LinkedAccountCommonModelScopeDeserializerRequest} request + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.scopes.linkedAccountScopesCreate({ + * await client.hris.scopes.linkedAccountScopesCreate({ * commonModels: [{ * modelName: "Employee", * modelPermissions: { @@ -191,17 +219,23 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.hris.LinkedAccountCommonModelScopeDeserializerRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.hris.LinkedAccountCommonModelScopeDeserializerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.hris.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -224,7 +258,9 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /hris/v1/linked-account-scopes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -232,7 +268,7 @@ export class Scopes { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts b/src/api/resources/hris/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts index 70da8ff1d..23fb0a3ac 100644 --- a/src/api/resources/hris/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/api/resources/hris/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/scopes/client/requests/index.ts b/src/api/resources/hris/resources/scopes/client/requests/index.ts index 28d8d7974..d193f008e 100644 --- a/src/api/resources/hris/resources/scopes/client/requests/index.ts +++ b/src/api/resources/hris/resources/scopes/client/requests/index.ts @@ -1 +1 @@ -export { LinkedAccountCommonModelScopeDeserializerRequest } from "./LinkedAccountCommonModelScopeDeserializerRequest"; +export { type LinkedAccountCommonModelScopeDeserializerRequest } from "./LinkedAccountCommonModelScopeDeserializerRequest"; diff --git a/src/api/resources/hris/resources/syncStatus/client/Client.ts b/src/api/resources/hris/resources/syncStatus/client/Client.ts index 7b699b6d6..a46a6689e 100644 --- a/src/api/resources/hris/resources/syncStatus/client/Client.ts +++ b/src/api/resources/hris/resources/syncStatus/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace SyncStatus { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,15 +38,18 @@ export class SyncStatus { /** * Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). * + * @param {Merge.hris.SyncStatusListRequest} request + * @param {SyncStatus.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.syncStatus.list({}) + * await client.hris.syncStatus.list() */ public async list( request: Merge.hris.SyncStatusListRequest = {}, requestOptions?: SyncStatus.RequestOptions ): Promise { const { cursor, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -60,15 +72,21 @@ export class SyncStatus { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedSyncStatusList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedSyncStatusList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -91,7 +109,7 @@ export class SyncStatus { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/sync-status."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -99,7 +117,7 @@ export class SyncStatus { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/syncStatus/client/requests/index.ts b/src/api/resources/hris/resources/syncStatus/client/requests/index.ts index 58e9548fe..ef4f7c855 100644 --- a/src/api/resources/hris/resources/syncStatus/client/requests/index.ts +++ b/src/api/resources/hris/resources/syncStatus/client/requests/index.ts @@ -1 +1 @@ -export { SyncStatusListRequest } from "./SyncStatusListRequest"; +export { type SyncStatusListRequest } from "./SyncStatusListRequest"; diff --git a/src/api/resources/hris/resources/teams/client/Client.ts b/src/api/resources/hris/resources/teams/client/Client.ts index 1e0bd81db..3a277b2ca 100644 --- a/src/api/resources/hris/resources/teams/client/Client.ts +++ b/src/api/resources/hris/resources/teams/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Teams { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Teams { /** * Returns a list of `Team` objects. * + * @param {Merge.hris.TeamsListRequest} request + * @param {Teams.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.teams.list({}) + * await client.hris.teams.list() */ public async list( request: Merge.hris.TeamsListRequest = {}, @@ -50,7 +62,7 @@ export class Teams { parentTeamId, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -113,15 +125,21 @@ export class Teams { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedTeamList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedTeamList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -144,7 +162,7 @@ export class Teams { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/teams."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -155,8 +173,12 @@ export class Teams { /** * Returns a `Team` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.TeamsRetrieveRequest} request + * @param {Teams.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.teams.retrieve("id", {}) + * await client.hris.teams.retrieve("id") */ public async retrieve( id: string, @@ -164,7 +186,7 @@ export class Teams { requestOptions?: Teams.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -176,7 +198,7 @@ export class Teams { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/teams/${id}` + `hris/v1/teams/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -187,15 +209,21 @@ export class Teams { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.Team.parseOrThrow(_response.body, { + return serializers.hris.Team.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -218,7 +246,7 @@ export class Teams { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/teams/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -226,7 +254,7 @@ export class Teams { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/teams/client/requests/index.ts b/src/api/resources/hris/resources/teams/client/requests/index.ts index 35a82ccee..d49b0677b 100644 --- a/src/api/resources/hris/resources/teams/client/requests/index.ts +++ b/src/api/resources/hris/resources/teams/client/requests/index.ts @@ -1,2 +1,2 @@ -export { TeamsListRequest } from "./TeamsListRequest"; -export { TeamsRetrieveRequest } from "./TeamsRetrieveRequest"; +export { type TeamsListRequest } from "./TeamsListRequest"; +export { type TeamsRetrieveRequest } from "./TeamsRetrieveRequest"; diff --git a/src/api/resources/hris/resources/timeOff/client/Client.ts b/src/api/resources/hris/resources/timeOff/client/Client.ts index 22ff556da..f9347cf7d 100644 --- a/src/api/resources/hris/resources/timeOff/client/Client.ts +++ b/src/api/resources/hris/resources/timeOff/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace TimeOff { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class TimeOff { /** * Returns a list of `TimeOff` objects. * + * @param {Merge.hris.TimeOffListRequest} request + * @param {TimeOff.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.timeOff.list({}) + * await client.hris.timeOff.list() */ public async list( request: Merge.hris.TimeOffListRequest = {}, @@ -59,7 +71,7 @@ export class TimeOff { startedBefore, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (approverId != null) { _queryParams["approver_id"] = approverId; } @@ -158,15 +170,21 @@ export class TimeOff { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedTimeOffList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedTimeOffList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -189,7 +207,7 @@ export class TimeOff { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/time-off."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -200,8 +218,11 @@ export class TimeOff { /** * Creates a `TimeOff` object with the given values. * + * @param {Merge.hris.TimeOffEndpointRequest} request + * @param {TimeOff.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.timeOff.create({ + * await client.hris.timeOff.create({ * model: {} * }) */ @@ -210,7 +231,7 @@ export class TimeOff { requestOptions?: TimeOff.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -233,16 +254,22 @@ export class TimeOff { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.hris.TimeOffEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.hris.TimeOffEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.TimeOffResponse.parseOrThrow(_response.body, { + return serializers.hris.TimeOffResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -265,7 +292,7 @@ export class TimeOff { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /hris/v1/time-off."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -276,8 +303,12 @@ export class TimeOff { /** * Returns a `TimeOff` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.TimeOffRetrieveRequest} request + * @param {TimeOff.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.timeOff.retrieve("id", {}) + * await client.hris.timeOff.retrieve("id") */ public async retrieve( id: string, @@ -285,7 +316,7 @@ export class TimeOff { requestOptions?: TimeOff.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -305,7 +336,7 @@ export class TimeOff { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/time-off/${id}` + `hris/v1/time-off/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -316,15 +347,21 @@ export class TimeOff { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.TimeOff.parseOrThrow(_response.body, { + return serializers.hris.TimeOff.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -347,7 +384,7 @@ export class TimeOff { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/time-off/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -358,8 +395,10 @@ export class TimeOff { /** * Returns metadata for `TimeOff` POSTs. * + * @param {TimeOff.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.timeOff.metaPostRetrieve() + * await client.hris.timeOff.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: TimeOff.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -376,14 +415,20 @@ export class TimeOff { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.MetaResponse.parseOrThrow(_response.body, { + return serializers.hris.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -406,7 +451,7 @@ export class TimeOff { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/time-off/meta/post."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -414,7 +459,7 @@ export class TimeOff { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/timeOff/client/requests/TimeOffEndpointRequest.ts b/src/api/resources/hris/resources/timeOff/client/requests/TimeOffEndpointRequest.ts index 06dbf3732..6fd3a69aa 100644 --- a/src/api/resources/hris/resources/timeOff/client/requests/TimeOffEndpointRequest.ts +++ b/src/api/resources/hris/resources/timeOff/client/requests/TimeOffEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/timeOff/client/requests/TimeOffListRequest.ts b/src/api/resources/hris/resources/timeOff/client/requests/TimeOffListRequest.ts index 0cda094e7..f684f0494 100644 --- a/src/api/resources/hris/resources/timeOff/client/requests/TimeOffListRequest.ts +++ b/src/api/resources/hris/resources/timeOff/client/requests/TimeOffListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/timeOff/client/requests/TimeOffRetrieveRequest.ts b/src/api/resources/hris/resources/timeOff/client/requests/TimeOffRetrieveRequest.ts index b262e6aa0..2a906827f 100644 --- a/src/api/resources/hris/resources/timeOff/client/requests/TimeOffRetrieveRequest.ts +++ b/src/api/resources/hris/resources/timeOff/client/requests/TimeOffRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/timeOff/client/requests/index.ts b/src/api/resources/hris/resources/timeOff/client/requests/index.ts index 64ede5206..790d992cb 100644 --- a/src/api/resources/hris/resources/timeOff/client/requests/index.ts +++ b/src/api/resources/hris/resources/timeOff/client/requests/index.ts @@ -1,3 +1,3 @@ -export { TimeOffListRequest } from "./TimeOffListRequest"; -export { TimeOffEndpointRequest } from "./TimeOffEndpointRequest"; -export { TimeOffRetrieveRequest } from "./TimeOffRetrieveRequest"; +export { type TimeOffListRequest } from "./TimeOffListRequest"; +export { type TimeOffEndpointRequest } from "./TimeOffEndpointRequest"; +export { type TimeOffRetrieveRequest } from "./TimeOffRetrieveRequest"; diff --git a/src/api/resources/hris/resources/timeOffBalances/client/Client.ts b/src/api/resources/hris/resources/timeOffBalances/client/Client.ts index 7c0b539bd..1a1226f2d 100644 --- a/src/api/resources/hris/resources/timeOffBalances/client/Client.ts +++ b/src/api/resources/hris/resources/timeOffBalances/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace TimeOffBalances { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class TimeOffBalances { /** * Returns a list of `TimeOffBalance` objects. * + * @param {Merge.hris.TimeOffBalancesListRequest} request + * @param {TimeOffBalances.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.timeOffBalances.list({}) + * await client.hris.timeOffBalances.list() */ public async list( request: Merge.hris.TimeOffBalancesListRequest = {}, @@ -53,7 +65,7 @@ export class TimeOffBalances { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -128,15 +140,21 @@ export class TimeOffBalances { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedTimeOffBalanceList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedTimeOffBalanceList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -159,7 +177,7 @@ export class TimeOffBalances { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/time-off-balances."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -170,8 +188,12 @@ export class TimeOffBalances { /** * Returns a `TimeOffBalance` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.TimeOffBalancesRetrieveRequest} request + * @param {TimeOffBalances.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.timeOffBalances.retrieve("id", {}) + * await client.hris.timeOffBalances.retrieve("id") */ public async retrieve( id: string, @@ -179,7 +201,7 @@ export class TimeOffBalances { requestOptions?: TimeOffBalances.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -199,7 +221,7 @@ export class TimeOffBalances { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/time-off-balances/${id}` + `hris/v1/time-off-balances/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -210,15 +232,21 @@ export class TimeOffBalances { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.TimeOffBalance.parseOrThrow(_response.body, { + return serializers.hris.TimeOffBalance.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -241,7 +269,9 @@ export class TimeOffBalances { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /hris/v1/time-off-balances/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -249,7 +279,7 @@ export class TimeOffBalances { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/timeOffBalances/client/requests/TimeOffBalancesListRequest.ts b/src/api/resources/hris/resources/timeOffBalances/client/requests/TimeOffBalancesListRequest.ts index 1ce838bf5..323edc1b0 100644 --- a/src/api/resources/hris/resources/timeOffBalances/client/requests/TimeOffBalancesListRequest.ts +++ b/src/api/resources/hris/resources/timeOffBalances/client/requests/TimeOffBalancesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/timeOffBalances/client/requests/index.ts b/src/api/resources/hris/resources/timeOffBalances/client/requests/index.ts index 4b24d89bd..7d80c16da 100644 --- a/src/api/resources/hris/resources/timeOffBalances/client/requests/index.ts +++ b/src/api/resources/hris/resources/timeOffBalances/client/requests/index.ts @@ -1,2 +1,2 @@ -export { TimeOffBalancesListRequest } from "./TimeOffBalancesListRequest"; -export { TimeOffBalancesRetrieveRequest } from "./TimeOffBalancesRetrieveRequest"; +export { type TimeOffBalancesListRequest } from "./TimeOffBalancesListRequest"; +export { type TimeOffBalancesRetrieveRequest } from "./TimeOffBalancesRetrieveRequest"; diff --git a/src/api/resources/hris/resources/timesheetEntries/client/Client.ts b/src/api/resources/hris/resources/timesheetEntries/client/Client.ts index 18670e537..f9db2ac3c 100644 --- a/src/api/resources/hris/resources/timesheetEntries/client/Client.ts +++ b/src/api/resources/hris/resources/timesheetEntries/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace TimesheetEntries { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class TimesheetEntries { /** * Returns a list of `TimesheetEntry` objects. * + * @param {Merge.hris.TimesheetEntriesListRequest} request + * @param {TimesheetEntries.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.timesheetEntries.list({}) + * await client.hris.timesheetEntries.list() */ public async list( request: Merge.hris.TimesheetEntriesListRequest = {}, @@ -54,7 +66,7 @@ export class TimesheetEntries { startedAfter, startedBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -133,15 +145,21 @@ export class TimesheetEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.PaginatedTimesheetEntryList.parseOrThrow(_response.body, { + return serializers.hris.PaginatedTimesheetEntryList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -164,7 +182,7 @@ export class TimesheetEntries { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/timesheet-entries."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -175,8 +193,11 @@ export class TimesheetEntries { /** * Creates a `TimesheetEntry` object with the given values. * + * @param {Merge.hris.TimesheetEntryEndpointRequest} request + * @param {TimesheetEntries.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.timesheetEntries.create({ + * await client.hris.timesheetEntries.create({ * model: {} * }) */ @@ -185,7 +206,7 @@ export class TimesheetEntries { requestOptions?: TimesheetEntries.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -208,18 +229,24 @@ export class TimesheetEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.hris.TimesheetEntryEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.hris.TimesheetEntryEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.TimesheetEntryResponse.parseOrThrow(_response.body, { + return serializers.hris.TimesheetEntryResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -242,7 +269,7 @@ export class TimesheetEntries { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /hris/v1/timesheet-entries."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -253,8 +280,12 @@ export class TimesheetEntries { /** * Returns a `TimesheetEntry` object with the given `id`. * + * @param {string} id + * @param {Merge.hris.TimesheetEntriesRetrieveRequest} request + * @param {TimesheetEntries.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.timesheetEntries.retrieve("id", {}) + * await client.hris.timesheetEntries.retrieve("id") */ public async retrieve( id: string, @@ -262,7 +293,7 @@ export class TimesheetEntries { requestOptions?: TimesheetEntries.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -270,7 +301,7 @@ export class TimesheetEntries { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/timesheet-entries/${id}` + `hris/v1/timesheet-entries/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -281,15 +312,21 @@ export class TimesheetEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.TimesheetEntry.parseOrThrow(_response.body, { + return serializers.hris.TimesheetEntry.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -312,7 +349,9 @@ export class TimesheetEntries { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /hris/v1/timesheet-entries/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -323,8 +362,10 @@ export class TimesheetEntries { /** * Returns metadata for `TimesheetEntry` POSTs. * + * @param {TimesheetEntries.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.timesheetEntries.metaPostRetrieve() + * await client.hris.timesheetEntries.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: TimesheetEntries.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -341,14 +382,20 @@ export class TimesheetEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.MetaResponse.parseOrThrow(_response.body, { + return serializers.hris.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -371,7 +418,9 @@ export class TimesheetEntries { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /hris/v1/timesheet-entries/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -379,7 +428,7 @@ export class TimesheetEntries { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntriesListRequest.ts b/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntriesListRequest.ts index 7c5f182a0..e9efc6d88 100644 --- a/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntriesListRequest.ts +++ b/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntriesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntryEndpointRequest.ts b/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntryEndpointRequest.ts index 75db3f535..a88139cb8 100644 --- a/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntryEndpointRequest.ts +++ b/src/api/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntryEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/hris/resources/timesheetEntries/client/requests/index.ts b/src/api/resources/hris/resources/timesheetEntries/client/requests/index.ts index b3dac71d9..cf244468e 100644 --- a/src/api/resources/hris/resources/timesheetEntries/client/requests/index.ts +++ b/src/api/resources/hris/resources/timesheetEntries/client/requests/index.ts @@ -1,3 +1,3 @@ -export { TimesheetEntriesListRequest } from "./TimesheetEntriesListRequest"; -export { TimesheetEntryEndpointRequest } from "./TimesheetEntryEndpointRequest"; -export { TimesheetEntriesRetrieveRequest } from "./TimesheetEntriesRetrieveRequest"; +export { type TimesheetEntriesListRequest } from "./TimesheetEntriesListRequest"; +export { type TimesheetEntryEndpointRequest } from "./TimesheetEntryEndpointRequest"; +export { type TimesheetEntriesRetrieveRequest } from "./TimesheetEntriesRetrieveRequest"; diff --git a/src/api/resources/hris/resources/webhookReceivers/client/Client.ts b/src/api/resources/hris/resources/webhookReceivers/client/Client.ts index f7872b5e1..efbdb7204 100644 --- a/src/api/resources/hris/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/hris/resources/webhookReceivers/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace WebhookReceivers { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class WebhookReceivers { /** * Returns a list of `WebhookReceiver` objects. * + * @param {WebhookReceivers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.webhookReceivers.list() + * await client.hris.webhookReceivers.list() */ public async list(requestOptions?: WebhookReceivers.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.webhookReceivers.list.Response.parseOrThrow(_response.body, { + return serializers.hris.webhookReceivers.list.Response.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class WebhookReceivers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /hris/v1/webhook-receivers."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -88,8 +105,11 @@ export class WebhookReceivers { /** * Creates a `WebhookReceiver` object with the given values. * + * @param {Merge.hris.WebhookReceiverRequest} request + * @param {WebhookReceivers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.hris.webhookReceivers.create({ + * await client.hris.webhookReceivers.create({ * event: "event", * isActive: true * }) @@ -112,17 +132,21 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.hris.WebhookReceiverRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.hris.WebhookReceiverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.hris.WebhookReceiver.parseOrThrow(_response.body, { + return serializers.hris.WebhookReceiver.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +169,7 @@ export class WebhookReceivers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /hris/v1/webhook-receivers."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -153,7 +177,7 @@ export class WebhookReceivers { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/hris/resources/webhookReceivers/client/requests/index.ts b/src/api/resources/hris/resources/webhookReceivers/client/requests/index.ts index 29f534250..1df76ea53 100644 --- a/src/api/resources/hris/resources/webhookReceivers/client/requests/index.ts +++ b/src/api/resources/hris/resources/webhookReceivers/client/requests/index.ts @@ -1 +1 @@ -export { WebhookReceiverRequest } from "./WebhookReceiverRequest"; +export { type WebhookReceiverRequest } from "./WebhookReceiverRequest"; diff --git a/src/api/resources/hris/types/AccountDetails.ts b/src/api/resources/hris/types/AccountDetails.ts index 4f823bf35..9f13eeffa 100644 --- a/src/api/resources/hris/types/AccountDetails.ts +++ b/src/api/resources/hris/types/AccountDetails.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountDetails { id?: string; diff --git a/src/api/resources/hris/types/AccountDetailsAndActions.ts b/src/api/resources/hris/types/AccountDetailsAndActions.ts index 6fd337bb1..ef27775a0 100644 --- a/src/api/resources/hris/types/AccountDetailsAndActions.ts +++ b/src/api/resources/hris/types/AccountDetailsAndActions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The LinkedAccount Object diff --git a/src/api/resources/hris/types/AccountDetailsAndActionsIntegration.ts b/src/api/resources/hris/types/AccountDetailsAndActionsIntegration.ts index e07bedbb7..0ce5f6b36 100644 --- a/src/api/resources/hris/types/AccountDetailsAndActionsIntegration.ts +++ b/src/api/resources/hris/types/AccountDetailsAndActionsIntegration.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountDetailsAndActionsIntegration { name: string; diff --git a/src/api/resources/hris/types/AccountIntegration.ts b/src/api/resources/hris/types/AccountIntegration.ts index 2e462568a..799aa616d 100644 --- a/src/api/resources/hris/types/AccountIntegration.ts +++ b/src/api/resources/hris/types/AccountIntegration.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountIntegration { /** Company name. */ diff --git a/src/api/resources/hris/types/AccountToken.ts b/src/api/resources/hris/types/AccountToken.ts index ba803b746..95f70d7b9 100644 --- a/src/api/resources/hris/types/AccountToken.ts +++ b/src/api/resources/hris/types/AccountToken.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountToken { accountToken: string; diff --git a/src/api/resources/hris/types/AuditLogEvent.ts b/src/api/resources/hris/types/AuditLogEvent.ts index d78c1aed4..db8c6a258 100644 --- a/src/api/resources/hris/types/AuditLogEvent.ts +++ b/src/api/resources/hris/types/AuditLogEvent.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AuditLogEvent { id?: string; diff --git a/src/api/resources/hris/types/AuditLogEventEventType.ts b/src/api/resources/hris/types/AuditLogEventEventType.ts index b156db4ab..2b4bd8785 100644 --- a/src/api/resources/hris/types/AuditLogEventEventType.ts +++ b/src/api/resources/hris/types/AuditLogEventEventType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Designates the type of event that occurred. diff --git a/src/api/resources/hris/types/AuditLogEventRole.ts b/src/api/resources/hris/types/AuditLogEventRole.ts index bb54fb5f9..13ed164f9 100644 --- a/src/api/resources/hris/types/AuditLogEventRole.ts +++ b/src/api/resources/hris/types/AuditLogEventRole.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. diff --git a/src/api/resources/hris/types/AvailableActions.ts b/src/api/resources/hris/types/AvailableActions.ts index 0bba5a88e..626a54744 100644 --- a/src/api/resources/hris/types/AvailableActions.ts +++ b/src/api/resources/hris/types/AvailableActions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The AvailableActions Object diff --git a/src/api/resources/hris/types/BankInfo.ts b/src/api/resources/hris/types/BankInfo.ts index 6fee2df70..3cd4eb7fa 100644 --- a/src/api/resources/hris/types/BankInfo.ts +++ b/src/api/resources/hris/types/BankInfo.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The BankInfo Object diff --git a/src/api/resources/hris/types/BankInfoAccountType.ts b/src/api/resources/hris/types/BankInfoAccountType.ts index def357c6e..de75e160e 100644 --- a/src/api/resources/hris/types/BankInfoAccountType.ts +++ b/src/api/resources/hris/types/BankInfoAccountType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The bank account type diff --git a/src/api/resources/hris/types/BankInfoEmployee.ts b/src/api/resources/hris/types/BankInfoEmployee.ts index c3328843a..652962629 100644 --- a/src/api/resources/hris/types/BankInfoEmployee.ts +++ b/src/api/resources/hris/types/BankInfoEmployee.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee with this bank account. diff --git a/src/api/resources/hris/types/Benefit.ts b/src/api/resources/hris/types/Benefit.ts index 2f3c20408..abccc31a1 100644 --- a/src/api/resources/hris/types/Benefit.ts +++ b/src/api/resources/hris/types/Benefit.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Benefit Object diff --git a/src/api/resources/hris/types/BenefitEmployee.ts b/src/api/resources/hris/types/BenefitEmployee.ts index 2a5221188..7c7ea9123 100644 --- a/src/api/resources/hris/types/BenefitEmployee.ts +++ b/src/api/resources/hris/types/BenefitEmployee.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee on the plan. diff --git a/src/api/resources/hris/types/CommonModelScopeApi.ts b/src/api/resources/hris/types/CommonModelScopeApi.ts index a3ba4e956..8579bbfad 100644 --- a/src/api/resources/hris/types/CommonModelScopeApi.ts +++ b/src/api/resources/hris/types/CommonModelScopeApi.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CommonModelScopeApi { /** The common models you want to update the scopes for */ diff --git a/src/api/resources/hris/types/CommonModelScopesBodyRequest.ts b/src/api/resources/hris/types/CommonModelScopesBodyRequest.ts index 033b517d3..e8a133faa 100644 --- a/src/api/resources/hris/types/CommonModelScopesBodyRequest.ts +++ b/src/api/resources/hris/types/CommonModelScopesBodyRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CommonModelScopesBodyRequest { modelId: string; diff --git a/src/api/resources/hris/types/Company.ts b/src/api/resources/hris/types/Company.ts index eb7221c28..f531ed34c 100644 --- a/src/api/resources/hris/types/Company.ts +++ b/src/api/resources/hris/types/Company.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Company Object diff --git a/src/api/resources/hris/types/DataPassthroughRequest.ts b/src/api/resources/hris/types/DataPassthroughRequest.ts index 01259a023..b743209e1 100644 --- a/src/api/resources/hris/types/DataPassthroughRequest.ts +++ b/src/api/resources/hris/types/DataPassthroughRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The DataPassthrough Object diff --git a/src/api/resources/hris/types/DebugModeLog.ts b/src/api/resources/hris/types/DebugModeLog.ts index 81eac4227..cd0b154b7 100644 --- a/src/api/resources/hris/types/DebugModeLog.ts +++ b/src/api/resources/hris/types/DebugModeLog.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface DebugModeLog { logId: string; diff --git a/src/api/resources/hris/types/Deduction.ts b/src/api/resources/hris/types/Deduction.ts index bcd268ee5..e014b58f9 100644 --- a/src/api/resources/hris/types/Deduction.ts +++ b/src/api/resources/hris/types/Deduction.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Deduction Object diff --git a/src/api/resources/hris/types/Dependent.ts b/src/api/resources/hris/types/Dependent.ts index 0df0dc8bf..985e1be1b 100644 --- a/src/api/resources/hris/types/Dependent.ts +++ b/src/api/resources/hris/types/Dependent.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Dependent Object diff --git a/src/api/resources/hris/types/DependentGender.ts b/src/api/resources/hris/types/DependentGender.ts index 2a506ea55..dad979b3d 100644 --- a/src/api/resources/hris/types/DependentGender.ts +++ b/src/api/resources/hris/types/DependentGender.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The dependent's gender. diff --git a/src/api/resources/hris/types/DependentRelationship.ts b/src/api/resources/hris/types/DependentRelationship.ts index bfb58c89a..9ff2234b3 100644 --- a/src/api/resources/hris/types/DependentRelationship.ts +++ b/src/api/resources/hris/types/DependentRelationship.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The dependent's relationship to the employee. diff --git a/src/api/resources/hris/types/Earning.ts b/src/api/resources/hris/types/Earning.ts index a11f082fa..7c150ce02 100644 --- a/src/api/resources/hris/types/Earning.ts +++ b/src/api/resources/hris/types/Earning.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Earning Object diff --git a/src/api/resources/hris/types/EarningType.ts b/src/api/resources/hris/types/EarningType.ts index d88f9b205..573ecff98 100644 --- a/src/api/resources/hris/types/EarningType.ts +++ b/src/api/resources/hris/types/EarningType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The type of earning. diff --git a/src/api/resources/hris/types/Employee.ts b/src/api/resources/hris/types/Employee.ts index 1345107e3..287296979 100644 --- a/src/api/resources/hris/types/Employee.ts +++ b/src/api/resources/hris/types/Employee.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Employee Object diff --git a/src/api/resources/hris/types/EmployeeCompany.ts b/src/api/resources/hris/types/EmployeeCompany.ts index 1f0d14ab4..8c8a6cf85 100644 --- a/src/api/resources/hris/types/EmployeeCompany.ts +++ b/src/api/resources/hris/types/EmployeeCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The ID of the employee's company. diff --git a/src/api/resources/hris/types/EmployeeEmploymentStatus.ts b/src/api/resources/hris/types/EmployeeEmploymentStatus.ts index 8e61db39f..2860c8379 100644 --- a/src/api/resources/hris/types/EmployeeEmploymentStatus.ts +++ b/src/api/resources/hris/types/EmployeeEmploymentStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employment status of the employee. diff --git a/src/api/resources/hris/types/EmployeeEmploymentsItem.ts b/src/api/resources/hris/types/EmployeeEmploymentsItem.ts index 09efa5dcb..931793826 100644 --- a/src/api/resources/hris/types/EmployeeEmploymentsItem.ts +++ b/src/api/resources/hris/types/EmployeeEmploymentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type EmployeeEmploymentsItem = string | Merge.hris.Employment; diff --git a/src/api/resources/hris/types/EmployeeEthnicity.ts b/src/api/resources/hris/types/EmployeeEthnicity.ts index fc700bec6..9bcdf1a80 100644 --- a/src/api/resources/hris/types/EmployeeEthnicity.ts +++ b/src/api/resources/hris/types/EmployeeEthnicity.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee's ethnicity. diff --git a/src/api/resources/hris/types/EmployeeGender.ts b/src/api/resources/hris/types/EmployeeGender.ts index 40abaec51..ea17166ad 100644 --- a/src/api/resources/hris/types/EmployeeGender.ts +++ b/src/api/resources/hris/types/EmployeeGender.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee's gender. diff --git a/src/api/resources/hris/types/EmployeeGroupsItem.ts b/src/api/resources/hris/types/EmployeeGroupsItem.ts index e35cbe09a..911fb1a8a 100644 --- a/src/api/resources/hris/types/EmployeeGroupsItem.ts +++ b/src/api/resources/hris/types/EmployeeGroupsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type EmployeeGroupsItem = string | Merge.hris.Group; diff --git a/src/api/resources/hris/types/EmployeeHomeLocation.ts b/src/api/resources/hris/types/EmployeeHomeLocation.ts index 917ad888f..8ccace445 100644 --- a/src/api/resources/hris/types/EmployeeHomeLocation.ts +++ b/src/api/resources/hris/types/EmployeeHomeLocation.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee's home address. diff --git a/src/api/resources/hris/types/EmployeeManager.ts b/src/api/resources/hris/types/EmployeeManager.ts index 19bb37e2a..3b32ed656 100644 --- a/src/api/resources/hris/types/EmployeeManager.ts +++ b/src/api/resources/hris/types/EmployeeManager.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee ID of the employee's manager. diff --git a/src/api/resources/hris/types/EmployeeMaritalStatus.ts b/src/api/resources/hris/types/EmployeeMaritalStatus.ts index 64041dbcf..efc494a2b 100644 --- a/src/api/resources/hris/types/EmployeeMaritalStatus.ts +++ b/src/api/resources/hris/types/EmployeeMaritalStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee's filing status as related to marital status. diff --git a/src/api/resources/hris/types/EmployeePayGroup.ts b/src/api/resources/hris/types/EmployeePayGroup.ts index cbfddb719..031b6a9b1 100644 --- a/src/api/resources/hris/types/EmployeePayGroup.ts +++ b/src/api/resources/hris/types/EmployeePayGroup.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee's pay group diff --git a/src/api/resources/hris/types/EmployeePayrollRun.ts b/src/api/resources/hris/types/EmployeePayrollRun.ts index 220a16da0..3b0ab810b 100644 --- a/src/api/resources/hris/types/EmployeePayrollRun.ts +++ b/src/api/resources/hris/types/EmployeePayrollRun.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The EmployeePayrollRun Object diff --git a/src/api/resources/hris/types/EmployeePayrollRunEmployee.ts b/src/api/resources/hris/types/EmployeePayrollRunEmployee.ts index ef48d965b..1dffd3c6f 100644 --- a/src/api/resources/hris/types/EmployeePayrollRunEmployee.ts +++ b/src/api/resources/hris/types/EmployeePayrollRunEmployee.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee whose payroll is being run. diff --git a/src/api/resources/hris/types/EmployeePayrollRunPayrollRun.ts b/src/api/resources/hris/types/EmployeePayrollRunPayrollRun.ts index 9050acd55..685e2654b 100644 --- a/src/api/resources/hris/types/EmployeePayrollRunPayrollRun.ts +++ b/src/api/resources/hris/types/EmployeePayrollRunPayrollRun.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The payroll being run. diff --git a/src/api/resources/hris/types/EmployeeRequest.ts b/src/api/resources/hris/types/EmployeeRequest.ts index b087c7ce7..a4c39d9b1 100644 --- a/src/api/resources/hris/types/EmployeeRequest.ts +++ b/src/api/resources/hris/types/EmployeeRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Employee Object diff --git a/src/api/resources/hris/types/EmployeeRequestCompany.ts b/src/api/resources/hris/types/EmployeeRequestCompany.ts index 8be61c928..ae1769840 100644 --- a/src/api/resources/hris/types/EmployeeRequestCompany.ts +++ b/src/api/resources/hris/types/EmployeeRequestCompany.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The ID of the employee's company. diff --git a/src/api/resources/hris/types/EmployeeRequestEmploymentStatus.ts b/src/api/resources/hris/types/EmployeeRequestEmploymentStatus.ts index 9d7ed4aab..70cf324c5 100644 --- a/src/api/resources/hris/types/EmployeeRequestEmploymentStatus.ts +++ b/src/api/resources/hris/types/EmployeeRequestEmploymentStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employment status of the employee. diff --git a/src/api/resources/hris/types/EmployeeRequestEmploymentsItem.ts b/src/api/resources/hris/types/EmployeeRequestEmploymentsItem.ts index 7a8eed0ba..efc085223 100644 --- a/src/api/resources/hris/types/EmployeeRequestEmploymentsItem.ts +++ b/src/api/resources/hris/types/EmployeeRequestEmploymentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type EmployeeRequestEmploymentsItem = string | Merge.hris.Employment; diff --git a/src/api/resources/hris/types/EmployeeRequestEthnicity.ts b/src/api/resources/hris/types/EmployeeRequestEthnicity.ts index 7989ed605..d714de50e 100644 --- a/src/api/resources/hris/types/EmployeeRequestEthnicity.ts +++ b/src/api/resources/hris/types/EmployeeRequestEthnicity.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee's ethnicity. diff --git a/src/api/resources/hris/types/EmployeeRequestGender.ts b/src/api/resources/hris/types/EmployeeRequestGender.ts index 08aa223c6..46f5567e6 100644 --- a/src/api/resources/hris/types/EmployeeRequestGender.ts +++ b/src/api/resources/hris/types/EmployeeRequestGender.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee's gender. diff --git a/src/api/resources/hris/types/EmployeeRequestGroupsItem.ts b/src/api/resources/hris/types/EmployeeRequestGroupsItem.ts index 4efe3454f..4818e9ae2 100644 --- a/src/api/resources/hris/types/EmployeeRequestGroupsItem.ts +++ b/src/api/resources/hris/types/EmployeeRequestGroupsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type EmployeeRequestGroupsItem = string | Merge.hris.Group; diff --git a/src/api/resources/hris/types/EmployeeRequestHomeLocation.ts b/src/api/resources/hris/types/EmployeeRequestHomeLocation.ts index 96d428906..20fda8485 100644 --- a/src/api/resources/hris/types/EmployeeRequestHomeLocation.ts +++ b/src/api/resources/hris/types/EmployeeRequestHomeLocation.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee's home address. diff --git a/src/api/resources/hris/types/EmployeeRequestManager.ts b/src/api/resources/hris/types/EmployeeRequestManager.ts index 9e372d32e..ec3409954 100644 --- a/src/api/resources/hris/types/EmployeeRequestManager.ts +++ b/src/api/resources/hris/types/EmployeeRequestManager.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee ID of the employee's manager. diff --git a/src/api/resources/hris/types/EmployeeRequestMaritalStatus.ts b/src/api/resources/hris/types/EmployeeRequestMaritalStatus.ts index dd95f080f..0df150f91 100644 --- a/src/api/resources/hris/types/EmployeeRequestMaritalStatus.ts +++ b/src/api/resources/hris/types/EmployeeRequestMaritalStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee's filing status as related to marital status. diff --git a/src/api/resources/hris/types/EmployeeRequestPayGroup.ts b/src/api/resources/hris/types/EmployeeRequestPayGroup.ts index baee4ce40..61ba07d45 100644 --- a/src/api/resources/hris/types/EmployeeRequestPayGroup.ts +++ b/src/api/resources/hris/types/EmployeeRequestPayGroup.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee's pay group diff --git a/src/api/resources/hris/types/EmployeeRequestTeam.ts b/src/api/resources/hris/types/EmployeeRequestTeam.ts index 1675edf42..77ce5f5b9 100644 --- a/src/api/resources/hris/types/EmployeeRequestTeam.ts +++ b/src/api/resources/hris/types/EmployeeRequestTeam.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee's team. diff --git a/src/api/resources/hris/types/EmployeeRequestWorkLocation.ts b/src/api/resources/hris/types/EmployeeRequestWorkLocation.ts index 792871ab7..5a882bdd1 100644 --- a/src/api/resources/hris/types/EmployeeRequestWorkLocation.ts +++ b/src/api/resources/hris/types/EmployeeRequestWorkLocation.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee's work address. diff --git a/src/api/resources/hris/types/EmployeeResponse.ts b/src/api/resources/hris/types/EmployeeResponse.ts index 7954f8ca0..e40b775a9 100644 --- a/src/api/resources/hris/types/EmployeeResponse.ts +++ b/src/api/resources/hris/types/EmployeeResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface EmployeeResponse { model: Merge.hris.Employee; diff --git a/src/api/resources/hris/types/EmployeeTeam.ts b/src/api/resources/hris/types/EmployeeTeam.ts index 0fce3fba3..c9d61a03c 100644 --- a/src/api/resources/hris/types/EmployeeTeam.ts +++ b/src/api/resources/hris/types/EmployeeTeam.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee's team. diff --git a/src/api/resources/hris/types/EmployeeWorkLocation.ts b/src/api/resources/hris/types/EmployeeWorkLocation.ts index 56a325b9b..a53b28010 100644 --- a/src/api/resources/hris/types/EmployeeWorkLocation.ts +++ b/src/api/resources/hris/types/EmployeeWorkLocation.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee's work address. diff --git a/src/api/resources/hris/types/EmployerBenefit.ts b/src/api/resources/hris/types/EmployerBenefit.ts index 5a2b26239..63f4d6409 100644 --- a/src/api/resources/hris/types/EmployerBenefit.ts +++ b/src/api/resources/hris/types/EmployerBenefit.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The EmployerBenefit Object diff --git a/src/api/resources/hris/types/EmployerBenefitBenefitPlanType.ts b/src/api/resources/hris/types/EmployerBenefitBenefitPlanType.ts index 6ad30a3f4..5275c8352 100644 --- a/src/api/resources/hris/types/EmployerBenefitBenefitPlanType.ts +++ b/src/api/resources/hris/types/EmployerBenefitBenefitPlanType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The type of benefit plan. diff --git a/src/api/resources/hris/types/Employment.ts b/src/api/resources/hris/types/Employment.ts index 802b7a71f..7efe65109 100644 --- a/src/api/resources/hris/types/Employment.ts +++ b/src/api/resources/hris/types/Employment.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Employment Object diff --git a/src/api/resources/hris/types/EmploymentEmployee.ts b/src/api/resources/hris/types/EmploymentEmployee.ts index de7a5f208..7116b4a2a 100644 --- a/src/api/resources/hris/types/EmploymentEmployee.ts +++ b/src/api/resources/hris/types/EmploymentEmployee.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee holding this position. diff --git a/src/api/resources/hris/types/EmploymentEmploymentType.ts b/src/api/resources/hris/types/EmploymentEmploymentType.ts index ab5a127ee..e6050c39b 100644 --- a/src/api/resources/hris/types/EmploymentEmploymentType.ts +++ b/src/api/resources/hris/types/EmploymentEmploymentType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The position's type of employment. diff --git a/src/api/resources/hris/types/EmploymentFlsaStatus.ts b/src/api/resources/hris/types/EmploymentFlsaStatus.ts index 2255729a4..eebc31d5e 100644 --- a/src/api/resources/hris/types/EmploymentFlsaStatus.ts +++ b/src/api/resources/hris/types/EmploymentFlsaStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The position's FLSA status. diff --git a/src/api/resources/hris/types/EmploymentPayCurrency.ts b/src/api/resources/hris/types/EmploymentPayCurrency.ts index ef35b861f..e7bc54f17 100644 --- a/src/api/resources/hris/types/EmploymentPayCurrency.ts +++ b/src/api/resources/hris/types/EmploymentPayCurrency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The position's currency code. diff --git a/src/api/resources/hris/types/EmploymentPayFrequency.ts b/src/api/resources/hris/types/EmploymentPayFrequency.ts index c6e5b42f7..827431ef5 100644 --- a/src/api/resources/hris/types/EmploymentPayFrequency.ts +++ b/src/api/resources/hris/types/EmploymentPayFrequency.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The position's pay frequency. diff --git a/src/api/resources/hris/types/EmploymentPayGroup.ts b/src/api/resources/hris/types/EmploymentPayGroup.ts index 9cefea74a..b4f1a2adc 100644 --- a/src/api/resources/hris/types/EmploymentPayGroup.ts +++ b/src/api/resources/hris/types/EmploymentPayGroup.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employment's pay group diff --git a/src/api/resources/hris/types/EmploymentPayPeriod.ts b/src/api/resources/hris/types/EmploymentPayPeriod.ts index ca845d97f..878f03e55 100644 --- a/src/api/resources/hris/types/EmploymentPayPeriod.ts +++ b/src/api/resources/hris/types/EmploymentPayPeriod.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The time period this pay rate encompasses. diff --git a/src/api/resources/hris/types/ErrorValidationProblem.ts b/src/api/resources/hris/types/ErrorValidationProblem.ts index d94ef5515..4de03c957 100644 --- a/src/api/resources/hris/types/ErrorValidationProblem.ts +++ b/src/api/resources/hris/types/ErrorValidationProblem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ErrorValidationProblem { source?: Merge.hris.ValidationProblemSource; diff --git a/src/api/resources/hris/types/ExternalTargetFieldApiResponse.ts b/src/api/resources/hris/types/ExternalTargetFieldApiResponse.ts index b1ef6f760..b17a39e70 100644 --- a/src/api/resources/hris/types/ExternalTargetFieldApiResponse.ts +++ b/src/api/resources/hris/types/ExternalTargetFieldApiResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ExternalTargetFieldApiResponse { benefit?: Merge.hris.ExternalTargetFieldApi[]; diff --git a/src/api/resources/hris/types/FieldMappingApiInstance.ts b/src/api/resources/hris/types/FieldMappingApiInstance.ts index a60f0b50d..f46df9130 100644 --- a/src/api/resources/hris/types/FieldMappingApiInstance.ts +++ b/src/api/resources/hris/types/FieldMappingApiInstance.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstance { id?: string; diff --git a/src/api/resources/hris/types/FieldMappingApiInstanceRemoteField.ts b/src/api/resources/hris/types/FieldMappingApiInstanceRemoteField.ts index 1762af88e..f17f7fdcd 100644 --- a/src/api/resources/hris/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/api/resources/hris/types/FieldMappingApiInstanceRemoteField.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstanceRemoteField { remoteKeyName: string; diff --git a/src/api/resources/hris/types/FieldMappingApiInstanceResponse.ts b/src/api/resources/hris/types/FieldMappingApiInstanceResponse.ts index 61b51252d..50f3d4138 100644 --- a/src/api/resources/hris/types/FieldMappingApiInstanceResponse.ts +++ b/src/api/resources/hris/types/FieldMappingApiInstanceResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstanceResponse { benefit?: Merge.hris.FieldMappingApiInstance[]; diff --git a/src/api/resources/hris/types/FieldMappingInstanceResponse.ts b/src/api/resources/hris/types/FieldMappingInstanceResponse.ts index 798a822a0..b3b25cb1b 100644 --- a/src/api/resources/hris/types/FieldMappingInstanceResponse.ts +++ b/src/api/resources/hris/types/FieldMappingInstanceResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingInstanceResponse { model: Merge.hris.FieldMappingApiInstance; diff --git a/src/api/resources/hris/types/Group.ts b/src/api/resources/hris/types/Group.ts index 9341617a8..8d2eac6bd 100644 --- a/src/api/resources/hris/types/Group.ts +++ b/src/api/resources/hris/types/Group.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Group Object diff --git a/src/api/resources/hris/types/GroupType.ts b/src/api/resources/hris/types/GroupType.ts index e463210b5..46d38b9e1 100644 --- a/src/api/resources/hris/types/GroupType.ts +++ b/src/api/resources/hris/types/GroupType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The Group type returned directly from the third-party. diff --git a/src/api/resources/hris/types/IndividualCommonModelScopeDeserializer.ts b/src/api/resources/hris/types/IndividualCommonModelScopeDeserializer.ts index 2451ffbef..43427e9d9 100644 --- a/src/api/resources/hris/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/api/resources/hris/types/IndividualCommonModelScopeDeserializer.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface IndividualCommonModelScopeDeserializer { modelName: string; diff --git a/src/api/resources/hris/types/IndividualCommonModelScopeDeserializerRequest.ts b/src/api/resources/hris/types/IndividualCommonModelScopeDeserializerRequest.ts index d6fbf7f06..63d7286da 100644 --- a/src/api/resources/hris/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/api/resources/hris/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface IndividualCommonModelScopeDeserializerRequest { modelName: string; diff --git a/src/api/resources/hris/types/Issue.ts b/src/api/resources/hris/types/Issue.ts index f176d714c..5012ec6aa 100644 --- a/src/api/resources/hris/types/Issue.ts +++ b/src/api/resources/hris/types/Issue.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface Issue { id?: string; diff --git a/src/api/resources/hris/types/IssueStatus.ts b/src/api/resources/hris/types/IssueStatus.ts index 155ba4c75..9d84ae29f 100644 --- a/src/api/resources/hris/types/IssueStatus.ts +++ b/src/api/resources/hris/types/IssueStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Status of the issue. Options: ('ONGOING', 'RESOLVED') diff --git a/src/api/resources/hris/types/Location.ts b/src/api/resources/hris/types/Location.ts index 4a2d7d3ec..53f3a1ec8 100644 --- a/src/api/resources/hris/types/Location.ts +++ b/src/api/resources/hris/types/Location.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Location Object diff --git a/src/api/resources/hris/types/LocationCountry.ts b/src/api/resources/hris/types/LocationCountry.ts index 538c17a52..c2b6e00a0 100644 --- a/src/api/resources/hris/types/LocationCountry.ts +++ b/src/api/resources/hris/types/LocationCountry.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The location's country. diff --git a/src/api/resources/hris/types/LocationLocationType.ts b/src/api/resources/hris/types/LocationLocationType.ts index 2d95fe705..d825612e3 100644 --- a/src/api/resources/hris/types/LocationLocationType.ts +++ b/src/api/resources/hris/types/LocationLocationType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The location's type. Can be either WORK or HOME diff --git a/src/api/resources/hris/types/MetaResponse.ts b/src/api/resources/hris/types/MetaResponse.ts index 5dabf5fa5..4d0fb4d45 100644 --- a/src/api/resources/hris/types/MetaResponse.ts +++ b/src/api/resources/hris/types/MetaResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface MetaResponse { requestSchema: Record; diff --git a/src/api/resources/hris/types/MultipartFormFieldRequest.ts b/src/api/resources/hris/types/MultipartFormFieldRequest.ts index 74237164b..d9bf314f5 100644 --- a/src/api/resources/hris/types/MultipartFormFieldRequest.ts +++ b/src/api/resources/hris/types/MultipartFormFieldRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The MultipartFormField Object diff --git a/src/api/resources/hris/types/MultipartFormFieldRequestEncoding.ts b/src/api/resources/hris/types/MultipartFormFieldRequestEncoding.ts index 675078793..6a263e712 100644 --- a/src/api/resources/hris/types/MultipartFormFieldRequestEncoding.ts +++ b/src/api/resources/hris/types/MultipartFormFieldRequestEncoding.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The encoding of the value of `data`. Defaults to `RAW` if not defined. diff --git a/src/api/resources/hris/types/PaginatedAccountDetailsAndActionsList.ts b/src/api/resources/hris/types/PaginatedAccountDetailsAndActionsList.ts index a67d03562..ae16d7af7 100644 --- a/src/api/resources/hris/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/api/resources/hris/types/PaginatedAccountDetailsAndActionsList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAccountDetailsAndActionsList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedAuditLogEventList.ts b/src/api/resources/hris/types/PaginatedAuditLogEventList.ts index 7b4338b00..bba7f9ff6 100644 --- a/src/api/resources/hris/types/PaginatedAuditLogEventList.ts +++ b/src/api/resources/hris/types/PaginatedAuditLogEventList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAuditLogEventList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedBankInfoList.ts b/src/api/resources/hris/types/PaginatedBankInfoList.ts index 064895165..6cf1c8bb7 100644 --- a/src/api/resources/hris/types/PaginatedBankInfoList.ts +++ b/src/api/resources/hris/types/PaginatedBankInfoList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedBankInfoList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedBenefitList.ts b/src/api/resources/hris/types/PaginatedBenefitList.ts index 0e75b8fbe..0e5ac4b10 100644 --- a/src/api/resources/hris/types/PaginatedBenefitList.ts +++ b/src/api/resources/hris/types/PaginatedBenefitList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedBenefitList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedCompanyList.ts b/src/api/resources/hris/types/PaginatedCompanyList.ts index f18d38f27..6c237e93a 100644 --- a/src/api/resources/hris/types/PaginatedCompanyList.ts +++ b/src/api/resources/hris/types/PaginatedCompanyList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedCompanyList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedDependentList.ts b/src/api/resources/hris/types/PaginatedDependentList.ts index 301cc529a..f1e6fdc4d 100644 --- a/src/api/resources/hris/types/PaginatedDependentList.ts +++ b/src/api/resources/hris/types/PaginatedDependentList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedDependentList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedEmployeeList.ts b/src/api/resources/hris/types/PaginatedEmployeeList.ts index 0b615e266..9b59bbc76 100644 --- a/src/api/resources/hris/types/PaginatedEmployeeList.ts +++ b/src/api/resources/hris/types/PaginatedEmployeeList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedEmployeeList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedEmployeePayrollRunList.ts b/src/api/resources/hris/types/PaginatedEmployeePayrollRunList.ts index ada049f40..8d79dd60f 100644 --- a/src/api/resources/hris/types/PaginatedEmployeePayrollRunList.ts +++ b/src/api/resources/hris/types/PaginatedEmployeePayrollRunList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedEmployeePayrollRunList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedEmployerBenefitList.ts b/src/api/resources/hris/types/PaginatedEmployerBenefitList.ts index caf102f5c..730d5f20c 100644 --- a/src/api/resources/hris/types/PaginatedEmployerBenefitList.ts +++ b/src/api/resources/hris/types/PaginatedEmployerBenefitList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedEmployerBenefitList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedEmploymentList.ts b/src/api/resources/hris/types/PaginatedEmploymentList.ts index 0063096bc..6ea874305 100644 --- a/src/api/resources/hris/types/PaginatedEmploymentList.ts +++ b/src/api/resources/hris/types/PaginatedEmploymentList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedEmploymentList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedGroupList.ts b/src/api/resources/hris/types/PaginatedGroupList.ts index 034753c5d..2923fa4bf 100644 --- a/src/api/resources/hris/types/PaginatedGroupList.ts +++ b/src/api/resources/hris/types/PaginatedGroupList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedGroupList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedIssueList.ts b/src/api/resources/hris/types/PaginatedIssueList.ts index 35d93cd26..7766efde0 100644 --- a/src/api/resources/hris/types/PaginatedIssueList.ts +++ b/src/api/resources/hris/types/PaginatedIssueList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedIssueList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedLocationList.ts b/src/api/resources/hris/types/PaginatedLocationList.ts index 16e126f70..eb823551f 100644 --- a/src/api/resources/hris/types/PaginatedLocationList.ts +++ b/src/api/resources/hris/types/PaginatedLocationList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedLocationList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedPayGroupList.ts b/src/api/resources/hris/types/PaginatedPayGroupList.ts index 1ed62f330..9de835f28 100644 --- a/src/api/resources/hris/types/PaginatedPayGroupList.ts +++ b/src/api/resources/hris/types/PaginatedPayGroupList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedPayGroupList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedPayrollRunList.ts b/src/api/resources/hris/types/PaginatedPayrollRunList.ts index 82b8d7183..09d8f070d 100644 --- a/src/api/resources/hris/types/PaginatedPayrollRunList.ts +++ b/src/api/resources/hris/types/PaginatedPayrollRunList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedPayrollRunList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedSyncStatusList.ts b/src/api/resources/hris/types/PaginatedSyncStatusList.ts index c8f381531..6caca6033 100644 --- a/src/api/resources/hris/types/PaginatedSyncStatusList.ts +++ b/src/api/resources/hris/types/PaginatedSyncStatusList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedSyncStatusList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedTeamList.ts b/src/api/resources/hris/types/PaginatedTeamList.ts index 32b0ca83a..120eaacf7 100644 --- a/src/api/resources/hris/types/PaginatedTeamList.ts +++ b/src/api/resources/hris/types/PaginatedTeamList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedTeamList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedTimeOffBalanceList.ts b/src/api/resources/hris/types/PaginatedTimeOffBalanceList.ts index 03c4f2fb4..87d13bda4 100644 --- a/src/api/resources/hris/types/PaginatedTimeOffBalanceList.ts +++ b/src/api/resources/hris/types/PaginatedTimeOffBalanceList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedTimeOffBalanceList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedTimeOffList.ts b/src/api/resources/hris/types/PaginatedTimeOffList.ts index 11de0483f..31870f964 100644 --- a/src/api/resources/hris/types/PaginatedTimeOffList.ts +++ b/src/api/resources/hris/types/PaginatedTimeOffList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedTimeOffList { next?: string; diff --git a/src/api/resources/hris/types/PaginatedTimesheetEntryList.ts b/src/api/resources/hris/types/PaginatedTimesheetEntryList.ts index 3621d61bd..b8fecb3f8 100644 --- a/src/api/resources/hris/types/PaginatedTimesheetEntryList.ts +++ b/src/api/resources/hris/types/PaginatedTimesheetEntryList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedTimesheetEntryList { next?: string; diff --git a/src/api/resources/hris/types/PayGroup.ts b/src/api/resources/hris/types/PayGroup.ts index beebeb0b7..4dad95212 100644 --- a/src/api/resources/hris/types/PayGroup.ts +++ b/src/api/resources/hris/types/PayGroup.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The PayGroup Object diff --git a/src/api/resources/hris/types/PayrollRun.ts b/src/api/resources/hris/types/PayrollRun.ts index 4503de41e..0358a520c 100644 --- a/src/api/resources/hris/types/PayrollRun.ts +++ b/src/api/resources/hris/types/PayrollRun.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The PayrollRun Object diff --git a/src/api/resources/hris/types/PayrollRunRunState.ts b/src/api/resources/hris/types/PayrollRunRunState.ts index 95e02fac9..f76cda08b 100644 --- a/src/api/resources/hris/types/PayrollRunRunState.ts +++ b/src/api/resources/hris/types/PayrollRunRunState.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The state of the payroll run diff --git a/src/api/resources/hris/types/PayrollRunRunType.ts b/src/api/resources/hris/types/PayrollRunRunType.ts index 539ca400d..0e137fcee 100644 --- a/src/api/resources/hris/types/PayrollRunRunType.ts +++ b/src/api/resources/hris/types/PayrollRunRunType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The type of the payroll run diff --git a/src/api/resources/hris/types/RemoteFieldApi.ts b/src/api/resources/hris/types/RemoteFieldApi.ts index 8e17d7cde..3d3395f40 100644 --- a/src/api/resources/hris/types/RemoteFieldApi.ts +++ b/src/api/resources/hris/types/RemoteFieldApi.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldApi { schema: Record; diff --git a/src/api/resources/hris/types/RemoteFieldApiResponse.ts b/src/api/resources/hris/types/RemoteFieldApiResponse.ts index a86156f0d..5d7f9e2bf 100644 --- a/src/api/resources/hris/types/RemoteFieldApiResponse.ts +++ b/src/api/resources/hris/types/RemoteFieldApiResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldApiResponse { benefit?: Merge.hris.RemoteFieldApi[]; diff --git a/src/api/resources/hris/types/RemoteResponse.ts b/src/api/resources/hris/types/RemoteResponse.ts index 2936b2fe9..c7d2e5e76 100644 --- a/src/api/resources/hris/types/RemoteResponse.ts +++ b/src/api/resources/hris/types/RemoteResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The RemoteResponse Object diff --git a/src/api/resources/hris/types/RemoteResponseResponseType.ts b/src/api/resources/hris/types/RemoteResponseResponseType.ts index 1ce213456..90d3f9873 100644 --- a/src/api/resources/hris/types/RemoteResponseResponseType.ts +++ b/src/api/resources/hris/types/RemoteResponseResponseType.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type RemoteResponseResponseType = Merge.hris.ResponseTypeEnum | string; diff --git a/src/api/resources/hris/types/SyncStatus.ts b/src/api/resources/hris/types/SyncStatus.ts index 7680b9fbc..8e8af0334 100644 --- a/src/api/resources/hris/types/SyncStatus.ts +++ b/src/api/resources/hris/types/SyncStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The SyncStatus Object diff --git a/src/api/resources/hris/types/Tax.ts b/src/api/resources/hris/types/Tax.ts index 02bf7916c..1b2edee49 100644 --- a/src/api/resources/hris/types/Tax.ts +++ b/src/api/resources/hris/types/Tax.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Tax Object diff --git a/src/api/resources/hris/types/Team.ts b/src/api/resources/hris/types/Team.ts index ec45c98a3..7b217df2a 100644 --- a/src/api/resources/hris/types/Team.ts +++ b/src/api/resources/hris/types/Team.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Team Object diff --git a/src/api/resources/hris/types/TeamParentTeam.ts b/src/api/resources/hris/types/TeamParentTeam.ts index 15641f625..ad096044a 100644 --- a/src/api/resources/hris/types/TeamParentTeam.ts +++ b/src/api/resources/hris/types/TeamParentTeam.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The team's parent team. diff --git a/src/api/resources/hris/types/TimeOff.ts b/src/api/resources/hris/types/TimeOff.ts index b6df7d658..391711005 100644 --- a/src/api/resources/hris/types/TimeOff.ts +++ b/src/api/resources/hris/types/TimeOff.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The TimeOff Object diff --git a/src/api/resources/hris/types/TimeOffApprover.ts b/src/api/resources/hris/types/TimeOffApprover.ts index dc072c94d..858dd23dd 100644 --- a/src/api/resources/hris/types/TimeOffApprover.ts +++ b/src/api/resources/hris/types/TimeOffApprover.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The Merge ID of the employee with the ability to approve the time off request. diff --git a/src/api/resources/hris/types/TimeOffBalance.ts b/src/api/resources/hris/types/TimeOffBalance.ts index 7243024ac..a2a81125e 100644 --- a/src/api/resources/hris/types/TimeOffBalance.ts +++ b/src/api/resources/hris/types/TimeOffBalance.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The TimeOffBalance Object diff --git a/src/api/resources/hris/types/TimeOffBalanceEmployee.ts b/src/api/resources/hris/types/TimeOffBalanceEmployee.ts index e8519f2ac..541ff2f90 100644 --- a/src/api/resources/hris/types/TimeOffBalanceEmployee.ts +++ b/src/api/resources/hris/types/TimeOffBalanceEmployee.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee the balance belongs to. diff --git a/src/api/resources/hris/types/TimeOffBalancePolicyType.ts b/src/api/resources/hris/types/TimeOffBalancePolicyType.ts index a9ec63b81..b6eef5476 100644 --- a/src/api/resources/hris/types/TimeOffBalancePolicyType.ts +++ b/src/api/resources/hris/types/TimeOffBalancePolicyType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The policy type of this time off balance. diff --git a/src/api/resources/hris/types/TimeOffEmployee.ts b/src/api/resources/hris/types/TimeOffEmployee.ts index 2e9a765a4..0b94971af 100644 --- a/src/api/resources/hris/types/TimeOffEmployee.ts +++ b/src/api/resources/hris/types/TimeOffEmployee.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee requesting time off. diff --git a/src/api/resources/hris/types/TimeOffRequest.ts b/src/api/resources/hris/types/TimeOffRequest.ts index 8cb55cb92..1a5920603 100644 --- a/src/api/resources/hris/types/TimeOffRequest.ts +++ b/src/api/resources/hris/types/TimeOffRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The TimeOff Object diff --git a/src/api/resources/hris/types/TimeOffRequestApprover.ts b/src/api/resources/hris/types/TimeOffRequestApprover.ts index 8cfd06905..ef512e506 100644 --- a/src/api/resources/hris/types/TimeOffRequestApprover.ts +++ b/src/api/resources/hris/types/TimeOffRequestApprover.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The Merge ID of the employee with the ability to approve the time off request. diff --git a/src/api/resources/hris/types/TimeOffRequestEmployee.ts b/src/api/resources/hris/types/TimeOffRequestEmployee.ts index d1cc609e1..1aecc4b81 100644 --- a/src/api/resources/hris/types/TimeOffRequestEmployee.ts +++ b/src/api/resources/hris/types/TimeOffRequestEmployee.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The employee requesting time off. diff --git a/src/api/resources/hris/types/TimeOffRequestRequestType.ts b/src/api/resources/hris/types/TimeOffRequestRequestType.ts index 8f62f9d5c..1da7d3522 100644 --- a/src/api/resources/hris/types/TimeOffRequestRequestType.ts +++ b/src/api/resources/hris/types/TimeOffRequestRequestType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The type of time off request. diff --git a/src/api/resources/hris/types/TimeOffRequestStatus.ts b/src/api/resources/hris/types/TimeOffRequestStatus.ts index 028249ba4..5a6c497c9 100644 --- a/src/api/resources/hris/types/TimeOffRequestStatus.ts +++ b/src/api/resources/hris/types/TimeOffRequestStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The status of this time off request. diff --git a/src/api/resources/hris/types/TimeOffRequestType.ts b/src/api/resources/hris/types/TimeOffRequestType.ts index a921cb0e3..de3da71d3 100644 --- a/src/api/resources/hris/types/TimeOffRequestType.ts +++ b/src/api/resources/hris/types/TimeOffRequestType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The type of time off request. diff --git a/src/api/resources/hris/types/TimeOffRequestUnits.ts b/src/api/resources/hris/types/TimeOffRequestUnits.ts index 44e6b5b3e..2c9bfabaf 100644 --- a/src/api/resources/hris/types/TimeOffRequestUnits.ts +++ b/src/api/resources/hris/types/TimeOffRequestUnits.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The measurement that the third-party integration uses to count time requested. diff --git a/src/api/resources/hris/types/TimeOffResponse.ts b/src/api/resources/hris/types/TimeOffResponse.ts index 4ba76d259..70af636d5 100644 --- a/src/api/resources/hris/types/TimeOffResponse.ts +++ b/src/api/resources/hris/types/TimeOffResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface TimeOffResponse { model: Merge.hris.TimeOff; diff --git a/src/api/resources/hris/types/TimeOffStatus.ts b/src/api/resources/hris/types/TimeOffStatus.ts index 4cfd78b51..dd0b33097 100644 --- a/src/api/resources/hris/types/TimeOffStatus.ts +++ b/src/api/resources/hris/types/TimeOffStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The status of this time off request. diff --git a/src/api/resources/hris/types/TimeOffUnits.ts b/src/api/resources/hris/types/TimeOffUnits.ts index 90cfc31b4..95480b5e0 100644 --- a/src/api/resources/hris/types/TimeOffUnits.ts +++ b/src/api/resources/hris/types/TimeOffUnits.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The measurement that the third-party integration uses to count time requested. diff --git a/src/api/resources/hris/types/TimesheetEntryResponse.ts b/src/api/resources/hris/types/TimesheetEntryResponse.ts index ffc8210a2..0ed6c4fee 100644 --- a/src/api/resources/hris/types/TimesheetEntryResponse.ts +++ b/src/api/resources/hris/types/TimesheetEntryResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface TimesheetEntryResponse { model: Merge.hris.TimesheetEntry; diff --git a/src/api/resources/hris/types/WarningValidationProblem.ts b/src/api/resources/hris/types/WarningValidationProblem.ts index 777efd04d..a8e984c38 100644 --- a/src/api/resources/hris/types/WarningValidationProblem.ts +++ b/src/api/resources/hris/types/WarningValidationProblem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface WarningValidationProblem { source?: Merge.hris.ValidationProblemSource; diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index 822a7f79d..2f8c56430 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -1,6 +1,6 @@ -export * as filestorage from "./filestorage"; export * as ats from "./ats"; +export * as filestorage from "./filestorage"; export * as crm from "./crm"; -export * as hris from "./hris"; export * as ticketing from "./ticketing"; +export * as hris from "./hris"; export * as accounting from "./accounting"; diff --git a/src/api/resources/ticketing/client/Client.ts b/src/api/resources/ticketing/client/Client.ts index 5dd370978..ca680e703 100644 --- a/src/api/resources/ticketing/client/Client.ts +++ b/src/api/resources/ticketing/client/Client.ts @@ -37,13 +37,22 @@ export declare namespace Ticketing { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } diff --git a/src/api/resources/ticketing/resources/accountDetails/client/Client.ts b/src/api/resources/ticketing/resources/accountDetails/client/Client.ts index a1aca25ab..3c9a94f72 100644 --- a/src/api/resources/ticketing/resources/accountDetails/client/Client.ts +++ b/src/api/resources/ticketing/resources/accountDetails/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AccountDetails { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class AccountDetails { /** * Get details for a linked account. * + * @param {AccountDetails.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.accountDetails.retrieve() + * await client.ticketing.accountDetails.retrieve() */ public async retrieve(requestOptions?: AccountDetails.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class AccountDetails { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.AccountDetails.parseOrThrow(_response.body, { + return serializers.ticketing.AccountDetails.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class AccountDetails { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/account-details."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -85,7 +102,7 @@ export class AccountDetails { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/accountToken/client/Client.ts b/src/api/resources/ticketing/resources/accountToken/client/Client.ts index 68f3f96c1..87a09a919 100644 --- a/src/api/resources/ticketing/resources/accountToken/client/Client.ts +++ b/src/api/resources/ticketing/resources/accountToken/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AccountToken { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class AccountToken { /** * Returns the account token for the end user with the provided public token. * + * @param {string} publicToken + * @param {AccountToken.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.accountToken.retrieve("public_token") + * await client.ticketing.accountToken.retrieve("public_token") */ public async retrieve( publicToken: string, @@ -39,7 +51,7 @@ export class AccountToken { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/account-token/${publicToken}` + `ticketing/v1/account-token/${encodeURIComponent(publicToken)}` ), method: "GET", headers: { @@ -50,14 +62,20 @@ export class AccountToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.AccountToken.parseOrThrow(_response.body, { + return serializers.ticketing.AccountToken.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -80,7 +98,9 @@ export class AccountToken { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/account-token/{public_token}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -88,7 +108,7 @@ export class AccountToken { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/accounts/client/Client.ts b/src/api/resources/ticketing/resources/accounts/client/Client.ts index e00bc5783..ac1dfe7b7 100644 --- a/src/api/resources/ticketing/resources/accounts/client/Client.ts +++ b/src/api/resources/ticketing/resources/accounts/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Accounts { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Accounts { /** * Returns a list of `Account` objects. * + * @param {Merge.ticketing.AccountsListRequest} request + * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.accounts.list({}) + * await client.ticketing.accounts.list() */ public async list( request: Merge.ticketing.AccountsListRequest = {}, @@ -48,7 +60,7 @@ export class Accounts { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,15 +115,21 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedAccountList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedAccountList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -134,7 +152,7 @@ export class Accounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/accounts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -145,8 +163,12 @@ export class Accounts { /** * Returns an `Account` object with the given `id`. * + * @param {string} id + * @param {Merge.ticketing.AccountsRetrieveRequest} request + * @param {Accounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.accounts.retrieve("id", {}) + * await client.ticketing.accounts.retrieve("id") */ public async retrieve( id: string, @@ -154,7 +176,7 @@ export class Accounts { requestOptions?: Accounts.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -162,7 +184,7 @@ export class Accounts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/accounts/${id}` + `ticketing/v1/accounts/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -173,15 +195,21 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.Account.parseOrThrow(_response.body, { + return serializers.ticketing.Account.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -204,7 +232,7 @@ export class Accounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/accounts/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -212,7 +240,7 @@ export class Accounts { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/accounts/client/requests/index.ts b/src/api/resources/ticketing/resources/accounts/client/requests/index.ts index 4e5a901a0..ef5727185 100644 --- a/src/api/resources/ticketing/resources/accounts/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/accounts/client/requests/index.ts @@ -1,2 +1,2 @@ -export { AccountsListRequest } from "./AccountsListRequest"; -export { AccountsRetrieveRequest } from "./AccountsRetrieveRequest"; +export { type AccountsListRequest } from "./AccountsListRequest"; +export { type AccountsRetrieveRequest } from "./AccountsRetrieveRequest"; diff --git a/src/api/resources/ticketing/resources/asyncPassthrough/client/Client.ts b/src/api/resources/ticketing/resources/asyncPassthrough/client/Client.ts index b45ff55e5..12d8dd13b 100644 --- a/src/api/resources/ticketing/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/ticketing/resources/asyncPassthrough/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace AsyncPassthrough { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,9 +38,12 @@ export class AsyncPassthrough { /** * Asynchronously pull data from an endpoint not currently supported by Merge. * + * @param {Merge.ticketing.DataPassthroughRequest} request + * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.asyncPassthrough.create({ - * method: Merge.ticketing.MethodEnum.Get, + * await client.ticketing.asyncPassthrough.create({ + * method: "GET", * path: "/scooters" * }) */ @@ -53,17 +65,23 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ticketing.DataPassthroughRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.ticketing.DataPassthroughRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.AsyncPassthroughReciept.parseOrThrow(_response.body, { + return serializers.ticketing.AsyncPassthroughReciept.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +104,9 @@ export class AsyncPassthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /ticketing/v1/async-passthrough." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -96,6 +116,12 @@ export class AsyncPassthrough { /** * Retrieves data from earlier async-passthrough POST request + * + * @param {string} asyncPassthroughReceiptId + * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.ticketing.asyncPassthrough.retrieve("async_passthrough_receipt_id") */ public async retrieve( asyncPassthroughReceiptId: string, @@ -104,7 +130,7 @@ export class AsyncPassthrough { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/async-passthrough/${asyncPassthroughReceiptId}` + `ticketing/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}` ), method: "GET", headers: { @@ -115,14 +141,20 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { + return serializers.ticketing.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +177,9 @@ export class AsyncPassthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/async-passthrough/{async_passthrough_receipt_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -153,7 +187,7 @@ export class AsyncPassthrough { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/api/resources/ticketing/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts index 3953a313d..a764f145e 100644 --- a/src/api/resources/ticketing/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts +++ b/src/api/resources/ticketing/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; export type AsyncPassthroughRetrieveResponse = Merge.ticketing.RemoteResponse | string; diff --git a/src/api/resources/ticketing/resources/attachments/client/Client.ts b/src/api/resources/ticketing/resources/attachments/client/Client.ts index ba1c3aaef..12df75009 100644 --- a/src/api/resources/ticketing/resources/attachments/client/Client.ts +++ b/src/api/resources/ticketing/resources/attachments/client/Client.ts @@ -4,23 +4,32 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; import * as stream from "stream"; export declare namespace Attachments { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -30,8 +39,11 @@ export class Attachments { /** * Returns a list of `Attachment` objects. * + * @param {Merge.ticketing.AttachmentsListRequest} request + * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.attachments.list({}) + * await client.ticketing.attachments.list() */ public async list( request: Merge.ticketing.AttachmentsListRequest = {}, @@ -52,7 +64,7 @@ export class Attachments { remoteId, ticketId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -119,15 +131,21 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedAttachmentList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedAttachmentList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -150,7 +168,7 @@ export class Attachments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/attachments."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -161,8 +179,11 @@ export class Attachments { /** * Creates an `Attachment` object with the given values. * + * @param {Merge.ticketing.TicketingAttachmentEndpointRequest} request + * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.attachments.create({ + * await client.ticketing.attachments.create({ * model: {} * }) */ @@ -171,7 +192,7 @@ export class Attachments { requestOptions?: Attachments.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -194,18 +215,24 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.ticketing.TicketingAttachmentEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.ticketing.TicketingAttachmentEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.TicketingAttachmentResponse.parseOrThrow(_response.body, { + return serializers.ticketing.TicketingAttachmentResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -228,7 +255,7 @@ export class Attachments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ticketing/v1/attachments."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -239,8 +266,12 @@ export class Attachments { /** * Returns an `Attachment` object with the given `id`. * + * @param {string} id + * @param {Merge.ticketing.AttachmentsRetrieveRequest} request + * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.attachments.retrieve("id", {}) + * await client.ticketing.attachments.retrieve("id") */ public async retrieve( id: string, @@ -248,7 +279,7 @@ export class Attachments { requestOptions?: Attachments.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -260,7 +291,7 @@ export class Attachments { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/attachments/${id}` + `ticketing/v1/attachments/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -271,15 +302,21 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.Attachment.parseOrThrow(_response.body, { + return serializers.ticketing.Attachment.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -302,7 +339,7 @@ export class Attachments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/attachments/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -319,7 +356,7 @@ export class Attachments { requestOptions?: Attachments.RequestOptions ): Promise { const { mimeType } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (mimeType != null) { _queryParams["mime_type"] = mimeType; } @@ -327,7 +364,7 @@ export class Attachments { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/attachments/${id}/download` + `ticketing/v1/attachments/${encodeURIComponent(id)}/download` ), method: "GET", headers: { @@ -338,13 +375,19 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", responseType: "streaming", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return _response.body; @@ -364,7 +407,9 @@ export class Attachments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/attachments/{id}/download." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -375,8 +420,10 @@ export class Attachments { /** * Returns metadata for `TicketingAttachment` POSTs. * + * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.attachments.metaPostRetrieve() + * await client.ticketing.attachments.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Attachments.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -393,14 +440,20 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { + return serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -423,7 +476,9 @@ export class Attachments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/attachments/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -431,7 +486,7 @@ export class Attachments { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsDownloadRetrieveRequest.ts b/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsDownloadRetrieveRequest.ts index 56880d919..5e77c0137 100644 --- a/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsDownloadRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/attachments/client/requests/AttachmentsDownloadRetrieveRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * mimeType: "string" + * } + */ export interface AttachmentsDownloadRetrieveRequest { /** * If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article. diff --git a/src/api/resources/ticketing/resources/attachments/client/requests/TicketingAttachmentEndpointRequest.ts b/src/api/resources/ticketing/resources/attachments/client/requests/TicketingAttachmentEndpointRequest.ts index 495781924..294e042c5 100644 --- a/src/api/resources/ticketing/resources/attachments/client/requests/TicketingAttachmentEndpointRequest.ts +++ b/src/api/resources/ticketing/resources/attachments/client/requests/TicketingAttachmentEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/attachments/client/requests/index.ts b/src/api/resources/ticketing/resources/attachments/client/requests/index.ts index 14d606dc1..b2a4fc15f 100644 --- a/src/api/resources/ticketing/resources/attachments/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/attachments/client/requests/index.ts @@ -1,4 +1,4 @@ -export { AttachmentsListRequest } from "./AttachmentsListRequest"; -export { TicketingAttachmentEndpointRequest } from "./TicketingAttachmentEndpointRequest"; -export { AttachmentsRetrieveRequest } from "./AttachmentsRetrieveRequest"; -export { AttachmentsDownloadRetrieveRequest } from "./AttachmentsDownloadRetrieveRequest"; +export { type AttachmentsListRequest } from "./AttachmentsListRequest"; +export { type TicketingAttachmentEndpointRequest } from "./TicketingAttachmentEndpointRequest"; +export { type AttachmentsRetrieveRequest } from "./AttachmentsRetrieveRequest"; +export { type AttachmentsDownloadRetrieveRequest } from "./AttachmentsDownloadRetrieveRequest"; diff --git a/src/api/resources/ticketing/resources/auditTrail/client/Client.ts b/src/api/resources/ticketing/resources/auditTrail/client/Client.ts index 69d7c33e9..44c40e641 100644 --- a/src/api/resources/ticketing/resources/auditTrail/client/Client.ts +++ b/src/api/resources/ticketing/resources/auditTrail/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AuditTrail { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,15 +38,18 @@ export class AuditTrail { /** * Gets a list of audit trail events. * + * @param {Merge.ticketing.AuditTrailListRequest} request + * @param {AuditTrail.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.auditTrail.list({}) + * await client.ticketing.auditTrail.list() */ public async list( request: Merge.ticketing.AuditTrailListRequest = {}, requestOptions?: AuditTrail.RequestOptions ): Promise { const { cursor, endDate, eventType, pageSize, startDate, userEmail } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -76,15 +88,21 @@ export class AuditTrail { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedAuditLogEventList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedAuditLogEventList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -107,7 +125,7 @@ export class AuditTrail { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/audit-trail."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -115,7 +133,7 @@ export class AuditTrail { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/auditTrail/client/requests/index.ts b/src/api/resources/ticketing/resources/auditTrail/client/requests/index.ts index ddce9e786..2c0762c28 100644 --- a/src/api/resources/ticketing/resources/auditTrail/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/auditTrail/client/requests/index.ts @@ -1 +1 @@ -export { AuditTrailListRequest } from "./AuditTrailListRequest"; +export { type AuditTrailListRequest } from "./AuditTrailListRequest"; diff --git a/src/api/resources/ticketing/resources/availableActions/client/Client.ts b/src/api/resources/ticketing/resources/availableActions/client/Client.ts index 38b644944..7bce691bf 100644 --- a/src/api/resources/ticketing/resources/availableActions/client/Client.ts +++ b/src/api/resources/ticketing/resources/availableActions/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace AvailableActions { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class AvailableActions { /** * Returns a list of models and actions available for an account. * + * @param {AvailableActions.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.availableActions.retrieve() + * await client.ticketing.availableActions.retrieve() */ public async retrieve(requestOptions?: AvailableActions.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class AvailableActions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.AvailableActions.parseOrThrow(_response.body, { + return serializers.ticketing.AvailableActions.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,9 @@ export class AvailableActions { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/available-actions." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -85,7 +104,7 @@ export class AvailableActions { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/collections/client/Client.ts b/src/api/resources/ticketing/resources/collections/client/Client.ts index 453d8fca1..0234cdefb 100644 --- a/src/api/resources/ticketing/resources/collections/client/Client.ts +++ b/src/api/resources/ticketing/resources/collections/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Collections { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Collections { /** * Returns a list of `Collection` objects. * + * @param {Merge.ticketing.CollectionsListRequest} request + * @param {Collections.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.collections.list({}) + * await client.ticketing.collections.list() */ public async list( request: Merge.ticketing.CollectionsListRequest = {}, @@ -53,7 +65,7 @@ export class Collections { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (collectionType != null) { _queryParams["collection_type"] = collectionType; } @@ -128,15 +140,21 @@ export class Collections { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedCollectionList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedCollectionList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -159,7 +177,7 @@ export class Collections { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/collections."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -170,8 +188,12 @@ export class Collections { /** * Returns a `Collection` object with the given `id`. * + * @param {string} id + * @param {Merge.ticketing.CollectionsRetrieveRequest} request + * @param {Collections.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.collections.retrieve("id", {}) + * await client.ticketing.collections.retrieve("id") */ public async retrieve( id: string, @@ -179,7 +201,7 @@ export class Collections { requestOptions?: Collections.RequestOptions ): Promise { const { expand, includeRemoteData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -199,7 +221,7 @@ export class Collections { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/collections/${id}` + `ticketing/v1/collections/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -210,15 +232,21 @@ export class Collections { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.Collection.parseOrThrow(_response.body, { + return serializers.ticketing.Collection.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -241,7 +269,7 @@ export class Collections { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/collections/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -252,8 +280,12 @@ export class Collections { /** * Returns a list of `User` objects. * + * @param {string} parentId + * @param {Merge.ticketing.CollectionsUsersListRequest} request + * @param {Collections.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.collections.usersList("parent_id", {}) + * await client.ticketing.collections.usersList("parent_id") */ public async usersList( parentId: string, @@ -261,7 +293,7 @@ export class Collections { requestOptions?: Collections.RequestOptions ): Promise { const { cursor, expand, includeDeletedData, includeRemoteData, includeShellData, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -289,7 +321,7 @@ export class Collections { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/collections/${parentId}/users` + `ticketing/v1/collections/${encodeURIComponent(parentId)}/users` ), method: "GET", headers: { @@ -300,15 +332,21 @@ export class Collections { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedUserList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedUserList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -331,7 +369,9 @@ export class Collections { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/collections/{parent_id}/users." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -339,7 +379,7 @@ export class Collections { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/collections/client/requests/CollectionsUsersListRequest.ts b/src/api/resources/ticketing/resources/collections/client/requests/CollectionsUsersListRequest.ts index e1e059e79..5c8f2b084 100644 --- a/src/api/resources/ticketing/resources/collections/client/requests/CollectionsUsersListRequest.ts +++ b/src/api/resources/ticketing/resources/collections/client/requests/CollectionsUsersListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/collections/client/requests/index.ts b/src/api/resources/ticketing/resources/collections/client/requests/index.ts index 0237c4500..41428534d 100644 --- a/src/api/resources/ticketing/resources/collections/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/collections/client/requests/index.ts @@ -1,3 +1,3 @@ -export { CollectionsListRequest } from "./CollectionsListRequest"; -export { CollectionsRetrieveRequest } from "./CollectionsRetrieveRequest"; -export { CollectionsUsersListRequest } from "./CollectionsUsersListRequest"; +export { type CollectionsListRequest } from "./CollectionsListRequest"; +export { type CollectionsRetrieveRequest } from "./CollectionsRetrieveRequest"; +export { type CollectionsUsersListRequest } from "./CollectionsUsersListRequest"; diff --git a/src/api/resources/ticketing/resources/comments/client/Client.ts b/src/api/resources/ticketing/resources/comments/client/Client.ts index ebc3255eb..26d40bc39 100644 --- a/src/api/resources/ticketing/resources/comments/client/Client.ts +++ b/src/api/resources/ticketing/resources/comments/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Comments { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Comments { /** * Returns a list of `Comment` objects. * + * @param {Merge.ticketing.CommentsListRequest} request + * @param {Comments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.comments.list({}) + * await client.ticketing.comments.list() */ public async list( request: Merge.ticketing.CommentsListRequest = {}, @@ -51,7 +63,7 @@ export class Comments { remoteId, ticketId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -118,15 +130,21 @@ export class Comments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedCommentList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedCommentList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -149,7 +167,7 @@ export class Comments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/comments."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -160,8 +178,11 @@ export class Comments { /** * Creates a `Comment` object with the given values. * + * @param {Merge.ticketing.CommentEndpointRequest} request + * @param {Comments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.comments.create({ + * await client.ticketing.comments.create({ * model: {} * }) */ @@ -170,7 +191,7 @@ export class Comments { requestOptions?: Comments.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -193,18 +214,22 @@ export class Comments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.ticketing.CommentEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.ticketing.CommentEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.CommentResponse.parseOrThrow(_response.body, { + return serializers.ticketing.CommentResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -227,7 +252,7 @@ export class Comments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ticketing/v1/comments."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -238,8 +263,12 @@ export class Comments { /** * Returns a `Comment` object with the given `id`. * + * @param {string} id + * @param {Merge.ticketing.CommentsRetrieveRequest} request + * @param {Comments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.comments.retrieve("id", {}) + * await client.ticketing.comments.retrieve("id") */ public async retrieve( id: string, @@ -247,7 +276,7 @@ export class Comments { requestOptions?: Comments.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -259,7 +288,7 @@ export class Comments { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/comments/${id}` + `ticketing/v1/comments/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -270,15 +299,21 @@ export class Comments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.Comment.parseOrThrow(_response.body, { + return serializers.ticketing.Comment.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -301,7 +336,7 @@ export class Comments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/comments/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -312,8 +347,10 @@ export class Comments { /** * Returns metadata for `Comment` POSTs. * + * @param {Comments.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.comments.metaPostRetrieve() + * await client.ticketing.comments.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Comments.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -330,14 +367,20 @@ export class Comments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { + return serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -360,7 +403,9 @@ export class Comments { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/comments/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -368,7 +413,7 @@ export class Comments { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/comments/client/requests/CommentEndpointRequest.ts b/src/api/resources/ticketing/resources/comments/client/requests/CommentEndpointRequest.ts index b5a428e66..6df8becf7 100644 --- a/src/api/resources/ticketing/resources/comments/client/requests/CommentEndpointRequest.ts +++ b/src/api/resources/ticketing/resources/comments/client/requests/CommentEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/comments/client/requests/CommentsListRequest.ts b/src/api/resources/ticketing/resources/comments/client/requests/CommentsListRequest.ts index 22b851d93..2d20c345e 100644 --- a/src/api/resources/ticketing/resources/comments/client/requests/CommentsListRequest.ts +++ b/src/api/resources/ticketing/resources/comments/client/requests/CommentsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/comments/client/requests/CommentsRetrieveRequest.ts b/src/api/resources/ticketing/resources/comments/client/requests/CommentsRetrieveRequest.ts index c106d1e9e..bc0c00648 100644 --- a/src/api/resources/ticketing/resources/comments/client/requests/CommentsRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/comments/client/requests/CommentsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/comments/client/requests/index.ts b/src/api/resources/ticketing/resources/comments/client/requests/index.ts index 3cd2fcb5c..6f508eba6 100644 --- a/src/api/resources/ticketing/resources/comments/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/comments/client/requests/index.ts @@ -1,3 +1,3 @@ -export { CommentsListRequest } from "./CommentsListRequest"; -export { CommentEndpointRequest } from "./CommentEndpointRequest"; -export { CommentsRetrieveRequest } from "./CommentsRetrieveRequest"; +export { type CommentsListRequest } from "./CommentsListRequest"; +export { type CommentEndpointRequest } from "./CommentEndpointRequest"; +export { type CommentsRetrieveRequest } from "./CommentsRetrieveRequest"; diff --git a/src/api/resources/ticketing/resources/contacts/client/Client.ts b/src/api/resources/ticketing/resources/contacts/client/Client.ts index ac77c3089..5feadf3bf 100644 --- a/src/api/resources/ticketing/resources/contacts/client/Client.ts +++ b/src/api/resources/ticketing/resources/contacts/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Contacts { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Contacts { /** * Returns a list of `Contact` objects. * + * @param {Merge.ticketing.ContactsListRequest} request + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.contacts.list({}) + * await client.ticketing.contacts.list() */ public async list( request: Merge.ticketing.ContactsListRequest = {}, @@ -49,7 +61,7 @@ export class Contacts { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,15 +120,21 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedContactList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedContactList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -139,7 +157,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/contacts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -150,8 +168,11 @@ export class Contacts { /** * Creates a `Contact` object with the given values. * + * @param {Merge.ticketing.TicketingContactEndpointRequest} request + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.contacts.create({ + * await client.ticketing.contacts.create({ * model: {} * }) */ @@ -160,7 +181,7 @@ export class Contacts { requestOptions?: Contacts.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -183,18 +204,24 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.ticketing.TicketingContactEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.ticketing.TicketingContactEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.TicketingContactResponse.parseOrThrow(_response.body, { + return serializers.ticketing.TicketingContactResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -217,7 +244,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ticketing/v1/contacts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -228,8 +255,12 @@ export class Contacts { /** * Returns a `Contact` object with the given `id`. * + * @param {string} id + * @param {Merge.ticketing.ContactsRetrieveRequest} request + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.contacts.retrieve("id", {}) + * await client.ticketing.contacts.retrieve("id") */ public async retrieve( id: string, @@ -237,7 +268,7 @@ export class Contacts { requestOptions?: Contacts.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -249,7 +280,7 @@ export class Contacts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/contacts/${id}` + `ticketing/v1/contacts/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -260,15 +291,21 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.Contact.parseOrThrow(_response.body, { + return serializers.ticketing.Contact.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -291,7 +328,7 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/contacts/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -302,8 +339,10 @@ export class Contacts { /** * Returns metadata for `TicketingContact` POSTs. * + * @param {Contacts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.contacts.metaPostRetrieve() + * await client.ticketing.contacts.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Contacts.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -320,14 +359,20 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { + return serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -350,7 +395,9 @@ export class Contacts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/contacts/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -358,7 +405,7 @@ export class Contacts { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/contacts/client/requests/TicketingContactEndpointRequest.ts b/src/api/resources/ticketing/resources/contacts/client/requests/TicketingContactEndpointRequest.ts index 0a26516f2..a9cb7217e 100644 --- a/src/api/resources/ticketing/resources/contacts/client/requests/TicketingContactEndpointRequest.ts +++ b/src/api/resources/ticketing/resources/contacts/client/requests/TicketingContactEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/contacts/client/requests/index.ts b/src/api/resources/ticketing/resources/contacts/client/requests/index.ts index bee253f27..4b9e647c2 100644 --- a/src/api/resources/ticketing/resources/contacts/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/contacts/client/requests/index.ts @@ -1,3 +1,3 @@ -export { ContactsListRequest } from "./ContactsListRequest"; -export { TicketingContactEndpointRequest } from "./TicketingContactEndpointRequest"; -export { ContactsRetrieveRequest } from "./ContactsRetrieveRequest"; +export { type ContactsListRequest } from "./ContactsListRequest"; +export { type TicketingContactEndpointRequest } from "./TicketingContactEndpointRequest"; +export { type ContactsRetrieveRequest } from "./ContactsRetrieveRequest"; diff --git a/src/api/resources/ticketing/resources/deleteAccount/client/Client.ts b/src/api/resources/ticketing/resources/deleteAccount/client/Client.ts index a5bc91ef9..67f4ede6f 100644 --- a/src/api/resources/ticketing/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/ticketing/resources/deleteAccount/client/Client.ts @@ -5,19 +5,28 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace DeleteAccount { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -27,8 +36,10 @@ export class DeleteAccount { /** * Delete a linked account. * + * @param {DeleteAccount.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.deleteAccount.delete() + * await client.ticketing.deleteAccount.delete() */ public async delete(requestOptions?: DeleteAccount.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -45,11 +56,17 @@ export class DeleteAccount { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -69,7 +86,7 @@ export class DeleteAccount { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ticketing/v1/delete-account."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -77,7 +94,7 @@ export class DeleteAccount { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/fieldMapping/client/Client.ts b/src/api/resources/ticketing/resources/fieldMapping/client/Client.ts index 167ed403d..0db588619 100644 --- a/src/api/resources/ticketing/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/ticketing/resources/fieldMapping/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace FieldMapping { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class FieldMapping { /** * Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). * + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.fieldMapping.fieldMappingsRetrieve() + * await client.ticketing.fieldMapping.fieldMappingsRetrieve() */ public async fieldMappingsRetrieve( requestOptions?: FieldMapping.RequestOptions @@ -49,14 +60,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { + return serializers.ticketing.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +96,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/field-mappings."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -90,8 +107,11 @@ export class FieldMapping { /** * Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {Merge.ticketing.CreateFieldMappingRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.fieldMapping.fieldMappingsCreate({ + * await client.ticketing.fieldMapping.fieldMappingsCreate({ * targetFieldName: "example_target_field_name", * targetFieldDescription: "this is a example description of the target field", * remoteFieldTraversalPath: ["example_remote_field"], @@ -118,17 +138,23 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ticketing.CreateFieldMappingRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.ticketing.CreateFieldMappingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.ticketing.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -151,7 +177,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ticketing/v1/field-mappings."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -162,8 +188,11 @@ export class FieldMapping { /** * Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {string} fieldMappingId + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.fieldMapping.fieldMappingsDestroy("field_mapping_id") + * await client.ticketing.fieldMapping.fieldMappingsDestroy("field_mapping_id") */ public async fieldMappingsDestroy( fieldMappingId: string, @@ -172,7 +201,7 @@ export class FieldMapping { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/field-mappings/${fieldMappingId}` + `ticketing/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` ), method: "DELETE", headers: { @@ -183,14 +212,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.ticketing.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +248,9 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling DELETE /ticketing/v1/field-mappings/{field_mapping_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -224,8 +261,12 @@ export class FieldMapping { /** * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. * + * @param {string} fieldMappingId + * @param {Merge.ticketing.PatchedEditFieldMappingRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id", {}) + * await client.ticketing.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id") */ public async fieldMappingsPartialUpdate( fieldMappingId: string, @@ -235,7 +276,7 @@ export class FieldMapping { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/field-mappings/${fieldMappingId}` + `ticketing/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` ), method: "PATCH", headers: { @@ -246,17 +287,23 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ticketing.PatchedEditFieldMappingRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.ticketing.PatchedEditFieldMappingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + return serializers.ticketing.FieldMappingInstanceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -279,7 +326,9 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling PATCH /ticketing/v1/field-mappings/{field_mapping_id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -290,15 +339,18 @@ export class FieldMapping { /** * Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). * + * @param {Merge.ticketing.RemoteFieldsRetrieveRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.fieldMapping.remoteFieldsRetrieve({}) + * await client.ticketing.fieldMapping.remoteFieldsRetrieve() */ public async remoteFieldsRetrieve( request: Merge.ticketing.RemoteFieldsRetrieveRequest = {}, requestOptions?: FieldMapping.RequestOptions ): Promise { const { commonModels, includeExampleValues } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (commonModels != null) { _queryParams["common_models"] = commonModels; } @@ -321,15 +373,21 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.RemoteFieldApiResponse.parseOrThrow(_response.body, { + return serializers.ticketing.RemoteFieldApiResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -352,7 +410,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/remote-fields."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -363,8 +421,10 @@ export class FieldMapping { /** * Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). * + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.fieldMapping.targetFieldsRetrieve() + * await client.ticketing.fieldMapping.targetFieldsRetrieve() */ public async targetFieldsRetrieve( requestOptions?: FieldMapping.RequestOptions @@ -383,14 +443,20 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { + return serializers.ticketing.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -413,7 +479,7 @@ export class FieldMapping { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/target-fields."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -421,7 +487,7 @@ export class FieldMapping { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/fieldMapping/client/requests/index.ts b/src/api/resources/ticketing/resources/fieldMapping/client/requests/index.ts index cb93982a7..450f54c2b 100644 --- a/src/api/resources/ticketing/resources/fieldMapping/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/fieldMapping/client/requests/index.ts @@ -1,3 +1,3 @@ -export { CreateFieldMappingRequest } from "./CreateFieldMappingRequest"; -export { PatchedEditFieldMappingRequest } from "./PatchedEditFieldMappingRequest"; -export { RemoteFieldsRetrieveRequest } from "./RemoteFieldsRetrieveRequest"; +export { type CreateFieldMappingRequest } from "./CreateFieldMappingRequest"; +export { type PatchedEditFieldMappingRequest } from "./PatchedEditFieldMappingRequest"; +export { type RemoteFieldsRetrieveRequest } from "./RemoteFieldsRetrieveRequest"; diff --git a/src/api/resources/ticketing/resources/forceResync/client/Client.ts b/src/api/resources/ticketing/resources/forceResync/client/Client.ts index 3111273d8..d18b32aaf 100644 --- a/src/api/resources/ticketing/resources/forceResync/client/Client.ts +++ b/src/api/resources/ticketing/resources/forceResync/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace ForceResync { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class ForceResync { /** * Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. * + * @param {ForceResync.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.forceResync.syncStatusResyncCreate() + * await client.ticketing.forceResync.syncStatusResyncCreate() */ public async syncStatusResyncCreate( requestOptions?: ForceResync.RequestOptions @@ -49,23 +60,26 @@ export class ForceResync { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.forceResync.syncStatusResyncCreate.Response.parseOrThrow( - _response.body, - { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - } - ); + return serializers.ticketing.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); } if (_response.error.reason === "status-code") { @@ -82,7 +96,9 @@ export class ForceResync { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /ticketing/v1/sync-status/resync." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -90,7 +106,7 @@ export class ForceResync { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/generateKey/client/Client.ts b/src/api/resources/ticketing/resources/generateKey/client/Client.ts index 501595e12..3e8f354d4 100644 --- a/src/api/resources/ticketing/resources/generateKey/client/Client.ts +++ b/src/api/resources/ticketing/resources/generateKey/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace GenerateKey { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class GenerateKey { /** * Create a remote key. * + * @param {Merge.ticketing.GenerateRemoteKeyRequest} request + * @param {GenerateKey.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.generateKey.create({ + * await client.ticketing.generateKey.create({ * name: "Remote Deployment Key 1" * }) */ @@ -52,17 +64,23 @@ export class GenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ticketing.GenerateRemoteKeyRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.ticketing.GenerateRemoteKeyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.RemoteKey.parseOrThrow(_response.body, { + return serializers.ticketing.RemoteKey.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +103,7 @@ export class GenerateKey { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ticketing/v1/generate-key."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -93,7 +111,7 @@ export class GenerateKey { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/generateKey/client/requests/index.ts b/src/api/resources/ticketing/resources/generateKey/client/requests/index.ts index 0df6e7c8b..d8255223c 100644 --- a/src/api/resources/ticketing/resources/generateKey/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/generateKey/client/requests/index.ts @@ -1 +1 @@ -export { GenerateRemoteKeyRequest } from "./GenerateRemoteKeyRequest"; +export { type GenerateRemoteKeyRequest } from "./GenerateRemoteKeyRequest"; diff --git a/src/api/resources/ticketing/resources/issues/client/Client.ts b/src/api/resources/ticketing/resources/issues/client/Client.ts index d49253c78..e24f7b67e 100644 --- a/src/api/resources/ticketing/resources/issues/client/Client.ts +++ b/src/api/resources/ticketing/resources/issues/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Issues { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Issues { /** * Gets all issues for Organization. * + * @param {Merge.ticketing.IssuesListRequest} request + * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.issues.list({}) + * await client.ticketing.issues.list() */ public async list( request: Merge.ticketing.IssuesListRequest = {}, @@ -52,7 +64,7 @@ export class Issues { startDate, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountToken != null) { _queryParams["account_token"] = accountToken; } @@ -123,15 +135,21 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedIssueList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedIssueList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +172,7 @@ export class Issues { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/issues."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -165,14 +183,17 @@ export class Issues { /** * Get a specific issue. * + * @param {string} id + * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.issues.retrieve("id") + * await client.ticketing.issues.retrieve("id") */ public async retrieve(id: string, requestOptions?: Issues.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/issues/${id}` + `ticketing/v1/issues/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -183,14 +204,20 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.Issue.parseOrThrow(_response.body, { + return serializers.ticketing.Issue.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +240,7 @@ export class Issues { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/issues/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -221,7 +248,7 @@ export class Issues { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/issues/client/requests/IssuesListRequest.ts b/src/api/resources/ticketing/resources/issues/client/requests/IssuesListRequest.ts index f8ea7b057..e03eb3fdb 100644 --- a/src/api/resources/ticketing/resources/issues/client/requests/IssuesListRequest.ts +++ b/src/api/resources/ticketing/resources/issues/client/requests/IssuesListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/issues/client/requests/index.ts b/src/api/resources/ticketing/resources/issues/client/requests/index.ts index 278763f77..ad215d907 100644 --- a/src/api/resources/ticketing/resources/issues/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/issues/client/requests/index.ts @@ -1 +1 @@ -export { IssuesListRequest } from "./IssuesListRequest"; +export { type IssuesListRequest } from "./IssuesListRequest"; diff --git a/src/api/resources/ticketing/resources/linkToken/client/Client.ts b/src/api/resources/ticketing/resources/linkToken/client/Client.ts index 49f3ad1af..ab8aaa2f6 100644 --- a/src/api/resources/ticketing/resources/linkToken/client/Client.ts +++ b/src/api/resources/ticketing/resources/linkToken/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace LinkToken { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,12 +38,15 @@ export class LinkToken { /** * Creates a link token to be used when linking a new end user. * + * @param {Merge.ticketing.EndUserDetailsRequest} request + * @param {LinkToken.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.linkToken.create({ + * await client.ticketing.linkToken.create({ * endUserEmailAddress: "example@gmail.com", * endUserOrganizationName: "Test Organization", * endUserOriginId: "12345", - * categories: [Merge.ticketing.CategoriesEnum.Hris, Merge.ticketing.CategoriesEnum.Ats] + * categories: ["hris", "ats"] * }) */ public async create( @@ -55,17 +67,21 @@ export class LinkToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ticketing.EndUserDetailsRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.ticketing.EndUserDetailsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.LinkToken.parseOrThrow(_response.body, { + return serializers.ticketing.LinkToken.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -88,7 +104,7 @@ export class LinkToken { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ticketing/v1/link-token."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -96,7 +112,7 @@ export class LinkToken { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/linkToken/client/requests/EndUserDetailsRequest.ts b/src/api/resources/ticketing/resources/linkToken/client/requests/EndUserDetailsRequest.ts index 9a295a6b1..63e149a8e 100644 --- a/src/api/resources/ticketing/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/api/resources/ticketing/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example @@ -10,7 +10,7 @@ import * as Merge from "../../../../../.."; * endUserEmailAddress: "example@gmail.com", * endUserOrganizationName: "Test Organization", * endUserOriginId: "12345", - * categories: [Merge.ticketing.CategoriesEnum.Hris, Merge.ticketing.CategoriesEnum.Ats] + * categories: ["hris", "ats"] * } */ export interface EndUserDetailsRequest { diff --git a/src/api/resources/ticketing/resources/linkToken/client/requests/index.ts b/src/api/resources/ticketing/resources/linkToken/client/requests/index.ts index d94b44a3e..de1b7e67d 100644 --- a/src/api/resources/ticketing/resources/linkToken/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/linkToken/client/requests/index.ts @@ -1 +1 @@ -export { EndUserDetailsRequest } from "./EndUserDetailsRequest"; +export { type EndUserDetailsRequest } from "./EndUserDetailsRequest"; diff --git a/src/api/resources/ticketing/resources/linkedAccounts/client/Client.ts b/src/api/resources/ticketing/resources/linkedAccounts/client/Client.ts index 38e32ab66..b2016109c 100644 --- a/src/api/resources/ticketing/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/ticketing/resources/linkedAccounts/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace LinkedAccounts { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class LinkedAccounts { /** * List linked accounts for your organization. * + * @param {Merge.ticketing.LinkedAccountsListRequest} request + * @param {LinkedAccounts.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.linkedAccounts.list({}) + * await client.ticketing.linkedAccounts.list() */ public async list( request: Merge.ticketing.LinkedAccountsListRequest = {}, @@ -51,7 +63,7 @@ export class LinkedAccounts { pageSize, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (category != null) { _queryParams["category"] = category; } @@ -118,15 +130,21 @@ export class LinkedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -149,7 +167,7 @@ export class LinkedAccounts { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/linked-accounts."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -157,7 +175,7 @@ export class LinkedAccounts { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts b/src/api/resources/ticketing/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts index b52db2977..659b62831 100644 --- a/src/api/resources/ticketing/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts +++ b/src/api/resources/ticketing/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/linkedAccounts/client/requests/index.ts b/src/api/resources/ticketing/resources/linkedAccounts/client/requests/index.ts index ef755b09f..d28d7a17d 100644 --- a/src/api/resources/ticketing/resources/linkedAccounts/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/linkedAccounts/client/requests/index.ts @@ -1 +1 @@ -export { LinkedAccountsListRequest } from "./LinkedAccountsListRequest"; +export { type LinkedAccountsListRequest } from "./LinkedAccountsListRequest"; diff --git a/src/api/resources/ticketing/resources/passthrough/client/Client.ts b/src/api/resources/ticketing/resources/passthrough/client/Client.ts index f947b41e9..b29667132 100644 --- a/src/api/resources/ticketing/resources/passthrough/client/Client.ts +++ b/src/api/resources/ticketing/resources/passthrough/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace Passthrough { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,9 +38,12 @@ export class Passthrough { /** * Pull data from an endpoint not currently supported by Merge. * + * @param {Merge.ticketing.DataPassthroughRequest} request + * @param {Passthrough.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.passthrough.create({ - * method: Merge.ticketing.MethodEnum.Get, + * await client.ticketing.passthrough.create({ + * method: "GET", * path: "/scooters" * }) */ @@ -53,17 +65,23 @@ export class Passthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ticketing.DataPassthroughRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.ticketing.DataPassthroughRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.RemoteResponse.parseOrThrow(_response.body, { + return serializers.ticketing.RemoteResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +104,7 @@ export class Passthrough { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ticketing/v1/passthrough."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -94,7 +112,7 @@ export class Passthrough { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/projects/client/Client.ts b/src/api/resources/ticketing/resources/projects/client/Client.ts index 01f6e38da..fea861e78 100644 --- a/src/api/resources/ticketing/resources/projects/client/Client.ts +++ b/src/api/resources/ticketing/resources/projects/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Projects { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Projects { /** * Returns a list of `Project` objects. * + * @param {Merge.ticketing.ProjectsListRequest} request + * @param {Projects.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.projects.list({}) + * await client.ticketing.projects.list() */ public async list( request: Merge.ticketing.ProjectsListRequest = {}, @@ -48,7 +60,7 @@ export class Projects { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,15 +115,21 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedProjectList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedProjectList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -134,7 +152,7 @@ export class Projects { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/projects."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -145,8 +163,12 @@ export class Projects { /** * Returns a `Project` object with the given `id`. * + * @param {string} id + * @param {Merge.ticketing.ProjectsRetrieveRequest} request + * @param {Projects.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.projects.retrieve("id", {}) + * await client.ticketing.projects.retrieve("id") */ public async retrieve( id: string, @@ -154,7 +176,7 @@ export class Projects { requestOptions?: Projects.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -162,7 +184,7 @@ export class Projects { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/projects/${id}` + `ticketing/v1/projects/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -173,15 +195,21 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.Project.parseOrThrow(_response.body, { + return serializers.ticketing.Project.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -204,7 +232,7 @@ export class Projects { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/projects/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -215,8 +243,12 @@ export class Projects { /** * Returns a list of `User` objects. * + * @param {string} parentId + * @param {Merge.ticketing.ProjectsUsersListRequest} request + * @param {Projects.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.projects.usersList("parent_id", {}) + * await client.ticketing.projects.usersList("parent_id") */ public async usersList( parentId: string, @@ -224,7 +256,7 @@ export class Projects { requestOptions?: Projects.RequestOptions ): Promise { const { cursor, expand, includeDeletedData, includeRemoteData, includeShellData, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -252,7 +284,7 @@ export class Projects { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/projects/${parentId}/users` + `ticketing/v1/projects/${encodeURIComponent(parentId)}/users` ), method: "GET", headers: { @@ -263,15 +295,21 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedUserList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedUserList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -294,7 +332,9 @@ export class Projects { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/projects/{parent_id}/users." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -302,7 +342,7 @@ export class Projects { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/projects/client/requests/ProjectsUsersListRequest.ts b/src/api/resources/ticketing/resources/projects/client/requests/ProjectsUsersListRequest.ts index cdb3c9e4e..34e3b307c 100644 --- a/src/api/resources/ticketing/resources/projects/client/requests/ProjectsUsersListRequest.ts +++ b/src/api/resources/ticketing/resources/projects/client/requests/ProjectsUsersListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/projects/client/requests/index.ts b/src/api/resources/ticketing/resources/projects/client/requests/index.ts index 47fa56896..28ad602d2 100644 --- a/src/api/resources/ticketing/resources/projects/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/projects/client/requests/index.ts @@ -1,3 +1,3 @@ -export { ProjectsListRequest } from "./ProjectsListRequest"; -export { ProjectsRetrieveRequest } from "./ProjectsRetrieveRequest"; -export { ProjectsUsersListRequest } from "./ProjectsUsersListRequest"; +export { type ProjectsListRequest } from "./ProjectsListRequest"; +export { type ProjectsRetrieveRequest } from "./ProjectsRetrieveRequest"; +export { type ProjectsUsersListRequest } from "./ProjectsUsersListRequest"; diff --git a/src/api/resources/ticketing/resources/regenerateKey/client/Client.ts b/src/api/resources/ticketing/resources/regenerateKey/client/Client.ts index 4fd0bb354..407a46bf0 100644 --- a/src/api/resources/ticketing/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/ticketing/resources/regenerateKey/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace RegenerateKey { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class RegenerateKey { /** * Exchange remote keys. * + * @param {Merge.ticketing.RemoteKeyForRegenerationRequest} request + * @param {RegenerateKey.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.regenerateKey.create({ + * await client.ticketing.regenerateKey.create({ * name: "Remote Deployment Key 1" * }) */ @@ -52,17 +64,23 @@ export class RegenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ticketing.RemoteKeyForRegenerationRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.ticketing.RemoteKeyForRegenerationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.RemoteKey.parseOrThrow(_response.body, { + return serializers.ticketing.RemoteKey.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +103,7 @@ export class RegenerateKey { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ticketing/v1/regenerate-key."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -93,7 +111,7 @@ export class RegenerateKey { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/regenerateKey/client/requests/index.ts b/src/api/resources/ticketing/resources/regenerateKey/client/requests/index.ts index 2987ef933..09bb5dbd0 100644 --- a/src/api/resources/ticketing/resources/regenerateKey/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/regenerateKey/client/requests/index.ts @@ -1 +1 @@ -export { RemoteKeyForRegenerationRequest } from "./RemoteKeyForRegenerationRequest"; +export { type RemoteKeyForRegenerationRequest } from "./RemoteKeyForRegenerationRequest"; diff --git a/src/api/resources/ticketing/resources/roles/client/Client.ts b/src/api/resources/ticketing/resources/roles/client/Client.ts index 4f50e1ccb..02dedcfa4 100644 --- a/src/api/resources/ticketing/resources/roles/client/Client.ts +++ b/src/api/resources/ticketing/resources/roles/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Roles { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Roles { /** * Returns a list of `Role` objects. * + * @param {Merge.ticketing.RolesListRequest} request + * @param {Roles.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.roles.list({}) + * await client.ticketing.roles.list() */ public async list( request: Merge.ticketing.RolesListRequest = {}, @@ -48,7 +60,7 @@ export class Roles { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,15 +115,21 @@ export class Roles { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedRoleList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedRoleList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -134,7 +152,7 @@ export class Roles { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/roles."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -145,8 +163,12 @@ export class Roles { /** * Returns a `Role` object with the given `id`. * + * @param {string} id + * @param {Merge.ticketing.RolesRetrieveRequest} request + * @param {Roles.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.roles.retrieve("id", {}) + * await client.ticketing.roles.retrieve("id") */ public async retrieve( id: string, @@ -154,7 +176,7 @@ export class Roles { requestOptions?: Roles.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -162,7 +184,7 @@ export class Roles { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/roles/${id}` + `ticketing/v1/roles/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -173,15 +195,21 @@ export class Roles { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.Role.parseOrThrow(_response.body, { + return serializers.ticketing.Role.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -204,7 +232,7 @@ export class Roles { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/roles/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -212,7 +240,7 @@ export class Roles { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/roles/client/requests/index.ts b/src/api/resources/ticketing/resources/roles/client/requests/index.ts index d19663a57..f08615d99 100644 --- a/src/api/resources/ticketing/resources/roles/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/roles/client/requests/index.ts @@ -1,2 +1,2 @@ -export { RolesListRequest } from "./RolesListRequest"; -export { RolesRetrieveRequest } from "./RolesRetrieveRequest"; +export { type RolesListRequest } from "./RolesListRequest"; +export { type RolesRetrieveRequest } from "./RolesRetrieveRequest"; diff --git a/src/api/resources/ticketing/resources/scopes/client/Client.ts b/src/api/resources/ticketing/resources/scopes/client/Client.ts index 100592827..3a1a7ce4e 100644 --- a/src/api/resources/ticketing/resources/scopes/client/Client.ts +++ b/src/api/resources/ticketing/resources/scopes/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Scopes { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class Scopes { /** * Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). * + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.scopes.defaultScopesRetrieve() + * await client.ticketing.scopes.defaultScopesRetrieve() */ public async defaultScopesRetrieve( requestOptions?: Scopes.RequestOptions @@ -49,14 +60,20 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.ticketing.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +96,7 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/default-scopes."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -90,8 +107,10 @@ export class Scopes { /** * Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). * + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.scopes.linkedAccountScopesRetrieve() + * await client.ticketing.scopes.linkedAccountScopesRetrieve() */ public async linkedAccountScopesRetrieve( requestOptions?: Scopes.RequestOptions @@ -110,14 +129,20 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.ticketing.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -140,7 +165,9 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/linked-account-scopes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -151,8 +178,11 @@ export class Scopes { /** * Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) * + * @param {Merge.ticketing.LinkedAccountCommonModelScopeDeserializerRequest} request + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.scopes.linkedAccountScopesCreate({ + * await client.ticketing.scopes.linkedAccountScopesCreate({ * commonModels: [{ * modelName: "Employee", * modelPermissions: { @@ -191,17 +221,23 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ticketing.LinkedAccountCommonModelScopeDeserializerRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.ticketing.LinkedAccountCommonModelScopeDeserializerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.CommonModelScopeApi.parseOrThrow(_response.body, { + return serializers.ticketing.CommonModelScopeApi.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -224,7 +260,9 @@ export class Scopes { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /ticketing/v1/linked-account-scopes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -232,7 +270,7 @@ export class Scopes { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts b/src/api/resources/ticketing/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts index de9a5cfa3..0466b3904 100644 --- a/src/api/resources/ticketing/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/api/resources/ticketing/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/scopes/client/requests/index.ts b/src/api/resources/ticketing/resources/scopes/client/requests/index.ts index 28d8d7974..d193f008e 100644 --- a/src/api/resources/ticketing/resources/scopes/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/scopes/client/requests/index.ts @@ -1 +1 @@ -export { LinkedAccountCommonModelScopeDeserializerRequest } from "./LinkedAccountCommonModelScopeDeserializerRequest"; +export { type LinkedAccountCommonModelScopeDeserializerRequest } from "./LinkedAccountCommonModelScopeDeserializerRequest"; diff --git a/src/api/resources/ticketing/resources/syncStatus/client/Client.ts b/src/api/resources/ticketing/resources/syncStatus/client/Client.ts index b4363c606..dedbdf07c 100644 --- a/src/api/resources/ticketing/resources/syncStatus/client/Client.ts +++ b/src/api/resources/ticketing/resources/syncStatus/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace SyncStatus { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,15 +38,18 @@ export class SyncStatus { /** * Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). * + * @param {Merge.ticketing.SyncStatusListRequest} request + * @param {SyncStatus.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.syncStatus.list({}) + * await client.ticketing.syncStatus.list() */ public async list( request: Merge.ticketing.SyncStatusListRequest = {}, requestOptions?: SyncStatus.RequestOptions ): Promise { const { cursor, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -60,15 +72,21 @@ export class SyncStatus { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedSyncStatusList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedSyncStatusList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -91,7 +109,7 @@ export class SyncStatus { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/sync-status."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -99,7 +117,7 @@ export class SyncStatus { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/syncStatus/client/requests/index.ts b/src/api/resources/ticketing/resources/syncStatus/client/requests/index.ts index 58e9548fe..ef4f7c855 100644 --- a/src/api/resources/ticketing/resources/syncStatus/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/syncStatus/client/requests/index.ts @@ -1 +1 @@ -export { SyncStatusListRequest } from "./SyncStatusListRequest"; +export { type SyncStatusListRequest } from "./SyncStatusListRequest"; diff --git a/src/api/resources/ticketing/resources/tags/client/Client.ts b/src/api/resources/ticketing/resources/tags/client/Client.ts index 7b6aacb77..65e77823b 100644 --- a/src/api/resources/ticketing/resources/tags/client/Client.ts +++ b/src/api/resources/ticketing/resources/tags/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Tags { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Tags { /** * Returns a list of `Tag` objects. * + * @param {Merge.ticketing.TagsListRequest} request + * @param {Tags.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.tags.list({}) + * await client.ticketing.tags.list() */ public async list( request: Merge.ticketing.TagsListRequest = {}, @@ -48,7 +60,7 @@ export class Tags { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,15 +115,21 @@ export class Tags { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedTagList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedTagList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -134,7 +152,7 @@ export class Tags { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/tags."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -145,8 +163,12 @@ export class Tags { /** * Returns a `Tag` object with the given `id`. * + * @param {string} id + * @param {Merge.ticketing.TagsRetrieveRequest} request + * @param {Tags.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.tags.retrieve("id", {}) + * await client.ticketing.tags.retrieve("id") */ public async retrieve( id: string, @@ -154,7 +176,7 @@ export class Tags { requestOptions?: Tags.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -162,7 +184,7 @@ export class Tags { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/tags/${id}` + `ticketing/v1/tags/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -173,15 +195,21 @@ export class Tags { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.Tag.parseOrThrow(_response.body, { + return serializers.ticketing.Tag.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -204,7 +232,7 @@ export class Tags { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/tags/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -212,7 +240,7 @@ export class Tags { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/tags/client/requests/index.ts b/src/api/resources/ticketing/resources/tags/client/requests/index.ts index 87f9510af..55624eb0a 100644 --- a/src/api/resources/ticketing/resources/tags/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/tags/client/requests/index.ts @@ -1,2 +1,2 @@ -export { TagsListRequest } from "./TagsListRequest"; -export { TagsRetrieveRequest } from "./TagsRetrieveRequest"; +export { type TagsListRequest } from "./TagsListRequest"; +export { type TagsRetrieveRequest } from "./TagsRetrieveRequest"; diff --git a/src/api/resources/ticketing/resources/teams/client/Client.ts b/src/api/resources/ticketing/resources/teams/client/Client.ts index aad13223a..73bc83be7 100644 --- a/src/api/resources/ticketing/resources/teams/client/Client.ts +++ b/src/api/resources/ticketing/resources/teams/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Teams { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Teams { /** * Returns a list of `Team` objects. * + * @param {Merge.ticketing.TeamsListRequest} request + * @param {Teams.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.teams.list({}) + * await client.ticketing.teams.list() */ public async list( request: Merge.ticketing.TeamsListRequest = {}, @@ -48,7 +60,7 @@ export class Teams { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,15 +115,21 @@ export class Teams { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedTeamList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedTeamList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -134,7 +152,7 @@ export class Teams { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/teams."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -145,8 +163,12 @@ export class Teams { /** * Returns a `Team` object with the given `id`. * + * @param {string} id + * @param {Merge.ticketing.TeamsRetrieveRequest} request + * @param {Teams.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.teams.retrieve("id", {}) + * await client.ticketing.teams.retrieve("id") */ public async retrieve( id: string, @@ -154,7 +176,7 @@ export class Teams { requestOptions?: Teams.RequestOptions ): Promise { const { includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -162,7 +184,7 @@ export class Teams { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/teams/${id}` + `ticketing/v1/teams/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -173,15 +195,21 @@ export class Teams { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.Team.parseOrThrow(_response.body, { + return serializers.ticketing.Team.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -204,7 +232,7 @@ export class Teams { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/teams/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -212,7 +240,7 @@ export class Teams { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/teams/client/requests/index.ts b/src/api/resources/ticketing/resources/teams/client/requests/index.ts index 35a82ccee..d49b0677b 100644 --- a/src/api/resources/ticketing/resources/teams/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/teams/client/requests/index.ts @@ -1,2 +1,2 @@ -export { TeamsListRequest } from "./TeamsListRequest"; -export { TeamsRetrieveRequest } from "./TeamsRetrieveRequest"; +export { type TeamsListRequest } from "./TeamsListRequest"; +export { type TeamsRetrieveRequest } from "./TeamsRetrieveRequest"; diff --git a/src/api/resources/ticketing/resources/tickets/client/Client.ts b/src/api/resources/ticketing/resources/tickets/client/Client.ts index 423240583..d27acdb8f 100644 --- a/src/api/resources/ticketing/resources/tickets/client/Client.ts +++ b/src/api/resources/ticketing/resources/tickets/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Tickets { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Tickets { /** * Returns a list of `Ticket` objects. * + * @param {Merge.ticketing.TicketsListRequest} request + * @param {Tickets.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.tickets.list({}) + * await client.ticketing.tickets.list() */ public async list( request: Merge.ticketing.TicketsListRequest = {}, @@ -70,7 +82,7 @@ export class Tickets { ticketType, ticketUrl, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountId != null) { _queryParams["account_id"] = accountId; } @@ -213,15 +225,21 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedTicketList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedTicketList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -244,7 +262,7 @@ export class Tickets { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/tickets."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -255,8 +273,11 @@ export class Tickets { /** * Creates a `Ticket` object with the given values. * + * @param {Merge.ticketing.TicketEndpointRequest} request + * @param {Tickets.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.tickets.create({ + * await client.ticketing.tickets.create({ * model: {} * }) */ @@ -265,7 +286,7 @@ export class Tickets { requestOptions?: Tickets.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -288,18 +309,22 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.ticketing.TicketEndpointRequest.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.ticketing.TicketEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.TicketResponse.parseOrThrow(_response.body, { + return serializers.ticketing.TicketResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -322,7 +347,7 @@ export class Tickets { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling POST /ticketing/v1/tickets."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -333,8 +358,12 @@ export class Tickets { /** * Returns a `Ticket` object with the given `id`. * + * @param {string} id + * @param {Merge.ticketing.TicketsRetrieveRequest} request + * @param {Tickets.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.tickets.retrieve("id", {}) + * await client.ticketing.tickets.retrieve("id") */ public async retrieve( id: string, @@ -342,7 +371,7 @@ export class Tickets { requestOptions?: Tickets.RequestOptions ): Promise { const { expand, includeRemoteData, includeRemoteFields, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -366,7 +395,7 @@ export class Tickets { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/tickets/${id}` + `ticketing/v1/tickets/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -377,15 +406,21 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.Ticket.parseOrThrow(_response.body, { + return serializers.ticketing.Ticket.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -408,7 +443,7 @@ export class Tickets { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/tickets/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -419,8 +454,12 @@ export class Tickets { /** * Updates a `Ticket` object with the given `id`. * + * @param {string} id + * @param {Merge.ticketing.PatchedTicketEndpointRequest} request + * @param {Tickets.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.tickets.partialUpdate("id", { + * await client.ticketing.tickets.partialUpdate("id", { * model: {} * }) */ @@ -430,7 +469,7 @@ export class Tickets { requestOptions?: Tickets.RequestOptions ): Promise { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -442,7 +481,7 @@ export class Tickets { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/tickets/${id}` + `ticketing/v1/tickets/${encodeURIComponent(id)}` ), method: "PATCH", headers: { @@ -453,18 +492,24 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, - body: await serializers.ticketing.PatchedTicketEndpointRequest.jsonOrThrow(_body, { + requestType: "json", + body: serializers.ticketing.PatchedTicketEndpointRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.TicketResponse.parseOrThrow(_response.body, { + return serializers.ticketing.TicketResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -487,7 +532,7 @@ export class Tickets { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling PATCH /ticketing/v1/tickets/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -498,8 +543,12 @@ export class Tickets { /** * Returns a list of `User` objects. * + * @param {string} parentId + * @param {Merge.ticketing.TicketsCollaboratorsListRequest} request + * @param {Tickets.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.tickets.collaboratorsList("parent_id", {}) + * await client.ticketing.tickets.collaboratorsList("parent_id") */ public async collaboratorsList( parentId: string, @@ -507,7 +556,7 @@ export class Tickets { requestOptions?: Tickets.RequestOptions ): Promise { const { cursor, expand, includeDeletedData, includeRemoteData, includeShellData, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -535,7 +584,7 @@ export class Tickets { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/tickets/${parentId}/collaborators` + `ticketing/v1/tickets/${encodeURIComponent(parentId)}/collaborators` ), method: "GET", headers: { @@ -546,15 +595,21 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedUserList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedUserList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -577,7 +632,9 @@ export class Tickets { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/tickets/{parent_id}/collaborators." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -588,8 +645,11 @@ export class Tickets { /** * Returns metadata for `Ticket` PATCHs. * + * @param {string} id + * @param {Tickets.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.tickets.metaPatchRetrieve("id") + * await client.ticketing.tickets.metaPatchRetrieve("id") */ public async metaPatchRetrieve( id: string, @@ -598,7 +658,7 @@ export class Tickets { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/tickets/meta/patch/${id}` + `ticketing/v1/tickets/meta/patch/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -609,14 +669,20 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { + return serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -639,7 +705,9 @@ export class Tickets { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/tickets/meta/patch/{id}." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -650,8 +718,10 @@ export class Tickets { /** * Returns metadata for `Ticket` POSTs. * + * @param {Tickets.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.tickets.metaPostRetrieve() + * await client.ticketing.tickets.metaPostRetrieve() */ public async metaPostRetrieve(requestOptions?: Tickets.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -668,14 +738,20 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { + return serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -698,7 +774,9 @@ export class Tickets { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/tickets/meta/post." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -709,8 +787,11 @@ export class Tickets { /** * Returns a list of `RemoteFieldClass` objects. * + * @param {Merge.ticketing.TicketsRemoteFieldClassesListRequest} request + * @param {Tickets.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.tickets.remoteFieldClassesList({}) + * await client.ticketing.tickets.remoteFieldClassesList() */ public async remoteFieldClassesList( request: Merge.ticketing.TicketsRemoteFieldClassesListRequest = {}, @@ -718,7 +799,7 @@ export class Tickets { ): Promise { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -757,15 +838,21 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -788,7 +875,9 @@ export class Tickets { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/tickets/remote-field-classes." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -796,7 +885,7 @@ export class Tickets { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/tickets/client/requests/PatchedTicketEndpointRequest.ts b/src/api/resources/ticketing/resources/tickets/client/requests/PatchedTicketEndpointRequest.ts index 2c6196ab1..73a934d99 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/PatchedTicketEndpointRequest.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/PatchedTicketEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/tickets/client/requests/TicketEndpointRequest.ts b/src/api/resources/ticketing/resources/tickets/client/requests/TicketEndpointRequest.ts index 56983a36a..55a32abde 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/TicketEndpointRequest.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/TicketEndpointRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsCollaboratorsListRequest.ts b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsCollaboratorsListRequest.ts index 061bac985..8a6d84ac1 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsCollaboratorsListRequest.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsCollaboratorsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.ts b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.ts index 124d739fd..dc8aaab66 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsRetrieveRequest.ts b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsRetrieveRequest.ts index 5762863bf..ca6ae9d8f 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/tickets/client/requests/index.ts b/src/api/resources/ticketing/resources/tickets/client/requests/index.ts index 75e01fcab..742fc8f2b 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/index.ts @@ -1,6 +1,6 @@ -export { TicketsListRequest } from "./TicketsListRequest"; -export { TicketEndpointRequest } from "./TicketEndpointRequest"; -export { TicketsRetrieveRequest } from "./TicketsRetrieveRequest"; -export { PatchedTicketEndpointRequest } from "./PatchedTicketEndpointRequest"; -export { TicketsCollaboratorsListRequest } from "./TicketsCollaboratorsListRequest"; -export { TicketsRemoteFieldClassesListRequest } from "./TicketsRemoteFieldClassesListRequest"; +export { type TicketsListRequest } from "./TicketsListRequest"; +export { type TicketEndpointRequest } from "./TicketEndpointRequest"; +export { type TicketsRetrieveRequest } from "./TicketsRetrieveRequest"; +export { type PatchedTicketEndpointRequest } from "./PatchedTicketEndpointRequest"; +export { type TicketsCollaboratorsListRequest } from "./TicketsCollaboratorsListRequest"; +export { type TicketsRemoteFieldClassesListRequest } from "./TicketsRemoteFieldClassesListRequest"; diff --git a/src/api/resources/ticketing/resources/users/client/Client.ts b/src/api/resources/ticketing/resources/users/client/Client.ts index 5f2a097bd..b9a547418 100644 --- a/src/api/resources/ticketing/resources/users/client/Client.ts +++ b/src/api/resources/ticketing/resources/users/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Users { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,11 @@ export class Users { /** * Returns a list of `User` objects. * + * @param {Merge.ticketing.UsersListRequest} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.users.list({}) + * await client.ticketing.users.list() */ public async list( request: Merge.ticketing.UsersListRequest = {}, @@ -50,7 +62,7 @@ export class Users { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -113,15 +125,21 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.PaginatedUserList.parseOrThrow(_response.body, { + return serializers.ticketing.PaginatedUserList.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -144,7 +162,7 @@ export class Users { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/users."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -155,8 +173,12 @@ export class Users { /** * Returns a `User` object with the given `id`. * + * @param {string} id + * @param {Merge.ticketing.UsersRetrieveRequest} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.users.retrieve("id", {}) + * await client.ticketing.users.retrieve("id") */ public async retrieve( id: string, @@ -164,7 +186,7 @@ export class Users { requestOptions?: Users.RequestOptions ): Promise { const { expand, includeRemoteData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -176,7 +198,7 @@ export class Users { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/users/${id}` + `ticketing/v1/users/${encodeURIComponent(id)}` ), method: "GET", headers: { @@ -187,15 +209,21 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.User.parseOrThrow(_response.body, { + return serializers.ticketing.User.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -218,7 +246,7 @@ export class Users { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /ticketing/v1/users/{id}."); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -226,7 +254,7 @@ export class Users { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/users/client/requests/UsersListRequest.ts b/src/api/resources/ticketing/resources/users/client/requests/UsersListRequest.ts index c6f07f0a6..9de5e11b1 100644 --- a/src/api/resources/ticketing/resources/users/client/requests/UsersListRequest.ts +++ b/src/api/resources/ticketing/resources/users/client/requests/UsersListRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/users/client/requests/UsersRetrieveRequest.ts b/src/api/resources/ticketing/resources/users/client/requests/UsersRetrieveRequest.ts index 7adfbc7c4..5fa0e20ee 100644 --- a/src/api/resources/ticketing/resources/users/client/requests/UsersRetrieveRequest.ts +++ b/src/api/resources/ticketing/resources/users/client/requests/UsersRetrieveRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../../../../.."; +import * as Merge from "../../../../../../index"; /** * @example diff --git a/src/api/resources/ticketing/resources/users/client/requests/index.ts b/src/api/resources/ticketing/resources/users/client/requests/index.ts index df5bbab6e..7d1cf841a 100644 --- a/src/api/resources/ticketing/resources/users/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/users/client/requests/index.ts @@ -1,2 +1,2 @@ -export { UsersListRequest } from "./UsersListRequest"; -export { UsersRetrieveRequest } from "./UsersRetrieveRequest"; +export { type UsersListRequest } from "./UsersListRequest"; +export { type UsersRetrieveRequest } from "./UsersRetrieveRequest"; diff --git a/src/api/resources/ticketing/resources/webhookReceivers/client/Client.ts b/src/api/resources/ticketing/resources/webhookReceivers/client/Client.ts index 8e178c9cb..f43638bdd 100644 --- a/src/api/resources/ticketing/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/ticketing/resources/webhookReceivers/client/Client.ts @@ -4,22 +4,31 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Merge from "../../../../.."; +import * as Merge from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace WebhookReceivers { interface Options { environment?: core.Supplier; apiKey: core.Supplier; + /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; } } @@ -29,8 +38,10 @@ export class WebhookReceivers { /** * Returns a list of `WebhookReceiver` objects. * + * @param {WebhookReceivers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.webhookReceivers.list() + * await client.ticketing.webhookReceivers.list() */ public async list(requestOptions?: WebhookReceivers.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,14 +58,20 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.webhookReceivers.list.Response.parseOrThrow(_response.body, { + return serializers.ticketing.webhookReceivers.list.Response.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,9 @@ export class WebhookReceivers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling GET /ticketing/v1/webhook-receivers." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -88,8 +107,11 @@ export class WebhookReceivers { /** * Creates a `WebhookReceiver` object with the given values. * + * @param {Merge.ticketing.WebhookReceiverRequest} request + * @param {WebhookReceivers.RequestOptions} requestOptions - Request-specific configuration. + * * @example - * await merge.ticketing.webhookReceivers.create({ + * await client.ticketing.webhookReceivers.create({ * event: "event", * isActive: true * }) @@ -112,17 +134,23 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.0.12", + "X-Fern-SDK-Version": "1.1.0", + "User-Agent": "@mergeapi/merge-node-client/1.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, }, contentType: "application/json", - body: await serializers.ticketing.WebhookReceiverRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.ticketing.WebhookReceiverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.ticketing.WebhookReceiver.parseOrThrow(_response.body, { + return serializers.ticketing.WebhookReceiver.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +173,9 @@ export class WebhookReceivers { body: _response.error.rawBody, }); case "timeout": - throw new errors.MergeTimeoutError(); + throw new errors.MergeTimeoutError( + "Timeout exceeded when calling POST /ticketing/v1/webhook-receivers." + ); case "unknown": throw new errors.MergeError({ message: _response.error.errorMessage, @@ -153,7 +183,7 @@ export class WebhookReceivers { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; } } diff --git a/src/api/resources/ticketing/resources/webhookReceivers/client/requests/index.ts b/src/api/resources/ticketing/resources/webhookReceivers/client/requests/index.ts index 29f534250..1df76ea53 100644 --- a/src/api/resources/ticketing/resources/webhookReceivers/client/requests/index.ts +++ b/src/api/resources/ticketing/resources/webhookReceivers/client/requests/index.ts @@ -1 +1 @@ -export { WebhookReceiverRequest } from "./WebhookReceiverRequest"; +export { type WebhookReceiverRequest } from "./WebhookReceiverRequest"; diff --git a/src/api/resources/ticketing/types/Account.ts b/src/api/resources/ticketing/types/Account.ts index a2c2fa79e..2c147801a 100644 --- a/src/api/resources/ticketing/types/Account.ts +++ b/src/api/resources/ticketing/types/Account.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Account Object diff --git a/src/api/resources/ticketing/types/AccountDetails.ts b/src/api/resources/ticketing/types/AccountDetails.ts index 59df74212..291e0fef0 100644 --- a/src/api/resources/ticketing/types/AccountDetails.ts +++ b/src/api/resources/ticketing/types/AccountDetails.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountDetails { id?: string; diff --git a/src/api/resources/ticketing/types/AccountDetailsAndActions.ts b/src/api/resources/ticketing/types/AccountDetailsAndActions.ts index b118e75ae..93f19a6bb 100644 --- a/src/api/resources/ticketing/types/AccountDetailsAndActions.ts +++ b/src/api/resources/ticketing/types/AccountDetailsAndActions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The LinkedAccount Object diff --git a/src/api/resources/ticketing/types/AccountDetailsAndActionsIntegration.ts b/src/api/resources/ticketing/types/AccountDetailsAndActionsIntegration.ts index 5de94f081..7d6368c04 100644 --- a/src/api/resources/ticketing/types/AccountDetailsAndActionsIntegration.ts +++ b/src/api/resources/ticketing/types/AccountDetailsAndActionsIntegration.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountDetailsAndActionsIntegration { name: string; diff --git a/src/api/resources/ticketing/types/AccountIntegration.ts b/src/api/resources/ticketing/types/AccountIntegration.ts index 8dfc91f5e..bf598fd02 100644 --- a/src/api/resources/ticketing/types/AccountIntegration.ts +++ b/src/api/resources/ticketing/types/AccountIntegration.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountIntegration { /** Company name. */ diff --git a/src/api/resources/ticketing/types/AccountToken.ts b/src/api/resources/ticketing/types/AccountToken.ts index 4ba88143b..09049de19 100644 --- a/src/api/resources/ticketing/types/AccountToken.ts +++ b/src/api/resources/ticketing/types/AccountToken.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AccountToken { accountToken: string; diff --git a/src/api/resources/ticketing/types/Attachment.ts b/src/api/resources/ticketing/types/Attachment.ts index 09f678ef6..3a9dd0927 100644 --- a/src/api/resources/ticketing/types/Attachment.ts +++ b/src/api/resources/ticketing/types/Attachment.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Attachment Object diff --git a/src/api/resources/ticketing/types/AttachmentRequest.ts b/src/api/resources/ticketing/types/AttachmentRequest.ts index 98e0e7844..f352b6ca7 100644 --- a/src/api/resources/ticketing/types/AttachmentRequest.ts +++ b/src/api/resources/ticketing/types/AttachmentRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Attachment Object diff --git a/src/api/resources/ticketing/types/AttachmentRequestTicket.ts b/src/api/resources/ticketing/types/AttachmentRequestTicket.ts index 6fd313786..202f92eba 100644 --- a/src/api/resources/ticketing/types/AttachmentRequestTicket.ts +++ b/src/api/resources/ticketing/types/AttachmentRequestTicket.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The ticket associated with the attachment. diff --git a/src/api/resources/ticketing/types/AttachmentTicket.ts b/src/api/resources/ticketing/types/AttachmentTicket.ts index e91f3359e..d28ee307b 100644 --- a/src/api/resources/ticketing/types/AttachmentTicket.ts +++ b/src/api/resources/ticketing/types/AttachmentTicket.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The ticket associated with the attachment. diff --git a/src/api/resources/ticketing/types/AuditLogEvent.ts b/src/api/resources/ticketing/types/AuditLogEvent.ts index 2dd9166fe..010ce70af 100644 --- a/src/api/resources/ticketing/types/AuditLogEvent.ts +++ b/src/api/resources/ticketing/types/AuditLogEvent.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface AuditLogEvent { id?: string; diff --git a/src/api/resources/ticketing/types/AuditLogEventEventType.ts b/src/api/resources/ticketing/types/AuditLogEventEventType.ts index 7f83a06c9..dcb1110b0 100644 --- a/src/api/resources/ticketing/types/AuditLogEventEventType.ts +++ b/src/api/resources/ticketing/types/AuditLogEventEventType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Designates the type of event that occurred. diff --git a/src/api/resources/ticketing/types/AuditLogEventRole.ts b/src/api/resources/ticketing/types/AuditLogEventRole.ts index a2bcf787f..87d0b80e4 100644 --- a/src/api/resources/ticketing/types/AuditLogEventRole.ts +++ b/src/api/resources/ticketing/types/AuditLogEventRole.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. diff --git a/src/api/resources/ticketing/types/AvailableActions.ts b/src/api/resources/ticketing/types/AvailableActions.ts index 2ed07fc62..acabaf529 100644 --- a/src/api/resources/ticketing/types/AvailableActions.ts +++ b/src/api/resources/ticketing/types/AvailableActions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The AvailableActions Object diff --git a/src/api/resources/ticketing/types/Collection.ts b/src/api/resources/ticketing/types/Collection.ts index 1679ab6c5..fb448350b 100644 --- a/src/api/resources/ticketing/types/Collection.ts +++ b/src/api/resources/ticketing/types/Collection.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Collection Object diff --git a/src/api/resources/ticketing/types/CollectionAccessLevel.ts b/src/api/resources/ticketing/types/CollectionAccessLevel.ts index 5db402c8e..66f3bda4d 100644 --- a/src/api/resources/ticketing/types/CollectionAccessLevel.ts +++ b/src/api/resources/ticketing/types/CollectionAccessLevel.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The level of access a User has to the Collection and its sub-objects. diff --git a/src/api/resources/ticketing/types/CollectionCollectionType.ts b/src/api/resources/ticketing/types/CollectionCollectionType.ts index c58f066c9..f74d9d9ab 100644 --- a/src/api/resources/ticketing/types/CollectionCollectionType.ts +++ b/src/api/resources/ticketing/types/CollectionCollectionType.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The collection's type. diff --git a/src/api/resources/ticketing/types/CollectionParentCollection.ts b/src/api/resources/ticketing/types/CollectionParentCollection.ts index 4ea2adf91..e767d2f69 100644 --- a/src/api/resources/ticketing/types/CollectionParentCollection.ts +++ b/src/api/resources/ticketing/types/CollectionParentCollection.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The parent collection for this collection. diff --git a/src/api/resources/ticketing/types/Comment.ts b/src/api/resources/ticketing/types/Comment.ts index 287aea039..02d30d564 100644 --- a/src/api/resources/ticketing/types/Comment.ts +++ b/src/api/resources/ticketing/types/Comment.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Comment Object diff --git a/src/api/resources/ticketing/types/CommentContact.ts b/src/api/resources/ticketing/types/CommentContact.ts index 5f197bafe..55fdb67b2 100644 --- a/src/api/resources/ticketing/types/CommentContact.ts +++ b/src/api/resources/ticketing/types/CommentContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The author of the Comment, if the author is a Contact.If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. diff --git a/src/api/resources/ticketing/types/CommentRequest.ts b/src/api/resources/ticketing/types/CommentRequest.ts index f65ee1a72..83205d971 100644 --- a/src/api/resources/ticketing/types/CommentRequest.ts +++ b/src/api/resources/ticketing/types/CommentRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Comment Object diff --git a/src/api/resources/ticketing/types/CommentRequestContact.ts b/src/api/resources/ticketing/types/CommentRequestContact.ts index f399d6e85..ea6e04617 100644 --- a/src/api/resources/ticketing/types/CommentRequestContact.ts +++ b/src/api/resources/ticketing/types/CommentRequestContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The author of the Comment, if the author is a Contact.If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. diff --git a/src/api/resources/ticketing/types/CommentRequestTicket.ts b/src/api/resources/ticketing/types/CommentRequestTicket.ts index 1e9786cb2..d7ce47591 100644 --- a/src/api/resources/ticketing/types/CommentRequestTicket.ts +++ b/src/api/resources/ticketing/types/CommentRequestTicket.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The ticket associated with the comment. diff --git a/src/api/resources/ticketing/types/CommentRequestUser.ts b/src/api/resources/ticketing/types/CommentRequestUser.ts index 1f2b02829..9b53ca923 100644 --- a/src/api/resources/ticketing/types/CommentRequestUser.ts +++ b/src/api/resources/ticketing/types/CommentRequestUser.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The author of the Comment, if the author is a User. If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. diff --git a/src/api/resources/ticketing/types/CommentResponse.ts b/src/api/resources/ticketing/types/CommentResponse.ts index ac386bb89..d8cc7fdd3 100644 --- a/src/api/resources/ticketing/types/CommentResponse.ts +++ b/src/api/resources/ticketing/types/CommentResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CommentResponse { model: Merge.ticketing.Comment; diff --git a/src/api/resources/ticketing/types/CommentTicket.ts b/src/api/resources/ticketing/types/CommentTicket.ts index 29dea359b..0e172b1b8 100644 --- a/src/api/resources/ticketing/types/CommentTicket.ts +++ b/src/api/resources/ticketing/types/CommentTicket.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The ticket associated with the comment. diff --git a/src/api/resources/ticketing/types/CommentUser.ts b/src/api/resources/ticketing/types/CommentUser.ts index 74a2b3280..c9e68701b 100644 --- a/src/api/resources/ticketing/types/CommentUser.ts +++ b/src/api/resources/ticketing/types/CommentUser.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The author of the Comment, if the author is a User. If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. diff --git a/src/api/resources/ticketing/types/CommonModelScopeApi.ts b/src/api/resources/ticketing/types/CommonModelScopeApi.ts index 035bbee28..c8c47b269 100644 --- a/src/api/resources/ticketing/types/CommonModelScopeApi.ts +++ b/src/api/resources/ticketing/types/CommonModelScopeApi.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CommonModelScopeApi { /** The common models you want to update the scopes for */ diff --git a/src/api/resources/ticketing/types/CommonModelScopesBodyRequest.ts b/src/api/resources/ticketing/types/CommonModelScopesBodyRequest.ts index d35a5a7a9..f2e8b368f 100644 --- a/src/api/resources/ticketing/types/CommonModelScopesBodyRequest.ts +++ b/src/api/resources/ticketing/types/CommonModelScopesBodyRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface CommonModelScopesBodyRequest { modelId: string; diff --git a/src/api/resources/ticketing/types/Contact.ts b/src/api/resources/ticketing/types/Contact.ts index 798c308fe..038fa08cb 100644 --- a/src/api/resources/ticketing/types/Contact.ts +++ b/src/api/resources/ticketing/types/Contact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Contact Object diff --git a/src/api/resources/ticketing/types/ContactAccount.ts b/src/api/resources/ticketing/types/ContactAccount.ts index d53b3264c..2a5370f23 100644 --- a/src/api/resources/ticketing/types/ContactAccount.ts +++ b/src/api/resources/ticketing/types/ContactAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The contact's account. diff --git a/src/api/resources/ticketing/types/ContactRequest.ts b/src/api/resources/ticketing/types/ContactRequest.ts index 0a7c1bd57..b763a4d00 100644 --- a/src/api/resources/ticketing/types/ContactRequest.ts +++ b/src/api/resources/ticketing/types/ContactRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Contact Object diff --git a/src/api/resources/ticketing/types/ContactRequestAccount.ts b/src/api/resources/ticketing/types/ContactRequestAccount.ts index e376bad90..07505a4e2 100644 --- a/src/api/resources/ticketing/types/ContactRequestAccount.ts +++ b/src/api/resources/ticketing/types/ContactRequestAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The contact's account. diff --git a/src/api/resources/ticketing/types/DataPassthroughRequest.ts b/src/api/resources/ticketing/types/DataPassthroughRequest.ts index 83ea768aa..c24998cac 100644 --- a/src/api/resources/ticketing/types/DataPassthroughRequest.ts +++ b/src/api/resources/ticketing/types/DataPassthroughRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The DataPassthrough Object diff --git a/src/api/resources/ticketing/types/DebugModeLog.ts b/src/api/resources/ticketing/types/DebugModeLog.ts index fb4a25621..87b733c39 100644 --- a/src/api/resources/ticketing/types/DebugModeLog.ts +++ b/src/api/resources/ticketing/types/DebugModeLog.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface DebugModeLog { logId: string; diff --git a/src/api/resources/ticketing/types/ErrorValidationProblem.ts b/src/api/resources/ticketing/types/ErrorValidationProblem.ts index 5a7431e79..eb6738b78 100644 --- a/src/api/resources/ticketing/types/ErrorValidationProblem.ts +++ b/src/api/resources/ticketing/types/ErrorValidationProblem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ErrorValidationProblem { source?: Merge.ticketing.ValidationProblemSource; diff --git a/src/api/resources/ticketing/types/ExternalTargetFieldApiResponse.ts b/src/api/resources/ticketing/types/ExternalTargetFieldApiResponse.ts index fd33772b8..819dc0045 100644 --- a/src/api/resources/ticketing/types/ExternalTargetFieldApiResponse.ts +++ b/src/api/resources/ticketing/types/ExternalTargetFieldApiResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ExternalTargetFieldApiResponse { ticket?: Merge.ticketing.ExternalTargetFieldApi[]; diff --git a/src/api/resources/ticketing/types/FieldMappingApiInstance.ts b/src/api/resources/ticketing/types/FieldMappingApiInstance.ts index 72f4efe1a..54fb99ec9 100644 --- a/src/api/resources/ticketing/types/FieldMappingApiInstance.ts +++ b/src/api/resources/ticketing/types/FieldMappingApiInstance.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstance { id?: string; diff --git a/src/api/resources/ticketing/types/FieldMappingApiInstanceRemoteField.ts b/src/api/resources/ticketing/types/FieldMappingApiInstanceRemoteField.ts index 476a7e195..37ce9a67c 100644 --- a/src/api/resources/ticketing/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/api/resources/ticketing/types/FieldMappingApiInstanceRemoteField.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstanceRemoteField { remoteKeyName: string; diff --git a/src/api/resources/ticketing/types/FieldMappingApiInstanceResponse.ts b/src/api/resources/ticketing/types/FieldMappingApiInstanceResponse.ts index cfbd645a7..3c847a24f 100644 --- a/src/api/resources/ticketing/types/FieldMappingApiInstanceResponse.ts +++ b/src/api/resources/ticketing/types/FieldMappingApiInstanceResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingApiInstanceResponse { ticket?: Merge.ticketing.FieldMappingApiInstance[]; diff --git a/src/api/resources/ticketing/types/FieldMappingInstanceResponse.ts b/src/api/resources/ticketing/types/FieldMappingInstanceResponse.ts index 778e1cc64..ea7304c1f 100644 --- a/src/api/resources/ticketing/types/FieldMappingInstanceResponse.ts +++ b/src/api/resources/ticketing/types/FieldMappingInstanceResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface FieldMappingInstanceResponse { model: Merge.ticketing.FieldMappingApiInstance; diff --git a/src/api/resources/ticketing/types/IndividualCommonModelScopeDeserializer.ts b/src/api/resources/ticketing/types/IndividualCommonModelScopeDeserializer.ts index bc1fdfccd..577d26e59 100644 --- a/src/api/resources/ticketing/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/api/resources/ticketing/types/IndividualCommonModelScopeDeserializer.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface IndividualCommonModelScopeDeserializer { modelName: string; diff --git a/src/api/resources/ticketing/types/IndividualCommonModelScopeDeserializerRequest.ts b/src/api/resources/ticketing/types/IndividualCommonModelScopeDeserializerRequest.ts index d87d1f08b..c70bd3221 100644 --- a/src/api/resources/ticketing/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/api/resources/ticketing/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface IndividualCommonModelScopeDeserializerRequest { modelName: string; diff --git a/src/api/resources/ticketing/types/Issue.ts b/src/api/resources/ticketing/types/Issue.ts index 69d7d7334..2a2bd57b1 100644 --- a/src/api/resources/ticketing/types/Issue.ts +++ b/src/api/resources/ticketing/types/Issue.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface Issue { id?: string; diff --git a/src/api/resources/ticketing/types/IssueStatus.ts b/src/api/resources/ticketing/types/IssueStatus.ts index eeda029e6..258475a02 100644 --- a/src/api/resources/ticketing/types/IssueStatus.ts +++ b/src/api/resources/ticketing/types/IssueStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * Status of the issue. Options: ('ONGOING', 'RESOLVED') diff --git a/src/api/resources/ticketing/types/ItemSchema.ts b/src/api/resources/ticketing/types/ItemSchema.ts index 6c04266ec..a06ce4713 100644 --- a/src/api/resources/ticketing/types/ItemSchema.ts +++ b/src/api/resources/ticketing/types/ItemSchema.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface ItemSchema { itemType?: Merge.ticketing.ItemTypeEnum; diff --git a/src/api/resources/ticketing/types/MetaResponse.ts b/src/api/resources/ticketing/types/MetaResponse.ts index 1c7d18f1a..fff523a5b 100644 --- a/src/api/resources/ticketing/types/MetaResponse.ts +++ b/src/api/resources/ticketing/types/MetaResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface MetaResponse { requestSchema: Record; diff --git a/src/api/resources/ticketing/types/MultipartFormFieldRequest.ts b/src/api/resources/ticketing/types/MultipartFormFieldRequest.ts index 5eadd5db7..543f480d8 100644 --- a/src/api/resources/ticketing/types/MultipartFormFieldRequest.ts +++ b/src/api/resources/ticketing/types/MultipartFormFieldRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The MultipartFormField Object diff --git a/src/api/resources/ticketing/types/MultipartFormFieldRequestEncoding.ts b/src/api/resources/ticketing/types/MultipartFormFieldRequestEncoding.ts index 8a4d46a70..b710e66e9 100644 --- a/src/api/resources/ticketing/types/MultipartFormFieldRequestEncoding.ts +++ b/src/api/resources/ticketing/types/MultipartFormFieldRequestEncoding.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The encoding of the value of `data`. Defaults to `RAW` if not defined. diff --git a/src/api/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.ts b/src/api/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.ts index 0b3e62b79..953ba4a21 100644 --- a/src/api/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/api/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAccountDetailsAndActionsList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedAccountList.ts b/src/api/resources/ticketing/types/PaginatedAccountList.ts index c33cf3723..b699c9f4e 100644 --- a/src/api/resources/ticketing/types/PaginatedAccountList.ts +++ b/src/api/resources/ticketing/types/PaginatedAccountList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAccountList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedAttachmentList.ts b/src/api/resources/ticketing/types/PaginatedAttachmentList.ts index 506d0086d..b58d139dc 100644 --- a/src/api/resources/ticketing/types/PaginatedAttachmentList.ts +++ b/src/api/resources/ticketing/types/PaginatedAttachmentList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAttachmentList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedAuditLogEventList.ts b/src/api/resources/ticketing/types/PaginatedAuditLogEventList.ts index f8961fef5..369296bdd 100644 --- a/src/api/resources/ticketing/types/PaginatedAuditLogEventList.ts +++ b/src/api/resources/ticketing/types/PaginatedAuditLogEventList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedAuditLogEventList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedCollectionList.ts b/src/api/resources/ticketing/types/PaginatedCollectionList.ts index c9ad40e2c..47c9dbc84 100644 --- a/src/api/resources/ticketing/types/PaginatedCollectionList.ts +++ b/src/api/resources/ticketing/types/PaginatedCollectionList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedCollectionList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedCommentList.ts b/src/api/resources/ticketing/types/PaginatedCommentList.ts index 7f446400d..45beb809b 100644 --- a/src/api/resources/ticketing/types/PaginatedCommentList.ts +++ b/src/api/resources/ticketing/types/PaginatedCommentList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedCommentList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedContactList.ts b/src/api/resources/ticketing/types/PaginatedContactList.ts index a2e68e5c9..fd5e12dd2 100644 --- a/src/api/resources/ticketing/types/PaginatedContactList.ts +++ b/src/api/resources/ticketing/types/PaginatedContactList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedContactList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedIssueList.ts b/src/api/resources/ticketing/types/PaginatedIssueList.ts index 5c864dfc1..53986b42d 100644 --- a/src/api/resources/ticketing/types/PaginatedIssueList.ts +++ b/src/api/resources/ticketing/types/PaginatedIssueList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedIssueList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedProjectList.ts b/src/api/resources/ticketing/types/PaginatedProjectList.ts index 581439486..0394cca7e 100644 --- a/src/api/resources/ticketing/types/PaginatedProjectList.ts +++ b/src/api/resources/ticketing/types/PaginatedProjectList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedProjectList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedRemoteFieldClassList.ts b/src/api/resources/ticketing/types/PaginatedRemoteFieldClassList.ts index 794966bd5..7f88b8fd1 100644 --- a/src/api/resources/ticketing/types/PaginatedRemoteFieldClassList.ts +++ b/src/api/resources/ticketing/types/PaginatedRemoteFieldClassList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedRemoteFieldClassList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedRoleList.ts b/src/api/resources/ticketing/types/PaginatedRoleList.ts index 7d1baa860..663d0de7b 100644 --- a/src/api/resources/ticketing/types/PaginatedRoleList.ts +++ b/src/api/resources/ticketing/types/PaginatedRoleList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedRoleList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedSyncStatusList.ts b/src/api/resources/ticketing/types/PaginatedSyncStatusList.ts index 33dc53971..3f3c891f8 100644 --- a/src/api/resources/ticketing/types/PaginatedSyncStatusList.ts +++ b/src/api/resources/ticketing/types/PaginatedSyncStatusList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedSyncStatusList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedTagList.ts b/src/api/resources/ticketing/types/PaginatedTagList.ts index 3534f7611..dcfb1ece7 100644 --- a/src/api/resources/ticketing/types/PaginatedTagList.ts +++ b/src/api/resources/ticketing/types/PaginatedTagList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedTagList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedTeamList.ts b/src/api/resources/ticketing/types/PaginatedTeamList.ts index d0dcb7e28..0eca23e57 100644 --- a/src/api/resources/ticketing/types/PaginatedTeamList.ts +++ b/src/api/resources/ticketing/types/PaginatedTeamList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedTeamList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedTicketList.ts b/src/api/resources/ticketing/types/PaginatedTicketList.ts index 201f60eb2..ba7def9e8 100644 --- a/src/api/resources/ticketing/types/PaginatedTicketList.ts +++ b/src/api/resources/ticketing/types/PaginatedTicketList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedTicketList { next?: string; diff --git a/src/api/resources/ticketing/types/PaginatedUserList.ts b/src/api/resources/ticketing/types/PaginatedUserList.ts index 2bda4b714..f0b7adaba 100644 --- a/src/api/resources/ticketing/types/PaginatedUserList.ts +++ b/src/api/resources/ticketing/types/PaginatedUserList.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface PaginatedUserList { next?: string; diff --git a/src/api/resources/ticketing/types/PatchedTicketRequest.ts b/src/api/resources/ticketing/types/PatchedTicketRequest.ts index b14b1c28b..7c5805a9f 100644 --- a/src/api/resources/ticketing/types/PatchedTicketRequest.ts +++ b/src/api/resources/ticketing/types/PatchedTicketRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Ticket Object diff --git a/src/api/resources/ticketing/types/PatchedTicketRequestPriority.ts b/src/api/resources/ticketing/types/PatchedTicketRequestPriority.ts index 825dd36c3..ffa04ed73 100644 --- a/src/api/resources/ticketing/types/PatchedTicketRequestPriority.ts +++ b/src/api/resources/ticketing/types/PatchedTicketRequestPriority.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The priority or urgency of the Ticket. diff --git a/src/api/resources/ticketing/types/PatchedTicketRequestStatus.ts b/src/api/resources/ticketing/types/PatchedTicketRequestStatus.ts index 88d2b53fe..a1d9fdf12 100644 --- a/src/api/resources/ticketing/types/PatchedTicketRequestStatus.ts +++ b/src/api/resources/ticketing/types/PatchedTicketRequestStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The current status of the ticket. diff --git a/src/api/resources/ticketing/types/Project.ts b/src/api/resources/ticketing/types/Project.ts index 4ff763f56..505cd38d6 100644 --- a/src/api/resources/ticketing/types/Project.ts +++ b/src/api/resources/ticketing/types/Project.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Project Object diff --git a/src/api/resources/ticketing/types/RemoteField.ts b/src/api/resources/ticketing/types/RemoteField.ts index ada5e448e..f0dd4a34a 100644 --- a/src/api/resources/ticketing/types/RemoteField.ts +++ b/src/api/resources/ticketing/types/RemoteField.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteField { remoteFieldClass: Merge.ticketing.RemoteFieldRemoteFieldClass; diff --git a/src/api/resources/ticketing/types/RemoteFieldApi.ts b/src/api/resources/ticketing/types/RemoteFieldApi.ts index befc11e37..52e3ad6ed 100644 --- a/src/api/resources/ticketing/types/RemoteFieldApi.ts +++ b/src/api/resources/ticketing/types/RemoteFieldApi.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldApi { schema: Record; diff --git a/src/api/resources/ticketing/types/RemoteFieldApiResponse.ts b/src/api/resources/ticketing/types/RemoteFieldApiResponse.ts index a7cfd81b7..b3ded5f41 100644 --- a/src/api/resources/ticketing/types/RemoteFieldApiResponse.ts +++ b/src/api/resources/ticketing/types/RemoteFieldApiResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldApiResponse { ticket?: Merge.ticketing.RemoteFieldApi[]; diff --git a/src/api/resources/ticketing/types/RemoteFieldClass.ts b/src/api/resources/ticketing/types/RemoteFieldClass.ts index f8e2e5fc4..95b9f59ff 100644 --- a/src/api/resources/ticketing/types/RemoteFieldClass.ts +++ b/src/api/resources/ticketing/types/RemoteFieldClass.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldClass { id?: string; diff --git a/src/api/resources/ticketing/types/RemoteFieldClassFieldFormat.ts b/src/api/resources/ticketing/types/RemoteFieldClassFieldFormat.ts index 96deab393..cb2a31a13 100644 --- a/src/api/resources/ticketing/types/RemoteFieldClassFieldFormat.ts +++ b/src/api/resources/ticketing/types/RemoteFieldClassFieldFormat.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type RemoteFieldClassFieldFormat = string | Merge.ticketing.FieldFormatEnum; diff --git a/src/api/resources/ticketing/types/RemoteFieldClassFieldType.ts b/src/api/resources/ticketing/types/RemoteFieldClassFieldType.ts index 566b3ee2b..88a04c2ce 100644 --- a/src/api/resources/ticketing/types/RemoteFieldClassFieldType.ts +++ b/src/api/resources/ticketing/types/RemoteFieldClassFieldType.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type RemoteFieldClassFieldType = string | Merge.ticketing.FieldTypeEnum; diff --git a/src/api/resources/ticketing/types/RemoteFieldRemoteFieldClass.ts b/src/api/resources/ticketing/types/RemoteFieldRemoteFieldClass.ts index 415dc7480..d0549e1fe 100644 --- a/src/api/resources/ticketing/types/RemoteFieldRemoteFieldClass.ts +++ b/src/api/resources/ticketing/types/RemoteFieldRemoteFieldClass.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type RemoteFieldRemoteFieldClass = string | Merge.ticketing.RemoteFieldClass; diff --git a/src/api/resources/ticketing/types/RemoteFieldRequest.ts b/src/api/resources/ticketing/types/RemoteFieldRequest.ts index 1bb1fd254..df974b854 100644 --- a/src/api/resources/ticketing/types/RemoteFieldRequest.ts +++ b/src/api/resources/ticketing/types/RemoteFieldRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface RemoteFieldRequest { remoteFieldClass: Merge.ticketing.RemoteFieldRequestRemoteFieldClass; diff --git a/src/api/resources/ticketing/types/RemoteFieldRequestRemoteFieldClass.ts b/src/api/resources/ticketing/types/RemoteFieldRequestRemoteFieldClass.ts index 92365c588..743d5a02f 100644 --- a/src/api/resources/ticketing/types/RemoteFieldRequestRemoteFieldClass.ts +++ b/src/api/resources/ticketing/types/RemoteFieldRequestRemoteFieldClass.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type RemoteFieldRequestRemoteFieldClass = string | Merge.ticketing.RemoteFieldClass; diff --git a/src/api/resources/ticketing/types/RemoteResponse.ts b/src/api/resources/ticketing/types/RemoteResponse.ts index 6510cc4c6..9aa00defc 100644 --- a/src/api/resources/ticketing/types/RemoteResponse.ts +++ b/src/api/resources/ticketing/types/RemoteResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The RemoteResponse Object diff --git a/src/api/resources/ticketing/types/Role.ts b/src/api/resources/ticketing/types/Role.ts index ae14fdc88..1644bc462 100644 --- a/src/api/resources/ticketing/types/Role.ts +++ b/src/api/resources/ticketing/types/Role.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Role Object diff --git a/src/api/resources/ticketing/types/RoleTicketAccess.ts b/src/api/resources/ticketing/types/RoleTicketAccess.ts index 92340573b..2675a456f 100644 --- a/src/api/resources/ticketing/types/RoleTicketAccess.ts +++ b/src/api/resources/ticketing/types/RoleTicketAccess.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The level of Ticket access that a User with this Role can perform. diff --git a/src/api/resources/ticketing/types/RoleTicketActionsItem.ts b/src/api/resources/ticketing/types/RoleTicketActionsItem.ts index 024b50fac..d8a5ea0e7 100644 --- a/src/api/resources/ticketing/types/RoleTicketActionsItem.ts +++ b/src/api/resources/ticketing/types/RoleTicketActionsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type RoleTicketActionsItem = string | Merge.ticketing.TicketActionsEnum; diff --git a/src/api/resources/ticketing/types/SyncStatus.ts b/src/api/resources/ticketing/types/SyncStatus.ts index 393909fdd..3928cf52c 100644 --- a/src/api/resources/ticketing/types/SyncStatus.ts +++ b/src/api/resources/ticketing/types/SyncStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The SyncStatus Object diff --git a/src/api/resources/ticketing/types/Tag.ts b/src/api/resources/ticketing/types/Tag.ts index b012ac5a8..8a9d1890b 100644 --- a/src/api/resources/ticketing/types/Tag.ts +++ b/src/api/resources/ticketing/types/Tag.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Tag Object diff --git a/src/api/resources/ticketing/types/Team.ts b/src/api/resources/ticketing/types/Team.ts index 7cc46014e..1ae6cb168 100644 --- a/src/api/resources/ticketing/types/Team.ts +++ b/src/api/resources/ticketing/types/Team.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Team Object diff --git a/src/api/resources/ticketing/types/Ticket.ts b/src/api/resources/ticketing/types/Ticket.ts index 63ecdb34f..87a330526 100644 --- a/src/api/resources/ticketing/types/Ticket.ts +++ b/src/api/resources/ticketing/types/Ticket.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Ticket Object diff --git a/src/api/resources/ticketing/types/TicketAccount.ts b/src/api/resources/ticketing/types/TicketAccount.ts index b4f8b7eed..2ebdbde87 100644 --- a/src/api/resources/ticketing/types/TicketAccount.ts +++ b/src/api/resources/ticketing/types/TicketAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account associated with the ticket. diff --git a/src/api/resources/ticketing/types/TicketAssigneesItem.ts b/src/api/resources/ticketing/types/TicketAssigneesItem.ts index be86ddf19..27f819741 100644 --- a/src/api/resources/ticketing/types/TicketAssigneesItem.ts +++ b/src/api/resources/ticketing/types/TicketAssigneesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type TicketAssigneesItem = string | Merge.ticketing.User; diff --git a/src/api/resources/ticketing/types/TicketAttachmentsItem.ts b/src/api/resources/ticketing/types/TicketAttachmentsItem.ts index de2669cdd..3017b5371 100644 --- a/src/api/resources/ticketing/types/TicketAttachmentsItem.ts +++ b/src/api/resources/ticketing/types/TicketAttachmentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type TicketAttachmentsItem = string | Merge.ticketing.Attachment; diff --git a/src/api/resources/ticketing/types/TicketCollectionsItem.ts b/src/api/resources/ticketing/types/TicketCollectionsItem.ts index c2fa127f3..8b67319c9 100644 --- a/src/api/resources/ticketing/types/TicketCollectionsItem.ts +++ b/src/api/resources/ticketing/types/TicketCollectionsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type TicketCollectionsItem = string | Merge.ticketing.Collection; diff --git a/src/api/resources/ticketing/types/TicketContact.ts b/src/api/resources/ticketing/types/TicketContact.ts index 3e97fc968..fd8fc5eaa 100644 --- a/src/api/resources/ticketing/types/TicketContact.ts +++ b/src/api/resources/ticketing/types/TicketContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The contact associated with the ticket. diff --git a/src/api/resources/ticketing/types/TicketCreator.ts b/src/api/resources/ticketing/types/TicketCreator.ts index 45b6620ed..9cdecdd82 100644 --- a/src/api/resources/ticketing/types/TicketCreator.ts +++ b/src/api/resources/ticketing/types/TicketCreator.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The user who created this ticket. diff --git a/src/api/resources/ticketing/types/TicketParentTicket.ts b/src/api/resources/ticketing/types/TicketParentTicket.ts index d502fe114..c387ac88c 100644 --- a/src/api/resources/ticketing/types/TicketParentTicket.ts +++ b/src/api/resources/ticketing/types/TicketParentTicket.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The ticket's parent ticket. diff --git a/src/api/resources/ticketing/types/TicketPriority.ts b/src/api/resources/ticketing/types/TicketPriority.ts index 00c4fca1f..a0964d166 100644 --- a/src/api/resources/ticketing/types/TicketPriority.ts +++ b/src/api/resources/ticketing/types/TicketPriority.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The priority or urgency of the Ticket. diff --git a/src/api/resources/ticketing/types/TicketRequest.ts b/src/api/resources/ticketing/types/TicketRequest.ts index ef18ba7c8..2d35a277f 100644 --- a/src/api/resources/ticketing/types/TicketRequest.ts +++ b/src/api/resources/ticketing/types/TicketRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The Ticket Object diff --git a/src/api/resources/ticketing/types/TicketRequestAccount.ts b/src/api/resources/ticketing/types/TicketRequestAccount.ts index 30c9acb24..f36485867 100644 --- a/src/api/resources/ticketing/types/TicketRequestAccount.ts +++ b/src/api/resources/ticketing/types/TicketRequestAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The account associated with the ticket. diff --git a/src/api/resources/ticketing/types/TicketRequestAssigneesItem.ts b/src/api/resources/ticketing/types/TicketRequestAssigneesItem.ts index 0a4e1d89e..8bbac6e77 100644 --- a/src/api/resources/ticketing/types/TicketRequestAssigneesItem.ts +++ b/src/api/resources/ticketing/types/TicketRequestAssigneesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type TicketRequestAssigneesItem = string | Merge.ticketing.User; diff --git a/src/api/resources/ticketing/types/TicketRequestAttachmentsItem.ts b/src/api/resources/ticketing/types/TicketRequestAttachmentsItem.ts index 4e010471b..33920e7ea 100644 --- a/src/api/resources/ticketing/types/TicketRequestAttachmentsItem.ts +++ b/src/api/resources/ticketing/types/TicketRequestAttachmentsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type TicketRequestAttachmentsItem = string | Merge.ticketing.Attachment; diff --git a/src/api/resources/ticketing/types/TicketRequestCollectionsItem.ts b/src/api/resources/ticketing/types/TicketRequestCollectionsItem.ts index 96e6a5c94..e6674087f 100644 --- a/src/api/resources/ticketing/types/TicketRequestCollectionsItem.ts +++ b/src/api/resources/ticketing/types/TicketRequestCollectionsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type TicketRequestCollectionsItem = string | Merge.ticketing.Collection; diff --git a/src/api/resources/ticketing/types/TicketRequestContact.ts b/src/api/resources/ticketing/types/TicketRequestContact.ts index c804e06ad..27fcda285 100644 --- a/src/api/resources/ticketing/types/TicketRequestContact.ts +++ b/src/api/resources/ticketing/types/TicketRequestContact.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The contact associated with the ticket. diff --git a/src/api/resources/ticketing/types/TicketRequestCreator.ts b/src/api/resources/ticketing/types/TicketRequestCreator.ts index 8f578c567..21ce1a509 100644 --- a/src/api/resources/ticketing/types/TicketRequestCreator.ts +++ b/src/api/resources/ticketing/types/TicketRequestCreator.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The user who created this ticket. diff --git a/src/api/resources/ticketing/types/TicketRequestParentTicket.ts b/src/api/resources/ticketing/types/TicketRequestParentTicket.ts index a7854f9f7..1c204db07 100644 --- a/src/api/resources/ticketing/types/TicketRequestParentTicket.ts +++ b/src/api/resources/ticketing/types/TicketRequestParentTicket.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The ticket's parent ticket. diff --git a/src/api/resources/ticketing/types/TicketRequestPriority.ts b/src/api/resources/ticketing/types/TicketRequestPriority.ts index 82681d899..31696ed2e 100644 --- a/src/api/resources/ticketing/types/TicketRequestPriority.ts +++ b/src/api/resources/ticketing/types/TicketRequestPriority.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The priority or urgency of the Ticket. diff --git a/src/api/resources/ticketing/types/TicketRequestStatus.ts b/src/api/resources/ticketing/types/TicketRequestStatus.ts index 899e4c2a5..2c4d97b4f 100644 --- a/src/api/resources/ticketing/types/TicketRequestStatus.ts +++ b/src/api/resources/ticketing/types/TicketRequestStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The current status of the ticket. diff --git a/src/api/resources/ticketing/types/TicketResponse.ts b/src/api/resources/ticketing/types/TicketResponse.ts index d39fbf9b1..d3a1cad90 100644 --- a/src/api/resources/ticketing/types/TicketResponse.ts +++ b/src/api/resources/ticketing/types/TicketResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface TicketResponse { model: Merge.ticketing.Ticket; diff --git a/src/api/resources/ticketing/types/TicketStatus.ts b/src/api/resources/ticketing/types/TicketStatus.ts index 9c9f21868..5c84924d4 100644 --- a/src/api/resources/ticketing/types/TicketStatus.ts +++ b/src/api/resources/ticketing/types/TicketStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * The current status of the ticket. diff --git a/src/api/resources/ticketing/types/TicketingAttachmentResponse.ts b/src/api/resources/ticketing/types/TicketingAttachmentResponse.ts index f172c7607..5ca4562bd 100644 --- a/src/api/resources/ticketing/types/TicketingAttachmentResponse.ts +++ b/src/api/resources/ticketing/types/TicketingAttachmentResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface TicketingAttachmentResponse { model: Merge.ticketing.Attachment; diff --git a/src/api/resources/ticketing/types/TicketingContactResponse.ts b/src/api/resources/ticketing/types/TicketingContactResponse.ts index 458acf665..f8c66dd7a 100644 --- a/src/api/resources/ticketing/types/TicketingContactResponse.ts +++ b/src/api/resources/ticketing/types/TicketingContactResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface TicketingContactResponse { model: Merge.ticketing.Contact; diff --git a/src/api/resources/ticketing/types/User.ts b/src/api/resources/ticketing/types/User.ts index be7674c3a..ce4a7e73a 100644 --- a/src/api/resources/ticketing/types/User.ts +++ b/src/api/resources/ticketing/types/User.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; /** * # The User Object diff --git a/src/api/resources/ticketing/types/UserRolesItem.ts b/src/api/resources/ticketing/types/UserRolesItem.ts index d73a18831..c44bcc5b9 100644 --- a/src/api/resources/ticketing/types/UserRolesItem.ts +++ b/src/api/resources/ticketing/types/UserRolesItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type UserRolesItem = string | Merge.ticketing.Role; diff --git a/src/api/resources/ticketing/types/UserTeamsItem.ts b/src/api/resources/ticketing/types/UserTeamsItem.ts index 6e1f3cfd0..959e7e40c 100644 --- a/src/api/resources/ticketing/types/UserTeamsItem.ts +++ b/src/api/resources/ticketing/types/UserTeamsItem.ts @@ -2,6 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export type UserTeamsItem = string | Merge.ticketing.Team; diff --git a/src/api/resources/ticketing/types/WarningValidationProblem.ts b/src/api/resources/ticketing/types/WarningValidationProblem.ts index ad0cd91fa..5270dbe2c 100644 --- a/src/api/resources/ticketing/types/WarningValidationProblem.ts +++ b/src/api/resources/ticketing/types/WarningValidationProblem.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Merge from "../../.."; +import * as Merge from "../../../index"; export interface WarningValidationProblem { source?: Merge.ticketing.ValidationProblemSource; diff --git a/src/core/fetcher/Fetcher.ts b/src/core/fetcher/Fetcher.ts index 19de5d475..b8f23717b 100644 --- a/src/core/fetcher/Fetcher.ts +++ b/src/core/fetcher/Fetcher.ts @@ -1,6 +1,10 @@ -import { default as FormData } from "form-data"; -import qs from "qs"; import { APIResponse } from "./APIResponse"; +import { createRequestUrl } from "./createRequestUrl"; +import { getFetchFn } from "./getFetchFn"; +import { getRequestBody } from "./getRequestBody"; +import { getResponseBody } from "./getResponseBody"; +import { makeRequest } from "./makeRequest"; +import { requestWithRetries } from "./requestWithRetries"; export type FetchFunction = (args: Fetcher.Args) => Promise>; @@ -10,12 +14,15 @@ export declare namespace Fetcher { method: string; contentType?: string; headers?: Record; - queryParameters?: Record; + queryParameters?: Record; body?: unknown; timeoutMs?: number; maxRetries?: number; withCredentials?: boolean; - responseType?: "json" | "blob" | "streaming"; + abortSignal?: AbortSignal; + requestType?: "json" | "file" | "bytes"; + responseType?: "json" | "blob" | "sse" | "streaming" | "text" | "arrayBuffer"; + duplex?: "half"; } export type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError; @@ -42,11 +49,7 @@ export declare namespace Fetcher { } } -const INITIAL_RETRY_DELAY = 1; -const MAX_RETRY_DELAY = 60; -const DEFAULT_MAX_RETRIES = 2; - -async function fetcherImpl(args: Fetcher.Args): Promise> { +export async function fetcherImpl(args: Fetcher.Args): Promise> { const headers: Record = {}; if (args.body !== undefined && args.contentType != null) { headers["Content-Type"] = args.contentType; @@ -60,85 +63,35 @@ async function fetcherImpl(args: Fetcher.Args): Promise 0 - ? `${args.url}?${qs.stringify(args.queryParameters, { arrayFormat: "repeat" })}` - : args.url; - - let body: BodyInit | undefined = undefined; - if (args.body instanceof FormData) { - // @ts-expect-error - body = args.body; - } else { - body = JSON.stringify(args.body); - } - - const fetchFn = typeof fetch == "function" ? fetch : require("node-fetch"); - - const makeRequest = async (): Promise => { - const controller = new AbortController(); - let abortId = undefined; - if (args.timeoutMs != null) { - abortId = setTimeout(() => controller.abort(), args.timeoutMs); - } - const response = await fetchFn(url, { - method: args.method, - headers, - body, - signal: controller.signal, - credentials: args.withCredentials ? "include" : undefined, - }); - if (abortId != null) { - clearTimeout(abortId); - } - return response; - }; + const url = createRequestUrl(args.url, args.queryParameters); + let requestBody: BodyInit | undefined = await getRequestBody({ + body: args.body, + type: args.requestType === "json" ? "json" : "other", + }); + const fetchFn = await getFetchFn(); try { - let response = await makeRequest(); - - for (let i = 0; i < (args.maxRetries ?? DEFAULT_MAX_RETRIES); ++i) { - if ( - response.status === 408 || - response.status === 409 || - response.status === 429 || - response.status >= 500 - ) { - const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(i, 2), MAX_RETRY_DELAY); - await new Promise((resolve) => setTimeout(resolve, delay)); - response = await makeRequest(); - } else { - break; - } - } - - let body: unknown; - if (response.body != null && args.responseType === "blob") { - body = await response.blob(); - } else if (response.body != null && args.responseType === "streaming") { - body = response.body; - } else { - const text = await response.text(); - if (text.length > 0) { - try { - body = JSON.parse(text); - } catch (err) { - return { - ok: false, - error: { - reason: "non-json", - statusCode: response.status, - rawBody: text, - }, - }; - } - } - } + const response = await requestWithRetries( + async () => + makeRequest( + fetchFn, + url, + args.method, + headers, + requestBody, + args.timeoutMs, + args.abortSignal, + args.withCredentials, + args.duplex + ), + args.maxRetries + ); + let responseBody = await getResponseBody(response, args.responseType); if (response.status >= 200 && response.status < 400) { return { ok: true, - body: body as R, + body: responseBody as R, headers: response.headers, }; } else { @@ -147,12 +100,20 @@ async function fetcherImpl(args: Fetcher.Args): Promise +): string { + return Object.keys(queryParameters ?? {}).length > 0 + ? `${baseUrl}?${qs.stringify(queryParameters, { arrayFormat: "repeat" })}` + : baseUrl; +} diff --git a/src/core/fetcher/getFetchFn.ts b/src/core/fetcher/getFetchFn.ts new file mode 100644 index 000000000..9fd9bfc42 --- /dev/null +++ b/src/core/fetcher/getFetchFn.ts @@ -0,0 +1,25 @@ +import { RUNTIME } from "../runtime"; + +/** + * Returns a fetch function based on the runtime + */ +export async function getFetchFn(): Promise { + // In Node.js 18+ environments, use native fetch + if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) { + return fetch; + } + + // In Node.js 18 or lower environments, the SDK always uses`node-fetch`. + if (RUNTIME.type === "node") { + return (await import("node-fetch")).default as any; + } + + // Otherwise the SDK uses global fetch if available, + // and falls back to node-fetch. + if (typeof fetch == "function") { + return fetch; + } + + // Defaults to node `node-fetch` if global fetch isn't available + return (await import("node-fetch")).default as any; +} diff --git a/src/core/fetcher/getRequestBody.ts b/src/core/fetcher/getRequestBody.ts new file mode 100644 index 000000000..1138414b1 --- /dev/null +++ b/src/core/fetcher/getRequestBody.ts @@ -0,0 +1,14 @@ +export declare namespace GetRequestBody { + interface Args { + body: unknown; + type: "json" | "file" | "bytes" | "other"; + } +} + +export async function getRequestBody({ body, type }: GetRequestBody.Args): Promise { + if (type.includes("json")) { + return JSON.stringify(body); + } else { + return body as BodyInit; + } +} diff --git a/src/core/fetcher/getResponseBody.ts b/src/core/fetcher/getResponseBody.ts new file mode 100644 index 000000000..d046e6ea2 --- /dev/null +++ b/src/core/fetcher/getResponseBody.ts @@ -0,0 +1,34 @@ +import { chooseStreamWrapper } from "./stream-wrappers/chooseStreamWrapper"; + +export async function getResponseBody(response: Response, responseType?: string): Promise { + if (response.body != null && responseType === "blob") { + return await response.blob(); + } else if (response.body != null && responseType === "arrayBuffer") { + return await response.arrayBuffer(); + } else if (response.body != null && responseType === "sse") { + return response.body; + } else if (response.body != null && responseType === "streaming") { + return chooseStreamWrapper(response.body); + } else if (response.body != null && responseType === "text") { + return await response.text(); + } else { + const text = await response.text(); + if (text.length > 0) { + try { + let responseBody = JSON.parse(text); + return responseBody; + } catch (err) { + return { + ok: false, + error: { + reason: "non-json", + statusCode: response.status, + rawBody: text, + }, + }; + } + } else { + return undefined; + } + } +} diff --git a/src/core/fetcher/makeRequest.ts b/src/core/fetcher/makeRequest.ts new file mode 100644 index 000000000..8fb4bace4 --- /dev/null +++ b/src/core/fetcher/makeRequest.ts @@ -0,0 +1,44 @@ +import { anySignal, getTimeoutSignal } from "./signals"; + +export const makeRequest = async ( + fetchFn: (url: string, init: RequestInit) => Promise, + url: string, + method: string, + headers: Record, + requestBody: BodyInit | undefined, + timeoutMs?: number, + abortSignal?: AbortSignal, + withCredentials?: boolean, + duplex?: "half" +): Promise => { + const signals: AbortSignal[] = []; + + // Add timeout signal + let timeoutAbortId: NodeJS.Timeout | undefined = undefined; + if (timeoutMs != null) { + const { signal, abortId } = getTimeoutSignal(timeoutMs); + timeoutAbortId = abortId; + signals.push(signal); + } + + // Add arbitrary signal + if (abortSignal != null) { + signals.push(abortSignal); + } + let newSignals = anySignal(signals); + const response = await fetchFn(url, { + method: method, + headers, + body: requestBody, + signal: newSignals, + credentials: withCredentials ? "include" : undefined, + // @ts-ignore + duplex, + }); + + if (timeoutAbortId != null) { + clearTimeout(timeoutAbortId); + } + + return response; +}; diff --git a/src/core/fetcher/requestWithRetries.ts b/src/core/fetcher/requestWithRetries.ts new file mode 100644 index 000000000..8d5af9d5a --- /dev/null +++ b/src/core/fetcher/requestWithRetries.ts @@ -0,0 +1,33 @@ +const INITIAL_RETRY_DELAY = 1000; // in milliseconds +const MAX_RETRY_DELAY = 60000; // in milliseconds +const DEFAULT_MAX_RETRIES = 2; +const JITTER_FACTOR = 0.2; // 20% random jitter + +function addJitter(delay: number): number { + // Generate a random value between -JITTER_FACTOR and +JITTER_FACTOR + const jitterMultiplier = 1 + (Math.random() * 2 - 1) * JITTER_FACTOR; + return delay * jitterMultiplier; +} + +export async function requestWithRetries( + requestFn: () => Promise, + maxRetries: number = DEFAULT_MAX_RETRIES +): Promise { + let response: Response = await requestFn(); + + for (let i = 0; i < maxRetries; ++i) { + if ([408, 409, 429].includes(response.status) || response.status >= 500) { + // Calculate base delay using exponential backoff (in milliseconds) + const baseDelay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY); + + // Add jitter to the delay + const delayWithJitter = addJitter(baseDelay); + + await new Promise((resolve) => setTimeout(resolve, delayWithJitter)); + response = await requestFn(); + } else { + break; + } + } + return response!; +} diff --git a/src/core/fetcher/signals.ts b/src/core/fetcher/signals.ts new file mode 100644 index 000000000..6c124ff79 --- /dev/null +++ b/src/core/fetcher/signals.ts @@ -0,0 +1,38 @@ +const TIMEOUT = "timeout"; + +export function getTimeoutSignal(timeoutMs: number): { signal: AbortSignal; abortId: NodeJS.Timeout } { + const controller = new AbortController(); + const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs); + return { signal: controller.signal, abortId }; +} + +/** + * Returns an abort signal that is getting aborted when + * at least one of the specified abort signals is aborted. + * + * Requires at least node.js 18. + */ +export function anySignal(...args: AbortSignal[] | [AbortSignal[]]): AbortSignal { + // Allowing signals to be passed either as array + // of signals or as multiple arguments. + const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args); + + const controller = new AbortController(); + + for (const signal of signals) { + if (signal.aborted) { + // Exiting early if one of the signals + // is already aborted. + controller.abort((signal as any)?.reason); + break; + } + + // Listening for signals and removing the listeners + // when at least one symbol is aborted. + signal.addEventListener("abort", () => controller.abort((signal as any)?.reason), { + signal: controller.signal, + }); + } + + return controller.signal; +} diff --git a/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts b/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts new file mode 100644 index 000000000..4d7b7d52e --- /dev/null +++ b/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts @@ -0,0 +1,256 @@ +import type { Writable } from "readable-stream"; +import { EventCallback, StreamWrapper } from "./chooseStreamWrapper"; + +export class Node18UniversalStreamWrapper + implements + StreamWrapper | Writable | WritableStream, ReadFormat> +{ + private readableStream: ReadableStream; + private reader: ReadableStreamDefaultReader; + private events: Record; + private paused: boolean; + private resumeCallback: ((value?: unknown) => void) | null; + private encoding: string | null; + + constructor(readableStream: ReadableStream) { + this.readableStream = readableStream; + this.reader = this.readableStream.getReader(); + this.events = { + data: [], + end: [], + error: [], + readable: [], + close: [], + pause: [], + resume: [], + }; + this.paused = false; + this.resumeCallback = null; + this.encoding = null; + } + + public on(event: string, callback: EventCallback): void { + this.events[event]?.push(callback); + } + + public off(event: string, callback: EventCallback): void { + this.events[event] = this.events[event]?.filter((cb) => cb !== callback); + } + + public pipe( + dest: Node18UniversalStreamWrapper | Writable | WritableStream + ): Node18UniversalStreamWrapper | Writable | WritableStream { + this.on("data", async (chunk) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._write(chunk); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } else { + dest.write(chunk); + } + }); + + this.on("end", async () => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._end(); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.close(); + } else { + dest.end(); + } + }); + + this.on("error", async (error) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._error(error); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.abort(error); + } else { + dest.destroy(error); + } + }); + + this._startReading(); + + return dest; + } + + public pipeTo( + dest: Node18UniversalStreamWrapper | Writable | WritableStream + ): Node18UniversalStreamWrapper | Writable | WritableStream { + return this.pipe(dest); + } + + public unpipe(dest: Node18UniversalStreamWrapper | Writable | WritableStream): void { + this.off("data", async (chunk) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._write(chunk); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } else { + dest.write(chunk); + } + }); + + this.off("end", async () => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._end(); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.close(); + } else { + dest.end(); + } + }); + + this.off("error", async (error) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._error(error); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.abort(error); + } else { + dest.destroy(error); + } + }); + } + + public destroy(error?: Error): void { + this.reader + .cancel(error) + .then(() => { + this._emit("close"); + }) + .catch((err) => { + this._emit("error", err); + }); + } + + public pause(): void { + this.paused = true; + this._emit("pause"); + } + + public resume(): void { + if (this.paused) { + this.paused = false; + this._emit("resume"); + if (this.resumeCallback) { + this.resumeCallback(); + this.resumeCallback = null; + } + } + } + + public get isPaused(): boolean { + return this.paused; + } + + public async read(): Promise { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + + if (done) { + return undefined; + } + return value; + } + + public setEncoding(encoding: string): void { + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: ReadFormat[] = []; + + while (true) { + const { done, value } = await this.reader.read(); + if (done) { + break; + } + if (value) { + chunks.push(value); + } + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(await new Blob(chunks).arrayBuffer()); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } + + private _write(chunk: ReadFormat): void { + this._emit("data", chunk); + } + + private _end(): void { + this._emit("end"); + } + + private _error(error: any): void { + this._emit("error", error); + } + + private _emit(event: string, data?: any): void { + if (this.events[event]) { + for (const callback of this.events[event] || []) { + callback(data); + } + } + } + + private async _startReading(): Promise { + try { + this._emit("readable"); + while (true) { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + this._emit("end"); + this._emit("close"); + break; + } + if (value) { + this._emit("data", value); + } + } + } catch (error) { + this._emit("error", error); + } + } + + [Symbol.asyncIterator](): AsyncIterableIterator { + return { + next: async () => { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + return { done: true, value: undefined }; + } + return { done: false, value }; + }, + [Symbol.asyncIterator]() { + return this; + }, + }; + } +} diff --git a/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts b/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts new file mode 100644 index 000000000..ba5f72767 --- /dev/null +++ b/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts @@ -0,0 +1,106 @@ +import type { Readable, Writable } from "readable-stream"; +import { EventCallback, StreamWrapper } from "./chooseStreamWrapper"; + +export class NodePre18StreamWrapper implements StreamWrapper { + private readableStream: Readable; + private encoding: string | undefined; + + constructor(readableStream: Readable) { + this.readableStream = readableStream; + } + + public on(event: string, callback: EventCallback): void { + this.readableStream.on(event, callback); + } + + public off(event: string, callback: EventCallback): void { + this.readableStream.off(event, callback); + } + + public pipe(dest: Writable): Writable { + this.readableStream.pipe(dest); + return dest; + } + + public pipeTo(dest: Writable): Writable { + return this.pipe(dest); + } + + public unpipe(dest?: Writable): void { + if (dest) { + this.readableStream.unpipe(dest); + } else { + this.readableStream.unpipe(); + } + } + + public destroy(error?: Error): void { + this.readableStream.destroy(error); + } + + public pause(): void { + this.readableStream.pause(); + } + + public resume(): void { + this.readableStream.resume(); + } + + public get isPaused(): boolean { + return this.readableStream.isPaused(); + } + + public async read(): Promise { + return new Promise((resolve, reject) => { + const chunk = this.readableStream.read(); + if (chunk) { + resolve(chunk); + } else { + this.readableStream.once("readable", () => { + const chunk = this.readableStream.read(); + resolve(chunk); + }); + this.readableStream.once("error", reject); + } + }); + } + + public setEncoding(encoding?: string): void { + this.readableStream.setEncoding(encoding as BufferEncoding); + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: Uint8Array[] = []; + const encoder = new TextEncoder(); + this.readableStream.setEncoding((this.encoding || "utf-8") as BufferEncoding); + + for await (const chunk of this.readableStream) { + chunks.push(encoder.encode(chunk)); + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(Buffer.concat(chunks)); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } + + public [Symbol.asyncIterator](): AsyncIterableIterator { + const readableStream = this.readableStream; + const iterator = readableStream[Symbol.asyncIterator](); + + // Create and return an async iterator that yields buffers + return { + async next(): Promise> { + const { value, done } = await iterator.next(); + return { value: value as Buffer, done }; + }, + [Symbol.asyncIterator]() { + return this; + }, + }; + } +} diff --git a/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts b/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts new file mode 100644 index 000000000..263af0091 --- /dev/null +++ b/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts @@ -0,0 +1,243 @@ +import { StreamWrapper } from "./chooseStreamWrapper"; + +type EventCallback = (data?: any) => void; + +export class UndiciStreamWrapper + implements StreamWrapper | WritableStream, ReadFormat> +{ + private readableStream: ReadableStream; + private reader: ReadableStreamDefaultReader; + private events: Record; + private paused: boolean; + private resumeCallback: ((value?: unknown) => void) | null; + private encoding: string | null; + + constructor(readableStream: ReadableStream) { + this.readableStream = readableStream; + this.reader = this.readableStream.getReader(); + this.events = { + data: [], + end: [], + error: [], + readable: [], + close: [], + pause: [], + resume: [], + }; + this.paused = false; + this.resumeCallback = null; + this.encoding = null; + } + + public on(event: string, callback: EventCallback): void { + this.events[event]?.push(callback); + } + + public off(event: string, callback: EventCallback): void { + this.events[event] = this.events[event]?.filter((cb) => cb !== callback); + } + + public pipe( + dest: UndiciStreamWrapper | WritableStream + ): UndiciStreamWrapper | WritableStream { + this.on("data", (chunk) => { + if (dest instanceof UndiciStreamWrapper) { + dest._write(chunk); + } else { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } + }); + + this.on("end", () => { + if (dest instanceof UndiciStreamWrapper) { + dest._end(); + } else { + const writer = dest.getWriter(); + writer.close(); + } + }); + + this.on("error", (error) => { + if (dest instanceof UndiciStreamWrapper) { + dest._error(error); + } else { + const writer = dest.getWriter(); + writer.abort(error); + } + }); + + this._startReading(); + + return dest; + } + + public pipeTo( + dest: UndiciStreamWrapper | WritableStream + ): UndiciStreamWrapper | WritableStream { + return this.pipe(dest); + } + + public unpipe(dest: UndiciStreamWrapper | WritableStream): void { + this.off("data", (chunk) => { + if (dest instanceof UndiciStreamWrapper) { + dest._write(chunk); + } else { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } + }); + + this.off("end", () => { + if (dest instanceof UndiciStreamWrapper) { + dest._end(); + } else { + const writer = dest.getWriter(); + writer.close(); + } + }); + + this.off("error", (error) => { + if (dest instanceof UndiciStreamWrapper) { + dest._error(error); + } else { + const writer = dest.getWriter(); + writer.abort(error); + } + }); + } + + public destroy(error?: Error): void { + this.reader + .cancel(error) + .then(() => { + this._emit("close"); + }) + .catch((err) => { + this._emit("error", err); + }); + } + + public pause(): void { + this.paused = true; + this._emit("pause"); + } + + public resume(): void { + if (this.paused) { + this.paused = false; + this._emit("resume"); + if (this.resumeCallback) { + this.resumeCallback(); + this.resumeCallback = null; + } + } + } + + public get isPaused(): boolean { + return this.paused; + } + + public async read(): Promise { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + return undefined; + } + return value; + } + + public setEncoding(encoding: string): void { + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: BlobPart[] = []; + + while (true) { + const { done, value } = await this.reader.read(); + if (done) { + break; + } + if (value) { + chunks.push(value); + } + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(await new Blob(chunks).arrayBuffer()); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } + + private _write(chunk: ReadFormat): void { + this._emit("data", chunk); + } + + private _end(): void { + this._emit("end"); + } + + private _error(error: any): void { + this._emit("error", error); + } + + private _emit(event: string, data?: any): void { + if (this.events[event]) { + for (const callback of this.events[event] || []) { + callback(data); + } + } + } + + private async _startReading(): Promise { + try { + this._emit("readable"); + while (true) { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + this._emit("end"); + this._emit("close"); + break; + } + if (value) { + this._emit("data", value); + } + } + } catch (error) { + this._emit("error", error); + } + } + + [Symbol.asyncIterator](): AsyncIterableIterator { + return { + next: async () => { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + return { done: true, value: undefined }; + } + return { done: false, value }; + }, + [Symbol.asyncIterator]() { + return this; + }, + }; + } +} diff --git a/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts b/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts new file mode 100644 index 000000000..2abd6b2ba --- /dev/null +++ b/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts @@ -0,0 +1,33 @@ +import type { Readable } from "readable-stream"; +import { RUNTIME } from "../../runtime"; + +export type EventCallback = (data?: any) => void; + +export interface StreamWrapper { + setEncoding(encoding?: string): void; + on(event: string, callback: EventCallback): void; + off(event: string, callback: EventCallback): void; + pipe(dest: WritableStream): WritableStream; + pipeTo(dest: WritableStream): WritableStream; + unpipe(dest?: WritableStream): void; + destroy(error?: Error): void; + pause(): void; + resume(): void; + get isPaused(): boolean; + read(): Promise; + text(): Promise; + json(): Promise; + [Symbol.asyncIterator](): AsyncIterableIterator; +} + +export async function chooseStreamWrapper(responseBody: any): Promise>> { + if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) { + return new (await import("./Node18UniversalStreamWrapper")).Node18UniversalStreamWrapper( + responseBody as ReadableStream + ); + } else if (RUNTIME.type !== "node" && typeof fetch === "function") { + return new (await import("./UndiciStreamWrapper")).UndiciStreamWrapper(responseBody as ReadableStream); + } else { + return new (await import("./NodePre18StreamWrapper")).NodePre18StreamWrapper(responseBody as Readable); + } +} diff --git a/src/core/index.ts b/src/core/index.ts index e2eb66e80..2d20c46f3 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,3 +1,4 @@ export * from "./fetcher"; export * from "./auth"; +export * from "./runtime"; export * as serialization from "./schemas"; diff --git a/src/core/runtime/index.ts b/src/core/runtime/index.ts new file mode 100644 index 000000000..5c76dbb13 --- /dev/null +++ b/src/core/runtime/index.ts @@ -0,0 +1 @@ +export { RUNTIME } from "./runtime"; diff --git a/src/core/runtime/runtime.ts b/src/core/runtime/runtime.ts new file mode 100644 index 000000000..4d0687e8e --- /dev/null +++ b/src/core/runtime/runtime.ts @@ -0,0 +1,126 @@ +interface DenoGlobal { + version: { + deno: string; + }; +} + +interface BunGlobal { + version: string; +} + +declare const Deno: DenoGlobal; +declare const Bun: BunGlobal; + +/** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ +const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is a Web Worker. + */ +const isWebWorker = + typeof self === "object" && + // @ts-ignore + typeof self?.importScripts === "function" && + (self.constructor?.name === "DedicatedWorkerGlobalScope" || + self.constructor?.name === "ServiceWorkerGlobalScope" || + self.constructor?.name === "SharedWorkerGlobalScope"); + +/** + * A constant that indicates whether the environment the code is running is Deno. + */ +const isDeno = + typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ +const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is Node.JS. + */ +const isNode = + typeof process !== "undefined" && + Boolean(process.version) && + Boolean(process.versions?.node) && + // Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions + !isDeno && + !isBun; + +/** + * A constant that indicates whether the environment the code is running is in React-Native. + * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js + */ +const isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + +/** + * A constant that indicates whether the environment the code is running is Cloudflare. + * https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent + */ +const isCloudflare = typeof globalThis !== "undefined" && globalThis?.navigator?.userAgent === "Cloudflare-Workers"; + +/** + * A constant that indicates which environment and version the SDK is running in. + */ +export const RUNTIME: Runtime = evaluateRuntime(); + +export interface Runtime { + type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd"; + version?: string; + parsedVersion?: number; +} + +function evaluateRuntime(): Runtime { + if (isBrowser) { + return { + type: "browser", + version: window.navigator.userAgent, + }; + } + + if (isCloudflare) { + return { + type: "workerd", + }; + } + + if (isWebWorker) { + return { + type: "web-worker", + }; + } + + if (isDeno) { + return { + type: "deno", + version: Deno.version.deno, + }; + } + + if (isBun) { + return { + type: "bun", + version: Bun.version, + }; + } + + if (isNode) { + return { + type: "node", + version: process.versions.node, + parsedVersion: Number(process.versions.node.split(".")[0]), + }; + } + + if (isReactNative) { + return { + type: "react-native", + }; + } + + return { + type: "unknown", + }; +} diff --git a/src/core/schemas/Schema.ts b/src/core/schemas/Schema.ts index 870f373ba..2a72eacec 100644 --- a/src/core/schemas/Schema.ts +++ b/src/core/schemas/Schema.ts @@ -1,5 +1,4 @@ import { SchemaUtils } from "./builders"; -import { MaybePromise } from "./utils/MaybePromise"; export type Schema = BaseSchema & SchemaUtils; @@ -7,12 +6,13 @@ export type inferRaw = S extends Schema ? Raw export type inferParsed = S extends Schema ? Parsed : never; export interface BaseSchema { - parse: (raw: unknown, opts?: SchemaOptions) => MaybePromise>; - json: (parsed: unknown, opts?: SchemaOptions) => MaybePromise>; - getType: () => SchemaType | Promise; + parse: (raw: unknown, opts?: SchemaOptions) => MaybeValid; + json: (parsed: unknown, opts?: SchemaOptions) => MaybeValid; + getType: () => SchemaType | SchemaType; } export const SchemaType = { + BIGINT: "bigint", DATE: "date", ENUM: "enum", LIST: "list", @@ -91,4 +91,9 @@ export interface SchemaOptions { * helpful for zurg's internal debug logging. */ breadcrumbsPrefix?: string[]; + + /** + * whether to send 'null' for optional properties explicitly set to 'undefined'. + */ + omitUndefined?: boolean; } diff --git a/src/core/schemas/builders/bigint/bigint.ts b/src/core/schemas/builders/bigint/bigint.ts new file mode 100644 index 000000000..dc9c742e0 --- /dev/null +++ b/src/core/schemas/builders/bigint/bigint.ts @@ -0,0 +1,50 @@ +import { BaseSchema, Schema, SchemaType } from "../../Schema"; +import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; +import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; +import { getSchemaUtils } from "../schema-utils"; + +export function bigint(): Schema { + const baseSchema: BaseSchema = { + parse: (raw, { breadcrumbsPrefix = [] } = {}) => { + if (typeof raw !== "string") { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(raw, "string"), + }, + ], + }; + } + return { + ok: true, + value: BigInt(raw), + }; + }, + json: (bigint, { breadcrumbsPrefix = [] } = {}) => { + if (typeof bigint === "bigint") { + return { + ok: true, + value: bigint.toString(), + }; + } else { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(bigint, "bigint"), + }, + ], + }; + } + }, + getType: () => SchemaType.BIGINT, + }; + + return { + ...maybeSkipValidation(baseSchema), + ...getSchemaUtils(baseSchema), + }; +} diff --git a/src/core/schemas/builders/bigint/index.ts b/src/core/schemas/builders/bigint/index.ts new file mode 100644 index 000000000..e5843043f --- /dev/null +++ b/src/core/schemas/builders/bigint/index.ts @@ -0,0 +1 @@ +export { bigint } from "./bigint"; diff --git a/src/core/schemas/builders/index.ts b/src/core/schemas/builders/index.ts index 050cd2c4e..65211f925 100644 --- a/src/core/schemas/builders/index.ts +++ b/src/core/schemas/builders/index.ts @@ -1,3 +1,4 @@ +export * from "./bigint"; export * from "./date"; export * from "./enum"; export * from "./lazy"; diff --git a/src/core/schemas/builders/lazy/lazy.ts b/src/core/schemas/builders/lazy/lazy.ts index a665472d2..835c61f8a 100644 --- a/src/core/schemas/builders/lazy/lazy.ts +++ b/src/core/schemas/builders/lazy/lazy.ts @@ -1,7 +1,7 @@ import { BaseSchema, Schema } from "../../Schema"; import { getSchemaUtils } from "../schema-utils"; -export type SchemaGetter> = () => SchemaType | Promise; +export type SchemaGetter> = () => SchemaType; export function lazy(getter: SchemaGetter>): Schema { const baseSchema = constructLazyBaseSchema(getter); @@ -15,20 +15,18 @@ export function constructLazyBaseSchema( getter: SchemaGetter> ): BaseSchema { return { - parse: async (raw, opts) => (await getMemoizedSchema(getter)).parse(raw, opts), - json: async (parsed, opts) => (await getMemoizedSchema(getter)).json(parsed, opts), - getType: async () => (await getMemoizedSchema(getter)).getType(), + parse: (raw, opts) => getMemoizedSchema(getter).parse(raw, opts), + json: (parsed, opts) => getMemoizedSchema(getter).json(parsed, opts), + getType: () => getMemoizedSchema(getter).getType(), }; } type MemoizedGetter> = SchemaGetter & { __zurg_memoized?: SchemaType }; -export async function getMemoizedSchema>( - getter: SchemaGetter -): Promise { +export function getMemoizedSchema>(getter: SchemaGetter): SchemaType { const castedGetter = getter as MemoizedGetter; if (castedGetter.__zurg_memoized == null) { - castedGetter.__zurg_memoized = await getter(); + castedGetter.__zurg_memoized = getter(); } return castedGetter.__zurg_memoized; } diff --git a/src/core/schemas/builders/lazy/lazyObject.ts b/src/core/schemas/builders/lazy/lazyObject.ts index e48c01666..38c9e2840 100644 --- a/src/core/schemas/builders/lazy/lazyObject.ts +++ b/src/core/schemas/builders/lazy/lazyObject.ts @@ -7,8 +7,8 @@ import { constructLazyBaseSchema, getMemoizedSchema, SchemaGetter } from "./lazy export function lazyObject(getter: SchemaGetter>): ObjectSchema { const baseSchema: BaseObjectSchema = { ...constructLazyBaseSchema(getter), - _getRawProperties: async () => (await getMemoizedSchema(getter))._getRawProperties(), - _getParsedProperties: async () => (await getMemoizedSchema(getter))._getParsedProperties(), + _getRawProperties: () => getMemoizedSchema(getter)._getRawProperties(), + _getParsedProperties: () => getMemoizedSchema(getter)._getParsedProperties(), }; return { diff --git a/src/core/schemas/builders/list/list.ts b/src/core/schemas/builders/list/list.ts index b333321b5..e4c5c4a4a 100644 --- a/src/core/schemas/builders/list/list.ts +++ b/src/core/schemas/builders/list/list.ts @@ -1,12 +1,11 @@ import { BaseSchema, MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { getSchemaUtils } from "../schema-utils"; export function list(schema: Schema): Schema { const baseSchema: BaseSchema = { - parse: async (raw, opts) => + parse: (raw, opts) => validateAndTransformArray(raw, (item, index) => schema.parse(item, { ...opts, @@ -29,10 +28,10 @@ export function list(schema: Schema): Schema( +function validateAndTransformArray( value: unknown, - transformItem: (item: Raw, index: number) => MaybePromise> -): Promise> { + transformItem: (item: Raw, index: number) => MaybeValid +): MaybeValid { if (!Array.isArray(value)) { return { ok: false, @@ -45,7 +44,7 @@ async function validateAndTransformArray( }; } - const maybeValidItems = await Promise.all(value.map((item, index) => transformItem(item, index))); + const maybeValidItems = value.map((item, index) => transformItem(item, index)); return maybeValidItems.reduce>( (acc, item) => { diff --git a/src/core/schemas/builders/object-like/getObjectLikeUtils.ts b/src/core/schemas/builders/object-like/getObjectLikeUtils.ts index 270ea170c..8331d08da 100644 --- a/src/core/schemas/builders/object-like/getObjectLikeUtils.ts +++ b/src/core/schemas/builders/object-like/getObjectLikeUtils.ts @@ -20,8 +20,8 @@ export function withParsedProperties Properties[K]) } ): ObjectLikeSchema { const objectSchema: BaseSchema = { - parse: async (raw, opts) => { - const parsedObject = await objectLike.parse(raw, opts); + parse: (raw, opts) => { + const parsedObject = objectLike.parse(raw, opts); if (!parsedObject.ok) { return parsedObject; } diff --git a/src/core/schemas/builders/object/object.ts b/src/core/schemas/builders/object/object.ts index 4abadfb38..8d40c33c8 100644 --- a/src/core/schemas/builders/object/object.ts +++ b/src/core/schemas/builders/object/object.ts @@ -4,7 +4,6 @@ import { filterObject } from "../../utils/filterObject"; import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; import { isPlainObject } from "../../utils/isPlainObject"; import { keys } from "../../utils/keys"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { partition } from "../../utils/partition"; import { getObjectLikeUtils } from "../object-like"; @@ -34,15 +33,12 @@ export function object > = { _getRawProperties: () => - Promise.resolve( - Object.entries(schemas).map(([parsedKey, propertySchema]) => - isProperty(propertySchema) ? propertySchema.rawKey : parsedKey - ) as unknown as (keyof inferRawObjectFromPropertySchemas)[] - ), - _getParsedProperties: () => - Promise.resolve(keys(schemas) as unknown as (keyof inferParsedObjectFromPropertySchemas)[]), + Object.entries(schemas).map(([parsedKey, propertySchema]) => + isProperty(propertySchema) ? propertySchema.rawKey : parsedKey + ) as unknown as (keyof inferRawObjectFromPropertySchemas)[], + _getParsedProperties: () => keys(schemas) as unknown as (keyof inferParsedObjectFromPropertySchemas)[], - parse: async (raw, opts) => { + parse: (raw, opts) => { const rawKeyToProperty: Record = {}; const requiredKeys: string[] = []; @@ -60,7 +56,7 @@ export function object { + json: (parsed, opts) => { const requiredKeys: string[] = []; for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { @@ -96,7 +93,7 @@ export function object MaybePromise> } - | undefined => { + ): { transformedKey: string; transform: (propertyValue: unknown) => MaybeValid } | undefined => { const property = schemas[parsedKey as keyof T]; // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition @@ -139,6 +134,7 @@ export function object({ +function validateAndTransformObject({ value, requiredKeys, getProperty, @@ -165,11 +161,12 @@ async function validateAndTransformObject({ requiredKeys: string[]; getProperty: ( preTransformedKey: string - ) => { transformedKey: string; transform: (propertyValue: unknown) => MaybePromise> } | undefined; + ) => { transformedKey: string; transform: (propertyValue: unknown) => MaybeValid } | undefined; unrecognizedObjectKeys: "fail" | "passthrough" | "strip" | undefined; skipValidation: boolean | undefined; breadcrumbsPrefix: string[] | undefined; -}): Promise> { + omitUndefined: boolean | undefined; +}): MaybeValid { if (!isPlainObject(value)) { return { ok: false, @@ -192,7 +189,7 @@ async function validateAndTransformObject({ if (property != null) { missingRequiredKeys.delete(preTransformedKey); - const value = await property.transform(preTransformedItemValue); + const value = property.transform(preTransformedItemValue); if (value.ok) { transformed[property.transformedKey] = value.value; } else { @@ -242,25 +239,19 @@ export function getObjectUtils(schema: BaseObjectSchema(extension: ObjectSchema) => { const baseSchema: BaseObjectSchema = { - _getParsedProperties: async () => [ - ...(await schema._getParsedProperties()), - ...(await extension._getParsedProperties()), - ], - _getRawProperties: async () => [ - ...(await schema._getRawProperties()), - ...(await extension._getRawProperties()), - ], - parse: async (raw, opts) => { + _getParsedProperties: () => [...schema._getParsedProperties(), ...extension._getParsedProperties()], + _getRawProperties: () => [...schema._getRawProperties(), ...extension._getRawProperties()], + parse: (raw, opts) => { return validateAndTransformExtendedObject({ - extensionKeys: await extension._getRawProperties(), + extensionKeys: extension._getRawProperties(), value: raw, transformBase: (rawBase) => schema.parse(rawBase, opts), transformExtension: (rawExtension) => extension.parse(rawExtension, opts), }); }, - json: async (parsed, opts) => { + json: (parsed, opts) => { return validateAndTransformExtendedObject({ - extensionKeys: await extension._getParsedProperties(), + extensionKeys: extension._getParsedProperties(), value: parsed, transformBase: (parsedBase) => schema.json(parsedBase, opts), transformExtension: (parsedExtension) => extension.json(parsedExtension, opts), @@ -269,6 +260,47 @@ export function getObjectUtils(schema: BaseObjectSchema SchemaType.OBJECT, }; + return { + ...baseSchema, + ...getSchemaUtils(baseSchema), + ...getObjectLikeUtils(baseSchema), + ...getObjectUtils(baseSchema), + }; + }, + passthrough: () => { + const baseSchema: BaseObjectSchema = + { + _getParsedProperties: () => schema._getParsedProperties(), + _getRawProperties: () => schema._getRawProperties(), + parse: (raw, opts) => { + const transformed = schema.parse(raw, { ...opts, unrecognizedObjectKeys: "passthrough" }); + if (!transformed.ok) { + return transformed; + } + return { + ok: true, + value: { + ...(raw as any), + ...transformed.value, + }, + }; + }, + json: (parsed, opts) => { + const transformed = schema.json(parsed, { ...opts, unrecognizedObjectKeys: "passthrough" }); + if (!transformed.ok) { + return transformed; + } + return { + ok: true, + value: { + ...(parsed as any), + ...transformed.value, + }, + }; + }, + getType: () => SchemaType.OBJECT, + }; + return { ...baseSchema, ...getSchemaUtils(baseSchema), @@ -279,7 +311,7 @@ export function getObjectUtils(schema: BaseObjectSchema({ +function validateAndTransformExtendedObject({ extensionKeys, value, transformBase, @@ -287,16 +319,16 @@ async function validateAndTransformExtendedObject MaybePromise>; - transformExtension: (value: unknown) => MaybePromise>; -}): Promise> { + transformBase: (value: unknown) => MaybeValid; + transformExtension: (value: unknown) => MaybeValid; +}): MaybeValid { const extensionPropertiesSet = new Set(extensionKeys); const [extensionProperties, baseProperties] = partition(keys(value), (key) => extensionPropertiesSet.has(key as keyof PreTransformedExtension) ); - const transformedBase = await transformBase(filterObject(value, baseProperties)); - const transformedExtension = await transformExtension(filterObject(value, extensionProperties)); + const transformedBase = transformBase(filterObject(value, baseProperties)); + const transformedExtension = transformExtension(filterObject(value, extensionProperties)); if (transformedBase.ok && transformedExtension.ok) { return { @@ -317,12 +349,12 @@ async function validateAndTransformExtendedObject): Promise { - return !(await isSchemaOptional(schema)); +function isSchemaRequired(schema: Schema): boolean { + return !isSchemaOptional(schema); } -async function isSchemaOptional(schema: Schema): Promise { - switch (await schema.getType()) { +function isSchemaOptional(schema: Schema): boolean { + switch (schema.getType()) { case SchemaType.ANY: case SchemaType.UNKNOWN: case SchemaType.OPTIONAL: diff --git a/src/core/schemas/builders/object/types.ts b/src/core/schemas/builders/object/types.ts index 17cff4f86..9f87cbb78 100644 --- a/src/core/schemas/builders/object/types.ts +++ b/src/core/schemas/builders/object/types.ts @@ -10,14 +10,15 @@ export type ObjectSchema = BaseObjectSchema & SchemaUtils; export interface BaseObjectSchema extends BaseSchema { - _getRawProperties: () => Promise<(keyof Raw)[]>; - _getParsedProperties: () => Promise<(keyof Parsed)[]>; + _getRawProperties: () => (keyof Raw)[]; + _getParsedProperties: () => (keyof Parsed)[]; } export interface ObjectUtils { extend: ( schemas: ObjectSchema ) => ObjectSchema; + passthrough: () => ObjectSchema; } export type inferRawObject> = O extends ObjectSchema ? Raw : never; diff --git a/src/core/schemas/builders/record/record.ts b/src/core/schemas/builders/record/record.ts index ac1cd22ad..6683ac360 100644 --- a/src/core/schemas/builders/record/record.ts +++ b/src/core/schemas/builders/record/record.ts @@ -2,7 +2,6 @@ import { MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; import { entries } from "../../utils/entries"; import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; import { isPlainObject } from "../../utils/isPlainObject"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { getSchemaUtils } from "../schema-utils"; import { BaseRecordSchema, RecordSchema } from "./types"; @@ -12,10 +11,10 @@ export function record ): RecordSchema { const baseSchema: BaseRecordSchema = { - parse: async (raw, opts) => { + parse: (raw, opts) => { return validateAndTransformRecord({ value: raw, - isKeyNumeric: (await keySchema.getType()) === SchemaType.NUMBER, + isKeyNumeric: keySchema.getType() === SchemaType.NUMBER, transformKey: (key) => keySchema.parse(key, { ...opts, @@ -29,10 +28,10 @@ export function record { + json: (parsed, opts) => { return validateAndTransformRecord({ value: parsed, - isKeyNumeric: (await keySchema.getType()) === SchemaType.NUMBER, + isKeyNumeric: keySchema.getType() === SchemaType.NUMBER, transformKey: (key) => keySchema.json(key, { ...opts, @@ -55,7 +54,7 @@ export function record({ +function validateAndTransformRecord({ value, isKeyNumeric, transformKey, @@ -64,10 +63,10 @@ async function validateAndTransformRecord MaybePromise>; - transformValue: (value: unknown, key: string | number) => MaybePromise>; + transformKey: (key: string | number) => MaybeValid; + transformValue: (value: unknown, key: string | number) => MaybeValid; breadcrumbsPrefix: string[] | undefined; -}): Promise>> { +}): MaybeValid> { if (!isPlainObject(value)) { return { ok: false, @@ -80,14 +79,14 @@ async function validateAndTransformRecord>>>( - async (accPromise, [stringKey, value]) => { + return entries(value).reduce>>( + (accPromise, [stringKey, value]) => { // skip nullish keys if (value == null) { return accPromise; } - const acc = await accPromise; + const acc = accPromise; let key: string | number = stringKey; if (isKeyNumeric) { @@ -96,9 +95,9 @@ async function validateAndTransformRecord }) + { ok: true, value: {} as Record } ); } diff --git a/src/core/schemas/builders/schema-utils/getSchemaUtils.ts b/src/core/schemas/builders/schema-utils/getSchemaUtils.ts index 0c0d379d8..79ecad921 100644 --- a/src/core/schemas/builders/schema-utils/getSchemaUtils.ts +++ b/src/core/schemas/builders/schema-utils/getSchemaUtils.ts @@ -5,8 +5,8 @@ import { ParseError } from "./ParseError"; export interface SchemaUtils { optional: () => Schema; transform: (transformer: SchemaTransformer) => Schema; - parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Promise; - jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Promise; + parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Parsed; + jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Raw; } export interface SchemaTransformer { @@ -18,15 +18,15 @@ export function getSchemaUtils(schema: BaseSchema): Sc return { optional: () => optional(schema), transform: (transformer) => transform(schema, transformer), - parseOrThrow: async (raw, opts) => { - const parsed = await schema.parse(raw, opts); + parseOrThrow: (raw, opts) => { + const parsed = schema.parse(raw, opts); if (parsed.ok) { return parsed.value; } throw new ParseError(parsed.errors); }, - jsonOrThrow: async (parsed, opts) => { - const raw = await schema.json(parsed, opts); + jsonOrThrow: (parsed, opts) => { + const raw = schema.json(parsed, opts); if (raw.ok) { return raw.value; } @@ -53,6 +53,12 @@ export function optional( return schema.parse(raw, opts); }, json: (parsed, opts) => { + if (opts?.omitUndefined && parsed === undefined) { + return { + ok: true, + value: undefined, + }; + } if (parsed == null) { return { ok: true, @@ -75,8 +81,8 @@ export function transform( transformer: SchemaTransformer ): Schema { const baseSchema: BaseSchema = { - parse: async (raw, opts) => { - const parsed = await schema.parse(raw, opts); + parse: (raw, opts) => { + const parsed = schema.parse(raw, opts); if (!parsed.ok) { return parsed; } @@ -85,8 +91,8 @@ export function transform( value: transformer.transform(parsed.value), }; }, - json: async (transformed, opts) => { - const parsed = await transformer.untransform(transformed); + json: (transformed, opts) => { + const parsed = transformer.untransform(transformed); return schema.json(parsed, opts); }, getType: () => schema.getType(), diff --git a/src/core/schemas/builders/set/set.ts b/src/core/schemas/builders/set/set.ts index 3113bcba3..e9e6bb7e5 100644 --- a/src/core/schemas/builders/set/set.ts +++ b/src/core/schemas/builders/set/set.ts @@ -7,8 +7,8 @@ import { getSchemaUtils } from "../schema-utils"; export function set(schema: Schema): Schema> { const listSchema = list(schema); const baseSchema: BaseSchema> = { - parse: async (raw, opts) => { - const parsedList = await listSchema.parse(raw, opts); + parse: (raw, opts) => { + const parsedList = listSchema.parse(raw, opts); if (parsedList.ok) { return { ok: true, @@ -18,7 +18,7 @@ export function set(schema: Schema): Schema { + json: (parsed, opts) => { if (!(parsed instanceof Set)) { return { ok: false, @@ -30,7 +30,7 @@ export function set(schema: Schema): Schema SchemaType.SET, diff --git a/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts b/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts index 771dc6a7e..21ed3df0f 100644 --- a/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts +++ b/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts @@ -1,5 +1,4 @@ import { BaseSchema, MaybeValid, Schema, SchemaOptions, SchemaType, ValidationError } from "../../Schema"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { getSchemaUtils } from "../schema-utils"; import { inferParsedUnidiscriminatedUnionSchema, inferRawUnidiscriminatedUnionSchema } from "./types"; @@ -11,14 +10,14 @@ export function undiscriminatedUnion, ...Schem inferRawUnidiscriminatedUnionSchema, inferParsedUnidiscriminatedUnionSchema > = { - parse: async (raw, opts) => { + parse: (raw, opts) => { return validateAndTransformUndiscriminatedUnion>( (schema, opts) => schema.parse(raw, opts), schemas, opts ); }, - json: async (parsed, opts) => { + json: (parsed, opts) => { return validateAndTransformUndiscriminatedUnion>( (schema, opts) => schema.json(parsed, opts), schemas, @@ -34,14 +33,14 @@ export function undiscriminatedUnion, ...Schem }; } -async function validateAndTransformUndiscriminatedUnion( - transform: (schema: Schema, opts: SchemaOptions) => MaybePromise>, +function validateAndTransformUndiscriminatedUnion( + transform: (schema: Schema, opts: SchemaOptions) => MaybeValid, schemas: Schema[], opts: SchemaOptions | undefined -): Promise> { +): MaybeValid { const errors: ValidationError[] = []; for (const [index, schema] of schemas.entries()) { - const transformed = await transform(schema, { ...opts, skipValidation: false }); + const transformed = transform(schema, { ...opts, skipValidation: false }); if (transformed.ok) { return transformed; } else { diff --git a/src/core/schemas/builders/union/union.ts b/src/core/schemas/builders/union/union.ts index ed659beb6..ab61475a5 100644 --- a/src/core/schemas/builders/union/union.ts +++ b/src/core/schemas/builders/union/union.ts @@ -2,7 +2,6 @@ import { BaseSchema, MaybeValid, SchemaType } from "../../Schema"; import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; import { isPlainObject } from "../../utils/isPlainObject"; import { keys } from "../../utils/keys"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { enum_ } from "../enum"; import { ObjectSchema } from "../object"; @@ -25,7 +24,7 @@ export function union, U extends Union const discriminantValueSchema = enum_(keys(union) as string[]); const baseSchema: BaseSchema, inferParsedUnion> = { - parse: async (raw, opts) => { + parse: (raw, opts) => { return transformAndValidateUnion({ value: raw, discriminant: rawDiscriminant, @@ -42,7 +41,7 @@ export function union, U extends Union breadcrumbsPrefix: opts?.breadcrumbsPrefix, }); }, - json: async (parsed, opts) => { + json: (parsed, opts) => { return transformAndValidateUnion({ value: parsed, discriminant: parsedDiscriminant, @@ -69,7 +68,7 @@ export function union, U extends Union }; } -async function transformAndValidateUnion< +function transformAndValidateUnion< TransformedDiscriminant extends string, TransformedDiscriminantValue extends string, TransformedAdditionalProperties @@ -86,17 +85,15 @@ async function transformAndValidateUnion< value: unknown; discriminant: string; transformedDiscriminant: TransformedDiscriminant; - transformDiscriminantValue: (discriminantValue: unknown) => MaybePromise>; + transformDiscriminantValue: (discriminantValue: unknown) => MaybeValid; getAdditionalPropertiesSchema: (discriminantValue: string) => ObjectSchema | undefined; allowUnrecognizedUnionMembers: boolean | undefined; transformAdditionalProperties: ( additionalProperties: unknown, additionalPropertiesSchema: ObjectSchema - ) => MaybePromise>; + ) => MaybeValid; breadcrumbsPrefix: string[] | undefined; -}): Promise< - MaybeValid & TransformedAdditionalProperties> -> { +}): MaybeValid & TransformedAdditionalProperties> { if (!isPlainObject(value)) { return { ok: false, @@ -123,7 +120,7 @@ async function transformAndValidateUnion< }; } - const transformedDiscriminantValue = await transformDiscriminantValue(discriminantValue); + const transformedDiscriminantValue = transformDiscriminantValue(discriminantValue); if (!transformedDiscriminantValue.ok) { return { ok: false, @@ -155,7 +152,7 @@ async function transformAndValidateUnion< } } - const transformedAdditionalProperties = await transformAdditionalProperties( + const transformedAdditionalProperties = transformAdditionalProperties( additionalProperties, additionalPropertiesSchema ); diff --git a/src/core/schemas/utils/getErrorMessageForIncorrectType.ts b/src/core/schemas/utils/getErrorMessageForIncorrectType.ts index 438012df4..1a5c31027 100644 --- a/src/core/schemas/utils/getErrorMessageForIncorrectType.ts +++ b/src/core/schemas/utils/getErrorMessageForIncorrectType.ts @@ -9,9 +9,13 @@ function getTypeAsString(value: unknown): string { if (value === null) { return "null"; } + if (value instanceof BigInt) { + return "BigInt"; + } switch (typeof value) { case "string": return `"${value}"`; + case "bigint": case "number": case "boolean": case "undefined": diff --git a/src/core/schemas/utils/maybeSkipValidation.ts b/src/core/schemas/utils/maybeSkipValidation.ts index 99c02c32b..86c07abf2 100644 --- a/src/core/schemas/utils/maybeSkipValidation.ts +++ b/src/core/schemas/utils/maybeSkipValidation.ts @@ -1,5 +1,4 @@ import { BaseSchema, MaybeValid, SchemaOptions } from "../Schema"; -import { MaybePromise } from "./MaybePromise"; export function maybeSkipValidation, Raw, Parsed>(schema: S): S { return { @@ -10,10 +9,10 @@ export function maybeSkipValidation, Raw, Pars } function transformAndMaybeSkipValidation( - transform: (value: unknown, opts?: SchemaOptions) => MaybePromise> -): (value: unknown, opts?: SchemaOptions) => MaybePromise> { - return async (value, opts): Promise> => { - const transformed = await transform(value, opts); + transform: (value: unknown, opts?: SchemaOptions) => MaybeValid +): (value: unknown, opts?: SchemaOptions) => MaybeValid { + return (value, opts): MaybeValid => { + const transformed = transform(value, opts); const { skipValidation = false } = opts ?? {}; if (!transformed.ok && skipValidation) { // eslint-disable-next-line no-console diff --git a/src/errors/MergeTimeoutError.ts b/src/errors/MergeTimeoutError.ts index 4acd4b634..901f8c8a6 100644 --- a/src/errors/MergeTimeoutError.ts +++ b/src/errors/MergeTimeoutError.ts @@ -3,8 +3,8 @@ */ export class MergeTimeoutError extends Error { - constructor() { - super("Timeout"); + constructor(message: string) { + super(message); Object.setPrototypeOf(this, MergeTimeoutError.prototype); } } diff --git a/src/serialization/resources/accounting/resources/accounts/client/requests/AccountEndpointRequest.ts b/src/serialization/resources/accounting/resources/accounts/client/requests/AccountEndpointRequest.ts index f2cb32ddd..600294527 100644 --- a/src/serialization/resources/accounting/resources/accounts/client/requests/AccountEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/accounts/client/requests/AccountEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { AccountRequest } from "../../../../types/AccountRequest"; export const AccountEndpointRequest: core.serialization.Schema< serializers.accounting.AccountEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).accounting.AccountRequest), + model: AccountRequest, }); export declare namespace AccountEndpointRequest { interface Raw { - model: serializers.accounting.AccountRequest.Raw; + model: AccountRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/accounts/types/AccountsListRequestRemoteFields.ts b/src/serialization/resources/accounting/resources/accounts/types/AccountsListRequestRemoteFields.ts index a29a0ce05..2b6fbb2e3 100644 --- a/src/serialization/resources/accounting/resources/accounts/types/AccountsListRequestRemoteFields.ts +++ b/src/serialization/resources/accounting/resources/accounts/types/AccountsListRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const AccountsListRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/accounts/types/AccountsListRequestShowEnumOrigins.ts b/src/serialization/resources/accounting/resources/accounts/types/AccountsListRequestShowEnumOrigins.ts index eff8568ab..91494b090 100644 --- a/src/serialization/resources/accounting/resources/accounts/types/AccountsListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/accounting/resources/accounts/types/AccountsListRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const AccountsListRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestRemoteFields.ts b/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestRemoteFields.ts index ed031c573..6c8116b38 100644 --- a/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const AccountsRetrieveRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestShowEnumOrigins.ts index ef41b1671..afde9306f 100644 --- a/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const AccountsRetrieveRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/serialization/resources/accounting/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts index 1dc8d3020..e88792c0c 100644 --- a/src/serialization/resources/accounting/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts +++ b/src/serialization/resources/accounting/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { RemoteResponse } from "../../../types/RemoteResponse"; export const AsyncPassthroughRetrieveResponse: core.serialization.Schema< serializers.accounting.AsyncPassthroughRetrieveResponse.Raw, Merge.accounting.AsyncPassthroughRetrieveResponse -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazyObject(async () => (await import("../../../../..")).accounting.RemoteResponse), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RemoteResponse, core.serialization.string()]); export declare namespace AsyncPassthroughRetrieveResponse { - type Raw = serializers.accounting.RemoteResponse.Raw | string; + type Raw = RemoteResponse.Raw | string; } diff --git a/src/serialization/resources/accounting/resources/attachments/client/requests/AccountingAttachmentEndpointRequest.ts b/src/serialization/resources/accounting/resources/attachments/client/requests/AccountingAttachmentEndpointRequest.ts index e9ff4f585..5a647aec7 100644 --- a/src/serialization/resources/accounting/resources/attachments/client/requests/AccountingAttachmentEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/attachments/client/requests/AccountingAttachmentEndpointRequest.ts @@ -2,21 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { AccountingAttachmentRequest } from "../../../../types/AccountingAttachmentRequest"; export const AccountingAttachmentEndpointRequest: core.serialization.Schema< serializers.accounting.AccountingAttachmentEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject( - async () => (await import("../../../../../..")).accounting.AccountingAttachmentRequest - ), + model: AccountingAttachmentRequest, }); export declare namespace AccountingAttachmentEndpointRequest { interface Raw { - model: serializers.accounting.AccountingAttachmentRequest.Raw; + model: AccountingAttachmentRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoListRequestExpand.ts b/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoListRequestExpand.ts index b7920650c..170ee0fde 100644 --- a/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CompanyInfoListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoRetrieveRequestExpand.ts index 6cc0ef717..2ed7c1d7e 100644 --- a/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CompanyInfoRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/contacts/client/requests/ContactEndpointRequest.ts b/src/serialization/resources/accounting/resources/contacts/client/requests/ContactEndpointRequest.ts index a1ac533b5..10e63064e 100644 --- a/src/serialization/resources/accounting/resources/contacts/client/requests/ContactEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/contacts/client/requests/ContactEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { ContactRequest } from "../../../../types/ContactRequest"; export const ContactEndpointRequest: core.serialization.Schema< serializers.accounting.ContactEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).accounting.ContactRequest), + model: ContactRequest, }); export declare namespace ContactEndpointRequest { interface Raw { - model: serializers.accounting.ContactRequest.Raw; + model: ContactRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/contacts/types/ContactsListRequestExpand.ts b/src/serialization/resources/accounting/resources/contacts/types/ContactsListRequestExpand.ts index a81d65116..88804224e 100644 --- a/src/serialization/resources/accounting/resources/contacts/types/ContactsListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/contacts/types/ContactsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ContactsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/contacts/types/ContactsRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/contacts/types/ContactsRetrieveRequestExpand.ts index f111d2bf1..f065628e7 100644 --- a/src/serialization/resources/accounting/resources/contacts/types/ContactsRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/contacts/types/ContactsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ContactsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestExpand.ts b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestExpand.ts index 794295d56..dc4f3a35f 100644 --- a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CreditNotesListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestRemoteFields.ts b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestRemoteFields.ts index 9ff06097f..c6bcdb220 100644 --- a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestRemoteFields.ts +++ b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CreditNotesListRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestShowEnumOrigins.ts b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestShowEnumOrigins.ts index 0ad63c62b..5e55b2211 100644 --- a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CreditNotesListRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestExpand.ts index 40b0effa3..721f3cc4f 100644 --- a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CreditNotesRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestRemoteFields.ts b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestRemoteFields.ts index 2d64fa052..03db1eab9 100644 --- a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CreditNotesRetrieveRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestShowEnumOrigins.ts index f8be60cea..346c3acf5 100644 --- a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CreditNotesRetrieveRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/expenses/client/requests/ExpenseEndpointRequest.ts b/src/serialization/resources/accounting/resources/expenses/client/requests/ExpenseEndpointRequest.ts index 95ca2a312..0483045a8 100644 --- a/src/serialization/resources/accounting/resources/expenses/client/requests/ExpenseEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/expenses/client/requests/ExpenseEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { ExpenseRequest } from "../../../../types/ExpenseRequest"; export const ExpenseEndpointRequest: core.serialization.Schema< serializers.accounting.ExpenseEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).accounting.ExpenseRequest), + model: ExpenseRequest, }); export declare namespace ExpenseEndpointRequest { interface Raw { - model: serializers.accounting.ExpenseRequest.Raw; + model: ExpenseRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/expenses/types/ExpensesListRequestExpand.ts b/src/serialization/resources/accounting/resources/expenses/types/ExpensesListRequestExpand.ts index 54f012115..fe4466f81 100644 --- a/src/serialization/resources/accounting/resources/expenses/types/ExpensesListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/expenses/types/ExpensesListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ExpensesListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/expenses/types/ExpensesRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/expenses/types/ExpensesRetrieveRequestExpand.ts index 47baa74f0..de246b989 100644 --- a/src/serialization/resources/accounting/resources/expenses/types/ExpensesRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/expenses/types/ExpensesRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ExpensesRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts b/src/serialization/resources/accounting/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts index c7bde3f15..812d0002e 100644 --- a/src/serialization/resources/accounting/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/serialization/resources/accounting/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const CreateFieldMappingRequest: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts b/src/serialization/resources/accounting/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts index a223df0a5..a262eebcb 100644 --- a/src/serialization/resources/accounting/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts +++ b/src/serialization/resources/accounting/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const PatchedEditFieldMappingRequest: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/forceResync/client/syncStatusResyncCreate.ts b/src/serialization/resources/accounting/resources/forceResync/client/syncStatusResyncCreate.ts index f86f89f95..ecde6d776 100644 --- a/src/serialization/resources/accounting/resources/forceResync/client/syncStatusResyncCreate.ts +++ b/src/serialization/resources/accounting/resources/forceResync/client/syncStatusResyncCreate.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { SyncStatus } from "../../../types/SyncStatus"; export const Response: core.serialization.Schema< serializers.accounting.forceResync.syncStatusResyncCreate.Response.Raw, Merge.accounting.SyncStatus[] -> = core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).accounting.SyncStatus) -); +> = core.serialization.list(SyncStatus); export declare namespace Response { - type Raw = serializers.accounting.SyncStatus.Raw[]; + type Raw = SyncStatus.Raw[]; } diff --git a/src/serialization/resources/accounting/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts b/src/serialization/resources/accounting/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts index 6fce65d52..931768ef7 100644 --- a/src/serialization/resources/accounting/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts +++ b/src/serialization/resources/accounting/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const GenerateRemoteKeyRequest: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/invoices/client/requests/InvoiceEndpointRequest.ts b/src/serialization/resources/accounting/resources/invoices/client/requests/InvoiceEndpointRequest.ts index 69cc344ce..e6e0f897d 100644 --- a/src/serialization/resources/accounting/resources/invoices/client/requests/InvoiceEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/invoices/client/requests/InvoiceEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { InvoiceRequest } from "../../../../types/InvoiceRequest"; export const InvoiceEndpointRequest: core.serialization.Schema< serializers.accounting.InvoiceEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).accounting.InvoiceRequest), + model: InvoiceRequest, }); export declare namespace InvoiceEndpointRequest { interface Raw { - model: serializers.accounting.InvoiceRequest.Raw; + model: InvoiceRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/invoices/client/requests/PatchedInvoiceEndpointRequest.ts b/src/serialization/resources/accounting/resources/invoices/client/requests/PatchedInvoiceEndpointRequest.ts index d5941e0ef..fe4e183d9 100644 --- a/src/serialization/resources/accounting/resources/invoices/client/requests/PatchedInvoiceEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/invoices/client/requests/PatchedInvoiceEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { InvoiceRequest } from "../../../../types/InvoiceRequest"; export const PatchedInvoiceEndpointRequest: core.serialization.Schema< serializers.accounting.PatchedInvoiceEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).accounting.InvoiceRequest), + model: InvoiceRequest, }); export declare namespace PatchedInvoiceEndpointRequest { interface Raw { - model: serializers.accounting.InvoiceRequest.Raw; + model: InvoiceRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestExpand.ts b/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestExpand.ts index bac0b55ae..c421051b4 100644 --- a/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const InvoicesListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestType.ts b/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestType.ts index bbd9bb76e..7c0f35fbd 100644 --- a/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestType.ts +++ b/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestType.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const InvoicesListRequestType: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/invoices/types/InvoicesRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/invoices/types/InvoicesRetrieveRequestExpand.ts index 34a8652ee..ba4ff1dbe 100644 --- a/src/serialization/resources/accounting/resources/invoices/types/InvoicesRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/invoices/types/InvoicesRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const InvoicesRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/issues/types/IssuesListRequestStatus.ts b/src/serialization/resources/accounting/resources/issues/types/IssuesListRequestStatus.ts index 5c53c273d..8546d7235 100644 --- a/src/serialization/resources/accounting/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/serialization/resources/accounting/resources/issues/types/IssuesListRequestStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const IssuesListRequestStatus: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/items/types/ItemsListRequestExpand.ts b/src/serialization/resources/accounting/resources/items/types/ItemsListRequestExpand.ts index 98e03b135..fd2792793 100644 --- a/src/serialization/resources/accounting/resources/items/types/ItemsListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/items/types/ItemsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ItemsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/items/types/ItemsRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/items/types/ItemsRetrieveRequestExpand.ts index 1e7453065..6fbe6177c 100644 --- a/src/serialization/resources/accounting/resources/items/types/ItemsRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/items/types/ItemsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ItemsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/journalEntries/client/requests/JournalEntryEndpointRequest.ts b/src/serialization/resources/accounting/resources/journalEntries/client/requests/JournalEntryEndpointRequest.ts index c4edabd80..f57d072b6 100644 --- a/src/serialization/resources/accounting/resources/journalEntries/client/requests/JournalEntryEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/journalEntries/client/requests/JournalEntryEndpointRequest.ts @@ -2,21 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { JournalEntryRequest } from "../../../../types/JournalEntryRequest"; export const JournalEntryEndpointRequest: core.serialization.Schema< serializers.accounting.JournalEntryEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject( - async () => (await import("../../../../../..")).accounting.JournalEntryRequest - ), + model: JournalEntryRequest, }); export declare namespace JournalEntryEndpointRequest { interface Raw { - model: serializers.accounting.JournalEntryRequest.Raw; + model: JournalEntryRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/journalEntries/types/JournalEntriesListRequestExpand.ts b/src/serialization/resources/accounting/resources/journalEntries/types/JournalEntriesListRequestExpand.ts index 81deee8af..979b4487d 100644 --- a/src/serialization/resources/accounting/resources/journalEntries/types/JournalEntriesListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/journalEntries/types/JournalEntriesListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const JournalEntriesListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/journalEntries/types/JournalEntriesRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/journalEntries/types/JournalEntriesRetrieveRequestExpand.ts index daab8be9f..885361cb8 100644 --- a/src/serialization/resources/accounting/resources/journalEntries/types/JournalEntriesRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/journalEntries/types/JournalEntriesRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const JournalEntriesRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/linkToken/client/requests/EndUserDetailsRequest.ts b/src/serialization/resources/accounting/resources/linkToken/client/requests/EndUserDetailsRequest.ts index 9bf893182..6f798b6f1 100644 --- a/src/serialization/resources/accounting/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/serialization/resources/accounting/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { CategoriesEnum } from "../../../../types/CategoriesEnum"; +import { CommonModelScopesBodyRequest } from "../../../../types/CommonModelScopesBodyRequest"; +import { IndividualCommonModelScopeDeserializerRequest } from "../../../../types/IndividualCommonModelScopeDeserializerRequest"; +import { LanguageEnum } from "../../../../types/LanguageEnum"; export const EndUserDetailsRequest: core.serialization.Schema< serializers.accounting.EndUserDetailsRequest.Raw, @@ -13,9 +17,7 @@ export const EndUserDetailsRequest: core.serialization.Schema< endUserEmailAddress: core.serialization.property("end_user_email_address", core.serialization.string()), endUserOrganizationName: core.serialization.property("end_user_organization_name", core.serialization.string()), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string()), - categories: core.serialization.list( - core.serialization.lazy(async () => (await import("../../../../../..")).accounting.CategoriesEnum) - ), + categories: core.serialization.list(CategoriesEnum), integration: core.serialization.string().optional(), linkExpiryMins: core.serialization.property("link_expiry_mins", core.serialization.number().optional()), shouldCreateMagicLinkUrl: core.serialization.property( @@ -25,34 +27,18 @@ export const EndUserDetailsRequest: core.serialization.Schema< hideAdminMagicLink: core.serialization.property("hide_admin_magic_link", core.serialization.boolean().optional()), commonModels: core.serialization.property( "common_models", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../../../../..")).accounting.CommonModelScopesBodyRequest - ) - ) - .optional() + core.serialization.list(CommonModelScopesBodyRequest).optional() ), categoryCommonModelScopes: core.serialization.property( "category_common_model_scopes", core.serialization .record( core.serialization.string(), - core.serialization - .list( - core.serialization.lazyObject( - async () => - (await import("../../../../../..")).accounting - .IndividualCommonModelScopeDeserializerRequest - ) - ) - .optional() + core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional() ) .optional() ), - language: core.serialization - .lazy(async () => (await import("../../../../../..")).accounting.LanguageEnum) - .optional(), + language: LanguageEnum.optional(), integrationSpecificConfig: core.serialization.property( "integration_specific_config", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -64,17 +50,17 @@ export declare namespace EndUserDetailsRequest { end_user_email_address: string; end_user_organization_name: string; end_user_origin_id: string; - categories: serializers.accounting.CategoriesEnum.Raw[]; + categories: CategoriesEnum.Raw[]; integration?: string | null; link_expiry_mins?: number | null; should_create_magic_link_url?: boolean | null; hide_admin_magic_link?: boolean | null; - common_models?: serializers.accounting.CommonModelScopesBodyRequest.Raw[] | null; + common_models?: CommonModelScopesBodyRequest.Raw[] | null; category_common_model_scopes?: Record< string, - serializers.accounting.IndividualCommonModelScopeDeserializerRequest.Raw[] | null | undefined + IndividualCommonModelScopeDeserializerRequest.Raw[] | null | undefined > | null; - language?: serializers.accounting.LanguageEnum.Raw | null; + language?: LanguageEnum.Raw | null; integration_specific_config?: Record | null; } } diff --git a/src/serialization/resources/accounting/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/serialization/resources/accounting/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index ed63189a2..d578027ec 100644 --- a/src/serialization/resources/accounting/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/serialization/resources/accounting/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const LinkedAccountsListRequestCategory: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/payments/client/requests/PatchedPaymentEndpointRequest.ts b/src/serialization/resources/accounting/resources/payments/client/requests/PatchedPaymentEndpointRequest.ts index 6b97b9a4e..d998aab00 100644 --- a/src/serialization/resources/accounting/resources/payments/client/requests/PatchedPaymentEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/payments/client/requests/PatchedPaymentEndpointRequest.ts @@ -2,21 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { PatchedPaymentRequest } from "../../../../types/PatchedPaymentRequest"; export const PatchedPaymentEndpointRequest: core.serialization.Schema< serializers.accounting.PatchedPaymentEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject( - async () => (await import("../../../../../..")).accounting.PatchedPaymentRequest - ), + model: PatchedPaymentRequest, }); export declare namespace PatchedPaymentEndpointRequest { interface Raw { - model: serializers.accounting.PatchedPaymentRequest.Raw; + model: PatchedPaymentRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/payments/client/requests/PaymentEndpointRequest.ts b/src/serialization/resources/accounting/resources/payments/client/requests/PaymentEndpointRequest.ts index f941ba27a..a877590a1 100644 --- a/src/serialization/resources/accounting/resources/payments/client/requests/PaymentEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/payments/client/requests/PaymentEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { PaymentRequest } from "../../../../types/PaymentRequest"; export const PaymentEndpointRequest: core.serialization.Schema< serializers.accounting.PaymentEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).accounting.PaymentRequest), + model: PaymentRequest, }); export declare namespace PaymentEndpointRequest { interface Raw { - model: serializers.accounting.PaymentRequest.Raw; + model: PaymentRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/payments/types/PaymentsListRequestExpand.ts b/src/serialization/resources/accounting/resources/payments/types/PaymentsListRequestExpand.ts index 08b53edbb..a6b6b9936 100644 --- a/src/serialization/resources/accounting/resources/payments/types/PaymentsListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/payments/types/PaymentsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const PaymentsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/payments/types/PaymentsRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/payments/types/PaymentsRetrieveRequestExpand.ts index 65c25fa68..f37e296b5 100644 --- a/src/serialization/resources/accounting/resources/payments/types/PaymentsRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/payments/types/PaymentsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const PaymentsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrderEndpointRequest.ts b/src/serialization/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrderEndpointRequest.ts index 12fb90332..c722c3a80 100644 --- a/src/serialization/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrderEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrderEndpointRequest.ts @@ -2,21 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { PurchaseOrderRequest } from "../../../../types/PurchaseOrderRequest"; export const PurchaseOrderEndpointRequest: core.serialization.Schema< serializers.accounting.PurchaseOrderEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject( - async () => (await import("../../../../../..")).accounting.PurchaseOrderRequest - ), + model: PurchaseOrderRequest, }); export declare namespace PurchaseOrderEndpointRequest { interface Raw { - model: serializers.accounting.PurchaseOrderRequest.Raw; + model: PurchaseOrderRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersListRequestExpand.ts b/src/serialization/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersListRequestExpand.ts index 202d29f32..d3956d13f 100644 --- a/src/serialization/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const PurchaseOrdersListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersRetrieveRequestExpand.ts index 57451393a..15707a024 100644 --- a/src/serialization/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const PurchaseOrdersRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts b/src/serialization/resources/accounting/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts index e6b9b499e..7fbc820ff 100644 --- a/src/serialization/resources/accounting/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts +++ b/src/serialization/resources/accounting/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const RemoteKeyForRegenerationRequest: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts b/src/serialization/resources/accounting/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts index a4a761e34..00892b851 100644 --- a/src/serialization/resources/accounting/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/accounting/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { IndividualCommonModelScopeDeserializerRequest } from "../../../../types/IndividualCommonModelScopeDeserializerRequest"; export const LinkedAccountCommonModelScopeDeserializerRequest: core.serialization.Schema< serializers.accounting.LinkedAccountCommonModelScopeDeserializerRequest.Raw, @@ -12,16 +13,12 @@ export const LinkedAccountCommonModelScopeDeserializerRequest: core.serializatio > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list( - core.serialization.lazyObject( - async () => (await import("../../../../../..")).accounting.IndividualCommonModelScopeDeserializerRequest - ) - ) + core.serialization.list(IndividualCommonModelScopeDeserializerRequest) ), }); export declare namespace LinkedAccountCommonModelScopeDeserializerRequest { interface Raw { - common_models: serializers.accounting.IndividualCommonModelScopeDeserializerRequest.Raw[]; + common_models: IndividualCommonModelScopeDeserializerRequest.Raw[]; } } diff --git a/src/serialization/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts b/src/serialization/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts index 3da2aa30c..77a2d6371 100644 --- a/src/serialization/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TransactionsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts index 3fbc32c7e..b575a85b3 100644 --- a/src/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TransactionsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsListRequestExpand.ts b/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsListRequestExpand.ts index 222fdb8b2..1f44cf7b3 100644 --- a/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const VendorCreditsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsRetrieveRequestExpand.ts index 40a792a29..56f26ac64 100644 --- a/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const VendorCreditsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/resources/webhookReceivers/client/list.ts b/src/serialization/resources/accounting/resources/webhookReceivers/client/list.ts index 8c0ca4b63..95de6ab04 100644 --- a/src/serialization/resources/accounting/resources/webhookReceivers/client/list.ts +++ b/src/serialization/resources/accounting/resources/webhookReceivers/client/list.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { WebhookReceiver } from "../../../types/WebhookReceiver"; export const Response: core.serialization.Schema< serializers.accounting.webhookReceivers.list.Response.Raw, Merge.accounting.WebhookReceiver[] -> = core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).accounting.WebhookReceiver) -); +> = core.serialization.list(WebhookReceiver); export declare namespace Response { - type Raw = serializers.accounting.WebhookReceiver.Raw[]; + type Raw = WebhookReceiver.Raw[]; } diff --git a/src/serialization/resources/accounting/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts b/src/serialization/resources/accounting/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts index 1912e2cc6..2fc33cb78 100644 --- a/src/serialization/resources/accounting/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts +++ b/src/serialization/resources/accounting/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const WebhookReceiverRequest: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/Account.ts b/src/serialization/resources/accounting/types/Account.ts index ccbf49db5..dc3b95d44 100644 --- a/src/serialization/resources/accounting/types/Account.ts +++ b/src/serialization/resources/accounting/types/Account.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountClassification } from "./AccountClassification"; +import { AccountStatus } from "./AccountStatus"; +import { AccountCurrency } from "./AccountCurrency"; +import { RemoteData } from "./RemoteData"; export const Account: core.serialization.ObjectSchema = core.serialization.object({ @@ -14,13 +18,11 @@ export const Account: core.serialization.ObjectSchema (await import("../../..")).accounting.AccountClassification) - .optional(), + classification: AccountClassification.optional(), type: core.serialization.string().optional(), - status: core.serialization.lazy(async () => (await import("../../..")).accounting.AccountStatus).optional(), + status: AccountStatus.optional(), currentBalance: core.serialization.property("current_balance", core.serialization.number().optional()), - currency: core.serialization.lazy(async () => (await import("../../..")).accounting.AccountCurrency).optional(), + currency: AccountCurrency.optional(), accountNumber: core.serialization.property("account_number", core.serialization.string().optional()), parentAccount: core.serialization.property("parent_account", core.serialization.string().optional()), company: core.serialization.string().optional(), @@ -29,12 +31,7 @@ export const Account: core.serialization.ObjectSchema (await import("../../..")).accounting.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Account { @@ -45,16 +42,16 @@ export declare namespace Account { modified_at?: string | null; name?: string | null; description?: string | null; - classification?: serializers.accounting.AccountClassification.Raw | null; + classification?: AccountClassification.Raw | null; type?: string | null; - status?: serializers.accounting.AccountStatus.Raw | null; + status?: AccountStatus.Raw | null; current_balance?: number | null; - currency?: serializers.accounting.AccountCurrency.Raw | null; + currency?: AccountCurrency.Raw | null; account_number?: string | null; parent_account?: string | null; company?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/AccountClassification.ts b/src/serialization/resources/accounting/types/AccountClassification.ts index 480e079a2..758c1b2f0 100644 --- a/src/serialization/resources/accounting/types/AccountClassification.ts +++ b/src/serialization/resources/accounting/types/AccountClassification.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ClassificationEnum } from "./ClassificationEnum"; export const AccountClassification: core.serialization.Schema< serializers.accounting.AccountClassification.Raw, Merge.accounting.AccountClassification -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.ClassificationEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([ClassificationEnum, core.serialization.string()]); export declare namespace AccountClassification { - type Raw = serializers.accounting.ClassificationEnum.Raw | string; + type Raw = ClassificationEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountCurrency.ts b/src/serialization/resources/accounting/types/AccountCurrency.ts index d0fce5e66..59332c5dd 100644 --- a/src/serialization/resources/accounting/types/AccountCurrency.ts +++ b/src/serialization/resources/accounting/types/AccountCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const AccountCurrency: core.serialization.Schema< serializers.accounting.AccountCurrency.Raw, Merge.accounting.AccountCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace AccountCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountDetails.ts b/src/serialization/resources/accounting/types/AccountDetails.ts index 71ecefdc9..b0cbb7cd6 100644 --- a/src/serialization/resources/accounting/types/AccountDetails.ts +++ b/src/serialization/resources/accounting/types/AccountDetails.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoryEnum } from "./CategoryEnum"; export const AccountDetails: core.serialization.ObjectSchema< serializers.accounting.AccountDetails.Raw, @@ -13,7 +14,7 @@ export const AccountDetails: core.serialization.ObjectSchema< id: core.serialization.string().optional(), integration: core.serialization.string().optional(), integrationSlug: core.serialization.property("integration_slug", core.serialization.string().optional()), - category: core.serialization.lazy(async () => (await import("../../..")).accounting.CategoryEnum).optional(), + category: CategoryEnum.optional(), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property( "end_user_organization_name", @@ -32,7 +33,7 @@ export declare namespace AccountDetails { id?: string | null; integration?: string | null; integration_slug?: string | null; - category?: serializers.accounting.CategoryEnum.Raw | null; + category?: CategoryEnum.Raw | null; end_user_origin_id?: string | null; end_user_organization_name?: string | null; end_user_email_address?: string | null; diff --git a/src/serialization/resources/accounting/types/AccountDetailsAndActions.ts b/src/serialization/resources/accounting/types/AccountDetailsAndActions.ts index 11b9e8890..126f14ab0 100644 --- a/src/serialization/resources/accounting/types/AccountDetailsAndActions.ts +++ b/src/serialization/resources/accounting/types/AccountDetailsAndActions.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoryEnum } from "./CategoryEnum"; +import { AccountDetailsAndActionsStatusEnum } from "./AccountDetailsAndActionsStatusEnum"; +import { AccountDetailsAndActionsIntegration } from "./AccountDetailsAndActionsIntegration"; export const AccountDetailsAndActions: core.serialization.ObjectSchema< serializers.accounting.AccountDetailsAndActions.Raw, Merge.accounting.AccountDetailsAndActions > = core.serialization.object({ id: core.serialization.string(), - category: core.serialization.lazy(async () => (await import("../../..")).accounting.CategoryEnum).optional(), - status: core.serialization.lazy( - async () => (await import("../../..")).accounting.AccountDetailsAndActionsStatusEnum - ), + category: CategoryEnum.optional(), + status: AccountDetailsAndActionsStatusEnum, statusDetail: core.serialization.property("status_detail", core.serialization.string().optional()), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property("end_user_organization_name", core.serialization.string()), @@ -22,9 +23,7 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< subdomain: core.serialization.string().optional(), webhookListenerUrl: core.serialization.property("webhook_listener_url", core.serialization.string()), isDuplicate: core.serialization.property("is_duplicate", core.serialization.boolean().optional()), - integration: core.serialization - .lazyObject(async () => (await import("../../..")).accounting.AccountDetailsAndActionsIntegration) - .optional(), + integration: AccountDetailsAndActionsIntegration.optional(), accountType: core.serialization.property("account_type", core.serialization.string()), completedAt: core.serialization.property("completed_at", core.serialization.date()), }); @@ -32,8 +31,8 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< export declare namespace AccountDetailsAndActions { interface Raw { id: string; - category?: serializers.accounting.CategoryEnum.Raw | null; - status: serializers.accounting.AccountDetailsAndActionsStatusEnum.Raw; + category?: CategoryEnum.Raw | null; + status: AccountDetailsAndActionsStatusEnum.Raw; status_detail?: string | null; end_user_origin_id?: string | null; end_user_organization_name: string; @@ -41,7 +40,7 @@ export declare namespace AccountDetailsAndActions { subdomain?: string | null; webhook_listener_url: string; is_duplicate?: boolean | null; - integration?: serializers.accounting.AccountDetailsAndActionsIntegration.Raw | null; + integration?: AccountDetailsAndActionsIntegration.Raw | null; account_type: string; completed_at: string; } diff --git a/src/serialization/resources/accounting/types/AccountDetailsAndActionsIntegration.ts b/src/serialization/resources/accounting/types/AccountDetailsAndActionsIntegration.ts index d0f025b48..77bd0093c 100644 --- a/src/serialization/resources/accounting/types/AccountDetailsAndActionsIntegration.ts +++ b/src/serialization/resources/accounting/types/AccountDetailsAndActionsIntegration.ts @@ -2,18 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoriesEnum } from "./CategoriesEnum"; +import { ModelOperation } from "./ModelOperation"; export const AccountDetailsAndActionsIntegration: core.serialization.ObjectSchema< serializers.accounting.AccountDetailsAndActionsIntegration.Raw, Merge.accounting.AccountDetailsAndActionsIntegration > = core.serialization.object({ name: core.serialization.string(), - categories: core.serialization.list( - core.serialization.lazy(async () => (await import("../../..")).accounting.CategoriesEnum) - ), + categories: core.serialization.list(CategoriesEnum), image: core.serialization.string().optional(), squareImage: core.serialization.property("square_image", core.serialization.string().optional()), color: core.serialization.string(), @@ -21,21 +21,19 @@ export const AccountDetailsAndActionsIntegration: core.serialization.ObjectSchem passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.ModelOperation)) - .optional() + core.serialization.list(ModelOperation).optional() ), }); export declare namespace AccountDetailsAndActionsIntegration { interface Raw { name: string; - categories: serializers.accounting.CategoriesEnum.Raw[]; + categories: CategoriesEnum.Raw[]; image?: string | null; square_image?: string | null; color: string; slug: string; passthrough_available: boolean; - available_model_operations?: serializers.accounting.ModelOperation.Raw[] | null; + available_model_operations?: ModelOperation.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/AccountDetailsAndActionsStatusEnum.ts b/src/serialization/resources/accounting/types/AccountDetailsAndActionsStatusEnum.ts index d4c152a55..c1269683a 100644 --- a/src/serialization/resources/accounting/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/serialization/resources/accounting/types/AccountDetailsAndActionsStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AccountDetailsAndActionsStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/AccountIntegration.ts b/src/serialization/resources/accounting/types/AccountIntegration.ts index 7d12c1e1f..69e2c0731 100644 --- a/src/serialization/resources/accounting/types/AccountIntegration.ts +++ b/src/serialization/resources/accounting/types/AccountIntegration.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoriesEnum } from "./CategoriesEnum"; export const AccountIntegration: core.serialization.ObjectSchema< serializers.accounting.AccountIntegration.Raw, @@ -12,9 +13,7 @@ export const AccountIntegration: core.serialization.ObjectSchema< > = core.serialization.object({ name: core.serialization.string(), abbreviatedName: core.serialization.property("abbreviated_name", core.serialization.string().optional()), - categories: core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).accounting.CategoriesEnum)) - .optional(), + categories: core.serialization.list(CategoriesEnum).optional(), image: core.serialization.string().optional(), squareImage: core.serialization.property("square_image", core.serialization.string().optional()), color: core.serialization.string().optional(), @@ -37,7 +36,7 @@ export declare namespace AccountIntegration { interface Raw { name: string; abbreviated_name?: string | null; - categories?: serializers.accounting.CategoriesEnum.Raw[] | null; + categories?: CategoriesEnum.Raw[] | null; image?: string | null; square_image?: string | null; color?: string | null; diff --git a/src/serialization/resources/accounting/types/AccountRequest.ts b/src/serialization/resources/accounting/types/AccountRequest.ts index e17a5801e..42e1f2aeb 100644 --- a/src/serialization/resources/accounting/types/AccountRequest.ts +++ b/src/serialization/resources/accounting/types/AccountRequest.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountRequestClassification } from "./AccountRequestClassification"; +import { AccountRequestStatus } from "./AccountRequestStatus"; +import { AccountRequestCurrency } from "./AccountRequestCurrency"; export const AccountRequest: core.serialization.ObjectSchema< serializers.accounting.AccountRequest.Raw, @@ -12,15 +15,11 @@ export const AccountRequest: core.serialization.ObjectSchema< > = core.serialization.object({ name: core.serialization.string().optional(), description: core.serialization.string().optional(), - classification: core.serialization - .lazy(async () => (await import("../../..")).accounting.AccountRequestClassification) - .optional(), + classification: AccountRequestClassification.optional(), type: core.serialization.string().optional(), - status: core.serialization.lazy(async () => (await import("../../..")).accounting.AccountRequestStatus).optional(), + status: AccountRequestStatus.optional(), currentBalance: core.serialization.property("current_balance", core.serialization.number().optional()), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.AccountRequestCurrency) - .optional(), + currency: AccountRequestCurrency.optional(), accountNumber: core.serialization.property("account_number", core.serialization.string().optional()), parentAccount: core.serialization.property("parent_account", core.serialization.string().optional()), company: core.serialization.string().optional(), @@ -38,11 +37,11 @@ export declare namespace AccountRequest { interface Raw { name?: string | null; description?: string | null; - classification?: serializers.accounting.AccountRequestClassification.Raw | null; + classification?: AccountRequestClassification.Raw | null; type?: string | null; - status?: serializers.accounting.AccountRequestStatus.Raw | null; + status?: AccountRequestStatus.Raw | null; current_balance?: number | null; - currency?: serializers.accounting.AccountRequestCurrency.Raw | null; + currency?: AccountRequestCurrency.Raw | null; account_number?: string | null; parent_account?: string | null; company?: string | null; diff --git a/src/serialization/resources/accounting/types/AccountRequestClassification.ts b/src/serialization/resources/accounting/types/AccountRequestClassification.ts index 4356a27a1..8fc903735 100644 --- a/src/serialization/resources/accounting/types/AccountRequestClassification.ts +++ b/src/serialization/resources/accounting/types/AccountRequestClassification.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ClassificationEnum } from "./ClassificationEnum"; export const AccountRequestClassification: core.serialization.Schema< serializers.accounting.AccountRequestClassification.Raw, Merge.accounting.AccountRequestClassification -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.ClassificationEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([ClassificationEnum, core.serialization.string()]); export declare namespace AccountRequestClassification { - type Raw = serializers.accounting.ClassificationEnum.Raw | string; + type Raw = ClassificationEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountRequestCurrency.ts b/src/serialization/resources/accounting/types/AccountRequestCurrency.ts index ff0df33a1..98245c5f3 100644 --- a/src/serialization/resources/accounting/types/AccountRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/AccountRequestCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const AccountRequestCurrency: core.serialization.Schema< serializers.accounting.AccountRequestCurrency.Raw, Merge.accounting.AccountRequestCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace AccountRequestCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountRequestStatus.ts b/src/serialization/resources/accounting/types/AccountRequestStatus.ts index b6a28f8b6..d953a5214 100644 --- a/src/serialization/resources/accounting/types/AccountRequestStatus.ts +++ b/src/serialization/resources/accounting/types/AccountRequestStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountStatusEnum } from "./AccountStatusEnum"; export const AccountRequestStatus: core.serialization.Schema< serializers.accounting.AccountRequestStatus.Raw, Merge.accounting.AccountRequestStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.AccountStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([AccountStatusEnum, core.serialization.string()]); export declare namespace AccountRequestStatus { - type Raw = serializers.accounting.AccountStatusEnum.Raw | string; + type Raw = AccountStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountResponse.ts b/src/serialization/resources/accounting/types/AccountResponse.ts index 6b9082ee7..fae2b7b85 100644 --- a/src/serialization/resources/accounting/types/AccountResponse.ts +++ b/src/serialization/resources/accounting/types/AccountResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const AccountResponse: core.serialization.ObjectSchema< serializers.accounting.AccountResponse.Raw, Merge.accounting.AccountResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.DebugModeLog)) - .optional(), + model: Account, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace AccountResponse { interface Raw { - model: serializers.accounting.Account.Raw; - warnings: serializers.accounting.WarningValidationProblem.Raw[]; - errors: serializers.accounting.ErrorValidationProblem.Raw[]; - logs?: serializers.accounting.DebugModeLog.Raw[] | null; + model: Account.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/AccountStatus.ts b/src/serialization/resources/accounting/types/AccountStatus.ts index b9285fc44..914f3bea5 100644 --- a/src/serialization/resources/accounting/types/AccountStatus.ts +++ b/src/serialization/resources/accounting/types/AccountStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountStatusEnum } from "./AccountStatusEnum"; export const AccountStatus: core.serialization.Schema< serializers.accounting.AccountStatus.Raw, Merge.accounting.AccountStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.AccountStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([AccountStatusEnum, core.serialization.string()]); export declare namespace AccountStatus { - type Raw = serializers.accounting.AccountStatusEnum.Raw | string; + type Raw = AccountStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountStatusEnum.ts b/src/serialization/resources/accounting/types/AccountStatusEnum.ts index 7d3c30a1f..4a7c086d6 100644 --- a/src/serialization/resources/accounting/types/AccountStatusEnum.ts +++ b/src/serialization/resources/accounting/types/AccountStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AccountStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/AccountToken.ts b/src/serialization/resources/accounting/types/AccountToken.ts index bffe11f62..d087155b3 100644 --- a/src/serialization/resources/accounting/types/AccountToken.ts +++ b/src/serialization/resources/accounting/types/AccountToken.ts @@ -2,21 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountIntegration } from "./AccountIntegration"; export const AccountToken: core.serialization.ObjectSchema< serializers.accounting.AccountToken.Raw, Merge.accounting.AccountToken > = core.serialization.object({ accountToken: core.serialization.property("account_token", core.serialization.string()), - integration: core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountIntegration), + integration: AccountIntegration, }); export declare namespace AccountToken { interface Raw { account_token: string; - integration: serializers.accounting.AccountIntegration.Raw; + integration: AccountIntegration.Raw; } } diff --git a/src/serialization/resources/accounting/types/AccountingAttachment.ts b/src/serialization/resources/accounting/types/AccountingAttachment.ts index 3f08c85a9..2b9acdcf3 100644 --- a/src/serialization/resources/accounting/types/AccountingAttachment.ts +++ b/src/serialization/resources/accounting/types/AccountingAttachment.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; export const AccountingAttachment: core.serialization.ObjectSchema< serializers.accounting.AccountingAttachment.Raw, @@ -22,12 +23,7 @@ export const AccountingAttachment: core.serialization.ObjectSchema< "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace AccountingAttachment { @@ -41,6 +37,6 @@ export declare namespace AccountingAttachment { company?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/AccountingAttachmentRequest.ts b/src/serialization/resources/accounting/types/AccountingAttachmentRequest.ts index 0a9c51ee4..9bb4e26f0 100644 --- a/src/serialization/resources/accounting/types/AccountingAttachmentRequest.ts +++ b/src/serialization/resources/accounting/types/AccountingAttachmentRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AccountingAttachmentRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/AccountingAttachmentResponse.ts b/src/serialization/resources/accounting/types/AccountingAttachmentResponse.ts index 6ac4a55cc..e198f2908 100644 --- a/src/serialization/resources/accounting/types/AccountingAttachmentResponse.ts +++ b/src/serialization/resources/accounting/types/AccountingAttachmentResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingAttachment } from "./AccountingAttachment"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const AccountingAttachmentResponse: core.serialization.ObjectSchema< serializers.accounting.AccountingAttachmentResponse.Raw, Merge.accounting.AccountingAttachmentResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingAttachment), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.DebugModeLog)) - .optional(), + model: AccountingAttachment, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace AccountingAttachmentResponse { interface Raw { - model: serializers.accounting.AccountingAttachment.Raw; - warnings: serializers.accounting.WarningValidationProblem.Raw[]; - errors: serializers.accounting.ErrorValidationProblem.Raw[]; - logs?: serializers.accounting.DebugModeLog.Raw[] | null; + model: AccountingAttachment.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/AccountingPeriod.ts b/src/serialization/resources/accounting/types/AccountingPeriod.ts index 78c9dfc54..2957b4d88 100644 --- a/src/serialization/resources/accounting/types/AccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/AccountingPeriod.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingPeriodStatus } from "./AccountingPeriodStatus"; +import { RemoteData } from "./RemoteData"; export const AccountingPeriod: core.serialization.ObjectSchema< serializers.accounting.AccountingPeriod.Raw, @@ -15,21 +17,14 @@ export const AccountingPeriod: core.serialization.ObjectSchema< createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), name: core.serialization.string().optional(), - status: core.serialization - .lazy(async () => (await import("../../..")).accounting.AccountingPeriodStatus) - .optional(), + status: AccountingPeriodStatus.optional(), startDate: core.serialization.property("start_date", core.serialization.date().optional()), endDate: core.serialization.property("end_date", core.serialization.date().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace AccountingPeriod { @@ -39,10 +34,10 @@ export declare namespace AccountingPeriod { created_at?: string | null; modified_at?: string | null; name?: string | null; - status?: serializers.accounting.AccountingPeriodStatus.Raw | null; + status?: AccountingPeriodStatus.Raw | null; start_date?: string | null; end_date?: string | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/AccountingPeriodStatus.ts b/src/serialization/resources/accounting/types/AccountingPeriodStatus.ts index b8879676d..ef45544b4 100644 --- a/src/serialization/resources/accounting/types/AccountingPeriodStatus.ts +++ b/src/serialization/resources/accounting/types/AccountingPeriodStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingPeriodStatusEnum } from "./AccountingPeriodStatusEnum"; export const AccountingPeriodStatus: core.serialization.Schema< serializers.accounting.AccountingPeriodStatus.Raw, Merge.accounting.AccountingPeriodStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.AccountingPeriodStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([AccountingPeriodStatusEnum, core.serialization.string()]); export declare namespace AccountingPeriodStatus { - type Raw = serializers.accounting.AccountingPeriodStatusEnum.Raw | string; + type Raw = AccountingPeriodStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountingPeriodStatusEnum.ts b/src/serialization/resources/accounting/types/AccountingPeriodStatusEnum.ts index 414a2d584..9a21c59bb 100644 --- a/src/serialization/resources/accounting/types/AccountingPeriodStatusEnum.ts +++ b/src/serialization/resources/accounting/types/AccountingPeriodStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AccountingPeriodStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/AccountingPhoneNumber.ts b/src/serialization/resources/accounting/types/AccountingPhoneNumber.ts index d7f70b524..61eb991ca 100644 --- a/src/serialization/resources/accounting/types/AccountingPhoneNumber.ts +++ b/src/serialization/resources/accounting/types/AccountingPhoneNumber.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AccountingPhoneNumber: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/AccountingPhoneNumberRequest.ts b/src/serialization/resources/accounting/types/AccountingPhoneNumberRequest.ts index 8c6a75bbd..39d07967d 100644 --- a/src/serialization/resources/accounting/types/AccountingPhoneNumberRequest.ts +++ b/src/serialization/resources/accounting/types/AccountingPhoneNumberRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AccountingPhoneNumberRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/Address.ts b/src/serialization/resources/accounting/types/Address.ts index d4bd2f6f7..fceb5e681 100644 --- a/src/serialization/resources/accounting/types/Address.ts +++ b/src/serialization/resources/accounting/types/Address.ts @@ -2,21 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AddressType } from "./AddressType"; +import { AddressCountry } from "./AddressCountry"; export const Address: core.serialization.ObjectSchema = core.serialization.object({ createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), - type: core.serialization.lazy(async () => (await import("../../..")).accounting.AddressType).optional(), + type: AddressType.optional(), street1: core.serialization.property("street_1", core.serialization.string().optional()), street2: core.serialization.property("street_2", core.serialization.string().optional()), city: core.serialization.string().optional(), state: core.serialization.unknown().optional(), countrySubdivision: core.serialization.property("country_subdivision", core.serialization.string().optional()), - country: core.serialization.lazy(async () => (await import("../../..")).accounting.AddressCountry).optional(), + country: AddressCountry.optional(), zipCode: core.serialization.property("zip_code", core.serialization.string().optional()), }); @@ -24,13 +26,13 @@ export declare namespace Address { interface Raw { created_at?: string | null; modified_at?: string | null; - type?: serializers.accounting.AddressType.Raw | null; + type?: AddressType.Raw | null; street_1?: string | null; street_2?: string | null; city?: string | null; state?: unknown | null; country_subdivision?: string | null; - country?: serializers.accounting.AddressCountry.Raw | null; + country?: AddressCountry.Raw | null; zip_code?: string | null; } } diff --git a/src/serialization/resources/accounting/types/AddressCountry.ts b/src/serialization/resources/accounting/types/AddressCountry.ts index 9cb4d73bb..15dfbe554 100644 --- a/src/serialization/resources/accounting/types/AddressCountry.ts +++ b/src/serialization/resources/accounting/types/AddressCountry.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CountryEnum } from "./CountryEnum"; export const AddressCountry: core.serialization.Schema< serializers.accounting.AddressCountry.Raw, Merge.accounting.AddressCountry -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CountryEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CountryEnum, core.serialization.string()]); export declare namespace AddressCountry { - type Raw = serializers.accounting.CountryEnum.Raw | string; + type Raw = CountryEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AddressRequest.ts b/src/serialization/resources/accounting/types/AddressRequest.ts index 9b49cb97f..bbaf22ea3 100644 --- a/src/serialization/resources/accounting/types/AddressRequest.ts +++ b/src/serialization/resources/accounting/types/AddressRequest.ts @@ -2,22 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AddressRequestType } from "./AddressRequestType"; +import { AddressRequestCountry } from "./AddressRequestCountry"; export const AddressRequest: core.serialization.ObjectSchema< serializers.accounting.AddressRequest.Raw, Merge.accounting.AddressRequest > = core.serialization.object({ - type: core.serialization.lazy(async () => (await import("../../..")).accounting.AddressRequestType).optional(), + type: AddressRequestType.optional(), street1: core.serialization.property("street_1", core.serialization.string().optional()), street2: core.serialization.property("street_2", core.serialization.string().optional()), city: core.serialization.string().optional(), countrySubdivision: core.serialization.property("country_subdivision", core.serialization.string().optional()), - country: core.serialization - .lazy(async () => (await import("../../..")).accounting.AddressRequestCountry) - .optional(), + country: AddressRequestCountry.optional(), zipCode: core.serialization.property("zip_code", core.serialization.string().optional()), integrationParams: core.serialization.property( "integration_params", @@ -31,12 +31,12 @@ export const AddressRequest: core.serialization.ObjectSchema< export declare namespace AddressRequest { interface Raw { - type?: serializers.accounting.AddressRequestType.Raw | null; + type?: AddressRequestType.Raw | null; street_1?: string | null; street_2?: string | null; city?: string | null; country_subdivision?: string | null; - country?: serializers.accounting.AddressRequestCountry.Raw | null; + country?: AddressRequestCountry.Raw | null; zip_code?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; diff --git a/src/serialization/resources/accounting/types/AddressRequestCountry.ts b/src/serialization/resources/accounting/types/AddressRequestCountry.ts index 06993a145..613db71ef 100644 --- a/src/serialization/resources/accounting/types/AddressRequestCountry.ts +++ b/src/serialization/resources/accounting/types/AddressRequestCountry.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CountryEnum } from "./CountryEnum"; export const AddressRequestCountry: core.serialization.Schema< serializers.accounting.AddressRequestCountry.Raw, Merge.accounting.AddressRequestCountry -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CountryEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CountryEnum, core.serialization.string()]); export declare namespace AddressRequestCountry { - type Raw = serializers.accounting.CountryEnum.Raw | string; + type Raw = CountryEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AddressRequestType.ts b/src/serialization/resources/accounting/types/AddressRequestType.ts index 4df7eaf01..0a65d3ddf 100644 --- a/src/serialization/resources/accounting/types/AddressRequestType.ts +++ b/src/serialization/resources/accounting/types/AddressRequestType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AddressTypeEnum } from "./AddressTypeEnum"; export const AddressRequestType: core.serialization.Schema< serializers.accounting.AddressRequestType.Raw, Merge.accounting.AddressRequestType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.AddressTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([AddressTypeEnum, core.serialization.string()]); export declare namespace AddressRequestType { - type Raw = serializers.accounting.AddressTypeEnum.Raw | string; + type Raw = AddressTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AddressType.ts b/src/serialization/resources/accounting/types/AddressType.ts index 64d6335fd..310238c1b 100644 --- a/src/serialization/resources/accounting/types/AddressType.ts +++ b/src/serialization/resources/accounting/types/AddressType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AddressTypeEnum } from "./AddressTypeEnum"; export const AddressType: core.serialization.Schema< serializers.accounting.AddressType.Raw, Merge.accounting.AddressType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.AddressTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([AddressTypeEnum, core.serialization.string()]); export declare namespace AddressType { - type Raw = serializers.accounting.AddressTypeEnum.Raw | string; + type Raw = AddressTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AddressTypeEnum.ts b/src/serialization/resources/accounting/types/AddressTypeEnum.ts index b91f2bb23..8d7036ca7 100644 --- a/src/serialization/resources/accounting/types/AddressTypeEnum.ts +++ b/src/serialization/resources/accounting/types/AddressTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AddressTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/AdvancedMetadata.ts b/src/serialization/resources/accounting/types/AdvancedMetadata.ts index 299c6f3ac..be27e928e 100644 --- a/src/serialization/resources/accounting/types/AdvancedMetadata.ts +++ b/src/serialization/resources/accounting/types/AdvancedMetadata.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AdvancedMetadata: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/AsyncPassthroughReciept.ts b/src/serialization/resources/accounting/types/AsyncPassthroughReciept.ts index e0db3d78e..7c26d0b44 100644 --- a/src/serialization/resources/accounting/types/AsyncPassthroughReciept.ts +++ b/src/serialization/resources/accounting/types/AsyncPassthroughReciept.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AsyncPassthroughReciept: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/AuditLogEvent.ts b/src/serialization/resources/accounting/types/AuditLogEvent.ts index e0d45d3e8..cfdfe9df2 100644 --- a/src/serialization/resources/accounting/types/AuditLogEvent.ts +++ b/src/serialization/resources/accounting/types/AuditLogEvent.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AuditLogEventRole } from "./AuditLogEventRole"; +import { AuditLogEventEventType } from "./AuditLogEventEventType"; export const AuditLogEvent: core.serialization.ObjectSchema< serializers.accounting.AuditLogEvent.Raw, @@ -13,12 +15,9 @@ export const AuditLogEvent: core.serialization.ObjectSchema< id: core.serialization.string().optional(), userName: core.serialization.property("user_name", core.serialization.string().optional()), userEmail: core.serialization.property("user_email", core.serialization.string().optional()), - role: core.serialization.lazy(async () => (await import("../../..")).accounting.AuditLogEventRole), + role: AuditLogEventRole, ipAddress: core.serialization.property("ip_address", core.serialization.string()), - eventType: core.serialization.property( - "event_type", - core.serialization.lazy(async () => (await import("../../..")).accounting.AuditLogEventEventType) - ), + eventType: core.serialization.property("event_type", AuditLogEventEventType), eventDescription: core.serialization.property("event_description", core.serialization.string()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), }); @@ -28,9 +27,9 @@ export declare namespace AuditLogEvent { id?: string | null; user_name?: string | null; user_email?: string | null; - role: serializers.accounting.AuditLogEventRole.Raw; + role: AuditLogEventRole.Raw; ip_address: string; - event_type: serializers.accounting.AuditLogEventEventType.Raw; + event_type: AuditLogEventEventType.Raw; event_description: string; created_at?: string | null; } diff --git a/src/serialization/resources/accounting/types/AuditLogEventEventType.ts b/src/serialization/resources/accounting/types/AuditLogEventEventType.ts index eb50f7fd3..25e465348 100644 --- a/src/serialization/resources/accounting/types/AuditLogEventEventType.ts +++ b/src/serialization/resources/accounting/types/AuditLogEventEventType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EventTypeEnum } from "./EventTypeEnum"; export const AuditLogEventEventType: core.serialization.Schema< serializers.accounting.AuditLogEventEventType.Raw, Merge.accounting.AuditLogEventEventType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.EventTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EventTypeEnum, core.serialization.string()]); export declare namespace AuditLogEventEventType { - type Raw = serializers.accounting.EventTypeEnum.Raw | string; + type Raw = EventTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AuditLogEventRole.ts b/src/serialization/resources/accounting/types/AuditLogEventRole.ts index ee16263d8..43fa5dc91 100644 --- a/src/serialization/resources/accounting/types/AuditLogEventRole.ts +++ b/src/serialization/resources/accounting/types/AuditLogEventRole.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RoleEnum } from "./RoleEnum"; export const AuditLogEventRole: core.serialization.Schema< serializers.accounting.AuditLogEventRole.Raw, Merge.accounting.AuditLogEventRole -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.RoleEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RoleEnum, core.serialization.string()]); export declare namespace AuditLogEventRole { - type Raw = serializers.accounting.RoleEnum.Raw | string; + type Raw = RoleEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AvailableActions.ts b/src/serialization/resources/accounting/types/AvailableActions.ts index 1651eee08..12f6e3e88 100644 --- a/src/serialization/resources/accounting/types/AvailableActions.ts +++ b/src/serialization/resources/accounting/types/AvailableActions.ts @@ -2,28 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountIntegration } from "./AccountIntegration"; +import { ModelOperation } from "./ModelOperation"; export const AvailableActions: core.serialization.ObjectSchema< serializers.accounting.AvailableActions.Raw, Merge.accounting.AvailableActions > = core.serialization.object({ - integration: core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountIntegration), + integration: AccountIntegration, passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.ModelOperation)) - .optional() + core.serialization.list(ModelOperation).optional() ), }); export declare namespace AvailableActions { interface Raw { - integration: serializers.accounting.AccountIntegration.Raw; + integration: AccountIntegration.Raw; passthrough_available: boolean; - available_model_operations?: serializers.accounting.ModelOperation.Raw[] | null; + available_model_operations?: ModelOperation.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/BalanceSheet.ts b/src/serialization/resources/accounting/types/BalanceSheet.ts index b1fd515e2..c9fc74314 100644 --- a/src/serialization/resources/accounting/types/BalanceSheet.ts +++ b/src/serialization/resources/accounting/types/BalanceSheet.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { BalanceSheetCurrency } from "./BalanceSheetCurrency"; +import { BalanceSheetCompany } from "./BalanceSheetCompany"; +import { ReportItem } from "./ReportItem"; +import { RemoteData } from "./RemoteData"; export const BalanceSheet: core.serialization.ObjectSchema< serializers.accounting.BalanceSheet.Raw, @@ -15,33 +19,20 @@ export const BalanceSheet: core.serialization.ObjectSchema< createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), name: core.serialization.string().optional(), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.BalanceSheetCurrency) - .optional(), - company: core.serialization.lazy(async () => (await import("../../..")).accounting.BalanceSheetCompany).optional(), + currency: BalanceSheetCurrency.optional(), + company: BalanceSheetCompany.optional(), date: core.serialization.date().optional(), netAssets: core.serialization.property("net_assets", core.serialization.number().optional()), - assets: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.ReportItem)) - .optional(), - liabilities: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.ReportItem)) - .optional(), - equity: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.ReportItem)) - .optional(), + assets: core.serialization.list(ReportItem).optional(), + liabilities: core.serialization.list(ReportItem).optional(), + equity: core.serialization.list(ReportItem).optional(), remoteGeneratedAt: core.serialization.property("remote_generated_at", core.serialization.date().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace BalanceSheet { @@ -51,16 +42,16 @@ export declare namespace BalanceSheet { created_at?: string | null; modified_at?: string | null; name?: string | null; - currency?: serializers.accounting.BalanceSheetCurrency.Raw | null; - company?: serializers.accounting.BalanceSheetCompany.Raw | null; + currency?: BalanceSheetCurrency.Raw | null; + company?: BalanceSheetCompany.Raw | null; date?: string | null; net_assets?: number | null; - assets?: serializers.accounting.ReportItem.Raw[] | null; - liabilities?: serializers.accounting.ReportItem.Raw[] | null; - equity?: serializers.accounting.ReportItem.Raw[] | null; + assets?: ReportItem.Raw[] | null; + liabilities?: ReportItem.Raw[] | null; + equity?: ReportItem.Raw[] | null; remote_generated_at?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/BalanceSheetCompany.ts b/src/serialization/resources/accounting/types/BalanceSheetCompany.ts index 952bcd19b..3395e6b26 100644 --- a/src/serialization/resources/accounting/types/BalanceSheetCompany.ts +++ b/src/serialization/resources/accounting/types/BalanceSheetCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const BalanceSheetCompany: core.serialization.Schema< serializers.accounting.BalanceSheetCompany.Raw, Merge.accounting.BalanceSheetCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace BalanceSheetCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/BalanceSheetCurrency.ts b/src/serialization/resources/accounting/types/BalanceSheetCurrency.ts index 2fa6b1351..701dacc18 100644 --- a/src/serialization/resources/accounting/types/BalanceSheetCurrency.ts +++ b/src/serialization/resources/accounting/types/BalanceSheetCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const BalanceSheetCurrency: core.serialization.Schema< serializers.accounting.BalanceSheetCurrency.Raw, Merge.accounting.BalanceSheetCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace BalanceSheetCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/CashFlowStatement.ts b/src/serialization/resources/accounting/types/CashFlowStatement.ts index be2c3c423..5444def50 100644 --- a/src/serialization/resources/accounting/types/CashFlowStatement.ts +++ b/src/serialization/resources/accounting/types/CashFlowStatement.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CashFlowStatementCurrency } from "./CashFlowStatementCurrency"; +import { CashFlowStatementCompany } from "./CashFlowStatementCompany"; +import { ReportItem } from "./ReportItem"; +import { RemoteData } from "./RemoteData"; export const CashFlowStatement: core.serialization.ObjectSchema< serializers.accounting.CashFlowStatement.Raw, @@ -15,12 +19,8 @@ export const CashFlowStatement: core.serialization.ObjectSchema< createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), name: core.serialization.string().optional(), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.CashFlowStatementCurrency) - .optional(), - company: core.serialization - .lazy(async () => (await import("../../..")).accounting.CashFlowStatementCompany) - .optional(), + currency: CashFlowStatementCurrency.optional(), + company: CashFlowStatementCompany.optional(), startPeriod: core.serialization.property("start_period", core.serialization.date().optional()), endPeriod: core.serialization.property("end_period", core.serialization.date().optional()), cashAtBeginningOfPeriod: core.serialization.property( @@ -30,21 +30,15 @@ export const CashFlowStatement: core.serialization.ObjectSchema< cashAtEndOfPeriod: core.serialization.property("cash_at_end_of_period", core.serialization.number().optional()), operatingActivities: core.serialization.property( "operating_activities", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.ReportItem)) - .optional() + core.serialization.list(ReportItem).optional() ), investingActivities: core.serialization.property( "investing_activities", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.ReportItem)) - .optional() + core.serialization.list(ReportItem).optional() ), financingActivities: core.serialization.property( "financing_activities", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.ReportItem)) - .optional() + core.serialization.list(ReportItem).optional() ), remoteGeneratedAt: core.serialization.property("remote_generated_at", core.serialization.date().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), @@ -52,12 +46,7 @@ export const CashFlowStatement: core.serialization.ObjectSchema< "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace CashFlowStatement { @@ -67,18 +56,18 @@ export declare namespace CashFlowStatement { created_at?: string | null; modified_at?: string | null; name?: string | null; - currency?: serializers.accounting.CashFlowStatementCurrency.Raw | null; - company?: serializers.accounting.CashFlowStatementCompany.Raw | null; + currency?: CashFlowStatementCurrency.Raw | null; + company?: CashFlowStatementCompany.Raw | null; start_period?: string | null; end_period?: string | null; cash_at_beginning_of_period?: number | null; cash_at_end_of_period?: number | null; - operating_activities?: serializers.accounting.ReportItem.Raw[] | null; - investing_activities?: serializers.accounting.ReportItem.Raw[] | null; - financing_activities?: serializers.accounting.ReportItem.Raw[] | null; + operating_activities?: ReportItem.Raw[] | null; + investing_activities?: ReportItem.Raw[] | null; + financing_activities?: ReportItem.Raw[] | null; remote_generated_at?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/CashFlowStatementCompany.ts b/src/serialization/resources/accounting/types/CashFlowStatementCompany.ts index 061ea6f64..99daebd0d 100644 --- a/src/serialization/resources/accounting/types/CashFlowStatementCompany.ts +++ b/src/serialization/resources/accounting/types/CashFlowStatementCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const CashFlowStatementCompany: core.serialization.Schema< serializers.accounting.CashFlowStatementCompany.Raw, Merge.accounting.CashFlowStatementCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace CashFlowStatementCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/CashFlowStatementCurrency.ts b/src/serialization/resources/accounting/types/CashFlowStatementCurrency.ts index e731a8d34..58066e30f 100644 --- a/src/serialization/resources/accounting/types/CashFlowStatementCurrency.ts +++ b/src/serialization/resources/accounting/types/CashFlowStatementCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const CashFlowStatementCurrency: core.serialization.Schema< serializers.accounting.CashFlowStatementCurrency.Raw, Merge.accounting.CashFlowStatementCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace CashFlowStatementCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/CategoriesEnum.ts b/src/serialization/resources/accounting/types/CategoriesEnum.ts index 0d2e7e2f0..d38acde3a 100644 --- a/src/serialization/resources/accounting/types/CategoriesEnum.ts +++ b/src/serialization/resources/accounting/types/CategoriesEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CategoriesEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/CategoryEnum.ts b/src/serialization/resources/accounting/types/CategoryEnum.ts index 5b497479e..0ebf9bb6e 100644 --- a/src/serialization/resources/accounting/types/CategoryEnum.ts +++ b/src/serialization/resources/accounting/types/CategoryEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CategoryEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/CategoryTypeEnum.ts b/src/serialization/resources/accounting/types/CategoryTypeEnum.ts index 7220ebfd8..6de48ac77 100644 --- a/src/serialization/resources/accounting/types/CategoryTypeEnum.ts +++ b/src/serialization/resources/accounting/types/CategoryTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CategoryTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/ClassificationEnum.ts b/src/serialization/resources/accounting/types/ClassificationEnum.ts index 9f5530eac..1cbe4f21c 100644 --- a/src/serialization/resources/accounting/types/ClassificationEnum.ts +++ b/src/serialization/resources/accounting/types/ClassificationEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ClassificationEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/CommonModelScopeApi.ts b/src/serialization/resources/accounting/types/CommonModelScopeApi.ts index 821f77383..22beb1383 100644 --- a/src/serialization/resources/accounting/types/CommonModelScopeApi.ts +++ b/src/serialization/resources/accounting/types/CommonModelScopeApi.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IndividualCommonModelScopeDeserializer } from "./IndividualCommonModelScopeDeserializer"; export const CommonModelScopeApi: core.serialization.ObjectSchema< serializers.accounting.CommonModelScopeApi.Raw, @@ -12,16 +13,12 @@ export const CommonModelScopeApi: core.serialization.ObjectSchema< > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list( - core.serialization.lazyObject( - async () => (await import("../../..")).accounting.IndividualCommonModelScopeDeserializer - ) - ) + core.serialization.list(IndividualCommonModelScopeDeserializer) ), }); export declare namespace CommonModelScopeApi { interface Raw { - common_models: serializers.accounting.IndividualCommonModelScopeDeserializer.Raw[]; + common_models: IndividualCommonModelScopeDeserializer.Raw[]; } } diff --git a/src/serialization/resources/accounting/types/CommonModelScopesBodyRequest.ts b/src/serialization/resources/accounting/types/CommonModelScopesBodyRequest.ts index c85311f3d..59b43bc41 100644 --- a/src/serialization/resources/accounting/types/CommonModelScopesBodyRequest.ts +++ b/src/serialization/resources/accounting/types/CommonModelScopesBodyRequest.ts @@ -2,21 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EnabledActionsEnum } from "./EnabledActionsEnum"; export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< serializers.accounting.CommonModelScopesBodyRequest.Raw, Merge.accounting.CommonModelScopesBodyRequest > = core.serialization.object({ modelId: core.serialization.property("model_id", core.serialization.string()), - enabledActions: core.serialization.property( - "enabled_actions", - core.serialization.list( - core.serialization.lazy(async () => (await import("../../..")).accounting.EnabledActionsEnum) - ) - ), + enabledActions: core.serialization.property("enabled_actions", core.serialization.list(EnabledActionsEnum)), disabledFields: core.serialization.property( "disabled_fields", core.serialization.list(core.serialization.string()) @@ -26,7 +22,7 @@ export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< export declare namespace CommonModelScopesBodyRequest { interface Raw { model_id: string; - enabled_actions: serializers.accounting.EnabledActionsEnum.Raw[]; + enabled_actions: EnabledActionsEnum.Raw[]; disabled_fields: string[]; } } diff --git a/src/serialization/resources/accounting/types/CompanyInfo.ts b/src/serialization/resources/accounting/types/CompanyInfo.ts index bae173a9e..ed9b7ad76 100644 --- a/src/serialization/resources/accounting/types/CompanyInfo.ts +++ b/src/serialization/resources/accounting/types/CompanyInfo.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfoCurrency } from "./CompanyInfoCurrency"; +import { Address } from "./Address"; +import { AccountingPhoneNumber } from "./AccountingPhoneNumber"; +import { RemoteData } from "./RemoteData"; export const CompanyInfo: core.serialization.ObjectSchema< serializers.accounting.CompanyInfo.Raw, @@ -19,31 +23,20 @@ export const CompanyInfo: core.serialization.ObjectSchema< taxNumber: core.serialization.property("tax_number", core.serialization.string().optional()), fiscalYearEndMonth: core.serialization.property("fiscal_year_end_month", core.serialization.number().optional()), fiscalYearEndDay: core.serialization.property("fiscal_year_end_day", core.serialization.number().optional()), - currency: core.serialization.lazy(async () => (await import("../../..")).accounting.CompanyInfoCurrency).optional(), + currency: CompanyInfoCurrency.optional(), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), urls: core.serialization.list(core.serialization.string().optional()).optional(), - addresses: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.Address)) - .optional(), + addresses: core.serialization.list(Address).optional(), phoneNumbers: core.serialization.property( "phone_numbers", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingPhoneNumber) - ) - .optional() + core.serialization.list(AccountingPhoneNumber).optional() ), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace CompanyInfo { @@ -57,13 +50,13 @@ export declare namespace CompanyInfo { tax_number?: string | null; fiscal_year_end_month?: number | null; fiscal_year_end_day?: number | null; - currency?: serializers.accounting.CompanyInfoCurrency.Raw | null; + currency?: CompanyInfoCurrency.Raw | null; remote_created_at?: string | null; urls?: (string | null | undefined)[] | null; - addresses?: serializers.accounting.Address.Raw[] | null; - phone_numbers?: serializers.accounting.AccountingPhoneNumber.Raw[] | null; + addresses?: Address.Raw[] | null; + phone_numbers?: AccountingPhoneNumber.Raw[] | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/CompanyInfoCurrency.ts b/src/serialization/resources/accounting/types/CompanyInfoCurrency.ts index 1f28325b2..1bbe0e200 100644 --- a/src/serialization/resources/accounting/types/CompanyInfoCurrency.ts +++ b/src/serialization/resources/accounting/types/CompanyInfoCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const CompanyInfoCurrency: core.serialization.Schema< serializers.accounting.CompanyInfoCurrency.Raw, Merge.accounting.CompanyInfoCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace CompanyInfoCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/ComponentTypeEnum.ts b/src/serialization/resources/accounting/types/ComponentTypeEnum.ts index 64e890412..f8607932f 100644 --- a/src/serialization/resources/accounting/types/ComponentTypeEnum.ts +++ b/src/serialization/resources/accounting/types/ComponentTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ComponentTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/Contact.ts b/src/serialization/resources/accounting/types/Contact.ts index d5f6def67..efc84d2bd 100644 --- a/src/serialization/resources/accounting/types/Contact.ts +++ b/src/serialization/resources/accounting/types/Contact.ts @@ -2,9 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ContactStatus } from "./ContactStatus"; +import { ContactAddressesItem } from "./ContactAddressesItem"; +import { AccountingPhoneNumber } from "./AccountingPhoneNumber"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const Contact: core.serialization.ObjectSchema = core.serialization.object({ @@ -17,44 +22,22 @@ export const Contact: core.serialization.ObjectSchema (await import("../../..")).accounting.ContactStatus).optional(), + status: ContactStatus.optional(), currency: core.serialization.string().optional(), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), company: core.serialization.string().optional(), - addresses: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.ContactAddressesItem) - .optional() - ) - .optional(), + addresses: core.serialization.list(ContactAddressesItem.optional()).optional(), phoneNumbers: core.serialization.property( "phone_numbers", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).accounting.AccountingPhoneNumber - ) - ) - .optional() + core.serialization.list(AccountingPhoneNumber).optional() ), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace Contact { @@ -68,15 +51,15 @@ export declare namespace Contact { is_customer?: boolean | null; email_address?: string | null; tax_number?: string | null; - status?: serializers.accounting.ContactStatus.Raw | null; + status?: ContactStatus.Raw | null; currency?: string | null; remote_updated_at?: string | null; company?: string | null; - addresses?: (serializers.accounting.ContactAddressesItem.Raw | null | undefined)[] | null; - phone_numbers?: serializers.accounting.AccountingPhoneNumber.Raw[] | null; + addresses?: (ContactAddressesItem.Raw | null | undefined)[] | null; + phone_numbers?: AccountingPhoneNumber.Raw[] | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; - remote_fields?: serializers.accounting.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/ContactAddressesItem.ts b/src/serialization/resources/accounting/types/ContactAddressesItem.ts index f989b7652..301952f0a 100644 --- a/src/serialization/resources/accounting/types/ContactAddressesItem.ts +++ b/src/serialization/resources/accounting/types/ContactAddressesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Address } from "./Address"; export const ContactAddressesItem: core.serialization.Schema< serializers.accounting.ContactAddressesItem.Raw, Merge.accounting.ContactAddressesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Address), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Address]); export declare namespace ContactAddressesItem { - type Raw = string | serializers.accounting.Address.Raw; + type Raw = string | Address.Raw; } diff --git a/src/serialization/resources/accounting/types/ContactRequest.ts b/src/serialization/resources/accounting/types/ContactRequest.ts index 38175b6d1..5358d846c 100644 --- a/src/serialization/resources/accounting/types/ContactRequest.ts +++ b/src/serialization/resources/accounting/types/ContactRequest.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ContactRequestStatus } from "./ContactRequestStatus"; +import { ContactRequestAddressesItem } from "./ContactRequestAddressesItem"; +import { AccountingPhoneNumberRequest } from "./AccountingPhoneNumberRequest"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const ContactRequest: core.serialization.ObjectSchema< serializers.accounting.ContactRequest.Raw, @@ -15,25 +19,13 @@ export const ContactRequest: core.serialization.ObjectSchema< isCustomer: core.serialization.property("is_customer", core.serialization.boolean().optional()), emailAddress: core.serialization.property("email_address", core.serialization.string().optional()), taxNumber: core.serialization.property("tax_number", core.serialization.string().optional()), - status: core.serialization.lazy(async () => (await import("../../..")).accounting.ContactRequestStatus).optional(), + status: ContactRequestStatus.optional(), currency: core.serialization.string().optional(), company: core.serialization.string().optional(), - addresses: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.ContactRequestAddressesItem) - .optional() - ) - .optional(), + addresses: core.serialization.list(ContactRequestAddressesItem.optional()).optional(), phoneNumbers: core.serialization.property( "phone_numbers", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).accounting.AccountingPhoneNumberRequest - ) - ) - .optional() + core.serialization.list(AccountingPhoneNumberRequest).optional() ), integrationParams: core.serialization.property( "integration_params", @@ -43,12 +35,7 @@ export const ContactRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace ContactRequest { @@ -58,13 +45,13 @@ export declare namespace ContactRequest { is_customer?: boolean | null; email_address?: string | null; tax_number?: string | null; - status?: serializers.accounting.ContactRequestStatus.Raw | null; + status?: ContactRequestStatus.Raw | null; currency?: string | null; company?: string | null; - addresses?: (serializers.accounting.ContactRequestAddressesItem.Raw | null | undefined)[] | null; - phone_numbers?: serializers.accounting.AccountingPhoneNumberRequest.Raw[] | null; + addresses?: (ContactRequestAddressesItem.Raw | null | undefined)[] | null; + phone_numbers?: AccountingPhoneNumberRequest.Raw[] | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.accounting.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/ContactRequestAddressesItem.ts b/src/serialization/resources/accounting/types/ContactRequestAddressesItem.ts index 3e4f5d15f..75dfbe9ec 100644 --- a/src/serialization/resources/accounting/types/ContactRequestAddressesItem.ts +++ b/src/serialization/resources/accounting/types/ContactRequestAddressesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Address } from "./Address"; export const ContactRequestAddressesItem: core.serialization.Schema< serializers.accounting.ContactRequestAddressesItem.Raw, Merge.accounting.ContactRequestAddressesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Address), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Address]); export declare namespace ContactRequestAddressesItem { - type Raw = string | serializers.accounting.Address.Raw; + type Raw = string | Address.Raw; } diff --git a/src/serialization/resources/accounting/types/ContactRequestStatus.ts b/src/serialization/resources/accounting/types/ContactRequestStatus.ts index de465a165..7d8e2cc85 100644 --- a/src/serialization/resources/accounting/types/ContactRequestStatus.ts +++ b/src/serialization/resources/accounting/types/ContactRequestStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Status7D1Enum } from "./Status7D1Enum"; export const ContactRequestStatus: core.serialization.Schema< serializers.accounting.ContactRequestStatus.Raw, Merge.accounting.ContactRequestStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.Status7D1Enum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([Status7D1Enum, core.serialization.string()]); export declare namespace ContactRequestStatus { - type Raw = serializers.accounting.Status7D1Enum.Raw | string; + type Raw = Status7D1Enum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/ContactResponse.ts b/src/serialization/resources/accounting/types/ContactResponse.ts index 116d40615..dbbc20710 100644 --- a/src/serialization/resources/accounting/types/ContactResponse.ts +++ b/src/serialization/resources/accounting/types/ContactResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const ContactResponse: core.serialization.ObjectSchema< serializers.accounting.ContactResponse.Raw, Merge.accounting.ContactResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.DebugModeLog)) - .optional(), + model: Contact, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace ContactResponse { interface Raw { - model: serializers.accounting.Contact.Raw; - warnings: serializers.accounting.WarningValidationProblem.Raw[]; - errors: serializers.accounting.ErrorValidationProblem.Raw[]; - logs?: serializers.accounting.DebugModeLog.Raw[] | null; + model: Contact.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/ContactStatus.ts b/src/serialization/resources/accounting/types/ContactStatus.ts index 808301304..3c9d8c0a6 100644 --- a/src/serialization/resources/accounting/types/ContactStatus.ts +++ b/src/serialization/resources/accounting/types/ContactStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Status7D1Enum } from "./Status7D1Enum"; export const ContactStatus: core.serialization.Schema< serializers.accounting.ContactStatus.Raw, Merge.accounting.ContactStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.Status7D1Enum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([Status7D1Enum, core.serialization.string()]); export declare namespace ContactStatus { - type Raw = serializers.accounting.Status7D1Enum.Raw | string; + type Raw = Status7D1Enum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/CountryEnum.ts b/src/serialization/resources/accounting/types/CountryEnum.ts index b8914a1e2..4dc5a0538 100644 --- a/src/serialization/resources/accounting/types/CountryEnum.ts +++ b/src/serialization/resources/accounting/types/CountryEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CountryEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/CreditNote.ts b/src/serialization/resources/accounting/types/CreditNote.ts index 58848e550..18c9a0d9c 100644 --- a/src/serialization/resources/accounting/types/CreditNote.ts +++ b/src/serialization/resources/accounting/types/CreditNote.ts @@ -2,9 +2,19 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CreditNoteStatus } from "./CreditNoteStatus"; +import { CreditNoteContact } from "./CreditNoteContact"; +import { CreditNoteCompany } from "./CreditNoteCompany"; +import { CreditNoteLineItem } from "./CreditNoteLineItem"; +import { CreditNoteTrackingCategoriesItem } from "./CreditNoteTrackingCategoriesItem"; +import { CreditNoteCurrency } from "./CreditNoteCurrency"; +import { CreditNotePaymentsItem } from "./CreditNotePaymentsItem"; +import { CreditNoteAppliedPaymentsItem } from "./CreditNoteAppliedPaymentsItem"; +import { CreditNoteAccountingPeriod } from "./CreditNoteAccountingPeriod"; +import { RemoteData } from "./RemoteData"; export const CreditNote: core.serialization.ObjectSchema< serializers.accounting.CreditNote.Raw, @@ -15,63 +25,34 @@ export const CreditNote: core.serialization.ObjectSchema< createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), transactionDate: core.serialization.property("transaction_date", core.serialization.date().optional()), - status: core.serialization.lazy(async () => (await import("../../..")).accounting.CreditNoteStatus).optional(), + status: CreditNoteStatus.optional(), number: core.serialization.string().optional(), - contact: core.serialization.lazy(async () => (await import("../../..")).accounting.CreditNoteContact).optional(), - company: core.serialization.lazy(async () => (await import("../../..")).accounting.CreditNoteCompany).optional(), + contact: CreditNoteContact.optional(), + company: CreditNoteCompany.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), totalAmount: core.serialization.property("total_amount", core.serialization.number().optional()), remainingCredit: core.serialization.property("remaining_credit", core.serialization.number().optional()), inclusiveOfTax: core.serialization.property("inclusive_of_tax", core.serialization.boolean().optional()), - lineItems: core.serialization.property( - "line_items", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.CreditNoteLineItem)) - .optional() - ), + lineItems: core.serialization.property("line_items", core.serialization.list(CreditNoteLineItem).optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.CreditNoteTrackingCategoriesItem) - .optional() - ) - .optional() + core.serialization.list(CreditNoteTrackingCategoriesItem.optional()).optional() ), - currency: core.serialization.lazy(async () => (await import("../../..")).accounting.CreditNoteCurrency).optional(), + currency: CreditNoteCurrency.optional(), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), - payments: core.serialization - .list( - core.serialization.lazy(async () => (await import("../../..")).accounting.CreditNotePaymentsItem).optional() - ) - .optional(), + payments: core.serialization.list(CreditNotePaymentsItem.optional()).optional(), appliedPayments: core.serialization.property( "applied_payments", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.CreditNoteAppliedPaymentsItem) - .optional() - ) - .optional() + core.serialization.list(CreditNoteAppliedPaymentsItem.optional()).optional() ), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), - accountingPeriod: core.serialization.property( - "accounting_period", - core.serialization.lazy(async () => (await import("../../..")).accounting.CreditNoteAccountingPeriod).optional() - ), + accountingPeriod: core.serialization.property("accounting_period", CreditNoteAccountingPeriod.optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace CreditNote { @@ -81,24 +62,24 @@ export declare namespace CreditNote { created_at?: string | null; modified_at?: string | null; transaction_date?: string | null; - status?: serializers.accounting.CreditNoteStatus.Raw | null; + status?: CreditNoteStatus.Raw | null; number?: string | null; - contact?: serializers.accounting.CreditNoteContact.Raw | null; - company?: serializers.accounting.CreditNoteCompany.Raw | null; + contact?: CreditNoteContact.Raw | null; + company?: CreditNoteCompany.Raw | null; exchange_rate?: string | null; total_amount?: number | null; remaining_credit?: number | null; inclusive_of_tax?: boolean | null; - line_items?: serializers.accounting.CreditNoteLineItem.Raw[] | null; - tracking_categories?: (serializers.accounting.CreditNoteTrackingCategoriesItem.Raw | null | undefined)[] | null; - currency?: serializers.accounting.CreditNoteCurrency.Raw | null; + line_items?: CreditNoteLineItem.Raw[] | null; + tracking_categories?: (CreditNoteTrackingCategoriesItem.Raw | null | undefined)[] | null; + currency?: CreditNoteCurrency.Raw | null; remote_created_at?: string | null; remote_updated_at?: string | null; - payments?: (serializers.accounting.CreditNotePaymentsItem.Raw | null | undefined)[] | null; - applied_payments?: (serializers.accounting.CreditNoteAppliedPaymentsItem.Raw | null | undefined)[] | null; + payments?: (CreditNotePaymentsItem.Raw | null | undefined)[] | null; + applied_payments?: (CreditNoteAppliedPaymentsItem.Raw | null | undefined)[] | null; remote_was_deleted?: boolean | null; - accounting_period?: serializers.accounting.CreditNoteAccountingPeriod.Raw | null; + accounting_period?: CreditNoteAccountingPeriod.Raw | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/CreditNoteAccountingPeriod.ts b/src/serialization/resources/accounting/types/CreditNoteAccountingPeriod.ts index aa93a0cbe..0b2eddee1 100644 --- a/src/serialization/resources/accounting/types/CreditNoteAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/CreditNoteAccountingPeriod.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingPeriod } from "./AccountingPeriod"; export const CreditNoteAccountingPeriod: core.serialization.Schema< serializers.accounting.CreditNoteAccountingPeriod.Raw, Merge.accounting.CreditNoteAccountingPeriod -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingPeriod), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace CreditNoteAccountingPeriod { - type Raw = string | serializers.accounting.AccountingPeriod.Raw; + type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteAppliedPaymentsItem.ts b/src/serialization/resources/accounting/types/CreditNoteAppliedPaymentsItem.ts index c26c09b51..48704ae17 100644 --- a/src/serialization/resources/accounting/types/CreditNoteAppliedPaymentsItem.ts +++ b/src/serialization/resources/accounting/types/CreditNoteAppliedPaymentsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PaymentLineItem } from "./PaymentLineItem"; export const CreditNoteAppliedPaymentsItem: core.serialization.Schema< serializers.accounting.CreditNoteAppliedPaymentsItem.Raw, Merge.accounting.CreditNoteAppliedPaymentsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.PaymentLineItem), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentLineItem]); export declare namespace CreditNoteAppliedPaymentsItem { - type Raw = string | serializers.accounting.PaymentLineItem.Raw; + type Raw = string | PaymentLineItem.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteCompany.ts b/src/serialization/resources/accounting/types/CreditNoteCompany.ts index 1f5f2185c..15c18e99e 100644 --- a/src/serialization/resources/accounting/types/CreditNoteCompany.ts +++ b/src/serialization/resources/accounting/types/CreditNoteCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const CreditNoteCompany: core.serialization.Schema< serializers.accounting.CreditNoteCompany.Raw, Merge.accounting.CreditNoteCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace CreditNoteCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteContact.ts b/src/serialization/resources/accounting/types/CreditNoteContact.ts index 4ae001640..f566f2d14 100644 --- a/src/serialization/resources/accounting/types/CreditNoteContact.ts +++ b/src/serialization/resources/accounting/types/CreditNoteContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const CreditNoteContact: core.serialization.Schema< serializers.accounting.CreditNoteContact.Raw, Merge.accounting.CreditNoteContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace CreditNoteContact { - type Raw = string | serializers.accounting.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteCurrency.ts b/src/serialization/resources/accounting/types/CreditNoteCurrency.ts index 556a3e32c..4ccdb438d 100644 --- a/src/serialization/resources/accounting/types/CreditNoteCurrency.ts +++ b/src/serialization/resources/accounting/types/CreditNoteCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const CreditNoteCurrency: core.serialization.Schema< serializers.accounting.CreditNoteCurrency.Raw, Merge.accounting.CreditNoteCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace CreditNoteCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/CreditNoteLineItem.ts b/src/serialization/resources/accounting/types/CreditNoteLineItem.ts index e6e75725d..062a868ab 100644 --- a/src/serialization/resources/accounting/types/CreditNoteLineItem.ts +++ b/src/serialization/resources/accounting/types/CreditNoteLineItem.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CreditNoteLineItemItem } from "./CreditNoteLineItemItem"; +import { CreditNoteLineItemCompany } from "./CreditNoteLineItemCompany"; export const CreditNoteLineItem: core.serialization.ObjectSchema< serializers.accounting.CreditNoteLineItem.Raw, @@ -14,7 +16,7 @@ export const CreditNoteLineItem: core.serialization.ObjectSchema< remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), - item: core.serialization.lazy(async () => (await import("../../..")).accounting.CreditNoteLineItemItem).optional(), + item: CreditNoteLineItemItem.optional(), name: core.serialization.string().optional(), description: core.serialization.string().optional(), quantity: core.serialization.string().optional(), @@ -28,9 +30,7 @@ export const CreditNoteLineItem: core.serialization.ObjectSchema< core.serialization.list(core.serialization.string().optional()).optional() ), account: core.serialization.string().optional(), - company: core.serialization - .lazy(async () => (await import("../../..")).accounting.CreditNoteLineItemCompany) - .optional(), + company: CreditNoteLineItemCompany.optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), }); @@ -40,7 +40,7 @@ export declare namespace CreditNoteLineItem { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - item?: serializers.accounting.CreditNoteLineItemItem.Raw | null; + item?: CreditNoteLineItemItem.Raw | null; name?: string | null; description?: string | null; quantity?: string | null; @@ -51,7 +51,7 @@ export declare namespace CreditNoteLineItem { tracking_category?: string | null; tracking_categories?: (string | null | undefined)[] | null; account?: string | null; - company?: serializers.accounting.CreditNoteLineItemCompany.Raw | null; + company?: CreditNoteLineItemCompany.Raw | null; remote_was_deleted?: boolean | null; } } diff --git a/src/serialization/resources/accounting/types/CreditNoteLineItemCompany.ts b/src/serialization/resources/accounting/types/CreditNoteLineItemCompany.ts index 2c4ecfdd0..1b13e0370 100644 --- a/src/serialization/resources/accounting/types/CreditNoteLineItemCompany.ts +++ b/src/serialization/resources/accounting/types/CreditNoteLineItemCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const CreditNoteLineItemCompany: core.serialization.Schema< serializers.accounting.CreditNoteLineItemCompany.Raw, Merge.accounting.CreditNoteLineItemCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace CreditNoteLineItemCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteLineItemItem.ts b/src/serialization/resources/accounting/types/CreditNoteLineItemItem.ts index 60839134c..96ecb5aae 100644 --- a/src/serialization/resources/accounting/types/CreditNoteLineItemItem.ts +++ b/src/serialization/resources/accounting/types/CreditNoteLineItemItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Item } from "./Item"; export const CreditNoteLineItemItem: core.serialization.Schema< serializers.accounting.CreditNoteLineItemItem.Raw, Merge.accounting.CreditNoteLineItemItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Item), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace CreditNoteLineItemItem { - type Raw = string | serializers.accounting.Item.Raw; + type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNotePaymentsItem.ts b/src/serialization/resources/accounting/types/CreditNotePaymentsItem.ts index 400c1d6f9..8bc65c665 100644 --- a/src/serialization/resources/accounting/types/CreditNotePaymentsItem.ts +++ b/src/serialization/resources/accounting/types/CreditNotePaymentsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Payment } from "./Payment"; export const CreditNotePaymentsItem: core.serialization.Schema< serializers.accounting.CreditNotePaymentsItem.Raw, Merge.accounting.CreditNotePaymentsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Payment), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Payment]); export declare namespace CreditNotePaymentsItem { - type Raw = string | serializers.accounting.Payment.Raw; + type Raw = string | Payment.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteStatus.ts b/src/serialization/resources/accounting/types/CreditNoteStatus.ts index d78ceec8b..ec7f40056 100644 --- a/src/serialization/resources/accounting/types/CreditNoteStatus.ts +++ b/src/serialization/resources/accounting/types/CreditNoteStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CreditNoteStatusEnum } from "./CreditNoteStatusEnum"; export const CreditNoteStatus: core.serialization.Schema< serializers.accounting.CreditNoteStatus.Raw, Merge.accounting.CreditNoteStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CreditNoteStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CreditNoteStatusEnum, core.serialization.string()]); export declare namespace CreditNoteStatus { - type Raw = serializers.accounting.CreditNoteStatusEnum.Raw | string; + type Raw = CreditNoteStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/CreditNoteStatusEnum.ts b/src/serialization/resources/accounting/types/CreditNoteStatusEnum.ts index 14d51266a..4e9e85ef8 100644 --- a/src/serialization/resources/accounting/types/CreditNoteStatusEnum.ts +++ b/src/serialization/resources/accounting/types/CreditNoteStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CreditNoteStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/CreditNoteTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/CreditNoteTrackingCategoriesItem.ts index 3535a611f..f41294952 100644 --- a/src/serialization/resources/accounting/types/CreditNoteTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/CreditNoteTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const CreditNoteTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.CreditNoteTrackingCategoriesItem.Raw, Merge.accounting.CreditNoteTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace CreditNoteTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/CurrencyEnum.ts b/src/serialization/resources/accounting/types/CurrencyEnum.ts index c6a836924..83d6f48ea 100644 --- a/src/serialization/resources/accounting/types/CurrencyEnum.ts +++ b/src/serialization/resources/accounting/types/CurrencyEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CurrencyEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/DataPassthroughRequest.ts b/src/serialization/resources/accounting/types/DataPassthroughRequest.ts index fe4f51638..48e86c78c 100644 --- a/src/serialization/resources/accounting/types/DataPassthroughRequest.ts +++ b/src/serialization/resources/accounting/types/DataPassthroughRequest.ts @@ -2,45 +2,39 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { MethodEnum } from "./MethodEnum"; +import { MultipartFormFieldRequest } from "./MultipartFormFieldRequest"; +import { RequestFormatEnum } from "./RequestFormatEnum"; export const DataPassthroughRequest: core.serialization.ObjectSchema< serializers.accounting.DataPassthroughRequest.Raw, Merge.accounting.DataPassthroughRequest > = core.serialization.object({ - method: core.serialization.lazy(async () => (await import("../../..")).accounting.MethodEnum), + method: MethodEnum, path: core.serialization.string(), baseUrlOverride: core.serialization.property("base_url_override", core.serialization.string().optional()), data: core.serialization.string().optional(), multipartFormData: core.serialization.property( "multipart_form_data", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).accounting.MultipartFormFieldRequest - ) - ) - .optional() + core.serialization.list(MultipartFormFieldRequest).optional() ), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), - requestFormat: core.serialization.property( - "request_format", - core.serialization.lazy(async () => (await import("../../..")).accounting.RequestFormatEnum).optional() - ), + requestFormat: core.serialization.property("request_format", RequestFormatEnum.optional()), normalizeResponse: core.serialization.property("normalize_response", core.serialization.boolean().optional()), }); export declare namespace DataPassthroughRequest { interface Raw { - method: serializers.accounting.MethodEnum.Raw; + method: MethodEnum.Raw; path: string; base_url_override?: string | null; data?: string | null; - multipart_form_data?: serializers.accounting.MultipartFormFieldRequest.Raw[] | null; + multipart_form_data?: MultipartFormFieldRequest.Raw[] | null; headers?: Record | null; - request_format?: serializers.accounting.RequestFormatEnum.Raw | null; + request_format?: RequestFormatEnum.Raw | null; normalize_response?: boolean | null; } } diff --git a/src/serialization/resources/accounting/types/DebugModeLog.ts b/src/serialization/resources/accounting/types/DebugModeLog.ts index 8ac40a12c..ba2719f6f 100644 --- a/src/serialization/resources/accounting/types/DebugModeLog.ts +++ b/src/serialization/resources/accounting/types/DebugModeLog.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { DebugModelLogSummary } from "./DebugModelLogSummary"; export const DebugModeLog: core.serialization.ObjectSchema< serializers.accounting.DebugModeLog.Raw, @@ -12,16 +13,13 @@ export const DebugModeLog: core.serialization.ObjectSchema< > = core.serialization.object({ logId: core.serialization.property("log_id", core.serialization.string()), dashboardView: core.serialization.property("dashboard_view", core.serialization.string()), - logSummary: core.serialization.property( - "log_summary", - core.serialization.lazyObject(async () => (await import("../../..")).accounting.DebugModelLogSummary) - ), + logSummary: core.serialization.property("log_summary", DebugModelLogSummary), }); export declare namespace DebugModeLog { interface Raw { log_id: string; dashboard_view: string; - log_summary: serializers.accounting.DebugModelLogSummary.Raw; + log_summary: DebugModelLogSummary.Raw; } } diff --git a/src/serialization/resources/accounting/types/DebugModelLogSummary.ts b/src/serialization/resources/accounting/types/DebugModelLogSummary.ts index a7b6cb7d0..7fd63e5e2 100644 --- a/src/serialization/resources/accounting/types/DebugModelLogSummary.ts +++ b/src/serialization/resources/accounting/types/DebugModelLogSummary.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const DebugModelLogSummary: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/EnabledActionsEnum.ts b/src/serialization/resources/accounting/types/EnabledActionsEnum.ts index e51644a72..095c47384 100644 --- a/src/serialization/resources/accounting/types/EnabledActionsEnum.ts +++ b/src/serialization/resources/accounting/types/EnabledActionsEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EnabledActionsEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/EncodingEnum.ts b/src/serialization/resources/accounting/types/EncodingEnum.ts index 1d264cfcc..0833150b5 100644 --- a/src/serialization/resources/accounting/types/EncodingEnum.ts +++ b/src/serialization/resources/accounting/types/EncodingEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EncodingEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/ErrorValidationProblem.ts b/src/serialization/resources/accounting/types/ErrorValidationProblem.ts index 7beda3d92..66fb8e5ef 100644 --- a/src/serialization/resources/accounting/types/ErrorValidationProblem.ts +++ b/src/serialization/resources/accounting/types/ErrorValidationProblem.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ValidationProblemSource } from "./ValidationProblemSource"; export const ErrorValidationProblem: core.serialization.ObjectSchema< serializers.accounting.ErrorValidationProblem.Raw, Merge.accounting.ErrorValidationProblem > = core.serialization.object({ - source: core.serialization - .lazyObject(async () => (await import("../../..")).accounting.ValidationProblemSource) - .optional(), + source: ValidationProblemSource.optional(), title: core.serialization.string(), detail: core.serialization.string(), problemType: core.serialization.property("problem_type", core.serialization.string()), @@ -20,7 +19,7 @@ export const ErrorValidationProblem: core.serialization.ObjectSchema< export declare namespace ErrorValidationProblem { interface Raw { - source?: serializers.accounting.ValidationProblemSource.Raw | null; + source?: ValidationProblemSource.Raw | null; title: string; detail: string; problem_type: string; diff --git a/src/serialization/resources/accounting/types/EventTypeEnum.ts b/src/serialization/resources/accounting/types/EventTypeEnum.ts index 57c5b4d6d..e392e5d4c 100644 --- a/src/serialization/resources/accounting/types/EventTypeEnum.ts +++ b/src/serialization/resources/accounting/types/EventTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EventTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/Expense.ts b/src/serialization/resources/accounting/types/Expense.ts index 7b106a749..e954a4aaf 100644 --- a/src/serialization/resources/accounting/types/Expense.ts +++ b/src/serialization/resources/accounting/types/Expense.ts @@ -2,9 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ExpenseAccount } from "./ExpenseAccount"; +import { ExpenseContact } from "./ExpenseContact"; +import { ExpenseCurrency } from "./ExpenseCurrency"; +import { ExpenseCompany } from "./ExpenseCompany"; +import { ExpenseLine } from "./ExpenseLine"; +import { ExpenseTrackingCategoriesItem } from "./ExpenseTrackingCategoriesItem"; +import { ExpenseAccountingPeriod } from "./ExpenseAccountingPeriod"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const Expense: core.serialization.ObjectSchema = core.serialization.object({ @@ -14,52 +23,29 @@ export const Expense: core.serialization.ObjectSchema (await import("../../..")).accounting.ExpenseAccount).optional(), - contact: core.serialization.lazy(async () => (await import("../../..")).accounting.ExpenseContact).optional(), + account: ExpenseAccount.optional(), + contact: ExpenseContact.optional(), totalAmount: core.serialization.property("total_amount", core.serialization.number().optional()), subTotal: core.serialization.property("sub_total", core.serialization.number().optional()), totalTaxAmount: core.serialization.property("total_tax_amount", core.serialization.number().optional()), - currency: core.serialization.lazy(async () => (await import("../../..")).accounting.ExpenseCurrency).optional(), + currency: ExpenseCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), inclusiveOfTax: core.serialization.property("inclusive_of_tax", core.serialization.boolean().optional()), - company: core.serialization.lazy(async () => (await import("../../..")).accounting.ExpenseCompany).optional(), + company: ExpenseCompany.optional(), memo: core.serialization.string().optional(), - lines: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExpenseLine)) - .optional(), + lines: core.serialization.list(ExpenseLine).optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseTrackingCategoriesItem) - .optional() - ) - .optional() + core.serialization.list(ExpenseTrackingCategoriesItem.optional()).optional() ), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), - accountingPeriod: core.serialization.property( - "accounting_period", - core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseAccountingPeriod) - .optional() - ), + accountingPeriod: core.serialization.property("accounting_period", ExpenseAccountingPeriod.optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace Expense { @@ -70,22 +56,22 @@ export declare namespace Expense { modified_at?: string | null; transaction_date?: string | null; remote_created_at?: string | null; - account?: serializers.accounting.ExpenseAccount.Raw | null; - contact?: serializers.accounting.ExpenseContact.Raw | null; + account?: ExpenseAccount.Raw | null; + contact?: ExpenseContact.Raw | null; total_amount?: number | null; sub_total?: number | null; total_tax_amount?: number | null; - currency?: serializers.accounting.ExpenseCurrency.Raw | null; + currency?: ExpenseCurrency.Raw | null; exchange_rate?: string | null; inclusive_of_tax?: boolean | null; - company?: serializers.accounting.ExpenseCompany.Raw | null; + company?: ExpenseCompany.Raw | null; memo?: string | null; - lines?: serializers.accounting.ExpenseLine.Raw[] | null; - tracking_categories?: (serializers.accounting.ExpenseTrackingCategoriesItem.Raw | null | undefined)[] | null; + lines?: ExpenseLine.Raw[] | null; + tracking_categories?: (ExpenseTrackingCategoriesItem.Raw | null | undefined)[] | null; remote_was_deleted?: boolean | null; - accounting_period?: serializers.accounting.ExpenseAccountingPeriod.Raw | null; + accounting_period?: ExpenseAccountingPeriod.Raw | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; - remote_fields?: serializers.accounting.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/ExpenseAccount.ts b/src/serialization/resources/accounting/types/ExpenseAccount.ts index fc0c13623..72d68cb87 100644 --- a/src/serialization/resources/accounting/types/ExpenseAccount.ts +++ b/src/serialization/resources/accounting/types/ExpenseAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const ExpenseAccount: core.serialization.Schema< serializers.accounting.ExpenseAccount.Raw, Merge.accounting.ExpenseAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ExpenseAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseAccountingPeriod.ts b/src/serialization/resources/accounting/types/ExpenseAccountingPeriod.ts index 532c3dd46..625cf8196 100644 --- a/src/serialization/resources/accounting/types/ExpenseAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/ExpenseAccountingPeriod.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingPeriod } from "./AccountingPeriod"; export const ExpenseAccountingPeriod: core.serialization.Schema< serializers.accounting.ExpenseAccountingPeriod.Raw, Merge.accounting.ExpenseAccountingPeriod -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingPeriod), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace ExpenseAccountingPeriod { - type Raw = string | serializers.accounting.AccountingPeriod.Raw; + type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseCompany.ts b/src/serialization/resources/accounting/types/ExpenseCompany.ts index 25794dd9d..c4cb46512 100644 --- a/src/serialization/resources/accounting/types/ExpenseCompany.ts +++ b/src/serialization/resources/accounting/types/ExpenseCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const ExpenseCompany: core.serialization.Schema< serializers.accounting.ExpenseCompany.Raw, Merge.accounting.ExpenseCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace ExpenseCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseContact.ts b/src/serialization/resources/accounting/types/ExpenseContact.ts index 116069709..7df88dc10 100644 --- a/src/serialization/resources/accounting/types/ExpenseContact.ts +++ b/src/serialization/resources/accounting/types/ExpenseContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const ExpenseContact: core.serialization.Schema< serializers.accounting.ExpenseContact.Raw, Merge.accounting.ExpenseContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace ExpenseContact { - type Raw = string | serializers.accounting.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseCurrency.ts b/src/serialization/resources/accounting/types/ExpenseCurrency.ts index db818055d..0c3936368 100644 --- a/src/serialization/resources/accounting/types/ExpenseCurrency.ts +++ b/src/serialization/resources/accounting/types/ExpenseCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const ExpenseCurrency: core.serialization.Schema< serializers.accounting.ExpenseCurrency.Raw, Merge.accounting.ExpenseCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace ExpenseCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/ExpenseLine.ts b/src/serialization/resources/accounting/types/ExpenseLine.ts index 6f9575cdf..2b41881ee 100644 --- a/src/serialization/resources/accounting/types/ExpenseLine.ts +++ b/src/serialization/resources/accounting/types/ExpenseLine.ts @@ -2,9 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ExpenseLineItem } from "./ExpenseLineItem"; +import { ExpenseLineTrackingCategory } from "./ExpenseLineTrackingCategory"; +import { ExpenseLineTrackingCategoriesItem } from "./ExpenseLineTrackingCategoriesItem"; +import { ExpenseLineCurrency } from "./ExpenseLineCurrency"; +import { ExpenseLineAccount } from "./ExpenseLineAccount"; +import { ExpenseLineContact } from "./ExpenseLineContact"; export const ExpenseLine: core.serialization.ObjectSchema< serializers.accounting.ExpenseLine.Raw, @@ -14,28 +20,17 @@ export const ExpenseLine: core.serialization.ObjectSchema< remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), - item: core.serialization.lazy(async () => (await import("../../..")).accounting.ExpenseLineItem).optional(), + item: ExpenseLineItem.optional(), netAmount: core.serialization.property("net_amount", core.serialization.number().optional()), - trackingCategory: core.serialization.property( - "tracking_category", - core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseLineTrackingCategory) - .optional() - ), + trackingCategory: core.serialization.property("tracking_category", ExpenseLineTrackingCategory.optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseLineTrackingCategoriesItem) - .optional() - ) - .optional() + core.serialization.list(ExpenseLineTrackingCategoriesItem.optional()).optional() ), company: core.serialization.string().optional(), - currency: core.serialization.lazy(async () => (await import("../../..")).accounting.ExpenseLineCurrency).optional(), - account: core.serialization.lazy(async () => (await import("../../..")).accounting.ExpenseLineAccount).optional(), - contact: core.serialization.lazy(async () => (await import("../../..")).accounting.ExpenseLineContact).optional(), + currency: ExpenseLineCurrency.optional(), + account: ExpenseLineAccount.optional(), + contact: ExpenseLineContact.optional(), description: core.serialization.string().optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), taxRate: core.serialization.property("tax_rate", core.serialization.string().optional()), @@ -48,16 +43,14 @@ export declare namespace ExpenseLine { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - item?: serializers.accounting.ExpenseLineItem.Raw | null; + item?: ExpenseLineItem.Raw | null; net_amount?: number | null; - tracking_category?: serializers.accounting.ExpenseLineTrackingCategory.Raw | null; - tracking_categories?: - | (serializers.accounting.ExpenseLineTrackingCategoriesItem.Raw | null | undefined)[] - | null; + tracking_category?: ExpenseLineTrackingCategory.Raw | null; + tracking_categories?: (ExpenseLineTrackingCategoriesItem.Raw | null | undefined)[] | null; company?: string | null; - currency?: serializers.accounting.ExpenseLineCurrency.Raw | null; - account?: serializers.accounting.ExpenseLineAccount.Raw | null; - contact?: serializers.accounting.ExpenseLineContact.Raw | null; + currency?: ExpenseLineCurrency.Raw | null; + account?: ExpenseLineAccount.Raw | null; + contact?: ExpenseLineContact.Raw | null; description?: string | null; exchange_rate?: string | null; tax_rate?: string | null; diff --git a/src/serialization/resources/accounting/types/ExpenseLineAccount.ts b/src/serialization/resources/accounting/types/ExpenseLineAccount.ts index d8a29f72c..f8fc643ff 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineAccount.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const ExpenseLineAccount: core.serialization.Schema< serializers.accounting.ExpenseLineAccount.Raw, Merge.accounting.ExpenseLineAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ExpenseLineAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineContact.ts b/src/serialization/resources/accounting/types/ExpenseLineContact.ts index 973b0ffb7..6cb45bd0a 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineContact.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const ExpenseLineContact: core.serialization.Schema< serializers.accounting.ExpenseLineContact.Raw, Merge.accounting.ExpenseLineContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace ExpenseLineContact { - type Raw = string | serializers.accounting.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineCurrency.ts b/src/serialization/resources/accounting/types/ExpenseLineCurrency.ts index 3d5bf4740..047871773 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineCurrency.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const ExpenseLineCurrency: core.serialization.Schema< serializers.accounting.ExpenseLineCurrency.Raw, Merge.accounting.ExpenseLineCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace ExpenseLineCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineItem.ts b/src/serialization/resources/accounting/types/ExpenseLineItem.ts index ebf3840a4..108d58d8d 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineItem.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Item } from "./Item"; export const ExpenseLineItem: core.serialization.Schema< serializers.accounting.ExpenseLineItem.Raw, Merge.accounting.ExpenseLineItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Item), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace ExpenseLineItem { - type Raw = string | serializers.accounting.Item.Raw; + type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequest.ts b/src/serialization/resources/accounting/types/ExpenseLineRequest.ts index b4ae81fcc..febe5367d 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequest.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequest.ts @@ -2,43 +2,33 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ExpenseLineRequestItem } from "./ExpenseLineRequestItem"; +import { ExpenseLineRequestTrackingCategory } from "./ExpenseLineRequestTrackingCategory"; +import { ExpenseLineRequestTrackingCategoriesItem } from "./ExpenseLineRequestTrackingCategoriesItem"; +import { ExpenseLineRequestCurrency } from "./ExpenseLineRequestCurrency"; +import { ExpenseLineRequestAccount } from "./ExpenseLineRequestAccount"; +import { ExpenseLineRequestContact } from "./ExpenseLineRequestContact"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const ExpenseLineRequest: core.serialization.ObjectSchema< serializers.accounting.ExpenseLineRequest.Raw, Merge.accounting.ExpenseLineRequest > = core.serialization.object({ remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), - item: core.serialization.lazy(async () => (await import("../../..")).accounting.ExpenseLineRequestItem).optional(), + item: ExpenseLineRequestItem.optional(), netAmount: core.serialization.property("net_amount", core.serialization.number().optional()), - trackingCategory: core.serialization.property( - "tracking_category", - core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseLineRequestTrackingCategory) - .optional() - ), + trackingCategory: core.serialization.property("tracking_category", ExpenseLineRequestTrackingCategory.optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseLineRequestTrackingCategoriesItem) - .optional() - ) - .optional() + core.serialization.list(ExpenseLineRequestTrackingCategoriesItem.optional()).optional() ), company: core.serialization.string().optional(), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseLineRequestCurrency) - .optional(), - account: core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseLineRequestAccount) - .optional(), - contact: core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseLineRequestContact) - .optional(), + currency: ExpenseLineRequestCurrency.optional(), + account: ExpenseLineRequestAccount.optional(), + contact: ExpenseLineRequestContact.optional(), description: core.serialization.string().optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), taxRate: core.serialization.property("tax_rate", core.serialization.string().optional()), @@ -50,32 +40,25 @@ export const ExpenseLineRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace ExpenseLineRequest { interface Raw { remote_id?: string | null; - item?: serializers.accounting.ExpenseLineRequestItem.Raw | null; + item?: ExpenseLineRequestItem.Raw | null; net_amount?: number | null; - tracking_category?: serializers.accounting.ExpenseLineRequestTrackingCategory.Raw | null; - tracking_categories?: - | (serializers.accounting.ExpenseLineRequestTrackingCategoriesItem.Raw | null | undefined)[] - | null; + tracking_category?: ExpenseLineRequestTrackingCategory.Raw | null; + tracking_categories?: (ExpenseLineRequestTrackingCategoriesItem.Raw | null | undefined)[] | null; company?: string | null; - currency?: serializers.accounting.ExpenseLineRequestCurrency.Raw | null; - account?: serializers.accounting.ExpenseLineRequestAccount.Raw | null; - contact?: serializers.accounting.ExpenseLineRequestContact.Raw | null; + currency?: ExpenseLineRequestCurrency.Raw | null; + account?: ExpenseLineRequestAccount.Raw | null; + contact?: ExpenseLineRequestContact.Raw | null; description?: string | null; exchange_rate?: string | null; tax_rate?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.accounting.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequestAccount.ts b/src/serialization/resources/accounting/types/ExpenseLineRequestAccount.ts index bc83445f0..0a641507b 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequestAccount.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequestAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const ExpenseLineRequestAccount: core.serialization.Schema< serializers.accounting.ExpenseLineRequestAccount.Raw, Merge.accounting.ExpenseLineRequestAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ExpenseLineRequestAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequestContact.ts b/src/serialization/resources/accounting/types/ExpenseLineRequestContact.ts index 13386c3d8..a941ba834 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequestContact.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequestContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const ExpenseLineRequestContact: core.serialization.Schema< serializers.accounting.ExpenseLineRequestContact.Raw, Merge.accounting.ExpenseLineRequestContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace ExpenseLineRequestContact { - type Raw = string | serializers.accounting.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequestCurrency.ts b/src/serialization/resources/accounting/types/ExpenseLineRequestCurrency.ts index de678def0..7c2d60a22 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequestCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const ExpenseLineRequestCurrency: core.serialization.Schema< serializers.accounting.ExpenseLineRequestCurrency.Raw, Merge.accounting.ExpenseLineRequestCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace ExpenseLineRequestCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequestItem.ts b/src/serialization/resources/accounting/types/ExpenseLineRequestItem.ts index dd33915a1..2a7e2301d 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequestItem.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequestItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Item } from "./Item"; export const ExpenseLineRequestItem: core.serialization.Schema< serializers.accounting.ExpenseLineRequestItem.Raw, Merge.accounting.ExpenseLineRequestItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Item), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace ExpenseLineRequestItem { - type Raw = string | serializers.accounting.Item.Raw; + type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategoriesItem.ts index 67d0834ba..40390d86e 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const ExpenseLineRequestTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.ExpenseLineRequestTrackingCategoriesItem.Raw, Merge.accounting.ExpenseLineRequestTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace ExpenseLineRequestTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategory.ts b/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategory.ts index 6c49fa3b7..3e16b2ae0 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategory.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategory.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const ExpenseLineRequestTrackingCategory: core.serialization.Schema< serializers.accounting.ExpenseLineRequestTrackingCategory.Raw, Merge.accounting.ExpenseLineRequestTrackingCategory -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace ExpenseLineRequestTrackingCategory { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/ExpenseLineTrackingCategoriesItem.ts index eb4eb82bf..9cdd03c2c 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const ExpenseLineTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.ExpenseLineTrackingCategoriesItem.Raw, Merge.accounting.ExpenseLineTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace ExpenseLineTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineTrackingCategory.ts b/src/serialization/resources/accounting/types/ExpenseLineTrackingCategory.ts index 044cc1fe2..172c78b06 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineTrackingCategory.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineTrackingCategory.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const ExpenseLineTrackingCategory: core.serialization.Schema< serializers.accounting.ExpenseLineTrackingCategory.Raw, Merge.accounting.ExpenseLineTrackingCategory -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace ExpenseLineTrackingCategory { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseRequest.ts b/src/serialization/resources/accounting/types/ExpenseRequest.ts index fe6b9bc88..c77c3992e 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequest.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequest.ts @@ -2,52 +2,39 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ExpenseRequestAccount } from "./ExpenseRequestAccount"; +import { ExpenseRequestContact } from "./ExpenseRequestContact"; +import { ExpenseRequestCurrency } from "./ExpenseRequestCurrency"; +import { ExpenseRequestCompany } from "./ExpenseRequestCompany"; +import { ExpenseLineRequest } from "./ExpenseLineRequest"; +import { ExpenseRequestTrackingCategoriesItem } from "./ExpenseRequestTrackingCategoriesItem"; +import { ExpenseRequestAccountingPeriod } from "./ExpenseRequestAccountingPeriod"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const ExpenseRequest: core.serialization.ObjectSchema< serializers.accounting.ExpenseRequest.Raw, Merge.accounting.ExpenseRequest > = core.serialization.object({ transactionDate: core.serialization.property("transaction_date", core.serialization.date().optional()), - account: core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseRequestAccount) - .optional(), - contact: core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseRequestContact) - .optional(), + account: ExpenseRequestAccount.optional(), + contact: ExpenseRequestContact.optional(), totalAmount: core.serialization.property("total_amount", core.serialization.number().optional()), subTotal: core.serialization.property("sub_total", core.serialization.number().optional()), totalTaxAmount: core.serialization.property("total_tax_amount", core.serialization.number().optional()), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseRequestCurrency) - .optional(), + currency: ExpenseRequestCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), inclusiveOfTax: core.serialization.property("inclusive_of_tax", core.serialization.boolean().optional()), - company: core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseRequestCompany) - .optional(), + company: ExpenseRequestCompany.optional(), memo: core.serialization.string().optional(), - lines: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExpenseLineRequest)) - .optional(), + lines: core.serialization.list(ExpenseLineRequest).optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseRequestTrackingCategoriesItem) - .optional() - ) - .optional() - ), - accountingPeriod: core.serialization.property( - "accounting_period", - core.serialization - .lazy(async () => (await import("../../..")).accounting.ExpenseRequestAccountingPeriod) - .optional() + core.serialization.list(ExpenseRequestTrackingCategoriesItem.optional()).optional() ), + accountingPeriod: core.serialization.property("accounting_period", ExpenseRequestAccountingPeriod.optional()), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -56,34 +43,27 @@ export const ExpenseRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace ExpenseRequest { interface Raw { transaction_date?: string | null; - account?: serializers.accounting.ExpenseRequestAccount.Raw | null; - contact?: serializers.accounting.ExpenseRequestContact.Raw | null; + account?: ExpenseRequestAccount.Raw | null; + contact?: ExpenseRequestContact.Raw | null; total_amount?: number | null; sub_total?: number | null; total_tax_amount?: number | null; - currency?: serializers.accounting.ExpenseRequestCurrency.Raw | null; + currency?: ExpenseRequestCurrency.Raw | null; exchange_rate?: string | null; inclusive_of_tax?: boolean | null; - company?: serializers.accounting.ExpenseRequestCompany.Raw | null; + company?: ExpenseRequestCompany.Raw | null; memo?: string | null; - lines?: serializers.accounting.ExpenseLineRequest.Raw[] | null; - tracking_categories?: - | (serializers.accounting.ExpenseRequestTrackingCategoriesItem.Raw | null | undefined)[] - | null; - accounting_period?: serializers.accounting.ExpenseRequestAccountingPeriod.Raw | null; + lines?: ExpenseLineRequest.Raw[] | null; + tracking_categories?: (ExpenseRequestTrackingCategoriesItem.Raw | null | undefined)[] | null; + accounting_period?: ExpenseRequestAccountingPeriod.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.accounting.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/ExpenseRequestAccount.ts b/src/serialization/resources/accounting/types/ExpenseRequestAccount.ts index 85fa9d718..bae08a4f0 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequestAccount.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequestAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const ExpenseRequestAccount: core.serialization.Schema< serializers.accounting.ExpenseRequestAccount.Raw, Merge.accounting.ExpenseRequestAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ExpenseRequestAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseRequestAccountingPeriod.ts b/src/serialization/resources/accounting/types/ExpenseRequestAccountingPeriod.ts index 08841d8a9..51cb5f8e4 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequestAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequestAccountingPeriod.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingPeriod } from "./AccountingPeriod"; export const ExpenseRequestAccountingPeriod: core.serialization.Schema< serializers.accounting.ExpenseRequestAccountingPeriod.Raw, Merge.accounting.ExpenseRequestAccountingPeriod -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingPeriod), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace ExpenseRequestAccountingPeriod { - type Raw = string | serializers.accounting.AccountingPeriod.Raw; + type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseRequestCompany.ts b/src/serialization/resources/accounting/types/ExpenseRequestCompany.ts index 5fd33faaf..3d4d648fa 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequestCompany.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequestCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const ExpenseRequestCompany: core.serialization.Schema< serializers.accounting.ExpenseRequestCompany.Raw, Merge.accounting.ExpenseRequestCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace ExpenseRequestCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseRequestContact.ts b/src/serialization/resources/accounting/types/ExpenseRequestContact.ts index 7e5283637..0d52b4a25 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequestContact.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequestContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const ExpenseRequestContact: core.serialization.Schema< serializers.accounting.ExpenseRequestContact.Raw, Merge.accounting.ExpenseRequestContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace ExpenseRequestContact { - type Raw = string | serializers.accounting.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseRequestCurrency.ts b/src/serialization/resources/accounting/types/ExpenseRequestCurrency.ts index 5445b4ad0..8a0e5a392 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequestCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const ExpenseRequestCurrency: core.serialization.Schema< serializers.accounting.ExpenseRequestCurrency.Raw, Merge.accounting.ExpenseRequestCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace ExpenseRequestCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/ExpenseRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/ExpenseRequestTrackingCategoriesItem.ts index ed3eb1907..790fbb368 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequestTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const ExpenseRequestTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.ExpenseRequestTrackingCategoriesItem.Raw, Merge.accounting.ExpenseRequestTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace ExpenseRequestTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseResponse.ts b/src/serialization/resources/accounting/types/ExpenseResponse.ts index dcb536677..7e63b0fc4 100644 --- a/src/serialization/resources/accounting/types/ExpenseResponse.ts +++ b/src/serialization/resources/accounting/types/ExpenseResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Expense } from "./Expense"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const ExpenseResponse: core.serialization.ObjectSchema< serializers.accounting.ExpenseResponse.Raw, Merge.accounting.ExpenseResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).accounting.Expense), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.DebugModeLog)) - .optional(), + model: Expense, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace ExpenseResponse { interface Raw { - model: serializers.accounting.Expense.Raw; - warnings: serializers.accounting.WarningValidationProblem.Raw[]; - errors: serializers.accounting.ErrorValidationProblem.Raw[]; - logs?: serializers.accounting.DebugModeLog.Raw[] | null; + model: Expense.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/ExpenseTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/ExpenseTrackingCategoriesItem.ts index fe191d45f..d5fdcb71e 100644 --- a/src/serialization/resources/accounting/types/ExpenseTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/ExpenseTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const ExpenseTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.ExpenseTrackingCategoriesItem.Raw, Merge.accounting.ExpenseTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace ExpenseTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/ExternalTargetFieldApi.ts b/src/serialization/resources/accounting/types/ExternalTargetFieldApi.ts index c14d40ede..15c5ac0b2 100644 --- a/src/serialization/resources/accounting/types/ExternalTargetFieldApi.ts +++ b/src/serialization/resources/accounting/types/ExternalTargetFieldApi.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ExternalTargetFieldApi: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/ExternalTargetFieldApiResponse.ts b/src/serialization/resources/accounting/types/ExternalTargetFieldApiResponse.ts index 6ee733f3b..4389b3f2e 100644 --- a/src/serialization/resources/accounting/types/ExternalTargetFieldApiResponse.ts +++ b/src/serialization/resources/accounting/types/ExternalTargetFieldApiResponse.ts @@ -2,206 +2,93 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ExternalTargetFieldApi } from "./ExternalTargetFieldApi"; export const ExternalTargetFieldApiResponse: core.serialization.ObjectSchema< serializers.accounting.ExternalTargetFieldApiResponse.Raw, Merge.accounting.ExternalTargetFieldApiResponse > = core.serialization.object({ - account: core.serialization.property( - "Account", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() - ), + account: core.serialization.property("Account", core.serialization.list(ExternalTargetFieldApi).optional()), accountingAttachment: core.serialization.property( "AccountingAttachment", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), balanceSheet: core.serialization.property( "BalanceSheet", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), cashFlowStatement: core.serialization.property( "CashFlowStatement", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() - ), - companyInfo: core.serialization.property( - "CompanyInfo", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() - ), - contact: core.serialization.property( - "Contact", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), + companyInfo: core.serialization.property("CompanyInfo", core.serialization.list(ExternalTargetFieldApi).optional()), + contact: core.serialization.property("Contact", core.serialization.list(ExternalTargetFieldApi).optional()), incomeStatement: core.serialization.property( "IncomeStatement", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() - ), - creditNote: core.serialization.property( - "CreditNote", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() - ), - item: core.serialization.property( - "Item", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), + creditNote: core.serialization.property("CreditNote", core.serialization.list(ExternalTargetFieldApi).optional()), + item: core.serialization.property("Item", core.serialization.list(ExternalTargetFieldApi).optional()), purchaseOrder: core.serialization.property( "PurchaseOrder", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), trackingCategory: core.serialization.property( "TrackingCategory", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), journalEntry: core.serialization.property( "JournalEntry", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() - ), - taxRate: core.serialization.property( - "TaxRate", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() - ), - invoice: core.serialization.property( - "Invoice", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() - ), - payment: core.serialization.property( - "Payment", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() - ), - expense: core.serialization.property( - "Expense", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), + taxRate: core.serialization.property("TaxRate", core.serialization.list(ExternalTargetFieldApi).optional()), + invoice: core.serialization.property("Invoice", core.serialization.list(ExternalTargetFieldApi).optional()), + payment: core.serialization.property("Payment", core.serialization.list(ExternalTargetFieldApi).optional()), + expense: core.serialization.property("Expense", core.serialization.list(ExternalTargetFieldApi).optional()), vendorCredit: core.serialization.property( "VendorCredit", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() - ), - transaction: core.serialization.property( - "Transaction", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), + transaction: core.serialization.property("Transaction", core.serialization.list(ExternalTargetFieldApi).optional()), accountingPeriod: core.serialization.property( "AccountingPeriod", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), generalLedgerTransaction: core.serialization.property( "GeneralLedgerTransaction", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), bankFeedAccount: core.serialization.property( "BankFeedAccount", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ExternalTargetFieldApi) - ) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), }); export declare namespace ExternalTargetFieldApiResponse { interface Raw { - Account?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - AccountingAttachment?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - BalanceSheet?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - CashFlowStatement?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - CompanyInfo?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - Contact?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - IncomeStatement?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - CreditNote?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - Item?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - PurchaseOrder?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - TrackingCategory?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - JournalEntry?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - TaxRate?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - Invoice?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - Payment?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - Expense?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - VendorCredit?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - Transaction?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - AccountingPeriod?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - GeneralLedgerTransaction?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; - BankFeedAccount?: serializers.accounting.ExternalTargetFieldApi.Raw[] | null; + Account?: ExternalTargetFieldApi.Raw[] | null; + AccountingAttachment?: ExternalTargetFieldApi.Raw[] | null; + BalanceSheet?: ExternalTargetFieldApi.Raw[] | null; + CashFlowStatement?: ExternalTargetFieldApi.Raw[] | null; + CompanyInfo?: ExternalTargetFieldApi.Raw[] | null; + Contact?: ExternalTargetFieldApi.Raw[] | null; + IncomeStatement?: ExternalTargetFieldApi.Raw[] | null; + CreditNote?: ExternalTargetFieldApi.Raw[] | null; + Item?: ExternalTargetFieldApi.Raw[] | null; + PurchaseOrder?: ExternalTargetFieldApi.Raw[] | null; + TrackingCategory?: ExternalTargetFieldApi.Raw[] | null; + JournalEntry?: ExternalTargetFieldApi.Raw[] | null; + TaxRate?: ExternalTargetFieldApi.Raw[] | null; + Invoice?: ExternalTargetFieldApi.Raw[] | null; + Payment?: ExternalTargetFieldApi.Raw[] | null; + Expense?: ExternalTargetFieldApi.Raw[] | null; + VendorCredit?: ExternalTargetFieldApi.Raw[] | null; + Transaction?: ExternalTargetFieldApi.Raw[] | null; + AccountingPeriod?: ExternalTargetFieldApi.Raw[] | null; + GeneralLedgerTransaction?: ExternalTargetFieldApi.Raw[] | null; + BankFeedAccount?: ExternalTargetFieldApi.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/FieldFormatEnum.ts b/src/serialization/resources/accounting/types/FieldFormatEnum.ts index f24cc6f91..2b86e0f7a 100644 --- a/src/serialization/resources/accounting/types/FieldFormatEnum.ts +++ b/src/serialization/resources/accounting/types/FieldFormatEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldFormatEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/FieldMappingApiInstance.ts b/src/serialization/resources/accounting/types/FieldMappingApiInstance.ts index af4e02dea..80cd53166 100644 --- a/src/serialization/resources/accounting/types/FieldMappingApiInstance.ts +++ b/src/serialization/resources/accounting/types/FieldMappingApiInstance.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstanceTargetField } from "./FieldMappingApiInstanceTargetField"; +import { FieldMappingApiInstanceRemoteField } from "./FieldMappingApiInstanceRemoteField"; export const FieldMappingApiInstance: core.serialization.ObjectSchema< serializers.accounting.FieldMappingApiInstance.Raw, @@ -12,25 +14,15 @@ export const FieldMappingApiInstance: core.serialization.ObjectSchema< > = core.serialization.object({ id: core.serialization.string().optional(), isIntegrationWide: core.serialization.property("is_integration_wide", core.serialization.boolean().optional()), - targetField: core.serialization.property( - "target_field", - core.serialization - .lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstanceTargetField) - .optional() - ), - remoteField: core.serialization.property( - "remote_field", - core.serialization - .lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstanceRemoteField) - .optional() - ), + targetField: core.serialization.property("target_field", FieldMappingApiInstanceTargetField.optional()), + remoteField: core.serialization.property("remote_field", FieldMappingApiInstanceRemoteField.optional()), }); export declare namespace FieldMappingApiInstance { interface Raw { id?: string | null; is_integration_wide?: boolean | null; - target_field?: serializers.accounting.FieldMappingApiInstanceTargetField.Raw | null; - remote_field?: serializers.accounting.FieldMappingApiInstanceRemoteField.Raw | null; + target_field?: FieldMappingApiInstanceTargetField.Raw | null; + remote_field?: FieldMappingApiInstanceRemoteField.Raw | null; } } diff --git a/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteField.ts b/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteField.ts index a0ceaf20e..716d512e9 100644 --- a/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteField.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo } from "./FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo"; export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema< serializers.accounting.FieldMappingApiInstanceRemoteField.Raw, @@ -14,9 +15,7 @@ export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()), remoteEndpointInfo: core.serialization.property( "remote_endpoint_info", - core.serialization.lazyObject( - async () => (await import("../../..")).accounting.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - ) + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo ), }); @@ -24,6 +23,6 @@ export declare namespace FieldMappingApiInstanceRemoteField { interface Raw { remote_key_name: string; schema: Record; - remote_endpoint_info: serializers.accounting.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; } } diff --git a/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts b/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts index 92d4c9ac8..64237cbea 100644 --- a/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts +++ b/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/FieldMappingApiInstanceResponse.ts b/src/serialization/resources/accounting/types/FieldMappingApiInstanceResponse.ts index dd4933aa8..076e5289b 100644 --- a/src/serialization/resources/accounting/types/FieldMappingApiInstanceResponse.ts +++ b/src/serialization/resources/accounting/types/FieldMappingApiInstanceResponse.ts @@ -2,206 +2,99 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstance } from "./FieldMappingApiInstance"; export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< serializers.accounting.FieldMappingApiInstanceResponse.Raw, Merge.accounting.FieldMappingApiInstanceResponse > = core.serialization.object({ - account: core.serialization.property( - "Account", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() - ), + account: core.serialization.property("Account", core.serialization.list(FieldMappingApiInstance).optional()), accountingAttachment: core.serialization.property( "AccountingAttachment", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), balanceSheet: core.serialization.property( "BalanceSheet", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), cashFlowStatement: core.serialization.property( "CashFlowStatement", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), companyInfo: core.serialization.property( "CompanyInfo", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() - ), - contact: core.serialization.property( - "Contact", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), + contact: core.serialization.property("Contact", core.serialization.list(FieldMappingApiInstance).optional()), incomeStatement: core.serialization.property( "IncomeStatement", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() - ), - creditNote: core.serialization.property( - "CreditNote", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() - ), - item: core.serialization.property( - "Item", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), + creditNote: core.serialization.property("CreditNote", core.serialization.list(FieldMappingApiInstance).optional()), + item: core.serialization.property("Item", core.serialization.list(FieldMappingApiInstance).optional()), purchaseOrder: core.serialization.property( "PurchaseOrder", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), trackingCategory: core.serialization.property( "TrackingCategory", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), journalEntry: core.serialization.property( "JournalEntry", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() - ), - taxRate: core.serialization.property( - "TaxRate", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() - ), - invoice: core.serialization.property( - "Invoice", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() - ), - payment: core.serialization.property( - "Payment", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() - ), - expense: core.serialization.property( - "Expense", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), + taxRate: core.serialization.property("TaxRate", core.serialization.list(FieldMappingApiInstance).optional()), + invoice: core.serialization.property("Invoice", core.serialization.list(FieldMappingApiInstance).optional()), + payment: core.serialization.property("Payment", core.serialization.list(FieldMappingApiInstance).optional()), + expense: core.serialization.property("Expense", core.serialization.list(FieldMappingApiInstance).optional()), vendorCredit: core.serialization.property( "VendorCredit", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), transaction: core.serialization.property( "Transaction", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), accountingPeriod: core.serialization.property( "AccountingPeriod", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), generalLedgerTransaction: core.serialization.property( "GeneralLedgerTransaction", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), bankFeedAccount: core.serialization.property( "BankFeedAccount", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance) - ) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), }); export declare namespace FieldMappingApiInstanceResponse { interface Raw { - Account?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - AccountingAttachment?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - BalanceSheet?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - CashFlowStatement?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - CompanyInfo?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - Contact?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - IncomeStatement?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - CreditNote?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - Item?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - PurchaseOrder?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - TrackingCategory?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - JournalEntry?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - TaxRate?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - Invoice?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - Payment?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - Expense?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - VendorCredit?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - Transaction?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - AccountingPeriod?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - GeneralLedgerTransaction?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; - BankFeedAccount?: serializers.accounting.FieldMappingApiInstance.Raw[] | null; + Account?: FieldMappingApiInstance.Raw[] | null; + AccountingAttachment?: FieldMappingApiInstance.Raw[] | null; + BalanceSheet?: FieldMappingApiInstance.Raw[] | null; + CashFlowStatement?: FieldMappingApiInstance.Raw[] | null; + CompanyInfo?: FieldMappingApiInstance.Raw[] | null; + Contact?: FieldMappingApiInstance.Raw[] | null; + IncomeStatement?: FieldMappingApiInstance.Raw[] | null; + CreditNote?: FieldMappingApiInstance.Raw[] | null; + Item?: FieldMappingApiInstance.Raw[] | null; + PurchaseOrder?: FieldMappingApiInstance.Raw[] | null; + TrackingCategory?: FieldMappingApiInstance.Raw[] | null; + JournalEntry?: FieldMappingApiInstance.Raw[] | null; + TaxRate?: FieldMappingApiInstance.Raw[] | null; + Invoice?: FieldMappingApiInstance.Raw[] | null; + Payment?: FieldMappingApiInstance.Raw[] | null; + Expense?: FieldMappingApiInstance.Raw[] | null; + VendorCredit?: FieldMappingApiInstance.Raw[] | null; + Transaction?: FieldMappingApiInstance.Raw[] | null; + AccountingPeriod?: FieldMappingApiInstance.Raw[] | null; + GeneralLedgerTransaction?: FieldMappingApiInstance.Raw[] | null; + BankFeedAccount?: FieldMappingApiInstance.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/FieldMappingApiInstanceTargetField.ts b/src/serialization/resources/accounting/types/FieldMappingApiInstanceTargetField.ts index 4359aa4f0..88161ec8f 100644 --- a/src/serialization/resources/accounting/types/FieldMappingApiInstanceTargetField.ts +++ b/src/serialization/resources/accounting/types/FieldMappingApiInstanceTargetField.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldMappingApiInstanceTargetField: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/FieldMappingInstanceResponse.ts b/src/serialization/resources/accounting/types/FieldMappingInstanceResponse.ts index 40174ea2c..b023c3589 100644 --- a/src/serialization/resources/accounting/types/FieldMappingInstanceResponse.ts +++ b/src/serialization/resources/accounting/types/FieldMappingInstanceResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstance } from "./FieldMappingApiInstance"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const FieldMappingInstanceResponse: core.serialization.ObjectSchema< serializers.accounting.FieldMappingInstanceResponse.Raw, Merge.accounting.FieldMappingInstanceResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).accounting.FieldMappingApiInstance), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.DebugModeLog)) - .optional(), + model: FieldMappingApiInstance, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace FieldMappingInstanceResponse { interface Raw { - model: serializers.accounting.FieldMappingApiInstance.Raw; - warnings: serializers.accounting.WarningValidationProblem.Raw[]; - errors: serializers.accounting.ErrorValidationProblem.Raw[]; - logs?: serializers.accounting.DebugModeLog.Raw[] | null; + model: FieldMappingApiInstance.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/FieldPermissionDeserializer.ts b/src/serialization/resources/accounting/types/FieldPermissionDeserializer.ts index 8dc4f8e95..bc9f8fbfd 100644 --- a/src/serialization/resources/accounting/types/FieldPermissionDeserializer.ts +++ b/src/serialization/resources/accounting/types/FieldPermissionDeserializer.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldPermissionDeserializer: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/FieldPermissionDeserializerRequest.ts b/src/serialization/resources/accounting/types/FieldPermissionDeserializerRequest.ts index bef1661f6..cf2a05070 100644 --- a/src/serialization/resources/accounting/types/FieldPermissionDeserializerRequest.ts +++ b/src/serialization/resources/accounting/types/FieldPermissionDeserializerRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldPermissionDeserializerRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/FieldTypeEnum.ts b/src/serialization/resources/accounting/types/FieldTypeEnum.ts index fe3cd3f30..5c38b2593 100644 --- a/src/serialization/resources/accounting/types/FieldTypeEnum.ts +++ b/src/serialization/resources/accounting/types/FieldTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/IncomeStatement.ts b/src/serialization/resources/accounting/types/IncomeStatement.ts index edc7de288..6bd826490 100644 --- a/src/serialization/resources/accounting/types/IncomeStatement.ts +++ b/src/serialization/resources/accounting/types/IncomeStatement.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IncomeStatementCurrency } from "./IncomeStatementCurrency"; +import { IncomeStatementCompany } from "./IncomeStatementCompany"; +import { ReportItem } from "./ReportItem"; +import { RemoteData } from "./RemoteData"; export const IncomeStatement: core.serialization.ObjectSchema< serializers.accounting.IncomeStatement.Raw, @@ -15,36 +19,21 @@ export const IncomeStatement: core.serialization.ObjectSchema< createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), name: core.serialization.string().optional(), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.IncomeStatementCurrency) - .optional(), - company: core.serialization - .lazy(async () => (await import("../../..")).accounting.IncomeStatementCompany) - .optional(), + currency: IncomeStatementCurrency.optional(), + company: IncomeStatementCompany.optional(), startPeriod: core.serialization.property("start_period", core.serialization.date().optional()), endPeriod: core.serialization.property("end_period", core.serialization.date().optional()), - income: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.ReportItem)) - .optional(), - costOfSales: core.serialization.property( - "cost_of_sales", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.ReportItem)) - .optional() - ), + income: core.serialization.list(ReportItem).optional(), + costOfSales: core.serialization.property("cost_of_sales", core.serialization.list(ReportItem).optional()), grossProfit: core.serialization.property("gross_profit", core.serialization.number().optional()), operatingExpenses: core.serialization.property( "operating_expenses", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.ReportItem)) - .optional() + core.serialization.list(ReportItem).optional() ), netOperatingIncome: core.serialization.property("net_operating_income", core.serialization.number().optional()), nonOperatingExpenses: core.serialization.property( "non_operating_expenses", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.ReportItem)) - .optional() + core.serialization.list(ReportItem).optional() ), netIncome: core.serialization.property("net_income", core.serialization.number().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), @@ -52,12 +41,7 @@ export const IncomeStatement: core.serialization.ObjectSchema< "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace IncomeStatement { @@ -67,19 +51,19 @@ export declare namespace IncomeStatement { created_at?: string | null; modified_at?: string | null; name?: string | null; - currency?: serializers.accounting.IncomeStatementCurrency.Raw | null; - company?: serializers.accounting.IncomeStatementCompany.Raw | null; + currency?: IncomeStatementCurrency.Raw | null; + company?: IncomeStatementCompany.Raw | null; start_period?: string | null; end_period?: string | null; - income?: serializers.accounting.ReportItem.Raw[] | null; - cost_of_sales?: serializers.accounting.ReportItem.Raw[] | null; + income?: ReportItem.Raw[] | null; + cost_of_sales?: ReportItem.Raw[] | null; gross_profit?: number | null; - operating_expenses?: serializers.accounting.ReportItem.Raw[] | null; + operating_expenses?: ReportItem.Raw[] | null; net_operating_income?: number | null; - non_operating_expenses?: serializers.accounting.ReportItem.Raw[] | null; + non_operating_expenses?: ReportItem.Raw[] | null; net_income?: number | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/IncomeStatementCompany.ts b/src/serialization/resources/accounting/types/IncomeStatementCompany.ts index ca0d7a6e2..094e2e18a 100644 --- a/src/serialization/resources/accounting/types/IncomeStatementCompany.ts +++ b/src/serialization/resources/accounting/types/IncomeStatementCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const IncomeStatementCompany: core.serialization.Schema< serializers.accounting.IncomeStatementCompany.Raw, Merge.accounting.IncomeStatementCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace IncomeStatementCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/IncomeStatementCurrency.ts b/src/serialization/resources/accounting/types/IncomeStatementCurrency.ts index e43e40dcb..8c439f5db 100644 --- a/src/serialization/resources/accounting/types/IncomeStatementCurrency.ts +++ b/src/serialization/resources/accounting/types/IncomeStatementCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const IncomeStatementCurrency: core.serialization.Schema< serializers.accounting.IncomeStatementCurrency.Raw, Merge.accounting.IncomeStatementCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace IncomeStatementCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/IndividualCommonModelScopeDeserializer.ts b/src/serialization/resources/accounting/types/IndividualCommonModelScopeDeserializer.ts index a8b6dc6a9..3345637b4 100644 --- a/src/serialization/resources/accounting/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/serialization/resources/accounting/types/IndividualCommonModelScopeDeserializer.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ModelPermissionDeserializer } from "./ModelPermissionDeserializer"; +import { FieldPermissionDeserializer } from "./FieldPermissionDeserializer"; export const IndividualCommonModelScopeDeserializer: core.serialization.ObjectSchema< serializers.accounting.IndividualCommonModelScopeDeserializer.Raw, @@ -13,27 +15,15 @@ export const IndividualCommonModelScopeDeserializer: core.serialization.ObjectSc modelName: core.serialization.property("model_name", core.serialization.string()), modelPermissions: core.serialization.property( "model_permissions", - core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject( - async () => (await import("../../..")).accounting.ModelPermissionDeserializer - ) - ) - .optional() - ), - fieldPermissions: core.serialization.property( - "field_permissions", - core.serialization - .lazyObject(async () => (await import("../../..")).accounting.FieldPermissionDeserializer) - .optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializer).optional() ), + fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializer.optional()), }); export declare namespace IndividualCommonModelScopeDeserializer { interface Raw { model_name: string; - model_permissions?: Record | null; - field_permissions?: serializers.accounting.FieldPermissionDeserializer.Raw | null; + model_permissions?: Record | null; + field_permissions?: FieldPermissionDeserializer.Raw | null; } } diff --git a/src/serialization/resources/accounting/types/IndividualCommonModelScopeDeserializerRequest.ts b/src/serialization/resources/accounting/types/IndividualCommonModelScopeDeserializerRequest.ts index f7343f9b7..edbb43bbd 100644 --- a/src/serialization/resources/accounting/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/accounting/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ModelPermissionDeserializerRequest } from "./ModelPermissionDeserializerRequest"; +import { FieldPermissionDeserializerRequest } from "./FieldPermissionDeserializerRequest"; export const IndividualCommonModelScopeDeserializerRequest: core.serialization.ObjectSchema< serializers.accounting.IndividualCommonModelScopeDeserializerRequest.Raw, @@ -13,27 +15,15 @@ export const IndividualCommonModelScopeDeserializerRequest: core.serialization.O modelName: core.serialization.property("model_name", core.serialization.string()), modelPermissions: core.serialization.property( "model_permissions", - core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject( - async () => (await import("../../..")).accounting.ModelPermissionDeserializerRequest - ) - ) - .optional() - ), - fieldPermissions: core.serialization.property( - "field_permissions", - core.serialization - .lazyObject(async () => (await import("../../..")).accounting.FieldPermissionDeserializerRequest) - .optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializerRequest).optional() ), + fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializerRequest.optional()), }); export declare namespace IndividualCommonModelScopeDeserializerRequest { interface Raw { model_name: string; - model_permissions?: Record | null; - field_permissions?: serializers.accounting.FieldPermissionDeserializerRequest.Raw | null; + model_permissions?: Record | null; + field_permissions?: FieldPermissionDeserializerRequest.Raw | null; } } diff --git a/src/serialization/resources/accounting/types/Invoice.ts b/src/serialization/resources/accounting/types/Invoice.ts index b18b559f7..d2b8eb722 100644 --- a/src/serialization/resources/accounting/types/Invoice.ts +++ b/src/serialization/resources/accounting/types/Invoice.ts @@ -2,9 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { InvoiceType } from "./InvoiceType"; +import { InvoiceContact } from "./InvoiceContact"; +import { InvoiceCompany } from "./InvoiceCompany"; +import { InvoiceCurrency } from "./InvoiceCurrency"; +import { InvoiceStatus } from "./InvoiceStatus"; +import { InvoiceTrackingCategoriesItem } from "./InvoiceTrackingCategoriesItem"; +import { InvoiceAccountingPeriod } from "./InvoiceAccountingPeriod"; +import { InvoicePurchaseOrdersItem } from "./InvoicePurchaseOrdersItem"; +import { InvoicePaymentsItem } from "./InvoicePaymentsItem"; +import { InvoiceAppliedPaymentsItem } from "./InvoiceAppliedPaymentsItem"; +import { InvoiceLineItem } from "./InvoiceLineItem"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const Invoice: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,90 +25,46 @@ export const Invoice: core.serialization.ObjectSchema (await import("../../..")).accounting.InvoiceType).optional(), - contact: core.serialization.lazy(async () => (await import("../../..")).accounting.InvoiceContact).optional(), + type: InvoiceType.optional(), + contact: InvoiceContact.optional(), number: core.serialization.string().optional(), issueDate: core.serialization.property("issue_date", core.serialization.date().optional()), dueDate: core.serialization.property("due_date", core.serialization.date().optional()), paidOnDate: core.serialization.property("paid_on_date", core.serialization.date().optional()), memo: core.serialization.string().optional(), - company: core.serialization.lazy(async () => (await import("../../..")).accounting.InvoiceCompany).optional(), - currency: core.serialization.lazy(async () => (await import("../../..")).accounting.InvoiceCurrency).optional(), + company: InvoiceCompany.optional(), + currency: InvoiceCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), totalDiscount: core.serialization.property("total_discount", core.serialization.number().optional()), subTotal: core.serialization.property("sub_total", core.serialization.number().optional()), - status: core.serialization.lazy(async () => (await import("../../..")).accounting.InvoiceStatus).optional(), + status: InvoiceStatus.optional(), totalTaxAmount: core.serialization.property("total_tax_amount", core.serialization.number().optional()), totalAmount: core.serialization.property("total_amount", core.serialization.number().optional()), balance: core.serialization.number().optional(), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceTrackingCategoriesItem) - .optional() - ) - .optional() - ), - accountingPeriod: core.serialization.property( - "accounting_period", - core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceAccountingPeriod) - .optional() + core.serialization.list(InvoiceTrackingCategoriesItem.optional()).optional() ), + accountingPeriod: core.serialization.property("accounting_period", InvoiceAccountingPeriod.optional()), purchaseOrders: core.serialization.property( "purchase_orders", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoicePurchaseOrdersItem) - .optional() - ) - .optional() + core.serialization.list(InvoicePurchaseOrdersItem.optional()).optional() ), - payments: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoicePaymentsItem) - .optional() - ) - .optional(), + payments: core.serialization.list(InvoicePaymentsItem.optional()).optional(), appliedPayments: core.serialization.property( "applied_payments", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceAppliedPaymentsItem) - .optional() - ) - .optional() - ), - lineItems: core.serialization.property( - "line_items", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.InvoiceLineItem)) - .optional() + core.serialization.list(InvoiceAppliedPaymentsItem.optional()).optional() ), + lineItems: core.serialization.property("line_items", core.serialization.list(InvoiceLineItem).optional()), inclusiveOfTax: core.serialization.property("inclusive_of_tax", core.serialization.boolean().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace Invoice { @@ -104,33 +73,33 @@ export declare namespace Invoice { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - type?: serializers.accounting.InvoiceType.Raw | null; - contact?: serializers.accounting.InvoiceContact.Raw | null; + type?: InvoiceType.Raw | null; + contact?: InvoiceContact.Raw | null; number?: string | null; issue_date?: string | null; due_date?: string | null; paid_on_date?: string | null; memo?: string | null; - company?: serializers.accounting.InvoiceCompany.Raw | null; - currency?: serializers.accounting.InvoiceCurrency.Raw | null; + company?: InvoiceCompany.Raw | null; + currency?: InvoiceCurrency.Raw | null; exchange_rate?: string | null; total_discount?: number | null; sub_total?: number | null; - status?: serializers.accounting.InvoiceStatus.Raw | null; + status?: InvoiceStatus.Raw | null; total_tax_amount?: number | null; total_amount?: number | null; balance?: number | null; remote_updated_at?: string | null; - tracking_categories?: (serializers.accounting.InvoiceTrackingCategoriesItem.Raw | null | undefined)[] | null; - accounting_period?: serializers.accounting.InvoiceAccountingPeriod.Raw | null; - purchase_orders?: (serializers.accounting.InvoicePurchaseOrdersItem.Raw | null | undefined)[] | null; - payments?: (serializers.accounting.InvoicePaymentsItem.Raw | null | undefined)[] | null; - applied_payments?: (serializers.accounting.InvoiceAppliedPaymentsItem.Raw | null | undefined)[] | null; - line_items?: serializers.accounting.InvoiceLineItem.Raw[] | null; + tracking_categories?: (InvoiceTrackingCategoriesItem.Raw | null | undefined)[] | null; + accounting_period?: InvoiceAccountingPeriod.Raw | null; + purchase_orders?: (InvoicePurchaseOrdersItem.Raw | null | undefined)[] | null; + payments?: (InvoicePaymentsItem.Raw | null | undefined)[] | null; + applied_payments?: (InvoiceAppliedPaymentsItem.Raw | null | undefined)[] | null; + line_items?: InvoiceLineItem.Raw[] | null; inclusive_of_tax?: boolean | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; - remote_fields?: serializers.accounting.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/InvoiceAccountingPeriod.ts b/src/serialization/resources/accounting/types/InvoiceAccountingPeriod.ts index d71c0a812..f40524fa6 100644 --- a/src/serialization/resources/accounting/types/InvoiceAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/InvoiceAccountingPeriod.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingPeriod } from "./AccountingPeriod"; export const InvoiceAccountingPeriod: core.serialization.Schema< serializers.accounting.InvoiceAccountingPeriod.Raw, Merge.accounting.InvoiceAccountingPeriod -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingPeriod), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace InvoiceAccountingPeriod { - type Raw = string | serializers.accounting.AccountingPeriod.Raw; + type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceAppliedPaymentsItem.ts b/src/serialization/resources/accounting/types/InvoiceAppliedPaymentsItem.ts index 8370b39b8..3889d83ab 100644 --- a/src/serialization/resources/accounting/types/InvoiceAppliedPaymentsItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceAppliedPaymentsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PaymentLineItem } from "./PaymentLineItem"; export const InvoiceAppliedPaymentsItem: core.serialization.Schema< serializers.accounting.InvoiceAppliedPaymentsItem.Raw, Merge.accounting.InvoiceAppliedPaymentsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.PaymentLineItem), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentLineItem]); export declare namespace InvoiceAppliedPaymentsItem { - type Raw = string | serializers.accounting.PaymentLineItem.Raw; + type Raw = string | PaymentLineItem.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceCompany.ts b/src/serialization/resources/accounting/types/InvoiceCompany.ts index 1411c32e8..c45436a13 100644 --- a/src/serialization/resources/accounting/types/InvoiceCompany.ts +++ b/src/serialization/resources/accounting/types/InvoiceCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const InvoiceCompany: core.serialization.Schema< serializers.accounting.InvoiceCompany.Raw, Merge.accounting.InvoiceCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace InvoiceCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceContact.ts b/src/serialization/resources/accounting/types/InvoiceContact.ts index adc3c6edd..5579db7bc 100644 --- a/src/serialization/resources/accounting/types/InvoiceContact.ts +++ b/src/serialization/resources/accounting/types/InvoiceContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const InvoiceContact: core.serialization.Schema< serializers.accounting.InvoiceContact.Raw, Merge.accounting.InvoiceContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace InvoiceContact { - type Raw = string | serializers.accounting.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceCurrency.ts b/src/serialization/resources/accounting/types/InvoiceCurrency.ts index 662d93e8e..7162341cc 100644 --- a/src/serialization/resources/accounting/types/InvoiceCurrency.ts +++ b/src/serialization/resources/accounting/types/InvoiceCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const InvoiceCurrency: core.serialization.Schema< serializers.accounting.InvoiceCurrency.Raw, Merge.accounting.InvoiceCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace InvoiceCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItem.ts b/src/serialization/resources/accounting/types/InvoiceLineItem.ts index c6b0bcc0a..5cd4ef45e 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItem.ts @@ -2,9 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { InvoiceLineItemCurrency } from "./InvoiceLineItemCurrency"; +import { InvoiceLineItemItem } from "./InvoiceLineItemItem"; +import { InvoiceLineItemAccount } from "./InvoiceLineItemAccount"; +import { InvoiceLineItemTrackingCategory } from "./InvoiceLineItemTrackingCategory"; +import { InvoiceLineItemTrackingCategoriesItem } from "./InvoiceLineItemTrackingCategoriesItem"; +import { RemoteField } from "./RemoteField"; export const InvoiceLineItem: core.serialization.ObjectSchema< serializers.accounting.InvoiceLineItem.Raw, @@ -18,30 +24,15 @@ export const InvoiceLineItem: core.serialization.ObjectSchema< unitPrice: core.serialization.property("unit_price", core.serialization.number().optional()), quantity: core.serialization.number().optional(), totalAmount: core.serialization.property("total_amount", core.serialization.number().optional()), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceLineItemCurrency) - .optional(), + currency: InvoiceLineItemCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), - item: core.serialization.lazy(async () => (await import("../../..")).accounting.InvoiceLineItemItem).optional(), - account: core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceLineItemAccount) - .optional(), + item: InvoiceLineItemItem.optional(), + account: InvoiceLineItemAccount.optional(), taxRate: core.serialization.property("tax_rate", core.serialization.string().optional()), - trackingCategory: core.serialization.property( - "tracking_category", - core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceLineItemTrackingCategory) - .optional() - ), + trackingCategory: core.serialization.property("tracking_category", InvoiceLineItemTrackingCategory.optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceLineItemTrackingCategoriesItem) - .optional() - ) - .optional() + core.serialization.list(InvoiceLineItemTrackingCategoriesItem.optional()).optional() ), company: core.serialization.string().optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), @@ -49,12 +40,7 @@ export const InvoiceLineItem: core.serialization.ObjectSchema< "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteField)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace InvoiceLineItem { @@ -67,18 +53,16 @@ export declare namespace InvoiceLineItem { unit_price?: number | null; quantity?: number | null; total_amount?: number | null; - currency?: serializers.accounting.InvoiceLineItemCurrency.Raw | null; + currency?: InvoiceLineItemCurrency.Raw | null; exchange_rate?: string | null; - item?: serializers.accounting.InvoiceLineItemItem.Raw | null; - account?: serializers.accounting.InvoiceLineItemAccount.Raw | null; + item?: InvoiceLineItemItem.Raw | null; + account?: InvoiceLineItemAccount.Raw | null; tax_rate?: string | null; - tracking_category?: serializers.accounting.InvoiceLineItemTrackingCategory.Raw | null; - tracking_categories?: - | (serializers.accounting.InvoiceLineItemTrackingCategoriesItem.Raw | null | undefined)[] - | null; + tracking_category?: InvoiceLineItemTrackingCategory.Raw | null; + tracking_categories?: (InvoiceLineItemTrackingCategoriesItem.Raw | null | undefined)[] | null; company?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_fields?: serializers.accounting.RemoteField.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemAccount.ts b/src/serialization/resources/accounting/types/InvoiceLineItemAccount.ts index 9d09d2530..d1587d2cd 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemAccount.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const InvoiceLineItemAccount: core.serialization.Schema< serializers.accounting.InvoiceLineItemAccount.Raw, Merge.accounting.InvoiceLineItemAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace InvoiceLineItemAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemCurrency.ts b/src/serialization/resources/accounting/types/InvoiceLineItemCurrency.ts index f22ffba48..338d367f4 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemCurrency.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const InvoiceLineItemCurrency: core.serialization.Schema< serializers.accounting.InvoiceLineItemCurrency.Raw, Merge.accounting.InvoiceLineItemCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace InvoiceLineItemCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemItem.ts b/src/serialization/resources/accounting/types/InvoiceLineItemItem.ts index e48a232b1..475a32b2b 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Item } from "./Item"; export const InvoiceLineItemItem: core.serialization.Schema< serializers.accounting.InvoiceLineItemItem.Raw, Merge.accounting.InvoiceLineItemItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Item), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace InvoiceLineItemItem { - type Raw = string | serializers.accounting.Item.Raw; + type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemRequest.ts b/src/serialization/resources/accounting/types/InvoiceLineItemRequest.ts index bfb3a0418..2fb6ea0c4 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemRequest.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemRequest.ts @@ -2,9 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { InvoiceLineItemRequestCurrency } from "./InvoiceLineItemRequestCurrency"; +import { InvoiceLineItemRequestItem } from "./InvoiceLineItemRequestItem"; +import { InvoiceLineItemRequestAccount } from "./InvoiceLineItemRequestAccount"; +import { InvoiceLineItemRequestTrackingCategory } from "./InvoiceLineItemRequestTrackingCategory"; +import { InvoiceLineItemRequestTrackingCategoriesItem } from "./InvoiceLineItemRequestTrackingCategoriesItem"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const InvoiceLineItemRequest: core.serialization.ObjectSchema< serializers.accounting.InvoiceLineItemRequest.Raw, @@ -15,34 +21,18 @@ export const InvoiceLineItemRequest: core.serialization.ObjectSchema< unitPrice: core.serialization.property("unit_price", core.serialization.number().optional()), quantity: core.serialization.number().optional(), totalAmount: core.serialization.property("total_amount", core.serialization.number().optional()), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceLineItemRequestCurrency) - .optional(), + currency: InvoiceLineItemRequestCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), - item: core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceLineItemRequestItem) - .optional(), - account: core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceLineItemRequestAccount) - .optional(), + item: InvoiceLineItemRequestItem.optional(), + account: InvoiceLineItemRequestAccount.optional(), taxRate: core.serialization.property("tax_rate", core.serialization.string().optional()), trackingCategory: core.serialization.property( "tracking_category", - core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceLineItemRequestTrackingCategory) - .optional() + InvoiceLineItemRequestTrackingCategory.optional() ), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy( - async () => (await import("../../..")).accounting.InvoiceLineItemRequestTrackingCategoriesItem - ) - .optional() - ) - .optional() + core.serialization.list(InvoiceLineItemRequestTrackingCategoriesItem.optional()).optional() ), company: core.serialization.string().optional(), integrationParams: core.serialization.property( @@ -53,12 +43,7 @@ export const InvoiceLineItemRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace InvoiceLineItemRequest { @@ -68,18 +53,16 @@ export declare namespace InvoiceLineItemRequest { unit_price?: number | null; quantity?: number | null; total_amount?: number | null; - currency?: serializers.accounting.InvoiceLineItemRequestCurrency.Raw | null; + currency?: InvoiceLineItemRequestCurrency.Raw | null; exchange_rate?: string | null; - item?: serializers.accounting.InvoiceLineItemRequestItem.Raw | null; - account?: serializers.accounting.InvoiceLineItemRequestAccount.Raw | null; + item?: InvoiceLineItemRequestItem.Raw | null; + account?: InvoiceLineItemRequestAccount.Raw | null; tax_rate?: string | null; - tracking_category?: serializers.accounting.InvoiceLineItemRequestTrackingCategory.Raw | null; - tracking_categories?: - | (serializers.accounting.InvoiceLineItemRequestTrackingCategoriesItem.Raw | null | undefined)[] - | null; + tracking_category?: InvoiceLineItemRequestTrackingCategory.Raw | null; + tracking_categories?: (InvoiceLineItemRequestTrackingCategoriesItem.Raw | null | undefined)[] | null; company?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.accounting.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemRequestAccount.ts b/src/serialization/resources/accounting/types/InvoiceLineItemRequestAccount.ts index fe0612645..cf341f077 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemRequestAccount.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemRequestAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const InvoiceLineItemRequestAccount: core.serialization.Schema< serializers.accounting.InvoiceLineItemRequestAccount.Raw, Merge.accounting.InvoiceLineItemRequestAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace InvoiceLineItemRequestAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemRequestCurrency.ts b/src/serialization/resources/accounting/types/InvoiceLineItemRequestCurrency.ts index 099c2cb37..abd4356c1 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemRequestCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const InvoiceLineItemRequestCurrency: core.serialization.Schema< serializers.accounting.InvoiceLineItemRequestCurrency.Raw, Merge.accounting.InvoiceLineItemRequestCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace InvoiceLineItemRequestCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemRequestItem.ts b/src/serialization/resources/accounting/types/InvoiceLineItemRequestItem.ts index 8714561f1..664f547f5 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemRequestItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemRequestItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Item } from "./Item"; export const InvoiceLineItemRequestItem: core.serialization.Schema< serializers.accounting.InvoiceLineItemRequestItem.Raw, Merge.accounting.InvoiceLineItemRequestItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Item), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace InvoiceLineItemRequestItem { - type Raw = string | serializers.accounting.Item.Raw; + type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategoriesItem.ts index f1a40bfad..aa9171441 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const InvoiceLineItemRequestTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.InvoiceLineItemRequestTrackingCategoriesItem.Raw, Merge.accounting.InvoiceLineItemRequestTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace InvoiceLineItemRequestTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategory.ts b/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategory.ts index b3b7945e4..60656094f 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategory.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategory.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const InvoiceLineItemRequestTrackingCategory: core.serialization.Schema< serializers.accounting.InvoiceLineItemRequestTrackingCategory.Raw, Merge.accounting.InvoiceLineItemRequestTrackingCategory -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace InvoiceLineItemRequestTrackingCategory { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategoriesItem.ts index eec628afd..6b1c0a3e4 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const InvoiceLineItemTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.InvoiceLineItemTrackingCategoriesItem.Raw, Merge.accounting.InvoiceLineItemTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace InvoiceLineItemTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategory.ts b/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategory.ts index 9c00e50eb..634f33b09 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategory.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategory.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const InvoiceLineItemTrackingCategory: core.serialization.Schema< serializers.accounting.InvoiceLineItemTrackingCategory.Raw, Merge.accounting.InvoiceLineItemTrackingCategory -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace InvoiceLineItemTrackingCategory { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoicePaymentsItem.ts b/src/serialization/resources/accounting/types/InvoicePaymentsItem.ts index 7459a290d..0e270f40c 100644 --- a/src/serialization/resources/accounting/types/InvoicePaymentsItem.ts +++ b/src/serialization/resources/accounting/types/InvoicePaymentsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Payment } from "./Payment"; export const InvoicePaymentsItem: core.serialization.Schema< serializers.accounting.InvoicePaymentsItem.Raw, Merge.accounting.InvoicePaymentsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Payment), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Payment]); export declare namespace InvoicePaymentsItem { - type Raw = string | serializers.accounting.Payment.Raw; + type Raw = string | Payment.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoicePurchaseOrdersItem.ts b/src/serialization/resources/accounting/types/InvoicePurchaseOrdersItem.ts index 9babfc13e..0574124ca 100644 --- a/src/serialization/resources/accounting/types/InvoicePurchaseOrdersItem.ts +++ b/src/serialization/resources/accounting/types/InvoicePurchaseOrdersItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PurchaseOrder } from "./PurchaseOrder"; export const InvoicePurchaseOrdersItem: core.serialization.Schema< serializers.accounting.InvoicePurchaseOrdersItem.Raw, Merge.accounting.InvoicePurchaseOrdersItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.PurchaseOrder), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PurchaseOrder]); export declare namespace InvoicePurchaseOrdersItem { - type Raw = string | serializers.accounting.PurchaseOrder.Raw; + type Raw = string | PurchaseOrder.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequest.ts b/src/serialization/resources/accounting/types/InvoiceRequest.ts index b46bb661a..ded38965e 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequest.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequest.ts @@ -2,30 +2,34 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { InvoiceRequestType } from "./InvoiceRequestType"; +import { InvoiceRequestContact } from "./InvoiceRequestContact"; +import { InvoiceRequestStatus } from "./InvoiceRequestStatus"; +import { InvoiceRequestCompany } from "./InvoiceRequestCompany"; +import { InvoiceRequestCurrency } from "./InvoiceRequestCurrency"; +import { InvoiceRequestPaymentsItem } from "./InvoiceRequestPaymentsItem"; +import { InvoiceRequestTrackingCategoriesItem } from "./InvoiceRequestTrackingCategoriesItem"; +import { InvoiceLineItemRequest } from "./InvoiceLineItemRequest"; +import { InvoiceRequestPurchaseOrdersItem } from "./InvoiceRequestPurchaseOrdersItem"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const InvoiceRequest: core.serialization.ObjectSchema< serializers.accounting.InvoiceRequest.Raw, Merge.accounting.InvoiceRequest > = core.serialization.object({ - type: core.serialization.lazy(async () => (await import("../../..")).accounting.InvoiceRequestType).optional(), - contact: core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceRequestContact) - .optional(), + type: InvoiceRequestType.optional(), + contact: InvoiceRequestContact.optional(), number: core.serialization.string().optional(), issueDate: core.serialization.property("issue_date", core.serialization.date().optional()), dueDate: core.serialization.property("due_date", core.serialization.date().optional()), paidOnDate: core.serialization.property("paid_on_date", core.serialization.date().optional()), memo: core.serialization.string().optional(), - status: core.serialization.lazy(async () => (await import("../../..")).accounting.InvoiceRequestStatus).optional(), - company: core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceRequestCompany) - .optional(), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceRequestCurrency) - .optional(), + status: InvoiceRequestStatus.optional(), + company: InvoiceRequestCompany.optional(), + currency: InvoiceRequestCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), totalDiscount: core.serialization.property("total_discount", core.serialization.number().optional()), subTotal: core.serialization.property("sub_total", core.serialization.number().optional()), @@ -33,40 +37,15 @@ export const InvoiceRequest: core.serialization.ObjectSchema< inclusiveOfTax: core.serialization.property("inclusive_of_tax", core.serialization.boolean().optional()), totalAmount: core.serialization.property("total_amount", core.serialization.number().optional()), balance: core.serialization.number().optional(), - payments: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceRequestPaymentsItem) - .optional() - ) - .optional(), + payments: core.serialization.list(InvoiceRequestPaymentsItem.optional()).optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceRequestTrackingCategoriesItem) - .optional() - ) - .optional() - ), - lineItems: core.serialization.property( - "line_items", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.InvoiceLineItemRequest) - ) - .optional() + core.serialization.list(InvoiceRequestTrackingCategoriesItem.optional()).optional() ), + lineItems: core.serialization.property("line_items", core.serialization.list(InvoiceLineItemRequest).optional()), purchaseOrders: core.serialization.property( "purchase_orders", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.InvoiceRequestPurchaseOrdersItem) - .optional() - ) - .optional() + core.serialization.list(InvoiceRequestPurchaseOrdersItem.optional()).optional() ), integrationParams: core.serialization.property( "integration_params", @@ -76,26 +55,21 @@ export const InvoiceRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace InvoiceRequest { interface Raw { - type?: serializers.accounting.InvoiceRequestType.Raw | null; - contact?: serializers.accounting.InvoiceRequestContact.Raw | null; + type?: InvoiceRequestType.Raw | null; + contact?: InvoiceRequestContact.Raw | null; number?: string | null; issue_date?: string | null; due_date?: string | null; paid_on_date?: string | null; memo?: string | null; - status?: serializers.accounting.InvoiceRequestStatus.Raw | null; - company?: serializers.accounting.InvoiceRequestCompany.Raw | null; - currency?: serializers.accounting.InvoiceRequestCurrency.Raw | null; + status?: InvoiceRequestStatus.Raw | null; + company?: InvoiceRequestCompany.Raw | null; + currency?: InvoiceRequestCurrency.Raw | null; exchange_rate?: string | null; total_discount?: number | null; sub_total?: number | null; @@ -103,14 +77,12 @@ export declare namespace InvoiceRequest { inclusive_of_tax?: boolean | null; total_amount?: number | null; balance?: number | null; - payments?: (serializers.accounting.InvoiceRequestPaymentsItem.Raw | null | undefined)[] | null; - tracking_categories?: - | (serializers.accounting.InvoiceRequestTrackingCategoriesItem.Raw | null | undefined)[] - | null; - line_items?: serializers.accounting.InvoiceLineItemRequest.Raw[] | null; - purchase_orders?: (serializers.accounting.InvoiceRequestPurchaseOrdersItem.Raw | null | undefined)[] | null; + payments?: (InvoiceRequestPaymentsItem.Raw | null | undefined)[] | null; + tracking_categories?: (InvoiceRequestTrackingCategoriesItem.Raw | null | undefined)[] | null; + line_items?: InvoiceLineItemRequest.Raw[] | null; + purchase_orders?: (InvoiceRequestPurchaseOrdersItem.Raw | null | undefined)[] | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.accounting.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestCompany.ts b/src/serialization/resources/accounting/types/InvoiceRequestCompany.ts index 64067bd08..9a61299bf 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestCompany.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const InvoiceRequestCompany: core.serialization.Schema< serializers.accounting.InvoiceRequestCompany.Raw, Merge.accounting.InvoiceRequestCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace InvoiceRequestCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestContact.ts b/src/serialization/resources/accounting/types/InvoiceRequestContact.ts index 1fa419414..33ef2cc43 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestContact.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const InvoiceRequestContact: core.serialization.Schema< serializers.accounting.InvoiceRequestContact.Raw, Merge.accounting.InvoiceRequestContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace InvoiceRequestContact { - type Raw = string | serializers.accounting.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestCurrency.ts b/src/serialization/resources/accounting/types/InvoiceRequestCurrency.ts index 3370388be..82e1d4415 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const InvoiceRequestCurrency: core.serialization.Schema< serializers.accounting.InvoiceRequestCurrency.Raw, Merge.accounting.InvoiceRequestCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace InvoiceRequestCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestPaymentsItem.ts b/src/serialization/resources/accounting/types/InvoiceRequestPaymentsItem.ts index 1046e4ed8..5c987c19b 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestPaymentsItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestPaymentsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Payment } from "./Payment"; export const InvoiceRequestPaymentsItem: core.serialization.Schema< serializers.accounting.InvoiceRequestPaymentsItem.Raw, Merge.accounting.InvoiceRequestPaymentsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Payment), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Payment]); export declare namespace InvoiceRequestPaymentsItem { - type Raw = string | serializers.accounting.Payment.Raw; + type Raw = string | Payment.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.ts b/src/serialization/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.ts index c7d823215..22a5ff100 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PurchaseOrder } from "./PurchaseOrder"; export const InvoiceRequestPurchaseOrdersItem: core.serialization.Schema< serializers.accounting.InvoiceRequestPurchaseOrdersItem.Raw, Merge.accounting.InvoiceRequestPurchaseOrdersItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.PurchaseOrder), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PurchaseOrder]); export declare namespace InvoiceRequestPurchaseOrdersItem { - type Raw = string | serializers.accounting.PurchaseOrder.Raw; + type Raw = string | PurchaseOrder.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestStatus.ts b/src/serialization/resources/accounting/types/InvoiceRequestStatus.ts index 284359013..80b785d7c 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestStatus.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { InvoiceStatusEnum } from "./InvoiceStatusEnum"; export const InvoiceRequestStatus: core.serialization.Schema< serializers.accounting.InvoiceRequestStatus.Raw, Merge.accounting.InvoiceRequestStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.InvoiceStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([InvoiceStatusEnum, core.serialization.string()]); export declare namespace InvoiceRequestStatus { - type Raw = serializers.accounting.InvoiceStatusEnum.Raw | string; + type Raw = InvoiceStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/InvoiceRequestTrackingCategoriesItem.ts index d9e259791..b56b36127 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const InvoiceRequestTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.InvoiceRequestTrackingCategoriesItem.Raw, Merge.accounting.InvoiceRequestTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace InvoiceRequestTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestType.ts b/src/serialization/resources/accounting/types/InvoiceRequestType.ts index dd9dd5d9e..552ae28da 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestType.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { InvoiceTypeEnum } from "./InvoiceTypeEnum"; export const InvoiceRequestType: core.serialization.Schema< serializers.accounting.InvoiceRequestType.Raw, Merge.accounting.InvoiceRequestType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.InvoiceTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([InvoiceTypeEnum, core.serialization.string()]); export declare namespace InvoiceRequestType { - type Raw = serializers.accounting.InvoiceTypeEnum.Raw | string; + type Raw = InvoiceTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceResponse.ts b/src/serialization/resources/accounting/types/InvoiceResponse.ts index e19f98208..9b0f8ce1f 100644 --- a/src/serialization/resources/accounting/types/InvoiceResponse.ts +++ b/src/serialization/resources/accounting/types/InvoiceResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Invoice } from "./Invoice"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const InvoiceResponse: core.serialization.ObjectSchema< serializers.accounting.InvoiceResponse.Raw, Merge.accounting.InvoiceResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).accounting.Invoice), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.DebugModeLog)) - .optional(), + model: Invoice, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace InvoiceResponse { interface Raw { - model: serializers.accounting.Invoice.Raw; - warnings: serializers.accounting.WarningValidationProblem.Raw[]; - errors: serializers.accounting.ErrorValidationProblem.Raw[]; - logs?: serializers.accounting.DebugModeLog.Raw[] | null; + model: Invoice.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/InvoiceStatus.ts b/src/serialization/resources/accounting/types/InvoiceStatus.ts index b254766b3..abbf3e8fa 100644 --- a/src/serialization/resources/accounting/types/InvoiceStatus.ts +++ b/src/serialization/resources/accounting/types/InvoiceStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { InvoiceStatusEnum } from "./InvoiceStatusEnum"; export const InvoiceStatus: core.serialization.Schema< serializers.accounting.InvoiceStatus.Raw, Merge.accounting.InvoiceStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.InvoiceStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([InvoiceStatusEnum, core.serialization.string()]); export declare namespace InvoiceStatus { - type Raw = serializers.accounting.InvoiceStatusEnum.Raw | string; + type Raw = InvoiceStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceStatusEnum.ts b/src/serialization/resources/accounting/types/InvoiceStatusEnum.ts index b3d1a6d45..761a8d7f6 100644 --- a/src/serialization/resources/accounting/types/InvoiceStatusEnum.ts +++ b/src/serialization/resources/accounting/types/InvoiceStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const InvoiceStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/InvoiceTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/InvoiceTrackingCategoriesItem.ts index 39ae5f690..1e64f19c1 100644 --- a/src/serialization/resources/accounting/types/InvoiceTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const InvoiceTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.InvoiceTrackingCategoriesItem.Raw, Merge.accounting.InvoiceTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace InvoiceTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceType.ts b/src/serialization/resources/accounting/types/InvoiceType.ts index 599566cdf..214479aed 100644 --- a/src/serialization/resources/accounting/types/InvoiceType.ts +++ b/src/serialization/resources/accounting/types/InvoiceType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { InvoiceTypeEnum } from "./InvoiceTypeEnum"; export const InvoiceType: core.serialization.Schema< serializers.accounting.InvoiceType.Raw, Merge.accounting.InvoiceType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.InvoiceTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([InvoiceTypeEnum, core.serialization.string()]); export declare namespace InvoiceType { - type Raw = serializers.accounting.InvoiceTypeEnum.Raw | string; + type Raw = InvoiceTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceTypeEnum.ts b/src/serialization/resources/accounting/types/InvoiceTypeEnum.ts index a0f30a3dd..6a6b8db09 100644 --- a/src/serialization/resources/accounting/types/InvoiceTypeEnum.ts +++ b/src/serialization/resources/accounting/types/InvoiceTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const InvoiceTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/Issue.ts b/src/serialization/resources/accounting/types/Issue.ts index 93b8b0b18..5fb13df28 100644 --- a/src/serialization/resources/accounting/types/Issue.ts +++ b/src/serialization/resources/accounting/types/Issue.ts @@ -2,14 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IssueStatus } from "./IssueStatus"; export const Issue: core.serialization.ObjectSchema = core.serialization.object({ id: core.serialization.string().optional(), - status: core.serialization.lazy(async () => (await import("../../..")).accounting.IssueStatus).optional(), + status: IssueStatus.optional(), errorDescription: core.serialization.property("error_description", core.serialization.string()), endUser: core.serialization.property( "end_user", @@ -27,7 +28,7 @@ export const Issue: core.serialization.ObjectSchema | null; first_incident_time?: string | null; diff --git a/src/serialization/resources/accounting/types/IssueStatus.ts b/src/serialization/resources/accounting/types/IssueStatus.ts index ede8a25eb..7355151ad 100644 --- a/src/serialization/resources/accounting/types/IssueStatus.ts +++ b/src/serialization/resources/accounting/types/IssueStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IssueStatusEnum } from "./IssueStatusEnum"; export const IssueStatus: core.serialization.Schema< serializers.accounting.IssueStatus.Raw, Merge.accounting.IssueStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.IssueStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([IssueStatusEnum, core.serialization.string()]); export declare namespace IssueStatus { - type Raw = serializers.accounting.IssueStatusEnum.Raw | string; + type Raw = IssueStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/IssueStatusEnum.ts b/src/serialization/resources/accounting/types/IssueStatusEnum.ts index 09af6ba89..c0a92f275 100644 --- a/src/serialization/resources/accounting/types/IssueStatusEnum.ts +++ b/src/serialization/resources/accounting/types/IssueStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const IssueStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/Item.ts b/src/serialization/resources/accounting/types/Item.ts index ae5f76e1b..160db5b13 100644 --- a/src/serialization/resources/accounting/types/Item.ts +++ b/src/serialization/resources/accounting/types/Item.ts @@ -2,9 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ItemStatus } from "./ItemStatus"; +import { ItemPurchaseAccount } from "./ItemPurchaseAccount"; +import { ItemSalesAccount } from "./ItemSalesAccount"; +import { ItemCompany } from "./ItemCompany"; +import { ItemPurchaseTaxRate } from "./ItemPurchaseTaxRate"; +import { ItemSalesTaxRate } from "./ItemSalesTaxRate"; +import { RemoteData } from "./RemoteData"; export const Item: core.serialization.ObjectSchema = core.serialization.object({ @@ -13,38 +20,21 @@ export const Item: core.serialization.ObjectSchema (await import("../../..")).accounting.ItemStatus).optional(), + status: ItemStatus.optional(), unitPrice: core.serialization.property("unit_price", core.serialization.number().optional()), purchasePrice: core.serialization.property("purchase_price", core.serialization.number().optional()), - purchaseAccount: core.serialization.property( - "purchase_account", - core.serialization.lazy(async () => (await import("../../..")).accounting.ItemPurchaseAccount).optional() - ), - salesAccount: core.serialization.property( - "sales_account", - core.serialization.lazy(async () => (await import("../../..")).accounting.ItemSalesAccount).optional() - ), - company: core.serialization.lazy(async () => (await import("../../..")).accounting.ItemCompany).optional(), - purchaseTaxRate: core.serialization.property( - "purchase_tax_rate", - core.serialization.lazy(async () => (await import("../../..")).accounting.ItemPurchaseTaxRate).optional() - ), - salesTaxRate: core.serialization.property( - "sales_tax_rate", - core.serialization.lazy(async () => (await import("../../..")).accounting.ItemSalesTaxRate).optional() - ), + purchaseAccount: core.serialization.property("purchase_account", ItemPurchaseAccount.optional()), + salesAccount: core.serialization.property("sales_account", ItemSalesAccount.optional()), + company: ItemCompany.optional(), + purchaseTaxRate: core.serialization.property("purchase_tax_rate", ItemPurchaseTaxRate.optional()), + salesTaxRate: core.serialization.property("sales_tax_rate", ItemSalesTaxRate.optional()), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Item { @@ -54,17 +44,17 @@ export declare namespace Item { created_at?: string | null; modified_at?: string | null; name?: string | null; - status?: serializers.accounting.ItemStatus.Raw | null; + status?: ItemStatus.Raw | null; unit_price?: number | null; purchase_price?: number | null; - purchase_account?: serializers.accounting.ItemPurchaseAccount.Raw | null; - sales_account?: serializers.accounting.ItemSalesAccount.Raw | null; - company?: serializers.accounting.ItemCompany.Raw | null; - purchase_tax_rate?: serializers.accounting.ItemPurchaseTaxRate.Raw | null; - sales_tax_rate?: serializers.accounting.ItemSalesTaxRate.Raw | null; + purchase_account?: ItemPurchaseAccount.Raw | null; + sales_account?: ItemSalesAccount.Raw | null; + company?: ItemCompany.Raw | null; + purchase_tax_rate?: ItemPurchaseTaxRate.Raw | null; + sales_tax_rate?: ItemSalesTaxRate.Raw | null; remote_updated_at?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/ItemCompany.ts b/src/serialization/resources/accounting/types/ItemCompany.ts index 3358dccef..3a38f6c4f 100644 --- a/src/serialization/resources/accounting/types/ItemCompany.ts +++ b/src/serialization/resources/accounting/types/ItemCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const ItemCompany: core.serialization.Schema< serializers.accounting.ItemCompany.Raw, Merge.accounting.ItemCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace ItemCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/ItemFormatEnum.ts b/src/serialization/resources/accounting/types/ItemFormatEnum.ts index a7048ed0b..a43561a23 100644 --- a/src/serialization/resources/accounting/types/ItemFormatEnum.ts +++ b/src/serialization/resources/accounting/types/ItemFormatEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ItemFormatEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/ItemPurchaseAccount.ts b/src/serialization/resources/accounting/types/ItemPurchaseAccount.ts index cd03aa870..a1befc160 100644 --- a/src/serialization/resources/accounting/types/ItemPurchaseAccount.ts +++ b/src/serialization/resources/accounting/types/ItemPurchaseAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const ItemPurchaseAccount: core.serialization.Schema< serializers.accounting.ItemPurchaseAccount.Raw, Merge.accounting.ItemPurchaseAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ItemPurchaseAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/ItemPurchaseTaxRate.ts b/src/serialization/resources/accounting/types/ItemPurchaseTaxRate.ts index 33cbaf44e..6ef4538d0 100644 --- a/src/serialization/resources/accounting/types/ItemPurchaseTaxRate.ts +++ b/src/serialization/resources/accounting/types/ItemPurchaseTaxRate.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TaxRate } from "./TaxRate"; export const ItemPurchaseTaxRate: core.serialization.Schema< serializers.accounting.ItemPurchaseTaxRate.Raw, Merge.accounting.ItemPurchaseTaxRate -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TaxRate), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TaxRate]); export declare namespace ItemPurchaseTaxRate { - type Raw = string | serializers.accounting.TaxRate.Raw; + type Raw = string | TaxRate.Raw; } diff --git a/src/serialization/resources/accounting/types/ItemSalesAccount.ts b/src/serialization/resources/accounting/types/ItemSalesAccount.ts index 997eaff1f..f621295d0 100644 --- a/src/serialization/resources/accounting/types/ItemSalesAccount.ts +++ b/src/serialization/resources/accounting/types/ItemSalesAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const ItemSalesAccount: core.serialization.Schema< serializers.accounting.ItemSalesAccount.Raw, Merge.accounting.ItemSalesAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ItemSalesAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/ItemSalesTaxRate.ts b/src/serialization/resources/accounting/types/ItemSalesTaxRate.ts index 3fe50331b..136501692 100644 --- a/src/serialization/resources/accounting/types/ItemSalesTaxRate.ts +++ b/src/serialization/resources/accounting/types/ItemSalesTaxRate.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TaxRate } from "./TaxRate"; export const ItemSalesTaxRate: core.serialization.Schema< serializers.accounting.ItemSalesTaxRate.Raw, Merge.accounting.ItemSalesTaxRate -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TaxRate), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TaxRate]); export declare namespace ItemSalesTaxRate { - type Raw = string | serializers.accounting.TaxRate.Raw; + type Raw = string | TaxRate.Raw; } diff --git a/src/serialization/resources/accounting/types/ItemSchema.ts b/src/serialization/resources/accounting/types/ItemSchema.ts index 8d0f24d01..6a1852d3b 100644 --- a/src/serialization/resources/accounting/types/ItemSchema.ts +++ b/src/serialization/resources/accounting/types/ItemSchema.ts @@ -2,22 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ItemTypeEnum } from "./ItemTypeEnum"; +import { ItemFormatEnum } from "./ItemFormatEnum"; export const ItemSchema: core.serialization.ObjectSchema< serializers.accounting.ItemSchema.Raw, Merge.accounting.ItemSchema > = core.serialization.object({ - itemType: core.serialization.property( - "item_type", - core.serialization.lazy(async () => (await import("../../..")).accounting.ItemTypeEnum).optional() - ), - itemFormat: core.serialization.property( - "item_format", - core.serialization.lazy(async () => (await import("../../..")).accounting.ItemFormatEnum).optional() - ), + itemType: core.serialization.property("item_type", ItemTypeEnum.optional()), + itemFormat: core.serialization.property("item_format", ItemFormatEnum.optional()), itemChoices: core.serialization.property( "item_choices", core.serialization.list(core.serialization.string()).optional() @@ -26,8 +22,8 @@ export const ItemSchema: core.serialization.ObjectSchema< export declare namespace ItemSchema { interface Raw { - item_type?: serializers.accounting.ItemTypeEnum.Raw | null; - item_format?: serializers.accounting.ItemFormatEnum.Raw | null; + item_type?: ItemTypeEnum.Raw | null; + item_format?: ItemFormatEnum.Raw | null; item_choices?: string[] | null; } } diff --git a/src/serialization/resources/accounting/types/ItemStatus.ts b/src/serialization/resources/accounting/types/ItemStatus.ts index dc1e6ea62..f60b49789 100644 --- a/src/serialization/resources/accounting/types/ItemStatus.ts +++ b/src/serialization/resources/accounting/types/ItemStatus.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Status7D1Enum } from "./Status7D1Enum"; export const ItemStatus: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.Status7D1Enum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([Status7D1Enum, core.serialization.string()]); export declare namespace ItemStatus { - type Raw = serializers.accounting.Status7D1Enum.Raw | string; + type Raw = Status7D1Enum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/ItemTypeEnum.ts b/src/serialization/resources/accounting/types/ItemTypeEnum.ts index 300988e2a..e9d4ce883 100644 --- a/src/serialization/resources/accounting/types/ItemTypeEnum.ts +++ b/src/serialization/resources/accounting/types/ItemTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ItemTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/JournalEntry.ts b/src/serialization/resources/accounting/types/JournalEntry.ts index 47fb43773..a57e30589 100644 --- a/src/serialization/resources/accounting/types/JournalEntry.ts +++ b/src/serialization/resources/accounting/types/JournalEntry.ts @@ -2,9 +2,19 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JournalEntryPaymentsItem } from "./JournalEntryPaymentsItem"; +import { JournalEntryAppliedPaymentsItem } from "./JournalEntryAppliedPaymentsItem"; +import { JournalEntryCurrency } from "./JournalEntryCurrency"; +import { JournalEntryCompany } from "./JournalEntryCompany"; +import { JournalLine } from "./JournalLine"; +import { JournalEntryTrackingCategoriesItem } from "./JournalEntryTrackingCategoriesItem"; +import { JournalEntryPostingStatus } from "./JournalEntryPostingStatus"; +import { JournalEntryAccountingPeriod } from "./JournalEntryAccountingPeriod"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const JournalEntry: core.serialization.ObjectSchema< serializers.accounting.JournalEntry.Raw, @@ -15,73 +25,33 @@ export const JournalEntry: core.serialization.ObjectSchema< createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), transactionDate: core.serialization.property("transaction_date", core.serialization.date().optional()), - payments: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalEntryPaymentsItem) - .optional() - ) - .optional(), + payments: core.serialization.list(JournalEntryPaymentsItem.optional()).optional(), appliedPayments: core.serialization.property( "applied_payments", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalEntryAppliedPaymentsItem) - .optional() - ) - .optional() + core.serialization.list(JournalEntryAppliedPaymentsItem.optional()).optional() ), memo: core.serialization.string().optional(), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalEntryCurrency) - .optional(), + currency: JournalEntryCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), - company: core.serialization.lazy(async () => (await import("../../..")).accounting.JournalEntryCompany).optional(), + company: JournalEntryCompany.optional(), inclusiveOfTax: core.serialization.property("inclusive_of_tax", core.serialization.boolean().optional()), - lines: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.JournalLine)) - .optional(), + lines: core.serialization.list(JournalLine).optional(), journalNumber: core.serialization.property("journal_number", core.serialization.string().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalEntryTrackingCategoriesItem) - .optional() - ) - .optional() + core.serialization.list(JournalEntryTrackingCategoriesItem.optional()).optional() ), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), - postingStatus: core.serialization.property( - "posting_status", - core.serialization.lazy(async () => (await import("../../..")).accounting.JournalEntryPostingStatus).optional() - ), - accountingPeriod: core.serialization.property( - "accounting_period", - core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalEntryAccountingPeriod) - .optional() - ), + postingStatus: core.serialization.property("posting_status", JournalEntryPostingStatus.optional()), + accountingPeriod: core.serialization.property("accounting_period", JournalEntryAccountingPeriod.optional()), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace JournalEntry { @@ -91,25 +61,23 @@ export declare namespace JournalEntry { created_at?: string | null; modified_at?: string | null; transaction_date?: string | null; - payments?: (serializers.accounting.JournalEntryPaymentsItem.Raw | null | undefined)[] | null; - applied_payments?: (serializers.accounting.JournalEntryAppliedPaymentsItem.Raw | null | undefined)[] | null; + payments?: (JournalEntryPaymentsItem.Raw | null | undefined)[] | null; + applied_payments?: (JournalEntryAppliedPaymentsItem.Raw | null | undefined)[] | null; memo?: string | null; - currency?: serializers.accounting.JournalEntryCurrency.Raw | null; + currency?: JournalEntryCurrency.Raw | null; exchange_rate?: string | null; - company?: serializers.accounting.JournalEntryCompany.Raw | null; + company?: JournalEntryCompany.Raw | null; inclusive_of_tax?: boolean | null; - lines?: serializers.accounting.JournalLine.Raw[] | null; + lines?: JournalLine.Raw[] | null; journal_number?: string | null; - tracking_categories?: - | (serializers.accounting.JournalEntryTrackingCategoriesItem.Raw | null | undefined)[] - | null; + tracking_categories?: (JournalEntryTrackingCategoriesItem.Raw | null | undefined)[] | null; remote_was_deleted?: boolean | null; - posting_status?: serializers.accounting.JournalEntryPostingStatus.Raw | null; - accounting_period?: serializers.accounting.JournalEntryAccountingPeriod.Raw | null; + posting_status?: JournalEntryPostingStatus.Raw | null; + accounting_period?: JournalEntryAccountingPeriod.Raw | null; remote_created_at?: string | null; remote_updated_at?: string | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; - remote_fields?: serializers.accounting.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/JournalEntryAccountingPeriod.ts b/src/serialization/resources/accounting/types/JournalEntryAccountingPeriod.ts index 47468d8a5..ea61eda79 100644 --- a/src/serialization/resources/accounting/types/JournalEntryAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/JournalEntryAccountingPeriod.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingPeriod } from "./AccountingPeriod"; export const JournalEntryAccountingPeriod: core.serialization.Schema< serializers.accounting.JournalEntryAccountingPeriod.Raw, Merge.accounting.JournalEntryAccountingPeriod -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingPeriod), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace JournalEntryAccountingPeriod { - type Raw = string | serializers.accounting.AccountingPeriod.Raw; + type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalEntryAppliedPaymentsItem.ts b/src/serialization/resources/accounting/types/JournalEntryAppliedPaymentsItem.ts index f237a8e06..b7e4571be 100644 --- a/src/serialization/resources/accounting/types/JournalEntryAppliedPaymentsItem.ts +++ b/src/serialization/resources/accounting/types/JournalEntryAppliedPaymentsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PaymentLineItem } from "./PaymentLineItem"; export const JournalEntryAppliedPaymentsItem: core.serialization.Schema< serializers.accounting.JournalEntryAppliedPaymentsItem.Raw, Merge.accounting.JournalEntryAppliedPaymentsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.PaymentLineItem), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentLineItem]); export declare namespace JournalEntryAppliedPaymentsItem { - type Raw = string | serializers.accounting.PaymentLineItem.Raw; + type Raw = string | PaymentLineItem.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalEntryCompany.ts b/src/serialization/resources/accounting/types/JournalEntryCompany.ts index 2b3486aca..54f305b96 100644 --- a/src/serialization/resources/accounting/types/JournalEntryCompany.ts +++ b/src/serialization/resources/accounting/types/JournalEntryCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const JournalEntryCompany: core.serialization.Schema< serializers.accounting.JournalEntryCompany.Raw, Merge.accounting.JournalEntryCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace JournalEntryCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalEntryCurrency.ts b/src/serialization/resources/accounting/types/JournalEntryCurrency.ts index 4939ec281..b4f0dbbd3 100644 --- a/src/serialization/resources/accounting/types/JournalEntryCurrency.ts +++ b/src/serialization/resources/accounting/types/JournalEntryCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const JournalEntryCurrency: core.serialization.Schema< serializers.accounting.JournalEntryCurrency.Raw, Merge.accounting.JournalEntryCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace JournalEntryCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/JournalEntryPaymentsItem.ts b/src/serialization/resources/accounting/types/JournalEntryPaymentsItem.ts index 0c7cbfbff..a0ebc48c7 100644 --- a/src/serialization/resources/accounting/types/JournalEntryPaymentsItem.ts +++ b/src/serialization/resources/accounting/types/JournalEntryPaymentsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Payment } from "./Payment"; export const JournalEntryPaymentsItem: core.serialization.Schema< serializers.accounting.JournalEntryPaymentsItem.Raw, Merge.accounting.JournalEntryPaymentsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Payment), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Payment]); export declare namespace JournalEntryPaymentsItem { - type Raw = string | serializers.accounting.Payment.Raw; + type Raw = string | Payment.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalEntryPostingStatus.ts b/src/serialization/resources/accounting/types/JournalEntryPostingStatus.ts index bed441081..1eedfb63c 100644 --- a/src/serialization/resources/accounting/types/JournalEntryPostingStatus.ts +++ b/src/serialization/resources/accounting/types/JournalEntryPostingStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PostingStatusEnum } from "./PostingStatusEnum"; export const JournalEntryPostingStatus: core.serialization.Schema< serializers.accounting.JournalEntryPostingStatus.Raw, Merge.accounting.JournalEntryPostingStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.PostingStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PostingStatusEnum, core.serialization.string()]); export declare namespace JournalEntryPostingStatus { - type Raw = serializers.accounting.PostingStatusEnum.Raw | string; + type Raw = PostingStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/JournalEntryRequest.ts b/src/serialization/resources/accounting/types/JournalEntryRequest.ts index c9d961fb9..d1f435914 100644 --- a/src/serialization/resources/accounting/types/JournalEntryRequest.ts +++ b/src/serialization/resources/accounting/types/JournalEntryRequest.ts @@ -2,51 +2,35 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JournalEntryRequestPaymentsItem } from "./JournalEntryRequestPaymentsItem"; +import { JournalEntryRequestCurrency } from "./JournalEntryRequestCurrency"; +import { JournalEntryRequestCompany } from "./JournalEntryRequestCompany"; +import { JournalEntryRequestTrackingCategoriesItem } from "./JournalEntryRequestTrackingCategoriesItem"; +import { JournalLineRequest } from "./JournalLineRequest"; +import { JournalEntryRequestPostingStatus } from "./JournalEntryRequestPostingStatus"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const JournalEntryRequest: core.serialization.ObjectSchema< serializers.accounting.JournalEntryRequest.Raw, Merge.accounting.JournalEntryRequest > = core.serialization.object({ transactionDate: core.serialization.property("transaction_date", core.serialization.date().optional()), - payments: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalEntryRequestPaymentsItem) - .optional() - ) - .optional(), + payments: core.serialization.list(JournalEntryRequestPaymentsItem.optional()).optional(), memo: core.serialization.string().optional(), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalEntryRequestCurrency) - .optional(), + currency: JournalEntryRequestCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), - company: core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalEntryRequestCompany) - .optional(), + company: JournalEntryRequestCompany.optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalEntryRequestTrackingCategoriesItem) - .optional() - ) - .optional() + core.serialization.list(JournalEntryRequestTrackingCategoriesItem.optional()).optional() ), inclusiveOfTax: core.serialization.property("inclusive_of_tax", core.serialization.boolean().optional()), - lines: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.JournalLineRequest)) - .optional(), + lines: core.serialization.list(JournalLineRequest).optional(), journalNumber: core.serialization.property("journal_number", core.serialization.string().optional()), - postingStatus: core.serialization.property( - "posting_status", - core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalEntryRequestPostingStatus) - .optional() - ), + postingStatus: core.serialization.property("posting_status", JournalEntryRequestPostingStatus.optional()), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -55,31 +39,24 @@ export const JournalEntryRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace JournalEntryRequest { interface Raw { transaction_date?: string | null; - payments?: (serializers.accounting.JournalEntryRequestPaymentsItem.Raw | null | undefined)[] | null; + payments?: (JournalEntryRequestPaymentsItem.Raw | null | undefined)[] | null; memo?: string | null; - currency?: serializers.accounting.JournalEntryRequestCurrency.Raw | null; + currency?: JournalEntryRequestCurrency.Raw | null; exchange_rate?: string | null; - company?: serializers.accounting.JournalEntryRequestCompany.Raw | null; - tracking_categories?: - | (serializers.accounting.JournalEntryRequestTrackingCategoriesItem.Raw | null | undefined)[] - | null; + company?: JournalEntryRequestCompany.Raw | null; + tracking_categories?: (JournalEntryRequestTrackingCategoriesItem.Raw | null | undefined)[] | null; inclusive_of_tax?: boolean | null; - lines?: serializers.accounting.JournalLineRequest.Raw[] | null; + lines?: JournalLineRequest.Raw[] | null; journal_number?: string | null; - posting_status?: serializers.accounting.JournalEntryRequestPostingStatus.Raw | null; + posting_status?: JournalEntryRequestPostingStatus.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.accounting.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/JournalEntryRequestCompany.ts b/src/serialization/resources/accounting/types/JournalEntryRequestCompany.ts index b0129e5fa..52c77f7ff 100644 --- a/src/serialization/resources/accounting/types/JournalEntryRequestCompany.ts +++ b/src/serialization/resources/accounting/types/JournalEntryRequestCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const JournalEntryRequestCompany: core.serialization.Schema< serializers.accounting.JournalEntryRequestCompany.Raw, Merge.accounting.JournalEntryRequestCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace JournalEntryRequestCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalEntryRequestCurrency.ts b/src/serialization/resources/accounting/types/JournalEntryRequestCurrency.ts index 92ef14d2c..53cc9a257 100644 --- a/src/serialization/resources/accounting/types/JournalEntryRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/JournalEntryRequestCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const JournalEntryRequestCurrency: core.serialization.Schema< serializers.accounting.JournalEntryRequestCurrency.Raw, Merge.accounting.JournalEntryRequestCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace JournalEntryRequestCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/JournalEntryRequestPaymentsItem.ts b/src/serialization/resources/accounting/types/JournalEntryRequestPaymentsItem.ts index 1d0a1487a..d7fb4544a 100644 --- a/src/serialization/resources/accounting/types/JournalEntryRequestPaymentsItem.ts +++ b/src/serialization/resources/accounting/types/JournalEntryRequestPaymentsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Payment } from "./Payment"; export const JournalEntryRequestPaymentsItem: core.serialization.Schema< serializers.accounting.JournalEntryRequestPaymentsItem.Raw, Merge.accounting.JournalEntryRequestPaymentsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Payment), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Payment]); export declare namespace JournalEntryRequestPaymentsItem { - type Raw = string | serializers.accounting.Payment.Raw; + type Raw = string | Payment.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalEntryRequestPostingStatus.ts b/src/serialization/resources/accounting/types/JournalEntryRequestPostingStatus.ts index 7f0aacc1a..5a75937e6 100644 --- a/src/serialization/resources/accounting/types/JournalEntryRequestPostingStatus.ts +++ b/src/serialization/resources/accounting/types/JournalEntryRequestPostingStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PostingStatusEnum } from "./PostingStatusEnum"; export const JournalEntryRequestPostingStatus: core.serialization.Schema< serializers.accounting.JournalEntryRequestPostingStatus.Raw, Merge.accounting.JournalEntryRequestPostingStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.PostingStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PostingStatusEnum, core.serialization.string()]); export declare namespace JournalEntryRequestPostingStatus { - type Raw = serializers.accounting.PostingStatusEnum.Raw | string; + type Raw = PostingStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/JournalEntryRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/JournalEntryRequestTrackingCategoriesItem.ts index c6edd0eea..5cc63dec8 100644 --- a/src/serialization/resources/accounting/types/JournalEntryRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/JournalEntryRequestTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const JournalEntryRequestTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.JournalEntryRequestTrackingCategoriesItem.Raw, Merge.accounting.JournalEntryRequestTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace JournalEntryRequestTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalEntryResponse.ts b/src/serialization/resources/accounting/types/JournalEntryResponse.ts index 5306a0267..abef29e3b 100644 --- a/src/serialization/resources/accounting/types/JournalEntryResponse.ts +++ b/src/serialization/resources/accounting/types/JournalEntryResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JournalEntry } from "./JournalEntry"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const JournalEntryResponse: core.serialization.ObjectSchema< serializers.accounting.JournalEntryResponse.Raw, Merge.accounting.JournalEntryResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).accounting.JournalEntry), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.DebugModeLog)) - .optional(), + model: JournalEntry, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace JournalEntryResponse { interface Raw { - model: serializers.accounting.JournalEntry.Raw; - warnings: serializers.accounting.WarningValidationProblem.Raw[]; - errors: serializers.accounting.ErrorValidationProblem.Raw[]; - logs?: serializers.accounting.DebugModeLog.Raw[] | null; + model: JournalEntry.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/JournalEntryTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/JournalEntryTrackingCategoriesItem.ts index 285d67bce..069edd8de 100644 --- a/src/serialization/resources/accounting/types/JournalEntryTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/JournalEntryTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const JournalEntryTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.JournalEntryTrackingCategoriesItem.Raw, Merge.accounting.JournalEntryTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace JournalEntryTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalLine.ts b/src/serialization/resources/accounting/types/JournalLine.ts index 6fceced5c..663ab8ecd 100644 --- a/src/serialization/resources/accounting/types/JournalLine.ts +++ b/src/serialization/resources/accounting/types/JournalLine.ts @@ -2,9 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JournalLineAccount } from "./JournalLineAccount"; +import { JournalLineTrackingCategory } from "./JournalLineTrackingCategory"; +import { JournalLineTrackingCategoriesItem } from "./JournalLineTrackingCategoriesItem"; +import { JournalLineCurrency } from "./JournalLineCurrency"; +import { RemoteField } from "./RemoteField"; export const JournalLine: core.serialization.ObjectSchema< serializers.accounting.JournalLine.Raw, @@ -14,37 +19,21 @@ export const JournalLine: core.serialization.ObjectSchema< remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), - account: core.serialization.lazy(async () => (await import("../../..")).accounting.JournalLineAccount).optional(), + account: JournalLineAccount.optional(), netAmount: core.serialization.property("net_amount", core.serialization.number().optional()), - trackingCategory: core.serialization.property( - "tracking_category", - core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalLineTrackingCategory) - .optional() - ), + trackingCategory: core.serialization.property("tracking_category", JournalLineTrackingCategory.optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalLineTrackingCategoriesItem) - .optional() - ) - .optional() + core.serialization.list(JournalLineTrackingCategoriesItem.optional()).optional() ), - currency: core.serialization.lazy(async () => (await import("../../..")).accounting.JournalLineCurrency).optional(), + currency: JournalLineCurrency.optional(), company: core.serialization.string().optional(), contact: core.serialization.string().optional(), taxRate: core.serialization.property("tax_rate", core.serialization.string().optional()), description: core.serialization.string().optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteField)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace JournalLine { @@ -53,19 +42,17 @@ export declare namespace JournalLine { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - account?: serializers.accounting.JournalLineAccount.Raw | null; + account?: JournalLineAccount.Raw | null; net_amount?: number | null; - tracking_category?: serializers.accounting.JournalLineTrackingCategory.Raw | null; - tracking_categories?: - | (serializers.accounting.JournalLineTrackingCategoriesItem.Raw | null | undefined)[] - | null; - currency?: serializers.accounting.JournalLineCurrency.Raw | null; + tracking_category?: JournalLineTrackingCategory.Raw | null; + tracking_categories?: (JournalLineTrackingCategoriesItem.Raw | null | undefined)[] | null; + currency?: JournalLineCurrency.Raw | null; company?: string | null; contact?: string | null; tax_rate?: string | null; description?: string | null; exchange_rate?: string | null; remote_was_deleted?: boolean | null; - remote_fields?: serializers.accounting.RemoteField.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/JournalLineAccount.ts b/src/serialization/resources/accounting/types/JournalLineAccount.ts index 8c1ac01ba..77be2112e 100644 --- a/src/serialization/resources/accounting/types/JournalLineAccount.ts +++ b/src/serialization/resources/accounting/types/JournalLineAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const JournalLineAccount: core.serialization.Schema< serializers.accounting.JournalLineAccount.Raw, Merge.accounting.JournalLineAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace JournalLineAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalLineCurrency.ts b/src/serialization/resources/accounting/types/JournalLineCurrency.ts index d40eb235d..f00d94112 100644 --- a/src/serialization/resources/accounting/types/JournalLineCurrency.ts +++ b/src/serialization/resources/accounting/types/JournalLineCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const JournalLineCurrency: core.serialization.Schema< serializers.accounting.JournalLineCurrency.Raw, Merge.accounting.JournalLineCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace JournalLineCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/JournalLineRequest.ts b/src/serialization/resources/accounting/types/JournalLineRequest.ts index 7332197e2..5ee763150 100644 --- a/src/serialization/resources/accounting/types/JournalLineRequest.ts +++ b/src/serialization/resources/accounting/types/JournalLineRequest.ts @@ -2,38 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JournalLineRequestAccount } from "./JournalLineRequestAccount"; +import { JournalLineRequestTrackingCategory } from "./JournalLineRequestTrackingCategory"; +import { JournalLineRequestTrackingCategoriesItem } from "./JournalLineRequestTrackingCategoriesItem"; +import { JournalLineRequestCurrency } from "./JournalLineRequestCurrency"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const JournalLineRequest: core.serialization.ObjectSchema< serializers.accounting.JournalLineRequest.Raw, Merge.accounting.JournalLineRequest > = core.serialization.object({ remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), - account: core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalLineRequestAccount) - .optional(), + account: JournalLineRequestAccount.optional(), netAmount: core.serialization.property("net_amount", core.serialization.number().optional()), - trackingCategory: core.serialization.property( - "tracking_category", - core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalLineRequestTrackingCategory) - .optional() - ), + trackingCategory: core.serialization.property("tracking_category", JournalLineRequestTrackingCategory.optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalLineRequestTrackingCategoriesItem) - .optional() - ) - .optional() + core.serialization.list(JournalLineRequestTrackingCategoriesItem.optional()).optional() ), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.JournalLineRequestCurrency) - .optional(), + currency: JournalLineRequestCurrency.optional(), company: core.serialization.string().optional(), contact: core.serialization.string().optional(), taxRate: core.serialization.property("tax_rate", core.serialization.string().optional()), @@ -47,24 +37,17 @@ export const JournalLineRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace JournalLineRequest { interface Raw { remote_id?: string | null; - account?: serializers.accounting.JournalLineRequestAccount.Raw | null; + account?: JournalLineRequestAccount.Raw | null; net_amount?: number | null; - tracking_category?: serializers.accounting.JournalLineRequestTrackingCategory.Raw | null; - tracking_categories?: - | (serializers.accounting.JournalLineRequestTrackingCategoriesItem.Raw | null | undefined)[] - | null; - currency?: serializers.accounting.JournalLineRequestCurrency.Raw | null; + tracking_category?: JournalLineRequestTrackingCategory.Raw | null; + tracking_categories?: (JournalLineRequestTrackingCategoriesItem.Raw | null | undefined)[] | null; + currency?: JournalLineRequestCurrency.Raw | null; company?: string | null; contact?: string | null; tax_rate?: string | null; @@ -72,6 +55,6 @@ export declare namespace JournalLineRequest { exchange_rate?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.accounting.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/JournalLineRequestAccount.ts b/src/serialization/resources/accounting/types/JournalLineRequestAccount.ts index d05e0b90e..6790434b2 100644 --- a/src/serialization/resources/accounting/types/JournalLineRequestAccount.ts +++ b/src/serialization/resources/accounting/types/JournalLineRequestAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const JournalLineRequestAccount: core.serialization.Schema< serializers.accounting.JournalLineRequestAccount.Raw, Merge.accounting.JournalLineRequestAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace JournalLineRequestAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalLineRequestCurrency.ts b/src/serialization/resources/accounting/types/JournalLineRequestCurrency.ts index 7ad0a7b4e..51b990f92 100644 --- a/src/serialization/resources/accounting/types/JournalLineRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/JournalLineRequestCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const JournalLineRequestCurrency: core.serialization.Schema< serializers.accounting.JournalLineRequestCurrency.Raw, Merge.accounting.JournalLineRequestCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace JournalLineRequestCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategoriesItem.ts index 8219224ff..401e5d8bb 100644 --- a/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const JournalLineRequestTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.JournalLineRequestTrackingCategoriesItem.Raw, Merge.accounting.JournalLineRequestTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace JournalLineRequestTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategory.ts b/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategory.ts index 9ab8faf3c..258011ec0 100644 --- a/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategory.ts +++ b/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategory.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const JournalLineRequestTrackingCategory: core.serialization.Schema< serializers.accounting.JournalLineRequestTrackingCategory.Raw, Merge.accounting.JournalLineRequestTrackingCategory -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace JournalLineRequestTrackingCategory { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalLineTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/JournalLineTrackingCategoriesItem.ts index d5631959e..8c3adfde9 100644 --- a/src/serialization/resources/accounting/types/JournalLineTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/JournalLineTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const JournalLineTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.JournalLineTrackingCategoriesItem.Raw, Merge.accounting.JournalLineTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace JournalLineTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalLineTrackingCategory.ts b/src/serialization/resources/accounting/types/JournalLineTrackingCategory.ts index 66feb6a3c..919b08282 100644 --- a/src/serialization/resources/accounting/types/JournalLineTrackingCategory.ts +++ b/src/serialization/resources/accounting/types/JournalLineTrackingCategory.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const JournalLineTrackingCategory: core.serialization.Schema< serializers.accounting.JournalLineTrackingCategory.Raw, Merge.accounting.JournalLineTrackingCategory -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace JournalLineTrackingCategory { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/LanguageEnum.ts b/src/serialization/resources/accounting/types/LanguageEnum.ts index 16fc4cfef..8cb3142e7 100644 --- a/src/serialization/resources/accounting/types/LanguageEnum.ts +++ b/src/serialization/resources/accounting/types/LanguageEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LanguageEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/LinkToken.ts b/src/serialization/resources/accounting/types/LinkToken.ts index 4941f32f2..146b128af 100644 --- a/src/serialization/resources/accounting/types/LinkToken.ts +++ b/src/serialization/resources/accounting/types/LinkToken.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LinkToken: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/LinkedAccountStatus.ts b/src/serialization/resources/accounting/types/LinkedAccountStatus.ts index c99ec47e9..3f4f6409c 100644 --- a/src/serialization/resources/accounting/types/LinkedAccountStatus.ts +++ b/src/serialization/resources/accounting/types/LinkedAccountStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LinkedAccountStatus: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/MetaResponse.ts b/src/serialization/resources/accounting/types/MetaResponse.ts index 952bcdd92..c3b922436 100644 --- a/src/serialization/resources/accounting/types/MetaResponse.ts +++ b/src/serialization/resources/accounting/types/MetaResponse.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { LinkedAccountStatus } from "./LinkedAccountStatus"; export const MetaResponse: core.serialization.ObjectSchema< serializers.accounting.MetaResponse.Raw, @@ -18,9 +19,7 @@ export const MetaResponse: core.serialization.ObjectSchema< "remote_field_classes", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - status: core.serialization - .lazyObject(async () => (await import("../../..")).accounting.LinkedAccountStatus) - .optional(), + status: LinkedAccountStatus.optional(), hasConditionalParams: core.serialization.property("has_conditional_params", core.serialization.boolean()), hasRequiredLinkedAccountParams: core.serialization.property( "has_required_linked_account_params", @@ -32,7 +31,7 @@ export declare namespace MetaResponse { interface Raw { request_schema: Record; remote_field_classes?: Record | null; - status?: serializers.accounting.LinkedAccountStatus.Raw | null; + status?: LinkedAccountStatus.Raw | null; has_conditional_params: boolean; has_required_linked_account_params: boolean; } diff --git a/src/serialization/resources/accounting/types/MethodEnum.ts b/src/serialization/resources/accounting/types/MethodEnum.ts index bf2ff53fd..7d3e14017 100644 --- a/src/serialization/resources/accounting/types/MethodEnum.ts +++ b/src/serialization/resources/accounting/types/MethodEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const MethodEnum: core.serialization.Schema = diff --git a/src/serialization/resources/accounting/types/ModelOperation.ts b/src/serialization/resources/accounting/types/ModelOperation.ts index 98fd02ac4..c6d92822a 100644 --- a/src/serialization/resources/accounting/types/ModelOperation.ts +++ b/src/serialization/resources/accounting/types/ModelOperation.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelOperation: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/ModelPermissionDeserializer.ts b/src/serialization/resources/accounting/types/ModelPermissionDeserializer.ts index 87c3ea85d..6328a165c 100644 --- a/src/serialization/resources/accounting/types/ModelPermissionDeserializer.ts +++ b/src/serialization/resources/accounting/types/ModelPermissionDeserializer.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelPermissionDeserializer: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/ModelPermissionDeserializerRequest.ts b/src/serialization/resources/accounting/types/ModelPermissionDeserializerRequest.ts index 089b13f80..b09970563 100644 --- a/src/serialization/resources/accounting/types/ModelPermissionDeserializerRequest.ts +++ b/src/serialization/resources/accounting/types/ModelPermissionDeserializerRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelPermissionDeserializerRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/MultipartFormFieldRequest.ts b/src/serialization/resources/accounting/types/MultipartFormFieldRequest.ts index d709f5f16..a27966e8d 100644 --- a/src/serialization/resources/accounting/types/MultipartFormFieldRequest.ts +++ b/src/serialization/resources/accounting/types/MultipartFormFieldRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { MultipartFormFieldRequestEncoding } from "./MultipartFormFieldRequestEncoding"; export const MultipartFormFieldRequest: core.serialization.ObjectSchema< serializers.accounting.MultipartFormFieldRequest.Raw, @@ -12,9 +13,7 @@ export const MultipartFormFieldRequest: core.serialization.ObjectSchema< > = core.serialization.object({ name: core.serialization.string(), data: core.serialization.string(), - encoding: core.serialization - .lazy(async () => (await import("../../..")).accounting.MultipartFormFieldRequestEncoding) - .optional(), + encoding: MultipartFormFieldRequestEncoding.optional(), fileName: core.serialization.property("file_name", core.serialization.string().optional()), contentType: core.serialization.property("content_type", core.serialization.string().optional()), }); @@ -23,7 +22,7 @@ export declare namespace MultipartFormFieldRequest { interface Raw { name: string; data: string; - encoding?: serializers.accounting.MultipartFormFieldRequestEncoding.Raw | null; + encoding?: MultipartFormFieldRequestEncoding.Raw | null; file_name?: string | null; content_type?: string | null; } diff --git a/src/serialization/resources/accounting/types/MultipartFormFieldRequestEncoding.ts b/src/serialization/resources/accounting/types/MultipartFormFieldRequestEncoding.ts index 38246fe9b..08a3f9e88 100644 --- a/src/serialization/resources/accounting/types/MultipartFormFieldRequestEncoding.ts +++ b/src/serialization/resources/accounting/types/MultipartFormFieldRequestEncoding.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EncodingEnum } from "./EncodingEnum"; export const MultipartFormFieldRequestEncoding: core.serialization.Schema< serializers.accounting.MultipartFormFieldRequestEncoding.Raw, Merge.accounting.MultipartFormFieldRequestEncoding -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.EncodingEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EncodingEnum, core.serialization.string()]); export declare namespace MultipartFormFieldRequestEncoding { - type Raw = serializers.accounting.EncodingEnum.Raw | string; + type Raw = EncodingEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PaginatedAccountDetailsAndActionsList.ts b/src/serialization/resources/accounting/types/PaginatedAccountDetailsAndActionsList.ts index 7f44f8670..1517bf06b 100644 --- a/src/serialization/resources/accounting/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/serialization/resources/accounting/types/PaginatedAccountDetailsAndActionsList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountDetailsAndActions } from "./AccountDetailsAndActions"; export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSchema< serializers.accounting.PaginatedAccountDetailsAndActionsList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSch > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountDetailsAndActions)) - .optional(), + results: core.serialization.list(AccountDetailsAndActions).optional(), }); export declare namespace PaginatedAccountDetailsAndActionsList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.AccountDetailsAndActions.Raw[] | null; + results?: AccountDetailsAndActions.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedAccountList.ts b/src/serialization/resources/accounting/types/PaginatedAccountList.ts index 8e11b615e..bc9056831 100644 --- a/src/serialization/resources/accounting/types/PaginatedAccountList.ts +++ b/src/serialization/resources/accounting/types/PaginatedAccountList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const PaginatedAccountList: core.serialization.ObjectSchema< serializers.accounting.PaginatedAccountList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAccountList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account)) - .optional(), + results: core.serialization.list(Account).optional(), }); export declare namespace PaginatedAccountList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.Account.Raw[] | null; + results?: Account.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedAccountingAttachmentList.ts b/src/serialization/resources/accounting/types/PaginatedAccountingAttachmentList.ts index 9b42e778b..425b6af53 100644 --- a/src/serialization/resources/accounting/types/PaginatedAccountingAttachmentList.ts +++ b/src/serialization/resources/accounting/types/PaginatedAccountingAttachmentList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingAttachment } from "./AccountingAttachment"; export const PaginatedAccountingAttachmentList: core.serialization.ObjectSchema< serializers.accounting.PaginatedAccountingAttachmentList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAccountingAttachmentList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingAttachment)) - .optional(), + results: core.serialization.list(AccountingAttachment).optional(), }); export declare namespace PaginatedAccountingAttachmentList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.AccountingAttachment.Raw[] | null; + results?: AccountingAttachment.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedAccountingPeriodList.ts b/src/serialization/resources/accounting/types/PaginatedAccountingPeriodList.ts index 9d25c2513..8ecaf5cbc 100644 --- a/src/serialization/resources/accounting/types/PaginatedAccountingPeriodList.ts +++ b/src/serialization/resources/accounting/types/PaginatedAccountingPeriodList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingPeriod } from "./AccountingPeriod"; export const PaginatedAccountingPeriodList: core.serialization.ObjectSchema< serializers.accounting.PaginatedAccountingPeriodList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAccountingPeriodList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingPeriod)) - .optional(), + results: core.serialization.list(AccountingPeriod).optional(), }); export declare namespace PaginatedAccountingPeriodList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.AccountingPeriod.Raw[] | null; + results?: AccountingPeriod.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedAuditLogEventList.ts b/src/serialization/resources/accounting/types/PaginatedAuditLogEventList.ts index 3b57c0979..d7ea7e810 100644 --- a/src/serialization/resources/accounting/types/PaginatedAuditLogEventList.ts +++ b/src/serialization/resources/accounting/types/PaginatedAuditLogEventList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AuditLogEvent } from "./AuditLogEvent"; export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< serializers.accounting.PaginatedAuditLogEventList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.AuditLogEvent)) - .optional(), + results: core.serialization.list(AuditLogEvent).optional(), }); export declare namespace PaginatedAuditLogEventList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.AuditLogEvent.Raw[] | null; + results?: AuditLogEvent.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedBalanceSheetList.ts b/src/serialization/resources/accounting/types/PaginatedBalanceSheetList.ts index 043e3861f..dbd78c9b7 100644 --- a/src/serialization/resources/accounting/types/PaginatedBalanceSheetList.ts +++ b/src/serialization/resources/accounting/types/PaginatedBalanceSheetList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { BalanceSheet } from "./BalanceSheet"; export const PaginatedBalanceSheetList: core.serialization.ObjectSchema< serializers.accounting.PaginatedBalanceSheetList.Raw, @@ -12,15 +13,13 @@ export const PaginatedBalanceSheetList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.BalanceSheet)) - .optional(), + results: core.serialization.list(BalanceSheet).optional(), }); export declare namespace PaginatedBalanceSheetList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.BalanceSheet.Raw[] | null; + results?: BalanceSheet.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedCashFlowStatementList.ts b/src/serialization/resources/accounting/types/PaginatedCashFlowStatementList.ts index 5f6319888..a10f77249 100644 --- a/src/serialization/resources/accounting/types/PaginatedCashFlowStatementList.ts +++ b/src/serialization/resources/accounting/types/PaginatedCashFlowStatementList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CashFlowStatement } from "./CashFlowStatement"; export const PaginatedCashFlowStatementList: core.serialization.ObjectSchema< serializers.accounting.PaginatedCashFlowStatementList.Raw, @@ -12,15 +13,13 @@ export const PaginatedCashFlowStatementList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.CashFlowStatement)) - .optional(), + results: core.serialization.list(CashFlowStatement).optional(), }); export declare namespace PaginatedCashFlowStatementList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.CashFlowStatement.Raw[] | null; + results?: CashFlowStatement.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedCompanyInfoList.ts b/src/serialization/resources/accounting/types/PaginatedCompanyInfoList.ts index f35e7d54f..547046333 100644 --- a/src/serialization/resources/accounting/types/PaginatedCompanyInfoList.ts +++ b/src/serialization/resources/accounting/types/PaginatedCompanyInfoList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const PaginatedCompanyInfoList: core.serialization.ObjectSchema< serializers.accounting.PaginatedCompanyInfoList.Raw, @@ -12,15 +13,13 @@ export const PaginatedCompanyInfoList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo)) - .optional(), + results: core.serialization.list(CompanyInfo).optional(), }); export declare namespace PaginatedCompanyInfoList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.CompanyInfo.Raw[] | null; + results?: CompanyInfo.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedContactList.ts b/src/serialization/resources/accounting/types/PaginatedContactList.ts index 09a686ed8..cbac0707f 100644 --- a/src/serialization/resources/accounting/types/PaginatedContactList.ts +++ b/src/serialization/resources/accounting/types/PaginatedContactList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const PaginatedContactList: core.serialization.ObjectSchema< serializers.accounting.PaginatedContactList.Raw, @@ -12,15 +13,13 @@ export const PaginatedContactList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact)) - .optional(), + results: core.serialization.list(Contact).optional(), }); export declare namespace PaginatedContactList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.Contact.Raw[] | null; + results?: Contact.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedCreditNoteList.ts b/src/serialization/resources/accounting/types/PaginatedCreditNoteList.ts index 32ac69a57..a2e62d630 100644 --- a/src/serialization/resources/accounting/types/PaginatedCreditNoteList.ts +++ b/src/serialization/resources/accounting/types/PaginatedCreditNoteList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CreditNote } from "./CreditNote"; export const PaginatedCreditNoteList: core.serialization.ObjectSchema< serializers.accounting.PaginatedCreditNoteList.Raw, @@ -12,15 +13,13 @@ export const PaginatedCreditNoteList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.CreditNote)) - .optional(), + results: core.serialization.list(CreditNote).optional(), }); export declare namespace PaginatedCreditNoteList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.CreditNote.Raw[] | null; + results?: CreditNote.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedExpenseList.ts b/src/serialization/resources/accounting/types/PaginatedExpenseList.ts index afb75fb33..c09459df1 100644 --- a/src/serialization/resources/accounting/types/PaginatedExpenseList.ts +++ b/src/serialization/resources/accounting/types/PaginatedExpenseList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Expense } from "./Expense"; export const PaginatedExpenseList: core.serialization.ObjectSchema< serializers.accounting.PaginatedExpenseList.Raw, @@ -12,15 +13,13 @@ export const PaginatedExpenseList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.Expense)) - .optional(), + results: core.serialization.list(Expense).optional(), }); export declare namespace PaginatedExpenseList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.Expense.Raw[] | null; + results?: Expense.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedIncomeStatementList.ts b/src/serialization/resources/accounting/types/PaginatedIncomeStatementList.ts index f28614a03..4aee303f1 100644 --- a/src/serialization/resources/accounting/types/PaginatedIncomeStatementList.ts +++ b/src/serialization/resources/accounting/types/PaginatedIncomeStatementList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IncomeStatement } from "./IncomeStatement"; export const PaginatedIncomeStatementList: core.serialization.ObjectSchema< serializers.accounting.PaginatedIncomeStatementList.Raw, @@ -12,15 +13,13 @@ export const PaginatedIncomeStatementList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.IncomeStatement)) - .optional(), + results: core.serialization.list(IncomeStatement).optional(), }); export declare namespace PaginatedIncomeStatementList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.IncomeStatement.Raw[] | null; + results?: IncomeStatement.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedInvoiceList.ts b/src/serialization/resources/accounting/types/PaginatedInvoiceList.ts index 870284250..fe6a85734 100644 --- a/src/serialization/resources/accounting/types/PaginatedInvoiceList.ts +++ b/src/serialization/resources/accounting/types/PaginatedInvoiceList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Invoice } from "./Invoice"; export const PaginatedInvoiceList: core.serialization.ObjectSchema< serializers.accounting.PaginatedInvoiceList.Raw, @@ -12,15 +13,13 @@ export const PaginatedInvoiceList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.Invoice)) - .optional(), + results: core.serialization.list(Invoice).optional(), }); export declare namespace PaginatedInvoiceList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.Invoice.Raw[] | null; + results?: Invoice.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedIssueList.ts b/src/serialization/resources/accounting/types/PaginatedIssueList.ts index 8d527c09d..0ec28c5c1 100644 --- a/src/serialization/resources/accounting/types/PaginatedIssueList.ts +++ b/src/serialization/resources/accounting/types/PaginatedIssueList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Issue } from "./Issue"; export const PaginatedIssueList: core.serialization.ObjectSchema< serializers.accounting.PaginatedIssueList.Raw, @@ -12,15 +13,13 @@ export const PaginatedIssueList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.Issue)) - .optional(), + results: core.serialization.list(Issue).optional(), }); export declare namespace PaginatedIssueList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.Issue.Raw[] | null; + results?: Issue.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedItemList.ts b/src/serialization/resources/accounting/types/PaginatedItemList.ts index 48f0de8da..297691f6e 100644 --- a/src/serialization/resources/accounting/types/PaginatedItemList.ts +++ b/src/serialization/resources/accounting/types/PaginatedItemList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Item } from "./Item"; export const PaginatedItemList: core.serialization.ObjectSchema< serializers.accounting.PaginatedItemList.Raw, @@ -12,15 +13,13 @@ export const PaginatedItemList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.Item)) - .optional(), + results: core.serialization.list(Item).optional(), }); export declare namespace PaginatedItemList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.Item.Raw[] | null; + results?: Item.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedJournalEntryList.ts b/src/serialization/resources/accounting/types/PaginatedJournalEntryList.ts index 31873b62d..fcfd22095 100644 --- a/src/serialization/resources/accounting/types/PaginatedJournalEntryList.ts +++ b/src/serialization/resources/accounting/types/PaginatedJournalEntryList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JournalEntry } from "./JournalEntry"; export const PaginatedJournalEntryList: core.serialization.ObjectSchema< serializers.accounting.PaginatedJournalEntryList.Raw, @@ -12,15 +13,13 @@ export const PaginatedJournalEntryList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.JournalEntry)) - .optional(), + results: core.serialization.list(JournalEntry).optional(), }); export declare namespace PaginatedJournalEntryList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.JournalEntry.Raw[] | null; + results?: JournalEntry.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedPaymentList.ts b/src/serialization/resources/accounting/types/PaginatedPaymentList.ts index c1b46b205..a5fe2fa94 100644 --- a/src/serialization/resources/accounting/types/PaginatedPaymentList.ts +++ b/src/serialization/resources/accounting/types/PaginatedPaymentList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Payment } from "./Payment"; export const PaginatedPaymentList: core.serialization.ObjectSchema< serializers.accounting.PaginatedPaymentList.Raw, @@ -12,15 +13,13 @@ export const PaginatedPaymentList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.Payment)) - .optional(), + results: core.serialization.list(Payment).optional(), }); export declare namespace PaginatedPaymentList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.Payment.Raw[] | null; + results?: Payment.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedPurchaseOrderList.ts b/src/serialization/resources/accounting/types/PaginatedPurchaseOrderList.ts index b579d4bc1..458a00443 100644 --- a/src/serialization/resources/accounting/types/PaginatedPurchaseOrderList.ts +++ b/src/serialization/resources/accounting/types/PaginatedPurchaseOrderList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PurchaseOrder } from "./PurchaseOrder"; export const PaginatedPurchaseOrderList: core.serialization.ObjectSchema< serializers.accounting.PaginatedPurchaseOrderList.Raw, @@ -12,15 +13,13 @@ export const PaginatedPurchaseOrderList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.PurchaseOrder)) - .optional(), + results: core.serialization.list(PurchaseOrder).optional(), }); export declare namespace PaginatedPurchaseOrderList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.PurchaseOrder.Raw[] | null; + results?: PurchaseOrder.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedRemoteFieldClassList.ts b/src/serialization/resources/accounting/types/PaginatedRemoteFieldClassList.ts index ba169f0b2..7f3a5aee7 100644 --- a/src/serialization/resources/accounting/types/PaginatedRemoteFieldClassList.ts +++ b/src/serialization/resources/accounting/types/PaginatedRemoteFieldClassList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldClass } from "./RemoteFieldClass"; export const PaginatedRemoteFieldClassList: core.serialization.ObjectSchema< serializers.accounting.PaginatedRemoteFieldClassList.Raw, @@ -12,15 +13,13 @@ export const PaginatedRemoteFieldClassList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldClass)) - .optional(), + results: core.serialization.list(RemoteFieldClass).optional(), }); export declare namespace PaginatedRemoteFieldClassList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.RemoteFieldClass.Raw[] | null; + results?: RemoteFieldClass.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedSyncStatusList.ts b/src/serialization/resources/accounting/types/PaginatedSyncStatusList.ts index b09133c29..5245e5051 100644 --- a/src/serialization/resources/accounting/types/PaginatedSyncStatusList.ts +++ b/src/serialization/resources/accounting/types/PaginatedSyncStatusList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { SyncStatus } from "./SyncStatus"; export const PaginatedSyncStatusList: core.serialization.ObjectSchema< serializers.accounting.PaginatedSyncStatusList.Raw, @@ -12,15 +13,13 @@ export const PaginatedSyncStatusList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.SyncStatus)) - .optional(), + results: core.serialization.list(SyncStatus).optional(), }); export declare namespace PaginatedSyncStatusList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.SyncStatus.Raw[] | null; + results?: SyncStatus.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedTaxRateList.ts b/src/serialization/resources/accounting/types/PaginatedTaxRateList.ts index 266009da7..6159dd174 100644 --- a/src/serialization/resources/accounting/types/PaginatedTaxRateList.ts +++ b/src/serialization/resources/accounting/types/PaginatedTaxRateList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TaxRate } from "./TaxRate"; export const PaginatedTaxRateList: core.serialization.ObjectSchema< serializers.accounting.PaginatedTaxRateList.Raw, @@ -12,15 +13,13 @@ export const PaginatedTaxRateList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.TaxRate)) - .optional(), + results: core.serialization.list(TaxRate).optional(), }); export declare namespace PaginatedTaxRateList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.TaxRate.Raw[] | null; + results?: TaxRate.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedTrackingCategoryList.ts b/src/serialization/resources/accounting/types/PaginatedTrackingCategoryList.ts index 23a8c29fd..838982465 100644 --- a/src/serialization/resources/accounting/types/PaginatedTrackingCategoryList.ts +++ b/src/serialization/resources/accounting/types/PaginatedTrackingCategoryList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const PaginatedTrackingCategoryList: core.serialization.ObjectSchema< serializers.accounting.PaginatedTrackingCategoryList.Raw, @@ -12,15 +13,13 @@ export const PaginatedTrackingCategoryList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory)) - .optional(), + results: core.serialization.list(TrackingCategory).optional(), }); export declare namespace PaginatedTrackingCategoryList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.TrackingCategory.Raw[] | null; + results?: TrackingCategory.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedTransactionList.ts b/src/serialization/resources/accounting/types/PaginatedTransactionList.ts index c30d7c8f5..ada2f362e 100644 --- a/src/serialization/resources/accounting/types/PaginatedTransactionList.ts +++ b/src/serialization/resources/accounting/types/PaginatedTransactionList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Transaction } from "./Transaction"; export const PaginatedTransactionList: core.serialization.ObjectSchema< serializers.accounting.PaginatedTransactionList.Raw, @@ -12,15 +13,13 @@ export const PaginatedTransactionList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.Transaction)) - .optional(), + results: core.serialization.list(Transaction).optional(), }); export declare namespace PaginatedTransactionList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.Transaction.Raw[] | null; + results?: Transaction.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaginatedVendorCreditList.ts b/src/serialization/resources/accounting/types/PaginatedVendorCreditList.ts index 0ff4b3fb9..97700dbe7 100644 --- a/src/serialization/resources/accounting/types/PaginatedVendorCreditList.ts +++ b/src/serialization/resources/accounting/types/PaginatedVendorCreditList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { VendorCredit } from "./VendorCredit"; export const PaginatedVendorCreditList: core.serialization.ObjectSchema< serializers.accounting.PaginatedVendorCreditList.Raw, @@ -12,15 +13,13 @@ export const PaginatedVendorCreditList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.VendorCredit)) - .optional(), + results: core.serialization.list(VendorCredit).optional(), }); export declare namespace PaginatedVendorCreditList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.accounting.VendorCredit.Raw[] | null; + results?: VendorCredit.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequest.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequest.ts index 649fa1c53..61b16405a 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequest.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequest.ts @@ -2,57 +2,42 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PatchedPaymentRequestContact } from "./PatchedPaymentRequestContact"; +import { PatchedPaymentRequestAccount } from "./PatchedPaymentRequestAccount"; +import { PatchedPaymentRequestCurrency } from "./PatchedPaymentRequestCurrency"; +import { PatchedPaymentRequestCompany } from "./PatchedPaymentRequestCompany"; +import { PatchedPaymentRequestType } from "./PatchedPaymentRequestType"; +import { PatchedPaymentRequestTrackingCategoriesItem } from "./PatchedPaymentRequestTrackingCategoriesItem"; +import { PatchedPaymentRequestAccountingPeriod } from "./PatchedPaymentRequestAccountingPeriod"; +import { PatchedPaymentRequestAppliedToLinesItem } from "./PatchedPaymentRequestAppliedToLinesItem"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const PatchedPaymentRequest: core.serialization.ObjectSchema< serializers.accounting.PatchedPaymentRequest.Raw, Merge.accounting.PatchedPaymentRequest > = core.serialization.object({ transactionDate: core.serialization.property("transaction_date", core.serialization.date().optional()), - contact: core.serialization - .lazy(async () => (await import("../../..")).accounting.PatchedPaymentRequestContact) - .optional(), - account: core.serialization - .lazy(async () => (await import("../../..")).accounting.PatchedPaymentRequestAccount) - .optional(), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.PatchedPaymentRequestCurrency) - .optional(), + contact: PatchedPaymentRequestContact.optional(), + account: PatchedPaymentRequestAccount.optional(), + currency: PatchedPaymentRequestCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), - company: core.serialization - .lazy(async () => (await import("../../..")).accounting.PatchedPaymentRequestCompany) - .optional(), + company: PatchedPaymentRequestCompany.optional(), totalAmount: core.serialization.property("total_amount", core.serialization.number().optional()), - type: core.serialization - .lazy(async () => (await import("../../..")).accounting.PatchedPaymentRequestType) - .optional(), + type: PatchedPaymentRequestType.optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.PatchedPaymentRequestTrackingCategoriesItem) - .optional() - ) - .optional() + core.serialization.list(PatchedPaymentRequestTrackingCategoriesItem.optional()).optional() ), accountingPeriod: core.serialization.property( "accounting_period", - core.serialization - .lazy(async () => (await import("../../..")).accounting.PatchedPaymentRequestAccountingPeriod) - .optional() + PatchedPaymentRequestAccountingPeriod.optional() ), appliedToLines: core.serialization.property( "applied_to_lines", - core.serialization - .list( - core.serialization.lazy( - async () => (await import("../../..")).accounting.PatchedPaymentRequestAppliedToLinesItem - ) - ) - .optional() + core.serialization.list(PatchedPaymentRequestAppliedToLinesItem).optional() ), integrationParams: core.serialization.property( "integration_params", @@ -62,31 +47,24 @@ export const PatchedPaymentRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PatchedPaymentRequest { interface Raw { transaction_date?: string | null; - contact?: serializers.accounting.PatchedPaymentRequestContact.Raw | null; - account?: serializers.accounting.PatchedPaymentRequestAccount.Raw | null; - currency?: serializers.accounting.PatchedPaymentRequestCurrency.Raw | null; + contact?: PatchedPaymentRequestContact.Raw | null; + account?: PatchedPaymentRequestAccount.Raw | null; + currency?: PatchedPaymentRequestCurrency.Raw | null; exchange_rate?: string | null; - company?: serializers.accounting.PatchedPaymentRequestCompany.Raw | null; + company?: PatchedPaymentRequestCompany.Raw | null; total_amount?: number | null; - type?: serializers.accounting.PatchedPaymentRequestType.Raw | null; - tracking_categories?: - | (serializers.accounting.PatchedPaymentRequestTrackingCategoriesItem.Raw | null | undefined)[] - | null; - accounting_period?: serializers.accounting.PatchedPaymentRequestAccountingPeriod.Raw | null; - applied_to_lines?: serializers.accounting.PatchedPaymentRequestAppliedToLinesItem.Raw[] | null; + type?: PatchedPaymentRequestType.Raw | null; + tracking_categories?: (PatchedPaymentRequestTrackingCategoriesItem.Raw | null | undefined)[] | null; + accounting_period?: PatchedPaymentRequestAccountingPeriod.Raw | null; + applied_to_lines?: PatchedPaymentRequestAppliedToLinesItem.Raw[] | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.accounting.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestAccount.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestAccount.ts index decc8a3dd..665990fe2 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestAccount.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const PatchedPaymentRequestAccount: core.serialization.Schema< serializers.accounting.PatchedPaymentRequestAccount.Raw, Merge.accounting.PatchedPaymentRequestAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace PatchedPaymentRequestAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestAccountingPeriod.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestAccountingPeriod.ts index f8d30976a..0e402e809 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestAccountingPeriod.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingPeriod } from "./AccountingPeriod"; export const PatchedPaymentRequestAccountingPeriod: core.serialization.Schema< serializers.accounting.PatchedPaymentRequestAccountingPeriod.Raw, Merge.accounting.PatchedPaymentRequestAccountingPeriod -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingPeriod), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace PatchedPaymentRequestAccountingPeriod { - type Raw = string | serializers.accounting.AccountingPeriod.Raw; + type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestAppliedToLinesItem.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestAppliedToLinesItem.ts index 4ee69ecfa..3745baa5b 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestAppliedToLinesItem.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestAppliedToLinesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PaymentLineItem } from "./PaymentLineItem"; export const PatchedPaymentRequestAppliedToLinesItem: core.serialization.Schema< serializers.accounting.PatchedPaymentRequestAppliedToLinesItem.Raw, Merge.accounting.PatchedPaymentRequestAppliedToLinesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.PaymentLineItem), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentLineItem]); export declare namespace PatchedPaymentRequestAppliedToLinesItem { - type Raw = string | serializers.accounting.PaymentLineItem.Raw; + type Raw = string | PaymentLineItem.Raw; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestCompany.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestCompany.ts index f9f71de8d..bf9d080f4 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestCompany.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const PatchedPaymentRequestCompany: core.serialization.Schema< serializers.accounting.PatchedPaymentRequestCompany.Raw, Merge.accounting.PatchedPaymentRequestCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace PatchedPaymentRequestCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestContact.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestContact.ts index d1a28141f..58e8c875a 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestContact.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const PatchedPaymentRequestContact: core.serialization.Schema< serializers.accounting.PatchedPaymentRequestContact.Raw, Merge.accounting.PatchedPaymentRequestContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace PatchedPaymentRequestContact { - type Raw = string | serializers.accounting.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestCurrency.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestCurrency.ts index 4dde45c9c..3a3d5ca75 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const PatchedPaymentRequestCurrency: core.serialization.Schema< serializers.accounting.PatchedPaymentRequestCurrency.Raw, Merge.accounting.PatchedPaymentRequestCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace PatchedPaymentRequestCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestTrackingCategoriesItem.ts index b580830c9..d3daae864 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const PatchedPaymentRequestTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.PatchedPaymentRequestTrackingCategoriesItem.Raw, Merge.accounting.PatchedPaymentRequestTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace PatchedPaymentRequestTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestType.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestType.ts index bc7b90bf9..bcd75fec7 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestType.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PaymentTypeEnum } from "./PaymentTypeEnum"; export const PatchedPaymentRequestType: core.serialization.Schema< serializers.accounting.PatchedPaymentRequestType.Raw, Merge.accounting.PatchedPaymentRequestType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.PaymentTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PaymentTypeEnum, core.serialization.string()]); export declare namespace PatchedPaymentRequestType { - type Raw = serializers.accounting.PaymentTypeEnum.Raw | string; + type Raw = PaymentTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/Payment.ts b/src/serialization/resources/accounting/types/Payment.ts index 095cbff4f..f5750ef8c 100644 --- a/src/serialization/resources/accounting/types/Payment.ts +++ b/src/serialization/resources/accounting/types/Payment.ts @@ -2,9 +2,19 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PaymentContact } from "./PaymentContact"; +import { PaymentAccount } from "./PaymentAccount"; +import { PaymentCurrency } from "./PaymentCurrency"; +import { PaymentCompany } from "./PaymentCompany"; +import { PaymentType } from "./PaymentType"; +import { PaymentTrackingCategoriesItem } from "./PaymentTrackingCategoriesItem"; +import { PaymentAccountingPeriod } from "./PaymentAccountingPeriod"; +import { PaymentAppliedToLinesItem } from "./PaymentAppliedToLinesItem"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const Payment: core.serialization.ObjectSchema = core.serialization.object({ @@ -13,36 +23,21 @@ export const Payment: core.serialization.ObjectSchema (await import("../../..")).accounting.PaymentContact).optional(), - account: core.serialization.lazy(async () => (await import("../../..")).accounting.PaymentAccount).optional(), - currency: core.serialization.lazy(async () => (await import("../../..")).accounting.PaymentCurrency).optional(), + contact: PaymentContact.optional(), + account: PaymentAccount.optional(), + currency: PaymentCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), - company: core.serialization.lazy(async () => (await import("../../..")).accounting.PaymentCompany).optional(), + company: PaymentCompany.optional(), totalAmount: core.serialization.property("total_amount", core.serialization.number().optional()), - type: core.serialization.lazy(async () => (await import("../../..")).accounting.PaymentType).optional(), + type: PaymentType.optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.PaymentTrackingCategoriesItem) - .optional() - ) - .optional() - ), - accountingPeriod: core.serialization.property( - "accounting_period", - core.serialization - .lazy(async () => (await import("../../..")).accounting.PaymentAccountingPeriod) - .optional() + core.serialization.list(PaymentTrackingCategoriesItem.optional()).optional() ), + accountingPeriod: core.serialization.property("accounting_period", PaymentAccountingPeriod.optional()), appliedToLines: core.serialization.property( "applied_to_lines", - core.serialization - .list( - core.serialization.lazy(async () => (await import("../../..")).accounting.PaymentAppliedToLinesItem) - ) - .optional() + core.serialization.list(PaymentAppliedToLinesItem).optional() ), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), @@ -50,18 +45,8 @@ export const Payment: core.serialization.ObjectSchema (await import("../../..")).accounting.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace Payment { @@ -71,20 +56,20 @@ export declare namespace Payment { created_at?: string | null; modified_at?: string | null; transaction_date?: string | null; - contact?: serializers.accounting.PaymentContact.Raw | null; - account?: serializers.accounting.PaymentAccount.Raw | null; - currency?: serializers.accounting.PaymentCurrency.Raw | null; + contact?: PaymentContact.Raw | null; + account?: PaymentAccount.Raw | null; + currency?: PaymentCurrency.Raw | null; exchange_rate?: string | null; - company?: serializers.accounting.PaymentCompany.Raw | null; + company?: PaymentCompany.Raw | null; total_amount?: number | null; - type?: serializers.accounting.PaymentType.Raw | null; - tracking_categories?: (serializers.accounting.PaymentTrackingCategoriesItem.Raw | null | undefined)[] | null; - accounting_period?: serializers.accounting.PaymentAccountingPeriod.Raw | null; - applied_to_lines?: serializers.accounting.PaymentAppliedToLinesItem.Raw[] | null; + type?: PaymentType.Raw | null; + tracking_categories?: (PaymentTrackingCategoriesItem.Raw | null | undefined)[] | null; + accounting_period?: PaymentAccountingPeriod.Raw | null; + applied_to_lines?: PaymentAppliedToLinesItem.Raw[] | null; remote_updated_at?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; - remote_fields?: serializers.accounting.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaymentAccount.ts b/src/serialization/resources/accounting/types/PaymentAccount.ts index b6e3b02a8..68bdfaee2 100644 --- a/src/serialization/resources/accounting/types/PaymentAccount.ts +++ b/src/serialization/resources/accounting/types/PaymentAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const PaymentAccount: core.serialization.Schema< serializers.accounting.PaymentAccount.Raw, Merge.accounting.PaymentAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace PaymentAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentAccountingPeriod.ts b/src/serialization/resources/accounting/types/PaymentAccountingPeriod.ts index 694a3ed4c..38d265d73 100644 --- a/src/serialization/resources/accounting/types/PaymentAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/PaymentAccountingPeriod.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingPeriod } from "./AccountingPeriod"; export const PaymentAccountingPeriod: core.serialization.Schema< serializers.accounting.PaymentAccountingPeriod.Raw, Merge.accounting.PaymentAccountingPeriod -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingPeriod), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace PaymentAccountingPeriod { - type Raw = string | serializers.accounting.AccountingPeriod.Raw; + type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentAppliedToLinesItem.ts b/src/serialization/resources/accounting/types/PaymentAppliedToLinesItem.ts index 749449eb2..6ed24544a 100644 --- a/src/serialization/resources/accounting/types/PaymentAppliedToLinesItem.ts +++ b/src/serialization/resources/accounting/types/PaymentAppliedToLinesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PaymentLineItem } from "./PaymentLineItem"; export const PaymentAppliedToLinesItem: core.serialization.Schema< serializers.accounting.PaymentAppliedToLinesItem.Raw, Merge.accounting.PaymentAppliedToLinesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.PaymentLineItem), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentLineItem]); export declare namespace PaymentAppliedToLinesItem { - type Raw = string | serializers.accounting.PaymentLineItem.Raw; + type Raw = string | PaymentLineItem.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentCompany.ts b/src/serialization/resources/accounting/types/PaymentCompany.ts index 5144194d9..b27c16107 100644 --- a/src/serialization/resources/accounting/types/PaymentCompany.ts +++ b/src/serialization/resources/accounting/types/PaymentCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const PaymentCompany: core.serialization.Schema< serializers.accounting.PaymentCompany.Raw, Merge.accounting.PaymentCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace PaymentCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentContact.ts b/src/serialization/resources/accounting/types/PaymentContact.ts index ba586ee16..782ae2e40 100644 --- a/src/serialization/resources/accounting/types/PaymentContact.ts +++ b/src/serialization/resources/accounting/types/PaymentContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const PaymentContact: core.serialization.Schema< serializers.accounting.PaymentContact.Raw, Merge.accounting.PaymentContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace PaymentContact { - type Raw = string | serializers.accounting.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentCurrency.ts b/src/serialization/resources/accounting/types/PaymentCurrency.ts index a324628a9..d5c35a9d8 100644 --- a/src/serialization/resources/accounting/types/PaymentCurrency.ts +++ b/src/serialization/resources/accounting/types/PaymentCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const PaymentCurrency: core.serialization.Schema< serializers.accounting.PaymentCurrency.Raw, Merge.accounting.PaymentCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace PaymentCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PaymentLineItem.ts b/src/serialization/resources/accounting/types/PaymentLineItem.ts index 76848d35e..33e2f5e59 100644 --- a/src/serialization/resources/accounting/types/PaymentLineItem.ts +++ b/src/serialization/resources/accounting/types/PaymentLineItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PaymentLineItem: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/PaymentLineItemRequest.ts b/src/serialization/resources/accounting/types/PaymentLineItemRequest.ts index 222166548..8f226e275 100644 --- a/src/serialization/resources/accounting/types/PaymentLineItemRequest.ts +++ b/src/serialization/resources/accounting/types/PaymentLineItemRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const PaymentLineItemRequest: core.serialization.ObjectSchema< serializers.accounting.PaymentLineItemRequest.Raw, @@ -23,12 +24,7 @@ export const PaymentLineItemRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PaymentLineItemRequest { @@ -40,6 +36,6 @@ export declare namespace PaymentLineItemRequest { related_object_type?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.accounting.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaymentRequest.ts b/src/serialization/resources/accounting/types/PaymentRequest.ts index 0f61a2c90..7d09646a4 100644 --- a/src/serialization/resources/accounting/types/PaymentRequest.ts +++ b/src/serialization/resources/accounting/types/PaymentRequest.ts @@ -2,55 +2,39 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PaymentRequestContact } from "./PaymentRequestContact"; +import { PaymentRequestAccount } from "./PaymentRequestAccount"; +import { PaymentRequestCurrency } from "./PaymentRequestCurrency"; +import { PaymentRequestCompany } from "./PaymentRequestCompany"; +import { PaymentRequestType } from "./PaymentRequestType"; +import { PaymentRequestTrackingCategoriesItem } from "./PaymentRequestTrackingCategoriesItem"; +import { PaymentRequestAccountingPeriod } from "./PaymentRequestAccountingPeriod"; +import { PaymentRequestAppliedToLinesItem } from "./PaymentRequestAppliedToLinesItem"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const PaymentRequest: core.serialization.ObjectSchema< serializers.accounting.PaymentRequest.Raw, Merge.accounting.PaymentRequest > = core.serialization.object({ transactionDate: core.serialization.property("transaction_date", core.serialization.date().optional()), - contact: core.serialization - .lazy(async () => (await import("../../..")).accounting.PaymentRequestContact) - .optional(), - account: core.serialization - .lazy(async () => (await import("../../..")).accounting.PaymentRequestAccount) - .optional(), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.PaymentRequestCurrency) - .optional(), + contact: PaymentRequestContact.optional(), + account: PaymentRequestAccount.optional(), + currency: PaymentRequestCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), - company: core.serialization - .lazy(async () => (await import("../../..")).accounting.PaymentRequestCompany) - .optional(), + company: PaymentRequestCompany.optional(), totalAmount: core.serialization.property("total_amount", core.serialization.number().optional()), - type: core.serialization.lazy(async () => (await import("../../..")).accounting.PaymentRequestType).optional(), + type: PaymentRequestType.optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.PaymentRequestTrackingCategoriesItem) - .optional() - ) - .optional() - ), - accountingPeriod: core.serialization.property( - "accounting_period", - core.serialization - .lazy(async () => (await import("../../..")).accounting.PaymentRequestAccountingPeriod) - .optional() + core.serialization.list(PaymentRequestTrackingCategoriesItem.optional()).optional() ), + accountingPeriod: core.serialization.property("accounting_period", PaymentRequestAccountingPeriod.optional()), appliedToLines: core.serialization.property( "applied_to_lines", - core.serialization - .list( - core.serialization.lazy( - async () => (await import("../../..")).accounting.PaymentRequestAppliedToLinesItem - ) - ) - .optional() + core.serialization.list(PaymentRequestAppliedToLinesItem).optional() ), integrationParams: core.serialization.property( "integration_params", @@ -60,31 +44,24 @@ export const PaymentRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PaymentRequest { interface Raw { transaction_date?: string | null; - contact?: serializers.accounting.PaymentRequestContact.Raw | null; - account?: serializers.accounting.PaymentRequestAccount.Raw | null; - currency?: serializers.accounting.PaymentRequestCurrency.Raw | null; + contact?: PaymentRequestContact.Raw | null; + account?: PaymentRequestAccount.Raw | null; + currency?: PaymentRequestCurrency.Raw | null; exchange_rate?: string | null; - company?: serializers.accounting.PaymentRequestCompany.Raw | null; + company?: PaymentRequestCompany.Raw | null; total_amount?: number | null; - type?: serializers.accounting.PaymentRequestType.Raw | null; - tracking_categories?: - | (serializers.accounting.PaymentRequestTrackingCategoriesItem.Raw | null | undefined)[] - | null; - accounting_period?: serializers.accounting.PaymentRequestAccountingPeriod.Raw | null; - applied_to_lines?: serializers.accounting.PaymentRequestAppliedToLinesItem.Raw[] | null; + type?: PaymentRequestType.Raw | null; + tracking_categories?: (PaymentRequestTrackingCategoriesItem.Raw | null | undefined)[] | null; + accounting_period?: PaymentRequestAccountingPeriod.Raw | null; + applied_to_lines?: PaymentRequestAppliedToLinesItem.Raw[] | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.accounting.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaymentRequestAccount.ts b/src/serialization/resources/accounting/types/PaymentRequestAccount.ts index 5f5298b70..1d24319a5 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestAccount.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const PaymentRequestAccount: core.serialization.Schema< serializers.accounting.PaymentRequestAccount.Raw, Merge.accounting.PaymentRequestAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace PaymentRequestAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestAccountingPeriod.ts b/src/serialization/resources/accounting/types/PaymentRequestAccountingPeriod.ts index fb152a817..047998be7 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestAccountingPeriod.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingPeriod } from "./AccountingPeriod"; export const PaymentRequestAccountingPeriod: core.serialization.Schema< serializers.accounting.PaymentRequestAccountingPeriod.Raw, Merge.accounting.PaymentRequestAccountingPeriod -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingPeriod), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace PaymentRequestAccountingPeriod { - type Raw = string | serializers.accounting.AccountingPeriod.Raw; + type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestAppliedToLinesItem.ts b/src/serialization/resources/accounting/types/PaymentRequestAppliedToLinesItem.ts index edf93dd07..ea014c864 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestAppliedToLinesItem.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestAppliedToLinesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PaymentLineItemRequest } from "./PaymentLineItemRequest"; export const PaymentRequestAppliedToLinesItem: core.serialization.Schema< serializers.accounting.PaymentRequestAppliedToLinesItem.Raw, Merge.accounting.PaymentRequestAppliedToLinesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.PaymentLineItemRequest), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentLineItemRequest]); export declare namespace PaymentRequestAppliedToLinesItem { - type Raw = string | serializers.accounting.PaymentLineItemRequest.Raw; + type Raw = string | PaymentLineItemRequest.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestCompany.ts b/src/serialization/resources/accounting/types/PaymentRequestCompany.ts index fd6bddfca..52a8bbb62 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestCompany.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const PaymentRequestCompany: core.serialization.Schema< serializers.accounting.PaymentRequestCompany.Raw, Merge.accounting.PaymentRequestCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace PaymentRequestCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestContact.ts b/src/serialization/resources/accounting/types/PaymentRequestContact.ts index 6123d5d27..a66c357de 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestContact.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const PaymentRequestContact: core.serialization.Schema< serializers.accounting.PaymentRequestContact.Raw, Merge.accounting.PaymentRequestContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace PaymentRequestContact { - type Raw = string | serializers.accounting.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestCurrency.ts b/src/serialization/resources/accounting/types/PaymentRequestCurrency.ts index d4a87e86a..76a130e63 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const PaymentRequestCurrency: core.serialization.Schema< serializers.accounting.PaymentRequestCurrency.Raw, Merge.accounting.PaymentRequestCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace PaymentRequestCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/PaymentRequestTrackingCategoriesItem.ts index 825f0fbe7..b8b735afd 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const PaymentRequestTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.PaymentRequestTrackingCategoriesItem.Raw, Merge.accounting.PaymentRequestTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace PaymentRequestTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestType.ts b/src/serialization/resources/accounting/types/PaymentRequestType.ts index 2af5f86f8..ca8b12d46 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestType.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PaymentTypeEnum } from "./PaymentTypeEnum"; export const PaymentRequestType: core.serialization.Schema< serializers.accounting.PaymentRequestType.Raw, Merge.accounting.PaymentRequestType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.PaymentTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PaymentTypeEnum, core.serialization.string()]); export declare namespace PaymentRequestType { - type Raw = serializers.accounting.PaymentTypeEnum.Raw | string; + type Raw = PaymentTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PaymentResponse.ts b/src/serialization/resources/accounting/types/PaymentResponse.ts index f4b74ca2a..e50023422 100644 --- a/src/serialization/resources/accounting/types/PaymentResponse.ts +++ b/src/serialization/resources/accounting/types/PaymentResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Payment } from "./Payment"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const PaymentResponse: core.serialization.ObjectSchema< serializers.accounting.PaymentResponse.Raw, Merge.accounting.PaymentResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).accounting.Payment), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.DebugModeLog)) - .optional(), + model: Payment, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace PaymentResponse { interface Raw { - model: serializers.accounting.Payment.Raw; - warnings: serializers.accounting.WarningValidationProblem.Raw[]; - errors: serializers.accounting.ErrorValidationProblem.Raw[]; - logs?: serializers.accounting.DebugModeLog.Raw[] | null; + model: Payment.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PaymentTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/PaymentTrackingCategoriesItem.ts index 9cf7515ec..c97fa67d1 100644 --- a/src/serialization/resources/accounting/types/PaymentTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/PaymentTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const PaymentTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.PaymentTrackingCategoriesItem.Raw, Merge.accounting.PaymentTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace PaymentTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentType.ts b/src/serialization/resources/accounting/types/PaymentType.ts index 2808f13c1..ee0bcab97 100644 --- a/src/serialization/resources/accounting/types/PaymentType.ts +++ b/src/serialization/resources/accounting/types/PaymentType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PaymentTypeEnum } from "./PaymentTypeEnum"; export const PaymentType: core.serialization.Schema< serializers.accounting.PaymentType.Raw, Merge.accounting.PaymentType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.PaymentTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PaymentTypeEnum, core.serialization.string()]); export declare namespace PaymentType { - type Raw = serializers.accounting.PaymentTypeEnum.Raw | string; + type Raw = PaymentTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PaymentTypeEnum.ts b/src/serialization/resources/accounting/types/PaymentTypeEnum.ts index fc4f9ceea..582e38bea 100644 --- a/src/serialization/resources/accounting/types/PaymentTypeEnum.ts +++ b/src/serialization/resources/accounting/types/PaymentTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PaymentTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/PostingStatusEnum.ts b/src/serialization/resources/accounting/types/PostingStatusEnum.ts index 325ec4fbe..a41f63ef5 100644 --- a/src/serialization/resources/accounting/types/PostingStatusEnum.ts +++ b/src/serialization/resources/accounting/types/PostingStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PostingStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/PurchaseOrder.ts b/src/serialization/resources/accounting/types/PurchaseOrder.ts index 55b65aef4..fa448f9a3 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrder.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrder.ts @@ -2,9 +2,19 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PurchaseOrderStatus } from "./PurchaseOrderStatus"; +import { PurchaseOrderDeliveryAddress } from "./PurchaseOrderDeliveryAddress"; +import { PurchaseOrderVendor } from "./PurchaseOrderVendor"; +import { PurchaseOrderCompany } from "./PurchaseOrderCompany"; +import { PurchaseOrderCurrency } from "./PurchaseOrderCurrency"; +import { PurchaseOrderLineItem } from "./PurchaseOrderLineItem"; +import { PurchaseOrderTrackingCategoriesItem } from "./PurchaseOrderTrackingCategoriesItem"; +import { PurchaseOrderAccountingPeriod } from "./PurchaseOrderAccountingPeriod"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const PurchaseOrder: core.serialization.ObjectSchema< serializers.accounting.PurchaseOrder.Raw, @@ -14,50 +24,25 @@ export const PurchaseOrder: core.serialization.ObjectSchema< remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), - status: core.serialization.lazy(async () => (await import("../../..")).accounting.PurchaseOrderStatus).optional(), + status: PurchaseOrderStatus.optional(), issueDate: core.serialization.property("issue_date", core.serialization.date().optional()), purchaseOrderNumber: core.serialization.property("purchase_order_number", core.serialization.string().optional()), deliveryDate: core.serialization.property("delivery_date", core.serialization.date().optional()), - deliveryAddress: core.serialization.property( - "delivery_address", - core.serialization - .lazy(async () => (await import("../../..")).accounting.PurchaseOrderDeliveryAddress) - .optional() - ), + deliveryAddress: core.serialization.property("delivery_address", PurchaseOrderDeliveryAddress.optional()), customer: core.serialization.string().optional(), - vendor: core.serialization.lazy(async () => (await import("../../..")).accounting.PurchaseOrderVendor).optional(), + vendor: PurchaseOrderVendor.optional(), memo: core.serialization.string().optional(), - company: core.serialization.lazy(async () => (await import("../../..")).accounting.PurchaseOrderCompany).optional(), + company: PurchaseOrderCompany.optional(), totalAmount: core.serialization.property("total_amount", core.serialization.number().optional()), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.PurchaseOrderCurrency) - .optional(), + currency: PurchaseOrderCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), - lineItems: core.serialization.property( - "line_items", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.PurchaseOrderLineItem) - ) - .optional() - ), + lineItems: core.serialization.property("line_items", core.serialization.list(PurchaseOrderLineItem).optional()), inclusiveOfTax: core.serialization.property("inclusive_of_tax", core.serialization.boolean().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.PurchaseOrderTrackingCategoriesItem) - .optional() - ) - .optional() - ), - accountingPeriod: core.serialization.property( - "accounting_period", - core.serialization - .lazy(async () => (await import("../../..")).accounting.PurchaseOrderAccountingPeriod) - .optional() + core.serialization.list(PurchaseOrderTrackingCategoriesItem.optional()).optional() ), + accountingPeriod: core.serialization.property("accounting_period", PurchaseOrderAccountingPeriod.optional()), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), @@ -65,18 +50,8 @@ export const PurchaseOrder: core.serialization.ObjectSchema< "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace PurchaseOrder { @@ -85,29 +60,27 @@ export declare namespace PurchaseOrder { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - status?: serializers.accounting.PurchaseOrderStatus.Raw | null; + status?: PurchaseOrderStatus.Raw | null; issue_date?: string | null; purchase_order_number?: string | null; delivery_date?: string | null; - delivery_address?: serializers.accounting.PurchaseOrderDeliveryAddress.Raw | null; + delivery_address?: PurchaseOrderDeliveryAddress.Raw | null; customer?: string | null; - vendor?: serializers.accounting.PurchaseOrderVendor.Raw | null; + vendor?: PurchaseOrderVendor.Raw | null; memo?: string | null; - company?: serializers.accounting.PurchaseOrderCompany.Raw | null; + company?: PurchaseOrderCompany.Raw | null; total_amount?: number | null; - currency?: serializers.accounting.PurchaseOrderCurrency.Raw | null; + currency?: PurchaseOrderCurrency.Raw | null; exchange_rate?: string | null; - line_items?: serializers.accounting.PurchaseOrderLineItem.Raw[] | null; + line_items?: PurchaseOrderLineItem.Raw[] | null; inclusive_of_tax?: boolean | null; - tracking_categories?: - | (serializers.accounting.PurchaseOrderTrackingCategoriesItem.Raw | null | undefined)[] - | null; - accounting_period?: serializers.accounting.PurchaseOrderAccountingPeriod.Raw | null; + tracking_categories?: (PurchaseOrderTrackingCategoriesItem.Raw | null | undefined)[] | null; + accounting_period?: PurchaseOrderAccountingPeriod.Raw | null; remote_created_at?: string | null; remote_updated_at?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; - remote_fields?: serializers.accounting.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderAccountingPeriod.ts b/src/serialization/resources/accounting/types/PurchaseOrderAccountingPeriod.ts index fbe3a58f4..81d7040e9 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderAccountingPeriod.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingPeriod } from "./AccountingPeriod"; export const PurchaseOrderAccountingPeriod: core.serialization.Schema< serializers.accounting.PurchaseOrderAccountingPeriod.Raw, Merge.accounting.PurchaseOrderAccountingPeriod -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingPeriod), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace PurchaseOrderAccountingPeriod { - type Raw = string | serializers.accounting.AccountingPeriod.Raw; + type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderCompany.ts b/src/serialization/resources/accounting/types/PurchaseOrderCompany.ts index 582c4fd6c..16a89a8f5 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderCompany.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const PurchaseOrderCompany: core.serialization.Schema< serializers.accounting.PurchaseOrderCompany.Raw, Merge.accounting.PurchaseOrderCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace PurchaseOrderCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderCurrency.ts b/src/serialization/resources/accounting/types/PurchaseOrderCurrency.ts index 1d1e82319..50af13e03 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderCurrency.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const PurchaseOrderCurrency: core.serialization.Schema< serializers.accounting.PurchaseOrderCurrency.Raw, Merge.accounting.PurchaseOrderCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace PurchaseOrderCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderDeliveryAddress.ts b/src/serialization/resources/accounting/types/PurchaseOrderDeliveryAddress.ts index b56131348..13d4daa03 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderDeliveryAddress.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderDeliveryAddress.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Address } from "./Address"; export const PurchaseOrderDeliveryAddress: core.serialization.Schema< serializers.accounting.PurchaseOrderDeliveryAddress.Raw, Merge.accounting.PurchaseOrderDeliveryAddress -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Address), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Address]); export declare namespace PurchaseOrderDeliveryAddress { - type Raw = string | serializers.accounting.Address.Raw; + type Raw = string | Address.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderLineItem.ts b/src/serialization/resources/accounting/types/PurchaseOrderLineItem.ts index f60f29931..b1c1ee528 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderLineItem.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderLineItem.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PurchaseOrderLineItemItem } from "./PurchaseOrderLineItemItem"; +import { PurchaseOrderLineItemCurrency } from "./PurchaseOrderLineItemCurrency"; +import { RemoteField } from "./RemoteField"; export const PurchaseOrderLineItem: core.serialization.ObjectSchema< serializers.accounting.PurchaseOrderLineItem.Raw, @@ -17,9 +20,7 @@ export const PurchaseOrderLineItem: core.serialization.ObjectSchema< description: core.serialization.string().optional(), unitPrice: core.serialization.property("unit_price", core.serialization.number().optional()), quantity: core.serialization.number().optional(), - item: core.serialization - .lazy(async () => (await import("../../..")).accounting.PurchaseOrderLineItemItem) - .optional(), + item: PurchaseOrderLineItemItem.optional(), account: core.serialization.string().optional(), trackingCategory: core.serialization.property("tracking_category", core.serialization.string().optional()), trackingCategories: core.serialization.property( @@ -28,19 +29,12 @@ export const PurchaseOrderLineItem: core.serialization.ObjectSchema< ), taxAmount: core.serialization.property("tax_amount", core.serialization.string().optional()), totalLineAmount: core.serialization.property("total_line_amount", core.serialization.string().optional()), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.PurchaseOrderLineItemCurrency) - .optional(), + currency: PurchaseOrderLineItemCurrency.optional(), taxRate: core.serialization.property("tax_rate", core.serialization.string().optional()), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), company: core.serialization.string().optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteField)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace PurchaseOrderLineItem { @@ -52,17 +46,17 @@ export declare namespace PurchaseOrderLineItem { description?: string | null; unit_price?: number | null; quantity?: number | null; - item?: serializers.accounting.PurchaseOrderLineItemItem.Raw | null; + item?: PurchaseOrderLineItemItem.Raw | null; account?: string | null; tracking_category?: string | null; tracking_categories?: (string | null | undefined)[] | null; tax_amount?: string | null; total_line_amount?: string | null; - currency?: serializers.accounting.PurchaseOrderLineItemCurrency.Raw | null; + currency?: PurchaseOrderLineItemCurrency.Raw | null; tax_rate?: string | null; exchange_rate?: string | null; company?: string | null; remote_was_deleted?: boolean | null; - remote_fields?: serializers.accounting.RemoteField.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderLineItemCurrency.ts b/src/serialization/resources/accounting/types/PurchaseOrderLineItemCurrency.ts index 1d565c751..e74fe97cf 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderLineItemCurrency.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderLineItemCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const PurchaseOrderLineItemCurrency: core.serialization.Schema< serializers.accounting.PurchaseOrderLineItemCurrency.Raw, Merge.accounting.PurchaseOrderLineItemCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace PurchaseOrderLineItemCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderLineItemItem.ts b/src/serialization/resources/accounting/types/PurchaseOrderLineItemItem.ts index 71fdd6d48..6ecf2e0e9 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderLineItemItem.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderLineItemItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Item } from "./Item"; export const PurchaseOrderLineItemItem: core.serialization.Schema< serializers.accounting.PurchaseOrderLineItemItem.Raw, Merge.accounting.PurchaseOrderLineItemItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Item), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace PurchaseOrderLineItemItem { - type Raw = string | serializers.accounting.Item.Raw; + type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequest.ts b/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequest.ts index fda05561b..4aa1298d4 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequest.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequest.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PurchaseOrderLineItemRequestItem } from "./PurchaseOrderLineItemRequestItem"; +import { PurchaseOrderLineItemRequestCurrency } from "./PurchaseOrderLineItemRequestCurrency"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const PurchaseOrderLineItemRequest: core.serialization.ObjectSchema< serializers.accounting.PurchaseOrderLineItemRequest.Raw, @@ -14,9 +17,7 @@ export const PurchaseOrderLineItemRequest: core.serialization.ObjectSchema< description: core.serialization.string().optional(), unitPrice: core.serialization.property("unit_price", core.serialization.number().optional()), quantity: core.serialization.number().optional(), - item: core.serialization - .lazy(async () => (await import("../../..")).accounting.PurchaseOrderLineItemRequestItem) - .optional(), + item: PurchaseOrderLineItemRequestItem.optional(), account: core.serialization.string().optional(), trackingCategory: core.serialization.property("tracking_category", core.serialization.string().optional()), trackingCategories: core.serialization.property( @@ -25,9 +26,7 @@ export const PurchaseOrderLineItemRequest: core.serialization.ObjectSchema< ), taxAmount: core.serialization.property("tax_amount", core.serialization.string().optional()), totalLineAmount: core.serialization.property("total_line_amount", core.serialization.string().optional()), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.PurchaseOrderLineItemRequestCurrency) - .optional(), + currency: PurchaseOrderLineItemRequestCurrency.optional(), taxRate: core.serialization.property("tax_rate", core.serialization.string().optional()), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), company: core.serialization.string().optional(), @@ -39,12 +38,7 @@ export const PurchaseOrderLineItemRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PurchaseOrderLineItemRequest { @@ -53,18 +47,18 @@ export declare namespace PurchaseOrderLineItemRequest { description?: string | null; unit_price?: number | null; quantity?: number | null; - item?: serializers.accounting.PurchaseOrderLineItemRequestItem.Raw | null; + item?: PurchaseOrderLineItemRequestItem.Raw | null; account?: string | null; tracking_category?: string | null; tracking_categories?: (string | null | undefined)[] | null; tax_amount?: string | null; total_line_amount?: string | null; - currency?: serializers.accounting.PurchaseOrderLineItemRequestCurrency.Raw | null; + currency?: PurchaseOrderLineItemRequestCurrency.Raw | null; tax_rate?: string | null; exchange_rate?: string | null; company?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.accounting.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestCurrency.ts b/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestCurrency.ts index 735461fb2..4e7427d94 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const PurchaseOrderLineItemRequestCurrency: core.serialization.Schema< serializers.accounting.PurchaseOrderLineItemRequestCurrency.Raw, Merge.accounting.PurchaseOrderLineItemRequestCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace PurchaseOrderLineItemRequestCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestItem.ts b/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestItem.ts index c8e6405cb..cae579457 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestItem.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Item } from "./Item"; export const PurchaseOrderLineItemRequestItem: core.serialization.Schema< serializers.accounting.PurchaseOrderLineItemRequestItem.Raw, Merge.accounting.PurchaseOrderLineItemRequestItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Item), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace PurchaseOrderLineItemRequestItem { - type Raw = string | serializers.accounting.Item.Raw; + type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequest.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequest.ts index bd8b78abf..bc237f08c 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequest.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequest.ts @@ -2,58 +2,41 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PurchaseOrderRequestStatus } from "./PurchaseOrderRequestStatus"; +import { PurchaseOrderRequestDeliveryAddress } from "./PurchaseOrderRequestDeliveryAddress"; +import { PurchaseOrderRequestVendor } from "./PurchaseOrderRequestVendor"; +import { PurchaseOrderRequestCompany } from "./PurchaseOrderRequestCompany"; +import { PurchaseOrderRequestCurrency } from "./PurchaseOrderRequestCurrency"; +import { PurchaseOrderRequestTrackingCategoriesItem } from "./PurchaseOrderRequestTrackingCategoriesItem"; +import { PurchaseOrderLineItemRequest } from "./PurchaseOrderLineItemRequest"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const PurchaseOrderRequest: core.serialization.ObjectSchema< serializers.accounting.PurchaseOrderRequest.Raw, Merge.accounting.PurchaseOrderRequest > = core.serialization.object({ - status: core.serialization - .lazy(async () => (await import("../../..")).accounting.PurchaseOrderRequestStatus) - .optional(), + status: PurchaseOrderRequestStatus.optional(), issueDate: core.serialization.property("issue_date", core.serialization.date().optional()), deliveryDate: core.serialization.property("delivery_date", core.serialization.date().optional()), - deliveryAddress: core.serialization.property( - "delivery_address", - core.serialization - .lazy(async () => (await import("../../..")).accounting.PurchaseOrderRequestDeliveryAddress) - .optional() - ), + deliveryAddress: core.serialization.property("delivery_address", PurchaseOrderRequestDeliveryAddress.optional()), customer: core.serialization.string().optional(), - vendor: core.serialization - .lazy(async () => (await import("../../..")).accounting.PurchaseOrderRequestVendor) - .optional(), + vendor: PurchaseOrderRequestVendor.optional(), memo: core.serialization.string().optional(), - company: core.serialization - .lazy(async () => (await import("../../..")).accounting.PurchaseOrderRequestCompany) - .optional(), + company: PurchaseOrderRequestCompany.optional(), totalAmount: core.serialization.property("total_amount", core.serialization.number().optional()), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.PurchaseOrderRequestCurrency) - .optional(), + currency: PurchaseOrderRequestCurrency.optional(), inclusiveOfTax: core.serialization.property("inclusive_of_tax", core.serialization.boolean().optional()), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.PurchaseOrderRequestTrackingCategoriesItem) - .optional() - ) - .optional() + core.serialization.list(PurchaseOrderRequestTrackingCategoriesItem.optional()).optional() ), lineItems: core.serialization.property( "line_items", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).accounting.PurchaseOrderLineItemRequest - ) - ) - .optional() + core.serialization.list(PurchaseOrderLineItemRequest).optional() ), integrationParams: core.serialization.property( "integration_params", @@ -63,34 +46,27 @@ export const PurchaseOrderRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PurchaseOrderRequest { interface Raw { - status?: serializers.accounting.PurchaseOrderRequestStatus.Raw | null; + status?: PurchaseOrderRequestStatus.Raw | null; issue_date?: string | null; delivery_date?: string | null; - delivery_address?: serializers.accounting.PurchaseOrderRequestDeliveryAddress.Raw | null; + delivery_address?: PurchaseOrderRequestDeliveryAddress.Raw | null; customer?: string | null; - vendor?: serializers.accounting.PurchaseOrderRequestVendor.Raw | null; + vendor?: PurchaseOrderRequestVendor.Raw | null; memo?: string | null; - company?: serializers.accounting.PurchaseOrderRequestCompany.Raw | null; + company?: PurchaseOrderRequestCompany.Raw | null; total_amount?: number | null; - currency?: serializers.accounting.PurchaseOrderRequestCurrency.Raw | null; + currency?: PurchaseOrderRequestCurrency.Raw | null; inclusive_of_tax?: boolean | null; exchange_rate?: string | null; - tracking_categories?: - | (serializers.accounting.PurchaseOrderRequestTrackingCategoriesItem.Raw | null | undefined)[] - | null; - line_items?: serializers.accounting.PurchaseOrderLineItemRequest.Raw[] | null; + tracking_categories?: (PurchaseOrderRequestTrackingCategoriesItem.Raw | null | undefined)[] | null; + line_items?: PurchaseOrderLineItemRequest.Raw[] | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.accounting.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequestCompany.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequestCompany.ts index 9eefe791c..617968453 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequestCompany.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequestCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const PurchaseOrderRequestCompany: core.serialization.Schema< serializers.accounting.PurchaseOrderRequestCompany.Raw, Merge.accounting.PurchaseOrderRequestCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace PurchaseOrderRequestCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequestCurrency.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequestCurrency.ts index cd98d38a6..6bb649f74 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequestCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const PurchaseOrderRequestCurrency: core.serialization.Schema< serializers.accounting.PurchaseOrderRequestCurrency.Raw, Merge.accounting.PurchaseOrderRequestCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace PurchaseOrderRequestCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.ts index 25abc4e8e..927706eea 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Address } from "./Address"; export const PurchaseOrderRequestDeliveryAddress: core.serialization.Schema< serializers.accounting.PurchaseOrderRequestDeliveryAddress.Raw, Merge.accounting.PurchaseOrderRequestDeliveryAddress -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Address), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Address]); export declare namespace PurchaseOrderRequestDeliveryAddress { - type Raw = string | serializers.accounting.Address.Raw; + type Raw = string | Address.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequestStatus.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequestStatus.ts index fe9435ca7..42f9029cd 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequestStatus.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequestStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PurchaseOrderStatusEnum } from "./PurchaseOrderStatusEnum"; export const PurchaseOrderRequestStatus: core.serialization.Schema< serializers.accounting.PurchaseOrderRequestStatus.Raw, Merge.accounting.PurchaseOrderRequestStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.PurchaseOrderStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PurchaseOrderStatusEnum, core.serialization.string()]); export declare namespace PurchaseOrderRequestStatus { - type Raw = serializers.accounting.PurchaseOrderStatusEnum.Raw | string; + type Raw = PurchaseOrderStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequestTrackingCategoriesItem.ts index 540f3781f..fb9c05f7e 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequestTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const PurchaseOrderRequestTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.PurchaseOrderRequestTrackingCategoriesItem.Raw, Merge.accounting.PurchaseOrderRequestTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace PurchaseOrderRequestTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequestVendor.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequestVendor.ts index 92c194ce1..70154d5c8 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequestVendor.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequestVendor.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const PurchaseOrderRequestVendor: core.serialization.Schema< serializers.accounting.PurchaseOrderRequestVendor.Raw, Merge.accounting.PurchaseOrderRequestVendor -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace PurchaseOrderRequestVendor { - type Raw = string | serializers.accounting.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderResponse.ts b/src/serialization/resources/accounting/types/PurchaseOrderResponse.ts index f7561f2f9..c269ffa78 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderResponse.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PurchaseOrder } from "./PurchaseOrder"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const PurchaseOrderResponse: core.serialization.ObjectSchema< serializers.accounting.PurchaseOrderResponse.Raw, Merge.accounting.PurchaseOrderResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).accounting.PurchaseOrder), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.DebugModeLog)) - .optional(), + model: PurchaseOrder, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace PurchaseOrderResponse { interface Raw { - model: serializers.accounting.PurchaseOrder.Raw; - warnings: serializers.accounting.WarningValidationProblem.Raw[]; - errors: serializers.accounting.ErrorValidationProblem.Raw[]; - logs?: serializers.accounting.DebugModeLog.Raw[] | null; + model: PurchaseOrder.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderStatus.ts b/src/serialization/resources/accounting/types/PurchaseOrderStatus.ts index 92c8c9c7c..e9b91d8e7 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderStatus.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PurchaseOrderStatusEnum } from "./PurchaseOrderStatusEnum"; export const PurchaseOrderStatus: core.serialization.Schema< serializers.accounting.PurchaseOrderStatus.Raw, Merge.accounting.PurchaseOrderStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.PurchaseOrderStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PurchaseOrderStatusEnum, core.serialization.string()]); export declare namespace PurchaseOrderStatus { - type Raw = serializers.accounting.PurchaseOrderStatusEnum.Raw | string; + type Raw = PurchaseOrderStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderStatusEnum.ts b/src/serialization/resources/accounting/types/PurchaseOrderStatusEnum.ts index aa3a0e756..293028626 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderStatusEnum.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PurchaseOrderStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/PurchaseOrderTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/PurchaseOrderTrackingCategoriesItem.ts index 862222924..498cfbd6c 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const PurchaseOrderTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.PurchaseOrderTrackingCategoriesItem.Raw, Merge.accounting.PurchaseOrderTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace PurchaseOrderTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderVendor.ts b/src/serialization/resources/accounting/types/PurchaseOrderVendor.ts index d4273d456..6cd7e2721 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderVendor.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderVendor.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const PurchaseOrderVendor: core.serialization.Schema< serializers.accounting.PurchaseOrderVendor.Raw, Merge.accounting.PurchaseOrderVendor -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace PurchaseOrderVendor { - type Raw = string | serializers.accounting.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/RemoteData.ts b/src/serialization/resources/accounting/types/RemoteData.ts index 9b725e9cc..2539eb03e 100644 --- a/src/serialization/resources/accounting/types/RemoteData.ts +++ b/src/serialization/resources/accounting/types/RemoteData.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteData: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/RemoteEndpointInfo.ts b/src/serialization/resources/accounting/types/RemoteEndpointInfo.ts index ba8e555ff..31f37fc53 100644 --- a/src/serialization/resources/accounting/types/RemoteEndpointInfo.ts +++ b/src/serialization/resources/accounting/types/RemoteEndpointInfo.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteEndpointInfo: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/RemoteField.ts b/src/serialization/resources/accounting/types/RemoteField.ts index cd550da83..2143fceee 100644 --- a/src/serialization/resources/accounting/types/RemoteField.ts +++ b/src/serialization/resources/accounting/types/RemoteField.ts @@ -2,24 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldClass } from "./RemoteFieldClass"; export const RemoteField: core.serialization.ObjectSchema< serializers.accounting.RemoteField.Raw, Merge.accounting.RemoteField > = core.serialization.object({ - remoteFieldClass: core.serialization.property( - "remote_field_class", - core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldClass) - ), + remoteFieldClass: core.serialization.property("remote_field_class", RemoteFieldClass), value: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), }); export declare namespace RemoteField { interface Raw { - remote_field_class: serializers.accounting.RemoteFieldClass.Raw; + remote_field_class: RemoteFieldClass.Raw; value?: Record | null; } } diff --git a/src/serialization/resources/accounting/types/RemoteFieldApi.ts b/src/serialization/resources/accounting/types/RemoteFieldApi.ts index b7aaac625..209698f0b 100644 --- a/src/serialization/resources/accounting/types/RemoteFieldApi.ts +++ b/src/serialization/resources/accounting/types/RemoteFieldApi.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteEndpointInfo } from "./RemoteEndpointInfo"; +import { AdvancedMetadata } from "./AdvancedMetadata"; +import { RemoteFieldApiCoverage } from "./RemoteFieldApiCoverage"; export const RemoteFieldApi: core.serialization.ObjectSchema< serializers.accounting.RemoteFieldApi.Raw, @@ -12,30 +15,22 @@ export const RemoteFieldApi: core.serialization.ObjectSchema< > = core.serialization.object({ schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()), remoteKeyName: core.serialization.property("remote_key_name", core.serialization.string()), - remoteEndpointInfo: core.serialization.property( - "remote_endpoint_info", - core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteEndpointInfo) - ), + remoteEndpointInfo: core.serialization.property("remote_endpoint_info", RemoteEndpointInfo), exampleValues: core.serialization.property( "example_values", core.serialization.list(core.serialization.unknown()).optional() ), - advancedMetadata: core.serialization.property( - "advanced_metadata", - core.serialization.lazyObject(async () => (await import("../../..")).accounting.AdvancedMetadata).optional() - ), - coverage: core.serialization - .lazy(async () => (await import("../../..")).accounting.RemoteFieldApiCoverage) - .optional(), + advancedMetadata: core.serialization.property("advanced_metadata", AdvancedMetadata.optional()), + coverage: RemoteFieldApiCoverage.optional(), }); export declare namespace RemoteFieldApi { interface Raw { schema: Record; remote_key_name: string; - remote_endpoint_info: serializers.accounting.RemoteEndpointInfo.Raw; + remote_endpoint_info: RemoteEndpointInfo.Raw; example_values?: unknown[] | null; - advanced_metadata?: serializers.accounting.AdvancedMetadata.Raw | null; - coverage?: serializers.accounting.RemoteFieldApiCoverage.Raw | null; + advanced_metadata?: AdvancedMetadata.Raw | null; + coverage?: RemoteFieldApiCoverage.Raw | null; } } diff --git a/src/serialization/resources/accounting/types/RemoteFieldApiCoverage.ts b/src/serialization/resources/accounting/types/RemoteFieldApiCoverage.ts index 3b8f1c547..a43be6d51 100644 --- a/src/serialization/resources/accounting/types/RemoteFieldApiCoverage.ts +++ b/src/serialization/resources/accounting/types/RemoteFieldApiCoverage.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteFieldApiCoverage: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/RemoteFieldApiResponse.ts b/src/serialization/resources/accounting/types/RemoteFieldApiResponse.ts index a747acf12..ec4dd9a5f 100644 --- a/src/serialization/resources/accounting/types/RemoteFieldApiResponse.ts +++ b/src/serialization/resources/accounting/types/RemoteFieldApiResponse.ts @@ -2,164 +2,75 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldApi } from "./RemoteFieldApi"; export const RemoteFieldApiResponse: core.serialization.ObjectSchema< serializers.accounting.RemoteFieldApiResponse.Raw, Merge.accounting.RemoteFieldApiResponse > = core.serialization.object({ - account: core.serialization.property( - "Account", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), + account: core.serialization.property("Account", core.serialization.list(RemoteFieldApi).optional()), accountingAttachment: core.serialization.property( "AccountingAttachment", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - balanceSheet: core.serialization.property( - "BalanceSheet", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() + core.serialization.list(RemoteFieldApi).optional() ), + balanceSheet: core.serialization.property("BalanceSheet", core.serialization.list(RemoteFieldApi).optional()), cashFlowStatement: core.serialization.property( "CashFlowStatement", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - companyInfo: core.serialization.property( - "CompanyInfo", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - contact: core.serialization.property( - "Contact", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - incomeStatement: core.serialization.property( - "IncomeStatement", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - creditNote: core.serialization.property( - "CreditNote", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - item: core.serialization.property( - "Item", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - purchaseOrder: core.serialization.property( - "PurchaseOrder", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), + core.serialization.list(RemoteFieldApi).optional() + ), + companyInfo: core.serialization.property("CompanyInfo", core.serialization.list(RemoteFieldApi).optional()), + contact: core.serialization.property("Contact", core.serialization.list(RemoteFieldApi).optional()), + incomeStatement: core.serialization.property("IncomeStatement", core.serialization.list(RemoteFieldApi).optional()), + creditNote: core.serialization.property("CreditNote", core.serialization.list(RemoteFieldApi).optional()), + item: core.serialization.property("Item", core.serialization.list(RemoteFieldApi).optional()), + purchaseOrder: core.serialization.property("PurchaseOrder", core.serialization.list(RemoteFieldApi).optional()), trackingCategory: core.serialization.property( "TrackingCategory", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - journalEntry: core.serialization.property( - "JournalEntry", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - taxRate: core.serialization.property( - "TaxRate", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - invoice: core.serialization.property( - "Invoice", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - payment: core.serialization.property( - "Payment", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - expense: core.serialization.property( - "Expense", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - vendorCredit: core.serialization.property( - "VendorCredit", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - transaction: core.serialization.property( - "Transaction", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), + core.serialization.list(RemoteFieldApi).optional() + ), + journalEntry: core.serialization.property("JournalEntry", core.serialization.list(RemoteFieldApi).optional()), + taxRate: core.serialization.property("TaxRate", core.serialization.list(RemoteFieldApi).optional()), + invoice: core.serialization.property("Invoice", core.serialization.list(RemoteFieldApi).optional()), + payment: core.serialization.property("Payment", core.serialization.list(RemoteFieldApi).optional()), + expense: core.serialization.property("Expense", core.serialization.list(RemoteFieldApi).optional()), + vendorCredit: core.serialization.property("VendorCredit", core.serialization.list(RemoteFieldApi).optional()), + transaction: core.serialization.property("Transaction", core.serialization.list(RemoteFieldApi).optional()), accountingPeriod: core.serialization.property( "AccountingPeriod", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() + core.serialization.list(RemoteFieldApi).optional() ), generalLedgerTransaction: core.serialization.property( "GeneralLedgerTransaction", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() - ), - bankFeedAccount: core.serialization.property( - "BankFeedAccount", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldApi)) - .optional() + core.serialization.list(RemoteFieldApi).optional() ), + bankFeedAccount: core.serialization.property("BankFeedAccount", core.serialization.list(RemoteFieldApi).optional()), }); export declare namespace RemoteFieldApiResponse { interface Raw { - Account?: serializers.accounting.RemoteFieldApi.Raw[] | null; - AccountingAttachment?: serializers.accounting.RemoteFieldApi.Raw[] | null; - BalanceSheet?: serializers.accounting.RemoteFieldApi.Raw[] | null; - CashFlowStatement?: serializers.accounting.RemoteFieldApi.Raw[] | null; - CompanyInfo?: serializers.accounting.RemoteFieldApi.Raw[] | null; - Contact?: serializers.accounting.RemoteFieldApi.Raw[] | null; - IncomeStatement?: serializers.accounting.RemoteFieldApi.Raw[] | null; - CreditNote?: serializers.accounting.RemoteFieldApi.Raw[] | null; - Item?: serializers.accounting.RemoteFieldApi.Raw[] | null; - PurchaseOrder?: serializers.accounting.RemoteFieldApi.Raw[] | null; - TrackingCategory?: serializers.accounting.RemoteFieldApi.Raw[] | null; - JournalEntry?: serializers.accounting.RemoteFieldApi.Raw[] | null; - TaxRate?: serializers.accounting.RemoteFieldApi.Raw[] | null; - Invoice?: serializers.accounting.RemoteFieldApi.Raw[] | null; - Payment?: serializers.accounting.RemoteFieldApi.Raw[] | null; - Expense?: serializers.accounting.RemoteFieldApi.Raw[] | null; - VendorCredit?: serializers.accounting.RemoteFieldApi.Raw[] | null; - Transaction?: serializers.accounting.RemoteFieldApi.Raw[] | null; - AccountingPeriod?: serializers.accounting.RemoteFieldApi.Raw[] | null; - GeneralLedgerTransaction?: serializers.accounting.RemoteFieldApi.Raw[] | null; - BankFeedAccount?: serializers.accounting.RemoteFieldApi.Raw[] | null; + Account?: RemoteFieldApi.Raw[] | null; + AccountingAttachment?: RemoteFieldApi.Raw[] | null; + BalanceSheet?: RemoteFieldApi.Raw[] | null; + CashFlowStatement?: RemoteFieldApi.Raw[] | null; + CompanyInfo?: RemoteFieldApi.Raw[] | null; + Contact?: RemoteFieldApi.Raw[] | null; + IncomeStatement?: RemoteFieldApi.Raw[] | null; + CreditNote?: RemoteFieldApi.Raw[] | null; + Item?: RemoteFieldApi.Raw[] | null; + PurchaseOrder?: RemoteFieldApi.Raw[] | null; + TrackingCategory?: RemoteFieldApi.Raw[] | null; + JournalEntry?: RemoteFieldApi.Raw[] | null; + TaxRate?: RemoteFieldApi.Raw[] | null; + Invoice?: RemoteFieldApi.Raw[] | null; + Payment?: RemoteFieldApi.Raw[] | null; + Expense?: RemoteFieldApi.Raw[] | null; + VendorCredit?: RemoteFieldApi.Raw[] | null; + Transaction?: RemoteFieldApi.Raw[] | null; + AccountingPeriod?: RemoteFieldApi.Raw[] | null; + GeneralLedgerTransaction?: RemoteFieldApi.Raw[] | null; + BankFeedAccount?: RemoteFieldApi.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/RemoteFieldClass.ts b/src/serialization/resources/accounting/types/RemoteFieldClass.ts index 79ad58c69..8b3875544 100644 --- a/src/serialization/resources/accounting/types/RemoteFieldClass.ts +++ b/src/serialization/resources/accounting/types/RemoteFieldClass.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldTypeEnum } from "./FieldTypeEnum"; +import { FieldFormatEnum } from "./FieldFormatEnum"; +import { ItemSchema } from "./ItemSchema"; export const RemoteFieldClass: core.serialization.ObjectSchema< serializers.accounting.RemoteFieldClass.Raw, @@ -16,22 +19,13 @@ export const RemoteFieldClass: core.serialization.ObjectSchema< description: core.serialization.string().optional(), isCustom: core.serialization.property("is_custom", core.serialization.boolean().optional()), isRequired: core.serialization.property("is_required", core.serialization.boolean().optional()), - fieldType: core.serialization.property( - "field_type", - core.serialization.lazy(async () => (await import("../../..")).accounting.FieldTypeEnum).optional() - ), - fieldFormat: core.serialization.property( - "field_format", - core.serialization.lazy(async () => (await import("../../..")).accounting.FieldFormatEnum).optional() - ), + fieldType: core.serialization.property("field_type", FieldTypeEnum.optional()), + fieldFormat: core.serialization.property("field_format", FieldFormatEnum.optional()), fieldChoices: core.serialization.property( "field_choices", core.serialization.list(core.serialization.string()).optional() ), - itemSchema: core.serialization.property( - "item_schema", - core.serialization.lazyObject(async () => (await import("../../..")).accounting.ItemSchema).optional() - ), + itemSchema: core.serialization.property("item_schema", ItemSchema.optional()), }); export declare namespace RemoteFieldClass { @@ -42,9 +36,9 @@ export declare namespace RemoteFieldClass { description?: string | null; is_custom?: boolean | null; is_required?: boolean | null; - field_type?: serializers.accounting.FieldTypeEnum.Raw | null; - field_format?: serializers.accounting.FieldFormatEnum.Raw | null; + field_type?: FieldTypeEnum.Raw | null; + field_format?: FieldFormatEnum.Raw | null; field_choices?: string[] | null; - item_schema?: serializers.accounting.ItemSchema.Raw | null; + item_schema?: ItemSchema.Raw | null; } } diff --git a/src/serialization/resources/accounting/types/RemoteFieldRequest.ts b/src/serialization/resources/accounting/types/RemoteFieldRequest.ts index 7d27a3531..75ed103a3 100644 --- a/src/serialization/resources/accounting/types/RemoteFieldRequest.ts +++ b/src/serialization/resources/accounting/types/RemoteFieldRequest.ts @@ -2,24 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldRequestRemoteFieldClass } from "./RemoteFieldRequestRemoteFieldClass"; export const RemoteFieldRequest: core.serialization.ObjectSchema< serializers.accounting.RemoteFieldRequest.Raw, Merge.accounting.RemoteFieldRequest > = core.serialization.object({ - remoteFieldClass: core.serialization.property( - "remote_field_class", - core.serialization.lazy(async () => (await import("../../..")).accounting.RemoteFieldRequestRemoteFieldClass) - ), + remoteFieldClass: core.serialization.property("remote_field_class", RemoteFieldRequestRemoteFieldClass), value: core.serialization.unknown().optional(), }); export declare namespace RemoteFieldRequest { interface Raw { - remote_field_class: serializers.accounting.RemoteFieldRequestRemoteFieldClass.Raw; + remote_field_class: RemoteFieldRequestRemoteFieldClass.Raw; value?: unknown | null; } } diff --git a/src/serialization/resources/accounting/types/RemoteFieldRequestRemoteFieldClass.ts b/src/serialization/resources/accounting/types/RemoteFieldRequestRemoteFieldClass.ts index c3f63aa0a..aecdbdba3 100644 --- a/src/serialization/resources/accounting/types/RemoteFieldRequestRemoteFieldClass.ts +++ b/src/serialization/resources/accounting/types/RemoteFieldRequestRemoteFieldClass.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldClass } from "./RemoteFieldClass"; export const RemoteFieldRequestRemoteFieldClass: core.serialization.Schema< serializers.accounting.RemoteFieldRequestRemoteFieldClass.Raw, Merge.accounting.RemoteFieldRequestRemoteFieldClass -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteFieldClass), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteFieldClass]); export declare namespace RemoteFieldRequestRemoteFieldClass { - type Raw = string | serializers.accounting.RemoteFieldClass.Raw; + type Raw = string | RemoteFieldClass.Raw; } diff --git a/src/serialization/resources/accounting/types/RemoteKey.ts b/src/serialization/resources/accounting/types/RemoteKey.ts index b1a301e46..c768ffc7e 100644 --- a/src/serialization/resources/accounting/types/RemoteKey.ts +++ b/src/serialization/resources/accounting/types/RemoteKey.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteKey: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/RemoteResponse.ts b/src/serialization/resources/accounting/types/RemoteResponse.ts index 3138426a8..ff776de87 100644 --- a/src/serialization/resources/accounting/types/RemoteResponse.ts +++ b/src/serialization/resources/accounting/types/RemoteResponse.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ResponseTypeEnum } from "./ResponseTypeEnum"; export const RemoteResponse: core.serialization.ObjectSchema< serializers.accounting.RemoteResponse.Raw, @@ -18,10 +19,7 @@ export const RemoteResponse: core.serialization.ObjectSchema< "response_headers", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - responseType: core.serialization.property( - "response_type", - core.serialization.lazy(async () => (await import("../../..")).accounting.ResponseTypeEnum).optional() - ), + responseType: core.serialization.property("response_type", ResponseTypeEnum.optional()), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), }); @@ -32,7 +30,7 @@ export declare namespace RemoteResponse { status: number; response?: unknown; response_headers?: Record | null; - response_type?: serializers.accounting.ResponseTypeEnum.Raw | null; + response_type?: ResponseTypeEnum.Raw | null; headers?: Record | null; } } diff --git a/src/serialization/resources/accounting/types/ReportItem.ts b/src/serialization/resources/accounting/types/ReportItem.ts index 6b9025a0d..894913a46 100644 --- a/src/serialization/resources/accounting/types/ReportItem.ts +++ b/src/serialization/resources/accounting/types/ReportItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ReportItem: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/RequestFormatEnum.ts b/src/serialization/resources/accounting/types/RequestFormatEnum.ts index acd22303b..f778e3f9c 100644 --- a/src/serialization/resources/accounting/types/RequestFormatEnum.ts +++ b/src/serialization/resources/accounting/types/RequestFormatEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RequestFormatEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/ResponseTypeEnum.ts b/src/serialization/resources/accounting/types/ResponseTypeEnum.ts index 4ca69474d..9a6e2e277 100644 --- a/src/serialization/resources/accounting/types/ResponseTypeEnum.ts +++ b/src/serialization/resources/accounting/types/ResponseTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ResponseTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/RoleEnum.ts b/src/serialization/resources/accounting/types/RoleEnum.ts index 85f53f5da..1d388533f 100644 --- a/src/serialization/resources/accounting/types/RoleEnum.ts +++ b/src/serialization/resources/accounting/types/RoleEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RoleEnum: core.serialization.Schema = diff --git a/src/serialization/resources/accounting/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/serialization/resources/accounting/types/SelectiveSyncConfigurationsUsageEnum.ts index 65433f7f9..dae07211d 100644 --- a/src/serialization/resources/accounting/types/SelectiveSyncConfigurationsUsageEnum.ts +++ b/src/serialization/resources/accounting/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const SelectiveSyncConfigurationsUsageEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/Status7D1Enum.ts b/src/serialization/resources/accounting/types/Status7D1Enum.ts index d979fa28d..ccc1a51fb 100644 --- a/src/serialization/resources/accounting/types/Status7D1Enum.ts +++ b/src/serialization/resources/accounting/types/Status7D1Enum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const Status7D1Enum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/SyncStatus.ts b/src/serialization/resources/accounting/types/SyncStatus.ts index c84794f7c..abcd1987f 100644 --- a/src/serialization/resources/accounting/types/SyncStatus.ts +++ b/src/serialization/resources/accounting/types/SyncStatus.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { SyncStatusStatusEnum } from "./SyncStatusStatusEnum"; +import { SelectiveSyncConfigurationsUsageEnum } from "./SelectiveSyncConfigurationsUsageEnum"; export const SyncStatus: core.serialization.ObjectSchema< serializers.accounting.SyncStatus.Raw, @@ -14,13 +16,11 @@ export const SyncStatus: core.serialization.ObjectSchema< modelId: core.serialization.property("model_id", core.serialization.string()), lastSyncStart: core.serialization.property("last_sync_start", core.serialization.date().optional()), nextSyncStart: core.serialization.property("next_sync_start", core.serialization.date().optional()), - status: core.serialization.lazy(async () => (await import("../../..")).accounting.SyncStatusStatusEnum), + status: SyncStatusStatusEnum, isInitialSync: core.serialization.property("is_initial_sync", core.serialization.boolean()), selectiveSyncConfigurationsUsage: core.serialization.property( "selective_sync_configurations_usage", - core.serialization - .lazy(async () => (await import("../../..")).accounting.SelectiveSyncConfigurationsUsageEnum) - .optional() + SelectiveSyncConfigurationsUsageEnum.optional() ), }); @@ -30,8 +30,8 @@ export declare namespace SyncStatus { model_id: string; last_sync_start?: string | null; next_sync_start?: string | null; - status: serializers.accounting.SyncStatusStatusEnum.Raw; + status: SyncStatusStatusEnum.Raw; is_initial_sync: boolean; - selective_sync_configurations_usage?: serializers.accounting.SelectiveSyncConfigurationsUsageEnum.Raw | null; + selective_sync_configurations_usage?: SelectiveSyncConfigurationsUsageEnum.Raw | null; } } diff --git a/src/serialization/resources/accounting/types/SyncStatusStatusEnum.ts b/src/serialization/resources/accounting/types/SyncStatusStatusEnum.ts index f35bb6e12..be8ca9af8 100644 --- a/src/serialization/resources/accounting/types/SyncStatusStatusEnum.ts +++ b/src/serialization/resources/accounting/types/SyncStatusStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const SyncStatusStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/accounting/types/TaxComponent.ts b/src/serialization/resources/accounting/types/TaxComponent.ts index 9c356aa79..636ff9998 100644 --- a/src/serialization/resources/accounting/types/TaxComponent.ts +++ b/src/serialization/resources/accounting/types/TaxComponent.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TaxComponentComponentType } from "./TaxComponentComponentType"; export const TaxComponent: core.serialization.ObjectSchema< serializers.accounting.TaxComponent.Raw, @@ -17,10 +18,7 @@ export const TaxComponent: core.serialization.ObjectSchema< name: core.serialization.string().optional(), rate: core.serialization.string().optional(), isCompound: core.serialization.property("is_compound", core.serialization.boolean().optional()), - componentType: core.serialization.property( - "component_type", - core.serialization.lazy(async () => (await import("../../..")).accounting.TaxComponentComponentType).optional() - ), + componentType: core.serialization.property("component_type", TaxComponentComponentType.optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), }); @@ -33,7 +31,7 @@ export declare namespace TaxComponent { name?: string | null; rate?: string | null; is_compound?: boolean | null; - component_type?: serializers.accounting.TaxComponentComponentType.Raw | null; + component_type?: TaxComponentComponentType.Raw | null; remote_was_deleted?: boolean | null; } } diff --git a/src/serialization/resources/accounting/types/TaxComponentComponentType.ts b/src/serialization/resources/accounting/types/TaxComponentComponentType.ts index cf9b2a67c..6067fa8c7 100644 --- a/src/serialization/resources/accounting/types/TaxComponentComponentType.ts +++ b/src/serialization/resources/accounting/types/TaxComponentComponentType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ComponentTypeEnum } from "./ComponentTypeEnum"; export const TaxComponentComponentType: core.serialization.Schema< serializers.accounting.TaxComponentComponentType.Raw, Merge.accounting.TaxComponentComponentType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.ComponentTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([ComponentTypeEnum, core.serialization.string()]); export declare namespace TaxComponentComponentType { - type Raw = serializers.accounting.ComponentTypeEnum.Raw | string; + type Raw = ComponentTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/TaxRate.ts b/src/serialization/resources/accounting/types/TaxRate.ts index 084a7f269..bc5ffd0ca 100644 --- a/src/serialization/resources/accounting/types/TaxRate.ts +++ b/src/serialization/resources/accounting/types/TaxRate.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TaxRateCompany } from "./TaxRateCompany"; +import { TaxRateStatus } from "./TaxRateStatus"; +import { TaxRateTaxComponentsItem } from "./TaxRateTaxComponentsItem"; +import { RemoteData } from "./RemoteData"; export const TaxRate: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,33 +16,24 @@ export const TaxRate: core.serialization.ObjectSchema (await import("../../..")).accounting.TaxRateCompany).optional(), + company: TaxRateCompany.optional(), code: core.serialization.string().optional(), name: core.serialization.string().optional(), description: core.serialization.string().optional(), - status: core.serialization.lazy(async () => (await import("../../..")).accounting.TaxRateStatus).optional(), + status: TaxRateStatus.optional(), country: core.serialization.string().optional(), totalTaxRate: core.serialization.property("total_tax_rate", core.serialization.number().optional()), effectiveTaxRate: core.serialization.property("effective_tax_rate", core.serialization.number().optional()), taxComponents: core.serialization.property( "tax_components", - core.serialization - .list( - core.serialization.lazy(async () => (await import("../../..")).accounting.TaxRateTaxComponentsItem) - ) - .optional() + core.serialization.list(TaxRateTaxComponentsItem).optional() ), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace TaxRate { @@ -47,17 +42,17 @@ export declare namespace TaxRate { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - company?: serializers.accounting.TaxRateCompany.Raw | null; + company?: TaxRateCompany.Raw | null; code?: string | null; name?: string | null; description?: string | null; - status?: serializers.accounting.TaxRateStatus.Raw | null; + status?: TaxRateStatus.Raw | null; country?: string | null; total_tax_rate?: number | null; effective_tax_rate?: number | null; - tax_components?: serializers.accounting.TaxRateTaxComponentsItem.Raw[] | null; + tax_components?: TaxRateTaxComponentsItem.Raw[] | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/TaxRateCompany.ts b/src/serialization/resources/accounting/types/TaxRateCompany.ts index 86ec19c2c..eecf155c4 100644 --- a/src/serialization/resources/accounting/types/TaxRateCompany.ts +++ b/src/serialization/resources/accounting/types/TaxRateCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const TaxRateCompany: core.serialization.Schema< serializers.accounting.TaxRateCompany.Raw, Merge.accounting.TaxRateCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace TaxRateCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/TaxRateStatus.ts b/src/serialization/resources/accounting/types/TaxRateStatus.ts index 030ba78b4..cb3e18f99 100644 --- a/src/serialization/resources/accounting/types/TaxRateStatus.ts +++ b/src/serialization/resources/accounting/types/TaxRateStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Status7D1Enum } from "./Status7D1Enum"; export const TaxRateStatus: core.serialization.Schema< serializers.accounting.TaxRateStatus.Raw, Merge.accounting.TaxRateStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.Status7D1Enum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([Status7D1Enum, core.serialization.string()]); export declare namespace TaxRateStatus { - type Raw = serializers.accounting.Status7D1Enum.Raw | string; + type Raw = Status7D1Enum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/TaxRateTaxComponentsItem.ts b/src/serialization/resources/accounting/types/TaxRateTaxComponentsItem.ts index 325e5eb23..0820024fe 100644 --- a/src/serialization/resources/accounting/types/TaxRateTaxComponentsItem.ts +++ b/src/serialization/resources/accounting/types/TaxRateTaxComponentsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TaxComponent } from "./TaxComponent"; export const TaxRateTaxComponentsItem: core.serialization.Schema< serializers.accounting.TaxRateTaxComponentsItem.Raw, Merge.accounting.TaxRateTaxComponentsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TaxComponent), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TaxComponent]); export declare namespace TaxRateTaxComponentsItem { - type Raw = string | serializers.accounting.TaxComponent.Raw; + type Raw = string | TaxComponent.Raw; } diff --git a/src/serialization/resources/accounting/types/TrackingCategory.ts b/src/serialization/resources/accounting/types/TrackingCategory.ts index 9761b2959..45a4f1c2d 100644 --- a/src/serialization/resources/accounting/types/TrackingCategory.ts +++ b/src/serialization/resources/accounting/types/TrackingCategory.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategoryStatus } from "./TrackingCategoryStatus"; +import { TrackingCategoryCategoryType } from "./TrackingCategoryCategoryType"; +import { TrackingCategoryCompany } from "./TrackingCategoryCompany"; +import { RemoteData } from "./RemoteData"; export const TrackingCategory: core.serialization.ObjectSchema< serializers.accounting.TrackingCategory.Raw, @@ -15,30 +19,16 @@ export const TrackingCategory: core.serialization.ObjectSchema< createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), name: core.serialization.string().optional(), - status: core.serialization - .lazy(async () => (await import("../../..")).accounting.TrackingCategoryStatus) - .optional(), - categoryType: core.serialization.property( - "category_type", - core.serialization - .lazy(async () => (await import("../../..")).accounting.TrackingCategoryCategoryType) - .optional() - ), + status: TrackingCategoryStatus.optional(), + categoryType: core.serialization.property("category_type", TrackingCategoryCategoryType.optional()), parentCategory: core.serialization.property("parent_category", core.serialization.string().optional()), - company: core.serialization - .lazy(async () => (await import("../../..")).accounting.TrackingCategoryCompany) - .optional(), + company: TrackingCategoryCompany.optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace TrackingCategory { @@ -48,12 +38,12 @@ export declare namespace TrackingCategory { created_at?: string | null; modified_at?: string | null; name?: string | null; - status?: serializers.accounting.TrackingCategoryStatus.Raw | null; - category_type?: serializers.accounting.TrackingCategoryCategoryType.Raw | null; + status?: TrackingCategoryStatus.Raw | null; + category_type?: TrackingCategoryCategoryType.Raw | null; parent_category?: string | null; - company?: serializers.accounting.TrackingCategoryCompany.Raw | null; + company?: TrackingCategoryCompany.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/TrackingCategoryCategoryType.ts b/src/serialization/resources/accounting/types/TrackingCategoryCategoryType.ts index 16ac439e6..d9ceec636 100644 --- a/src/serialization/resources/accounting/types/TrackingCategoryCategoryType.ts +++ b/src/serialization/resources/accounting/types/TrackingCategoryCategoryType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoryTypeEnum } from "./CategoryTypeEnum"; export const TrackingCategoryCategoryType: core.serialization.Schema< serializers.accounting.TrackingCategoryCategoryType.Raw, Merge.accounting.TrackingCategoryCategoryType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CategoryTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CategoryTypeEnum, core.serialization.string()]); export declare namespace TrackingCategoryCategoryType { - type Raw = serializers.accounting.CategoryTypeEnum.Raw | string; + type Raw = CategoryTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/TrackingCategoryCompany.ts b/src/serialization/resources/accounting/types/TrackingCategoryCompany.ts index 43ae62e87..cc32cacfb 100644 --- a/src/serialization/resources/accounting/types/TrackingCategoryCompany.ts +++ b/src/serialization/resources/accounting/types/TrackingCategoryCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const TrackingCategoryCompany: core.serialization.Schema< serializers.accounting.TrackingCategoryCompany.Raw, Merge.accounting.TrackingCategoryCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace TrackingCategoryCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/TrackingCategoryStatus.ts b/src/serialization/resources/accounting/types/TrackingCategoryStatus.ts index 00c45828f..fd704463d 100644 --- a/src/serialization/resources/accounting/types/TrackingCategoryStatus.ts +++ b/src/serialization/resources/accounting/types/TrackingCategoryStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Status7D1Enum } from "./Status7D1Enum"; export const TrackingCategoryStatus: core.serialization.Schema< serializers.accounting.TrackingCategoryStatus.Raw, Merge.accounting.TrackingCategoryStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.Status7D1Enum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([Status7D1Enum, core.serialization.string()]); export declare namespace TrackingCategoryStatus { - type Raw = serializers.accounting.Status7D1Enum.Raw | string; + type Raw = Status7D1Enum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/Transaction.ts b/src/serialization/resources/accounting/types/Transaction.ts index c1ea22d3b..3470216d4 100644 --- a/src/serialization/resources/accounting/types/Transaction.ts +++ b/src/serialization/resources/accounting/types/Transaction.ts @@ -2,9 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TransactionAccount } from "./TransactionAccount"; +import { TransactionContact } from "./TransactionContact"; +import { TransactionCurrency } from "./TransactionCurrency"; +import { TransactionTrackingCategoriesItem } from "./TransactionTrackingCategoriesItem"; +import { TransactionLineItem } from "./TransactionLineItem"; +import { TransactionAccountingPeriod } from "./TransactionAccountingPeriod"; +import { RemoteData } from "./RemoteData"; export const Transaction: core.serialization.ObjectSchema< serializers.accounting.Transaction.Raw, @@ -17,46 +24,25 @@ export const Transaction: core.serialization.ObjectSchema< transactionType: core.serialization.property("transaction_type", core.serialization.string().optional()), number: core.serialization.string().optional(), transactionDate: core.serialization.property("transaction_date", core.serialization.date().optional()), - account: core.serialization.lazy(async () => (await import("../../..")).accounting.TransactionAccount).optional(), - contact: core.serialization.lazy(async () => (await import("../../..")).accounting.TransactionContact).optional(), + account: TransactionAccount.optional(), + contact: TransactionContact.optional(), inclusiveOfTax: core.serialization.property("inclusive_of_tax", core.serialization.boolean().optional()), totalAmount: core.serialization.property("total_amount", core.serialization.string().optional()), - currency: core.serialization.lazy(async () => (await import("../../..")).accounting.TransactionCurrency).optional(), + currency: TransactionCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), company: core.serialization.string().optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.TransactionTrackingCategoriesItem) - .optional() - ) - .optional() - ), - lineItems: core.serialization.property( - "line_items", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.TransactionLineItem)) - .optional() + core.serialization.list(TransactionTrackingCategoriesItem.optional()).optional() ), + lineItems: core.serialization.property("line_items", core.serialization.list(TransactionLineItem).optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), - accountingPeriod: core.serialization.property( - "accounting_period", - core.serialization - .lazy(async () => (await import("../../..")).accounting.TransactionAccountingPeriod) - .optional() - ), + accountingPeriod: core.serialization.property("accounting_period", TransactionAccountingPeriod.optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Transaction { @@ -68,20 +54,18 @@ export declare namespace Transaction { transaction_type?: string | null; number?: string | null; transaction_date?: string | null; - account?: serializers.accounting.TransactionAccount.Raw | null; - contact?: serializers.accounting.TransactionContact.Raw | null; + account?: TransactionAccount.Raw | null; + contact?: TransactionContact.Raw | null; inclusive_of_tax?: boolean | null; total_amount?: string | null; - currency?: serializers.accounting.TransactionCurrency.Raw | null; + currency?: TransactionCurrency.Raw | null; exchange_rate?: string | null; company?: string | null; - tracking_categories?: - | (serializers.accounting.TransactionTrackingCategoriesItem.Raw | null | undefined)[] - | null; - line_items?: serializers.accounting.TransactionLineItem.Raw[] | null; + tracking_categories?: (TransactionTrackingCategoriesItem.Raw | null | undefined)[] | null; + line_items?: TransactionLineItem.Raw[] | null; remote_was_deleted?: boolean | null; - accounting_period?: serializers.accounting.TransactionAccountingPeriod.Raw | null; + accounting_period?: TransactionAccountingPeriod.Raw | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/TransactionAccount.ts b/src/serialization/resources/accounting/types/TransactionAccount.ts index 2e5a85ffe..1b8811e84 100644 --- a/src/serialization/resources/accounting/types/TransactionAccount.ts +++ b/src/serialization/resources/accounting/types/TransactionAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const TransactionAccount: core.serialization.Schema< serializers.accounting.TransactionAccount.Raw, Merge.accounting.TransactionAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace TransactionAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/TransactionAccountingPeriod.ts b/src/serialization/resources/accounting/types/TransactionAccountingPeriod.ts index 006a6d9fa..8d8184485 100644 --- a/src/serialization/resources/accounting/types/TransactionAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/TransactionAccountingPeriod.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingPeriod } from "./AccountingPeriod"; export const TransactionAccountingPeriod: core.serialization.Schema< serializers.accounting.TransactionAccountingPeriod.Raw, Merge.accounting.TransactionAccountingPeriod -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingPeriod), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace TransactionAccountingPeriod { - type Raw = string | serializers.accounting.AccountingPeriod.Raw; + type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/TransactionContact.ts b/src/serialization/resources/accounting/types/TransactionContact.ts index 67fcb6f25..d96889066 100644 --- a/src/serialization/resources/accounting/types/TransactionContact.ts +++ b/src/serialization/resources/accounting/types/TransactionContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const TransactionContact: core.serialization.Schema< serializers.accounting.TransactionContact.Raw, Merge.accounting.TransactionContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace TransactionContact { - type Raw = string | serializers.accounting.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/TransactionCurrency.ts b/src/serialization/resources/accounting/types/TransactionCurrency.ts index 4122829fa..e0f1a4c91 100644 --- a/src/serialization/resources/accounting/types/TransactionCurrency.ts +++ b/src/serialization/resources/accounting/types/TransactionCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const TransactionCurrency: core.serialization.Schema< serializers.accounting.TransactionCurrency.Raw, Merge.accounting.TransactionCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace TransactionCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/TransactionLineItem.ts b/src/serialization/resources/accounting/types/TransactionLineItem.ts index b8588246e..0098dab3d 100644 --- a/src/serialization/resources/accounting/types/TransactionLineItem.ts +++ b/src/serialization/resources/accounting/types/TransactionLineItem.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TransactionLineItemItem } from "./TransactionLineItemItem"; +import { TransactionLineItemCurrency } from "./TransactionLineItemCurrency"; export const TransactionLineItem: core.serialization.ObjectSchema< serializers.accounting.TransactionLineItem.Raw, @@ -17,7 +19,7 @@ export const TransactionLineItem: core.serialization.ObjectSchema< memo: core.serialization.string().optional(), unitPrice: core.serialization.property("unit_price", core.serialization.string().optional()), quantity: core.serialization.string().optional(), - item: core.serialization.lazy(async () => (await import("../../..")).accounting.TransactionLineItemItem).optional(), + item: TransactionLineItemItem.optional(), account: core.serialization.string().optional(), trackingCategory: core.serialization.property("tracking_category", core.serialization.string().optional()), trackingCategories: core.serialization.property( @@ -26,9 +28,7 @@ export const TransactionLineItem: core.serialization.ObjectSchema< ), totalLineAmount: core.serialization.property("total_line_amount", core.serialization.string().optional()), taxRate: core.serialization.property("tax_rate", core.serialization.string().optional()), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.TransactionLineItemCurrency) - .optional(), + currency: TransactionLineItemCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), company: core.serialization.string().optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), @@ -43,13 +43,13 @@ export declare namespace TransactionLineItem { memo?: string | null; unit_price?: string | null; quantity?: string | null; - item?: serializers.accounting.TransactionLineItemItem.Raw | null; + item?: TransactionLineItemItem.Raw | null; account?: string | null; tracking_category?: string | null; tracking_categories?: (string | null | undefined)[] | null; total_line_amount?: string | null; tax_rate?: string | null; - currency?: serializers.accounting.TransactionLineItemCurrency.Raw | null; + currency?: TransactionLineItemCurrency.Raw | null; exchange_rate?: string | null; company?: string | null; remote_was_deleted?: boolean | null; diff --git a/src/serialization/resources/accounting/types/TransactionLineItemCurrency.ts b/src/serialization/resources/accounting/types/TransactionLineItemCurrency.ts index 02ddb84d8..3f6515bf5 100644 --- a/src/serialization/resources/accounting/types/TransactionLineItemCurrency.ts +++ b/src/serialization/resources/accounting/types/TransactionLineItemCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const TransactionLineItemCurrency: core.serialization.Schema< serializers.accounting.TransactionLineItemCurrency.Raw, Merge.accounting.TransactionLineItemCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace TransactionLineItemCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/TransactionLineItemItem.ts b/src/serialization/resources/accounting/types/TransactionLineItemItem.ts index cecc792c6..ddec2b293 100644 --- a/src/serialization/resources/accounting/types/TransactionLineItemItem.ts +++ b/src/serialization/resources/accounting/types/TransactionLineItemItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Item } from "./Item"; export const TransactionLineItemItem: core.serialization.Schema< serializers.accounting.TransactionLineItemItem.Raw, Merge.accounting.TransactionLineItemItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Item), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace TransactionLineItemItem { - type Raw = string | serializers.accounting.Item.Raw; + type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/TransactionTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/TransactionTrackingCategoriesItem.ts index ff8314290..ba1a1bf59 100644 --- a/src/serialization/resources/accounting/types/TransactionTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/TransactionTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const TransactionTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.TransactionTrackingCategoriesItem.Raw, Merge.accounting.TransactionTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace TransactionTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/ValidationProblemSource.ts b/src/serialization/resources/accounting/types/ValidationProblemSource.ts index 25cd32ab4..b5bfb02c7 100644 --- a/src/serialization/resources/accounting/types/ValidationProblemSource.ts +++ b/src/serialization/resources/accounting/types/ValidationProblemSource.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ValidationProblemSource: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/accounting/types/VendorCredit.ts b/src/serialization/resources/accounting/types/VendorCredit.ts index 02446e47f..d1f577161 100644 --- a/src/serialization/resources/accounting/types/VendorCredit.ts +++ b/src/serialization/resources/accounting/types/VendorCredit.ts @@ -2,9 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { VendorCreditVendor } from "./VendorCreditVendor"; +import { VendorCreditCurrency } from "./VendorCreditCurrency"; +import { VendorCreditCompany } from "./VendorCreditCompany"; +import { VendorCreditLine } from "./VendorCreditLine"; +import { VendorCreditTrackingCategoriesItem } from "./VendorCreditTrackingCategoriesItem"; +import { VendorCreditAccountingPeriod } from "./VendorCreditAccountingPeriod"; +import { RemoteData } from "./RemoteData"; export const VendorCredit: core.serialization.ObjectSchema< serializers.accounting.VendorCredit.Raw, @@ -16,44 +23,24 @@ export const VendorCredit: core.serialization.ObjectSchema< modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), number: core.serialization.string().optional(), transactionDate: core.serialization.property("transaction_date", core.serialization.date().optional()), - vendor: core.serialization.lazy(async () => (await import("../../..")).accounting.VendorCreditVendor).optional(), + vendor: VendorCreditVendor.optional(), totalAmount: core.serialization.property("total_amount", core.serialization.number().optional()), - currency: core.serialization - .lazy(async () => (await import("../../..")).accounting.VendorCreditCurrency) - .optional(), + currency: VendorCreditCurrency.optional(), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), inclusiveOfTax: core.serialization.property("inclusive_of_tax", core.serialization.boolean().optional()), - company: core.serialization.lazy(async () => (await import("../../..")).accounting.VendorCreditCompany).optional(), - lines: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.VendorCreditLine)) - .optional(), + company: VendorCreditCompany.optional(), + lines: core.serialization.list(VendorCreditLine).optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).accounting.VendorCreditTrackingCategoriesItem) - .optional() - ) - .optional() + core.serialization.list(VendorCreditTrackingCategoriesItem.optional()).optional() ), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), - accountingPeriod: core.serialization.property( - "accounting_period", - core.serialization - .lazy(async () => (await import("../../..")).accounting.VendorCreditAccountingPeriod) - .optional() - ), + accountingPeriod: core.serialization.property("accounting_period", VendorCreditAccountingPeriod.optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).accounting.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace VendorCredit { @@ -64,19 +51,17 @@ export declare namespace VendorCredit { modified_at?: string | null; number?: string | null; transaction_date?: string | null; - vendor?: serializers.accounting.VendorCreditVendor.Raw | null; + vendor?: VendorCreditVendor.Raw | null; total_amount?: number | null; - currency?: serializers.accounting.VendorCreditCurrency.Raw | null; + currency?: VendorCreditCurrency.Raw | null; exchange_rate?: string | null; inclusive_of_tax?: boolean | null; - company?: serializers.accounting.VendorCreditCompany.Raw | null; - lines?: serializers.accounting.VendorCreditLine.Raw[] | null; - tracking_categories?: - | (serializers.accounting.VendorCreditTrackingCategoriesItem.Raw | null | undefined)[] - | null; + company?: VendorCreditCompany.Raw | null; + lines?: VendorCreditLine.Raw[] | null; + tracking_categories?: (VendorCreditTrackingCategoriesItem.Raw | null | undefined)[] | null; remote_was_deleted?: boolean | null; - accounting_period?: serializers.accounting.VendorCreditAccountingPeriod.Raw | null; + accounting_period?: VendorCreditAccountingPeriod.Raw | null; field_mappings?: Record | null; - remote_data?: serializers.accounting.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/accounting/types/VendorCreditAccountingPeriod.ts b/src/serialization/resources/accounting/types/VendorCreditAccountingPeriod.ts index f60e63384..54f8abbd4 100644 --- a/src/serialization/resources/accounting/types/VendorCreditAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/VendorCreditAccountingPeriod.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountingPeriod } from "./AccountingPeriod"; export const VendorCreditAccountingPeriod: core.serialization.Schema< serializers.accounting.VendorCreditAccountingPeriod.Raw, Merge.accounting.VendorCreditAccountingPeriod -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.AccountingPeriod), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace VendorCreditAccountingPeriod { - type Raw = string | serializers.accounting.AccountingPeriod.Raw; + type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditCompany.ts b/src/serialization/resources/accounting/types/VendorCreditCompany.ts index 0f90cfe80..86105881a 100644 --- a/src/serialization/resources/accounting/types/VendorCreditCompany.ts +++ b/src/serialization/resources/accounting/types/VendorCreditCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CompanyInfo } from "./CompanyInfo"; export const VendorCreditCompany: core.serialization.Schema< serializers.accounting.VendorCreditCompany.Raw, Merge.accounting.VendorCreditCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.CompanyInfo), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace VendorCreditCompany { - type Raw = string | serializers.accounting.CompanyInfo.Raw; + type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditCurrency.ts b/src/serialization/resources/accounting/types/VendorCreditCurrency.ts index 0eb7e2bf3..eb96faf69 100644 --- a/src/serialization/resources/accounting/types/VendorCreditCurrency.ts +++ b/src/serialization/resources/accounting/types/VendorCreditCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CurrencyEnum } from "./CurrencyEnum"; export const VendorCreditCurrency: core.serialization.Schema< serializers.accounting.VendorCreditCurrency.Raw, Merge.accounting.VendorCreditCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).accounting.CurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CurrencyEnum, core.serialization.string()]); export declare namespace VendorCreditCurrency { - type Raw = serializers.accounting.CurrencyEnum.Raw | string; + type Raw = CurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/VendorCreditLine.ts b/src/serialization/resources/accounting/types/VendorCreditLine.ts index da1e09ef7..2a8593f29 100644 --- a/src/serialization/resources/accounting/types/VendorCreditLine.ts +++ b/src/serialization/resources/accounting/types/VendorCreditLine.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { VendorCreditLineAccount } from "./VendorCreditLineAccount"; export const VendorCreditLine: core.serialization.ObjectSchema< serializers.accounting.VendorCreditLine.Raw, @@ -21,9 +22,7 @@ export const VendorCreditLine: core.serialization.ObjectSchema< core.serialization.list(core.serialization.string().optional()).optional() ), description: core.serialization.string().optional(), - account: core.serialization - .lazy(async () => (await import("../../..")).accounting.VendorCreditLineAccount) - .optional(), + account: VendorCreditLineAccount.optional(), company: core.serialization.string().optional(), taxRate: core.serialization.property("tax_rate", core.serialization.string().optional()), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), @@ -40,7 +39,7 @@ export declare namespace VendorCreditLine { tracking_category?: string | null; tracking_categories?: (string | null | undefined)[] | null; description?: string | null; - account?: serializers.accounting.VendorCreditLineAccount.Raw | null; + account?: VendorCreditLineAccount.Raw | null; company?: string | null; tax_rate?: string | null; exchange_rate?: string | null; diff --git a/src/serialization/resources/accounting/types/VendorCreditLineAccount.ts b/src/serialization/resources/accounting/types/VendorCreditLineAccount.ts index f414205c6..d8b52a1dd 100644 --- a/src/serialization/resources/accounting/types/VendorCreditLineAccount.ts +++ b/src/serialization/resources/accounting/types/VendorCreditLineAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const VendorCreditLineAccount: core.serialization.Schema< serializers.accounting.VendorCreditLineAccount.Raw, Merge.accounting.VendorCreditLineAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace VendorCreditLineAccount { - type Raw = string | serializers.accounting.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/VendorCreditTrackingCategoriesItem.ts index 79d2ec8a7..7701b1562 100644 --- a/src/serialization/resources/accounting/types/VendorCreditTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/VendorCreditTrackingCategoriesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TrackingCategory } from "./TrackingCategory"; export const VendorCreditTrackingCategoriesItem: core.serialization.Schema< serializers.accounting.VendorCreditTrackingCategoriesItem.Raw, Merge.accounting.VendorCreditTrackingCategoriesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.TrackingCategory), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace VendorCreditTrackingCategoriesItem { - type Raw = string | serializers.accounting.TrackingCategory.Raw; + type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditVendor.ts b/src/serialization/resources/accounting/types/VendorCreditVendor.ts index 64c8e2bdc..2a9f9ce00 100644 --- a/src/serialization/resources/accounting/types/VendorCreditVendor.ts +++ b/src/serialization/resources/accounting/types/VendorCreditVendor.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const VendorCreditVendor: core.serialization.Schema< serializers.accounting.VendorCreditVendor.Raw, Merge.accounting.VendorCreditVendor -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).accounting.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace VendorCreditVendor { - type Raw = string | serializers.accounting.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/WarningValidationProblem.ts b/src/serialization/resources/accounting/types/WarningValidationProblem.ts index 6e7371a74..9afb1b20b 100644 --- a/src/serialization/resources/accounting/types/WarningValidationProblem.ts +++ b/src/serialization/resources/accounting/types/WarningValidationProblem.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ValidationProblemSource } from "./ValidationProblemSource"; export const WarningValidationProblem: core.serialization.ObjectSchema< serializers.accounting.WarningValidationProblem.Raw, Merge.accounting.WarningValidationProblem > = core.serialization.object({ - source: core.serialization - .lazyObject(async () => (await import("../../..")).accounting.ValidationProblemSource) - .optional(), + source: ValidationProblemSource.optional(), title: core.serialization.string(), detail: core.serialization.string(), problemType: core.serialization.property("problem_type", core.serialization.string()), @@ -20,7 +19,7 @@ export const WarningValidationProblem: core.serialization.ObjectSchema< export declare namespace WarningValidationProblem { interface Raw { - source?: serializers.accounting.ValidationProblemSource.Raw | null; + source?: ValidationProblemSource.Raw | null; title: string; detail: string; problem_type: string; diff --git a/src/serialization/resources/accounting/types/WebhookReceiver.ts b/src/serialization/resources/accounting/types/WebhookReceiver.ts index 3eef43f73..8736dfc70 100644 --- a/src/serialization/resources/accounting/types/WebhookReceiver.ts +++ b/src/serialization/resources/accounting/types/WebhookReceiver.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const WebhookReceiver: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/resources/activities/client/requests/ActivityEndpointRequest.ts b/src/serialization/resources/ats/resources/activities/client/requests/ActivityEndpointRequest.ts index 13e38b917..36c1be4e8 100644 --- a/src/serialization/resources/ats/resources/activities/client/requests/ActivityEndpointRequest.ts +++ b/src/serialization/resources/ats/resources/activities/client/requests/ActivityEndpointRequest.ts @@ -2,21 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { ActivityRequest } from "../../../../types/ActivityRequest"; export const ActivityEndpointRequest: core.serialization.Schema< serializers.ats.ActivityEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).ats.ActivityRequest), + model: ActivityRequest, remoteUserId: core.serialization.property("remote_user_id", core.serialization.string()), }); export declare namespace ActivityEndpointRequest { interface Raw { - model: serializers.ats.ActivityRequest.Raw; + model: ActivityRequest.Raw; remote_user_id: string; } } diff --git a/src/serialization/resources/ats/resources/activities/types/ActivitiesListRequestRemoteFields.ts b/src/serialization/resources/ats/resources/activities/types/ActivitiesListRequestRemoteFields.ts index e5c2a1c27..a1370e397 100644 --- a/src/serialization/resources/ats/resources/activities/types/ActivitiesListRequestRemoteFields.ts +++ b/src/serialization/resources/ats/resources/activities/types/ActivitiesListRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ActivitiesListRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/activities/types/ActivitiesListRequestShowEnumOrigins.ts b/src/serialization/resources/ats/resources/activities/types/ActivitiesListRequestShowEnumOrigins.ts index ae0f6276f..e152f42c7 100644 --- a/src/serialization/resources/ats/resources/activities/types/ActivitiesListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/ats/resources/activities/types/ActivitiesListRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ActivitiesListRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestRemoteFields.ts b/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestRemoteFields.ts index a53d27adf..96edde8f9 100644 --- a/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ActivitiesRetrieveRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestShowEnumOrigins.ts index f831bc375..b12e10c27 100644 --- a/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ActivitiesRetrieveRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/applications/client/requests/ApplicationEndpointRequest.ts b/src/serialization/resources/ats/resources/applications/client/requests/ApplicationEndpointRequest.ts index 616907b90..4bea8c9fd 100644 --- a/src/serialization/resources/ats/resources/applications/client/requests/ApplicationEndpointRequest.ts +++ b/src/serialization/resources/ats/resources/applications/client/requests/ApplicationEndpointRequest.ts @@ -2,21 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { ApplicationRequest } from "../../../../types/ApplicationRequest"; export const ApplicationEndpointRequest: core.serialization.Schema< serializers.ats.ApplicationEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).ats.ApplicationRequest), + model: ApplicationRequest, remoteUserId: core.serialization.property("remote_user_id", core.serialization.string()), }); export declare namespace ApplicationEndpointRequest { interface Raw { - model: serializers.ats.ApplicationRequest.Raw; + model: ApplicationRequest.Raw; remote_user_id: string; } } diff --git a/src/serialization/resources/ats/resources/applications/client/requests/UpdateApplicationStageRequest.ts b/src/serialization/resources/ats/resources/applications/client/requests/UpdateApplicationStageRequest.ts index 99d86acf2..27b990214 100644 --- a/src/serialization/resources/ats/resources/applications/client/requests/UpdateApplicationStageRequest.ts +++ b/src/serialization/resources/ats/resources/applications/client/requests/UpdateApplicationStageRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const UpdateApplicationStageRequest: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/applications/types/ApplicationsListRequestExpand.ts b/src/serialization/resources/ats/resources/applications/types/ApplicationsListRequestExpand.ts index 0a9318707..bfca7e716 100644 --- a/src/serialization/resources/ats/resources/applications/types/ApplicationsListRequestExpand.ts +++ b/src/serialization/resources/ats/resources/applications/types/ApplicationsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ApplicationsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/applications/types/ApplicationsRetrieveRequestExpand.ts b/src/serialization/resources/ats/resources/applications/types/ApplicationsRetrieveRequestExpand.ts index e4832cafb..00325ad42 100644 --- a/src/serialization/resources/ats/resources/applications/types/ApplicationsRetrieveRequestExpand.ts +++ b/src/serialization/resources/ats/resources/applications/types/ApplicationsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ApplicationsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/serialization/resources/ats/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts index 3a6d38352..35928be2a 100644 --- a/src/serialization/resources/ats/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts +++ b/src/serialization/resources/ats/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { RemoteResponse } from "../../../types/RemoteResponse"; export const AsyncPassthroughRetrieveResponse: core.serialization.Schema< serializers.ats.AsyncPassthroughRetrieveResponse.Raw, Merge.ats.AsyncPassthroughRetrieveResponse -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazyObject(async () => (await import("../../../../..")).ats.RemoteResponse), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RemoteResponse, core.serialization.string()]); export declare namespace AsyncPassthroughRetrieveResponse { - type Raw = serializers.ats.RemoteResponse.Raw | string; + type Raw = RemoteResponse.Raw | string; } diff --git a/src/serialization/resources/ats/resources/attachments/client/requests/AttachmentEndpointRequest.ts b/src/serialization/resources/ats/resources/attachments/client/requests/AttachmentEndpointRequest.ts index 233bda95e..32cfc7639 100644 --- a/src/serialization/resources/ats/resources/attachments/client/requests/AttachmentEndpointRequest.ts +++ b/src/serialization/resources/ats/resources/attachments/client/requests/AttachmentEndpointRequest.ts @@ -2,21 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { AttachmentRequest } from "../../../../types/AttachmentRequest"; export const AttachmentEndpointRequest: core.serialization.Schema< serializers.ats.AttachmentEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).ats.AttachmentRequest), + model: AttachmentRequest, remoteUserId: core.serialization.property("remote_user_id", core.serialization.string()), }); export declare namespace AttachmentEndpointRequest { interface Raw { - model: serializers.ats.AttachmentRequest.Raw; + model: AttachmentRequest.Raw; remote_user_id: string; } } diff --git a/src/serialization/resources/ats/resources/candidates/client/requests/CandidateEndpointRequest.ts b/src/serialization/resources/ats/resources/candidates/client/requests/CandidateEndpointRequest.ts index 031e18f24..70a8cb61a 100644 --- a/src/serialization/resources/ats/resources/candidates/client/requests/CandidateEndpointRequest.ts +++ b/src/serialization/resources/ats/resources/candidates/client/requests/CandidateEndpointRequest.ts @@ -2,21 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { CandidateRequest } from "../../../../types/CandidateRequest"; export const CandidateEndpointRequest: core.serialization.Schema< serializers.ats.CandidateEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).ats.CandidateRequest), + model: CandidateRequest, remoteUserId: core.serialization.property("remote_user_id", core.serialization.string()), }); export declare namespace CandidateEndpointRequest { interface Raw { - model: serializers.ats.CandidateRequest.Raw; + model: CandidateRequest.Raw; remote_user_id: string; } } diff --git a/src/serialization/resources/ats/resources/candidates/client/requests/IgnoreCommonModelRequest.ts b/src/serialization/resources/ats/resources/candidates/client/requests/IgnoreCommonModelRequest.ts index b8cd3fb4d..326064e3d 100644 --- a/src/serialization/resources/ats/resources/candidates/client/requests/IgnoreCommonModelRequest.ts +++ b/src/serialization/resources/ats/resources/candidates/client/requests/IgnoreCommonModelRequest.ts @@ -2,21 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { ReasonEnum } from "../../../../types/ReasonEnum"; export const IgnoreCommonModelRequest: core.serialization.Schema< serializers.ats.IgnoreCommonModelRequest.Raw, Merge.ats.IgnoreCommonModelRequest > = core.serialization.object({ - reason: core.serialization.lazy(async () => (await import("../../../../../..")).ats.ReasonEnum), + reason: ReasonEnum, message: core.serialization.string().optional(), }); export declare namespace IgnoreCommonModelRequest { interface Raw { - reason: serializers.ats.ReasonEnum.Raw; + reason: ReasonEnum.Raw; message?: string | null; } } diff --git a/src/serialization/resources/ats/resources/candidates/client/requests/PatchedCandidateEndpointRequest.ts b/src/serialization/resources/ats/resources/candidates/client/requests/PatchedCandidateEndpointRequest.ts index 0cbfe61cf..7f052751e 100644 --- a/src/serialization/resources/ats/resources/candidates/client/requests/PatchedCandidateEndpointRequest.ts +++ b/src/serialization/resources/ats/resources/candidates/client/requests/PatchedCandidateEndpointRequest.ts @@ -2,21 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { PatchedCandidateRequest } from "../../../../types/PatchedCandidateRequest"; export const PatchedCandidateEndpointRequest: core.serialization.Schema< serializers.ats.PatchedCandidateEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).ats.PatchedCandidateRequest), + model: PatchedCandidateRequest, remoteUserId: core.serialization.property("remote_user_id", core.serialization.string()), }); export declare namespace PatchedCandidateEndpointRequest { interface Raw { - model: serializers.ats.PatchedCandidateRequest.Raw; + model: PatchedCandidateRequest.Raw; remote_user_id: string; } } diff --git a/src/serialization/resources/ats/resources/candidates/types/CandidatesListRequestExpand.ts b/src/serialization/resources/ats/resources/candidates/types/CandidatesListRequestExpand.ts index ff2d176e0..db05f312b 100644 --- a/src/serialization/resources/ats/resources/candidates/types/CandidatesListRequestExpand.ts +++ b/src/serialization/resources/ats/resources/candidates/types/CandidatesListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CandidatesListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/candidates/types/CandidatesRetrieveRequestExpand.ts b/src/serialization/resources/ats/resources/candidates/types/CandidatesRetrieveRequestExpand.ts index 1904e869d..d59f1e46c 100644 --- a/src/serialization/resources/ats/resources/candidates/types/CandidatesRetrieveRequestExpand.ts +++ b/src/serialization/resources/ats/resources/candidates/types/CandidatesRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CandidatesRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestRemoteFields.ts b/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestRemoteFields.ts index 95e77573a..446011cc4 100644 --- a/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestRemoteFields.ts +++ b/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EeocsListRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestShowEnumOrigins.ts b/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestShowEnumOrigins.ts index 875e2771a..a0b1dfd55 100644 --- a/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EeocsListRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestRemoteFields.ts b/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestRemoteFields.ts index 278012f50..a5aebc8bb 100644 --- a/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EeocsRetrieveRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestShowEnumOrigins.ts index e3980ff2f..911cc68fc 100644 --- a/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EeocsRetrieveRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts b/src/serialization/resources/ats/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts index d7a556ce0..3a5b83372 100644 --- a/src/serialization/resources/ats/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/serialization/resources/ats/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const CreateFieldMappingRequest: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts b/src/serialization/resources/ats/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts index 7a1bec847..21119b736 100644 --- a/src/serialization/resources/ats/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts +++ b/src/serialization/resources/ats/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const PatchedEditFieldMappingRequest: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/forceResync/client/syncStatusResyncCreate.ts b/src/serialization/resources/ats/resources/forceResync/client/syncStatusResyncCreate.ts index 0cf975c9f..2d6681df6 100644 --- a/src/serialization/resources/ats/resources/forceResync/client/syncStatusResyncCreate.ts +++ b/src/serialization/resources/ats/resources/forceResync/client/syncStatusResyncCreate.ts @@ -2,15 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { SyncStatus } from "../../../types/SyncStatus"; export const Response: core.serialization.Schema< serializers.ats.forceResync.syncStatusResyncCreate.Response.Raw, Merge.ats.SyncStatus[] -> = core.serialization.list(core.serialization.lazyObject(async () => (await import("../../../../..")).ats.SyncStatus)); +> = core.serialization.list(SyncStatus); export declare namespace Response { - type Raw = serializers.ats.SyncStatus.Raw[]; + type Raw = SyncStatus.Raw[]; } diff --git a/src/serialization/resources/ats/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts b/src/serialization/resources/ats/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts index 0cc3cc668..81e91d2dd 100644 --- a/src/serialization/resources/ats/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts +++ b/src/serialization/resources/ats/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const GenerateRemoteKeyRequest: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/interviews/client/requests/ScheduledInterviewEndpointRequest.ts b/src/serialization/resources/ats/resources/interviews/client/requests/ScheduledInterviewEndpointRequest.ts index 4a9d341da..b4b863888 100644 --- a/src/serialization/resources/ats/resources/interviews/client/requests/ScheduledInterviewEndpointRequest.ts +++ b/src/serialization/resources/ats/resources/interviews/client/requests/ScheduledInterviewEndpointRequest.ts @@ -2,21 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { ScheduledInterviewRequest } from "../../../../types/ScheduledInterviewRequest"; export const ScheduledInterviewEndpointRequest: core.serialization.Schema< serializers.ats.ScheduledInterviewEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).ats.ScheduledInterviewRequest), + model: ScheduledInterviewRequest, remoteUserId: core.serialization.property("remote_user_id", core.serialization.string()), }); export declare namespace ScheduledInterviewEndpointRequest { interface Raw { - model: serializers.ats.ScheduledInterviewRequest.Raw; + model: ScheduledInterviewRequest.Raw; remote_user_id: string; } } diff --git a/src/serialization/resources/ats/resources/interviews/types/InterviewsListRequestExpand.ts b/src/serialization/resources/ats/resources/interviews/types/InterviewsListRequestExpand.ts index a311c515f..ef41b29ea 100644 --- a/src/serialization/resources/ats/resources/interviews/types/InterviewsListRequestExpand.ts +++ b/src/serialization/resources/ats/resources/interviews/types/InterviewsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const InterviewsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/interviews/types/InterviewsRetrieveRequestExpand.ts b/src/serialization/resources/ats/resources/interviews/types/InterviewsRetrieveRequestExpand.ts index 84b2fa7a5..7f6b6bbc9 100644 --- a/src/serialization/resources/ats/resources/interviews/types/InterviewsRetrieveRequestExpand.ts +++ b/src/serialization/resources/ats/resources/interviews/types/InterviewsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const InterviewsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/issues/types/IssuesListRequestStatus.ts b/src/serialization/resources/ats/resources/issues/types/IssuesListRequestStatus.ts index d7ff219e1..ed6e44666 100644 --- a/src/serialization/resources/ats/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/serialization/resources/ats/resources/issues/types/IssuesListRequestStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const IssuesListRequestStatus: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/jobPostings/types/JobPostingsListRequestStatus.ts b/src/serialization/resources/ats/resources/jobPostings/types/JobPostingsListRequestStatus.ts index eb442db0c..4d4faae98 100644 --- a/src/serialization/resources/ats/resources/jobPostings/types/JobPostingsListRequestStatus.ts +++ b/src/serialization/resources/ats/resources/jobPostings/types/JobPostingsListRequestStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const JobPostingsListRequestStatus: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/jobs/types/JobsListRequestExpand.ts b/src/serialization/resources/ats/resources/jobs/types/JobsListRequestExpand.ts index 6fd5965a1..17a6eb83f 100644 --- a/src/serialization/resources/ats/resources/jobs/types/JobsListRequestExpand.ts +++ b/src/serialization/resources/ats/resources/jobs/types/JobsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const JobsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/jobs/types/JobsListRequestStatus.ts b/src/serialization/resources/ats/resources/jobs/types/JobsListRequestStatus.ts index ee381ac92..45ee669b0 100644 --- a/src/serialization/resources/ats/resources/jobs/types/JobsListRequestStatus.ts +++ b/src/serialization/resources/ats/resources/jobs/types/JobsListRequestStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const JobsListRequestStatus: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/jobs/types/JobsRetrieveRequestExpand.ts b/src/serialization/resources/ats/resources/jobs/types/JobsRetrieveRequestExpand.ts index cd32db33b..0b0dd3b2d 100644 --- a/src/serialization/resources/ats/resources/jobs/types/JobsRetrieveRequestExpand.ts +++ b/src/serialization/resources/ats/resources/jobs/types/JobsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const JobsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/jobs/types/JobsScreeningQuestionsListRequestExpand.ts b/src/serialization/resources/ats/resources/jobs/types/JobsScreeningQuestionsListRequestExpand.ts index 25189342d..0b53c6fb3 100644 --- a/src/serialization/resources/ats/resources/jobs/types/JobsScreeningQuestionsListRequestExpand.ts +++ b/src/serialization/resources/ats/resources/jobs/types/JobsScreeningQuestionsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const JobsScreeningQuestionsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/linkToken/client/requests/EndUserDetailsRequest.ts b/src/serialization/resources/ats/resources/linkToken/client/requests/EndUserDetailsRequest.ts index f15f023a0..9fc620ff7 100644 --- a/src/serialization/resources/ats/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/serialization/resources/ats/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { CategoriesEnum } from "../../../../types/CategoriesEnum"; +import { CommonModelScopesBodyRequest } from "../../../../types/CommonModelScopesBodyRequest"; +import { IndividualCommonModelScopeDeserializerRequest } from "../../../../types/IndividualCommonModelScopeDeserializerRequest"; +import { LanguageEnum } from "../../../../types/LanguageEnum"; export const EndUserDetailsRequest: core.serialization.Schema< serializers.ats.EndUserDetailsRequest.Raw, @@ -13,9 +17,7 @@ export const EndUserDetailsRequest: core.serialization.Schema< endUserEmailAddress: core.serialization.property("end_user_email_address", core.serialization.string()), endUserOrganizationName: core.serialization.property("end_user_organization_name", core.serialization.string()), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string()), - categories: core.serialization.list( - core.serialization.lazy(async () => (await import("../../../../../..")).ats.CategoriesEnum) - ), + categories: core.serialization.list(CategoriesEnum), integration: core.serialization.string().optional(), linkExpiryMins: core.serialization.property("link_expiry_mins", core.serialization.number().optional()), shouldCreateMagicLinkUrl: core.serialization.property( @@ -25,31 +27,18 @@ export const EndUserDetailsRequest: core.serialization.Schema< hideAdminMagicLink: core.serialization.property("hide_admin_magic_link", core.serialization.boolean().optional()), commonModels: core.serialization.property( "common_models", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../../../../..")).ats.CommonModelScopesBodyRequest - ) - ) - .optional() + core.serialization.list(CommonModelScopesBodyRequest).optional() ), categoryCommonModelScopes: core.serialization.property( "category_common_model_scopes", core.serialization .record( core.serialization.string(), - core.serialization - .list( - core.serialization.lazyObject( - async () => - (await import("../../../../../..")).ats.IndividualCommonModelScopeDeserializerRequest - ) - ) - .optional() + core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional() ) .optional() ), - language: core.serialization.lazy(async () => (await import("../../../../../..")).ats.LanguageEnum).optional(), + language: LanguageEnum.optional(), integrationSpecificConfig: core.serialization.property( "integration_specific_config", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -61,17 +50,17 @@ export declare namespace EndUserDetailsRequest { end_user_email_address: string; end_user_organization_name: string; end_user_origin_id: string; - categories: serializers.ats.CategoriesEnum.Raw[]; + categories: CategoriesEnum.Raw[]; integration?: string | null; link_expiry_mins?: number | null; should_create_magic_link_url?: boolean | null; hide_admin_magic_link?: boolean | null; - common_models?: serializers.ats.CommonModelScopesBodyRequest.Raw[] | null; + common_models?: CommonModelScopesBodyRequest.Raw[] | null; category_common_model_scopes?: Record< string, - serializers.ats.IndividualCommonModelScopeDeserializerRequest.Raw[] | null | undefined + IndividualCommonModelScopeDeserializerRequest.Raw[] | null | undefined > | null; - language?: serializers.ats.LanguageEnum.Raw | null; + language?: LanguageEnum.Raw | null; integration_specific_config?: Record | null; } } diff --git a/src/serialization/resources/ats/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/serialization/resources/ats/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index aa607d28c..61a886f10 100644 --- a/src/serialization/resources/ats/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/serialization/resources/ats/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const LinkedAccountsListRequestCategory: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/offers/types/OffersListRequestExpand.ts b/src/serialization/resources/ats/resources/offers/types/OffersListRequestExpand.ts index 0d95af1e8..3aba68c74 100644 --- a/src/serialization/resources/ats/resources/offers/types/OffersListRequestExpand.ts +++ b/src/serialization/resources/ats/resources/offers/types/OffersListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const OffersListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/offers/types/OffersRetrieveRequestExpand.ts b/src/serialization/resources/ats/resources/offers/types/OffersRetrieveRequestExpand.ts index 351752c04..dc8031a34 100644 --- a/src/serialization/resources/ats/resources/offers/types/OffersRetrieveRequestExpand.ts +++ b/src/serialization/resources/ats/resources/offers/types/OffersRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const OffersRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts b/src/serialization/resources/ats/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts index 815294915..ca82cc420 100644 --- a/src/serialization/resources/ats/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts +++ b/src/serialization/resources/ats/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const RemoteKeyForRegenerationRequest: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts b/src/serialization/resources/ats/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts index 823ed99bd..02aff2d84 100644 --- a/src/serialization/resources/ats/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/ats/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { IndividualCommonModelScopeDeserializerRequest } from "../../../../types/IndividualCommonModelScopeDeserializerRequest"; export const LinkedAccountCommonModelScopeDeserializerRequest: core.serialization.Schema< serializers.ats.LinkedAccountCommonModelScopeDeserializerRequest.Raw, @@ -12,16 +13,12 @@ export const LinkedAccountCommonModelScopeDeserializerRequest: core.serializatio > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list( - core.serialization.lazyObject( - async () => (await import("../../../../../..")).ats.IndividualCommonModelScopeDeserializerRequest - ) - ) + core.serialization.list(IndividualCommonModelScopeDeserializerRequest) ), }); export declare namespace LinkedAccountCommonModelScopeDeserializerRequest { interface Raw { - common_models: serializers.ats.IndividualCommonModelScopeDeserializerRequest.Raw[]; + common_models: IndividualCommonModelScopeDeserializerRequest.Raw[]; } } diff --git a/src/serialization/resources/ats/resources/scorecards/types/ScorecardsListRequestExpand.ts b/src/serialization/resources/ats/resources/scorecards/types/ScorecardsListRequestExpand.ts index c45b83161..f6e50a73d 100644 --- a/src/serialization/resources/ats/resources/scorecards/types/ScorecardsListRequestExpand.ts +++ b/src/serialization/resources/ats/resources/scorecards/types/ScorecardsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ScorecardsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/scorecards/types/ScorecardsRetrieveRequestExpand.ts b/src/serialization/resources/ats/resources/scorecards/types/ScorecardsRetrieveRequestExpand.ts index 98eb2e366..f9ef4ff17 100644 --- a/src/serialization/resources/ats/resources/scorecards/types/ScorecardsRetrieveRequestExpand.ts +++ b/src/serialization/resources/ats/resources/scorecards/types/ScorecardsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ScorecardsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ats/resources/webhookReceivers/client/list.ts b/src/serialization/resources/ats/resources/webhookReceivers/client/list.ts index a79dd94ec..e43b9bda5 100644 --- a/src/serialization/resources/ats/resources/webhookReceivers/client/list.ts +++ b/src/serialization/resources/ats/resources/webhookReceivers/client/list.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { WebhookReceiver } from "../../../types/WebhookReceiver"; export const Response: core.serialization.Schema< serializers.ats.webhookReceivers.list.Response.Raw, Merge.ats.WebhookReceiver[] -> = core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).ats.WebhookReceiver) -); +> = core.serialization.list(WebhookReceiver); export declare namespace Response { - type Raw = serializers.ats.WebhookReceiver.Raw[]; + type Raw = WebhookReceiver.Raw[]; } diff --git a/src/serialization/resources/ats/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts b/src/serialization/resources/ats/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts index f30206128..ae6904c51 100644 --- a/src/serialization/resources/ats/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts +++ b/src/serialization/resources/ats/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const WebhookReceiverRequest: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/AccessRoleEnum.ts b/src/serialization/resources/ats/types/AccessRoleEnum.ts index 1c76b5a47..d719b0faa 100644 --- a/src/serialization/resources/ats/types/AccessRoleEnum.ts +++ b/src/serialization/resources/ats/types/AccessRoleEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AccessRoleEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/AccountDetails.ts b/src/serialization/resources/ats/types/AccountDetails.ts index 7b24e10a8..bb15183bb 100644 --- a/src/serialization/resources/ats/types/AccountDetails.ts +++ b/src/serialization/resources/ats/types/AccountDetails.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoryEnum } from "./CategoryEnum"; export const AccountDetails: core.serialization.ObjectSchema< serializers.ats.AccountDetails.Raw, @@ -13,7 +14,7 @@ export const AccountDetails: core.serialization.ObjectSchema< id: core.serialization.string().optional(), integration: core.serialization.string().optional(), integrationSlug: core.serialization.property("integration_slug", core.serialization.string().optional()), - category: core.serialization.lazy(async () => (await import("../../..")).ats.CategoryEnum).optional(), + category: CategoryEnum.optional(), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property( "end_user_organization_name", @@ -32,7 +33,7 @@ export declare namespace AccountDetails { id?: string | null; integration?: string | null; integration_slug?: string | null; - category?: serializers.ats.CategoryEnum.Raw | null; + category?: CategoryEnum.Raw | null; end_user_origin_id?: string | null; end_user_organization_name?: string | null; end_user_email_address?: string | null; diff --git a/src/serialization/resources/ats/types/AccountDetailsAndActions.ts b/src/serialization/resources/ats/types/AccountDetailsAndActions.ts index 8a7e4e5b1..053aa7537 100644 --- a/src/serialization/resources/ats/types/AccountDetailsAndActions.ts +++ b/src/serialization/resources/ats/types/AccountDetailsAndActions.ts @@ -2,17 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoryEnum } from "./CategoryEnum"; +import { AccountDetailsAndActionsStatusEnum } from "./AccountDetailsAndActionsStatusEnum"; +import { AccountDetailsAndActionsIntegration } from "./AccountDetailsAndActionsIntegration"; export const AccountDetailsAndActions: core.serialization.ObjectSchema< serializers.ats.AccountDetailsAndActions.Raw, Merge.ats.AccountDetailsAndActions > = core.serialization.object({ id: core.serialization.string(), - category: core.serialization.lazy(async () => (await import("../../..")).ats.CategoryEnum).optional(), - status: core.serialization.lazy(async () => (await import("../../..")).ats.AccountDetailsAndActionsStatusEnum), + category: CategoryEnum.optional(), + status: AccountDetailsAndActionsStatusEnum, statusDetail: core.serialization.property("status_detail", core.serialization.string().optional()), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property("end_user_organization_name", core.serialization.string()), @@ -20,9 +23,7 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< subdomain: core.serialization.string().optional(), webhookListenerUrl: core.serialization.property("webhook_listener_url", core.serialization.string()), isDuplicate: core.serialization.property("is_duplicate", core.serialization.boolean().optional()), - integration: core.serialization - .lazyObject(async () => (await import("../../..")).ats.AccountDetailsAndActionsIntegration) - .optional(), + integration: AccountDetailsAndActionsIntegration.optional(), accountType: core.serialization.property("account_type", core.serialization.string()), completedAt: core.serialization.property("completed_at", core.serialization.date()), }); @@ -30,8 +31,8 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< export declare namespace AccountDetailsAndActions { interface Raw { id: string; - category?: serializers.ats.CategoryEnum.Raw | null; - status: serializers.ats.AccountDetailsAndActionsStatusEnum.Raw; + category?: CategoryEnum.Raw | null; + status: AccountDetailsAndActionsStatusEnum.Raw; status_detail?: string | null; end_user_origin_id?: string | null; end_user_organization_name: string; @@ -39,7 +40,7 @@ export declare namespace AccountDetailsAndActions { subdomain?: string | null; webhook_listener_url: string; is_duplicate?: boolean | null; - integration?: serializers.ats.AccountDetailsAndActionsIntegration.Raw | null; + integration?: AccountDetailsAndActionsIntegration.Raw | null; account_type: string; completed_at: string; } diff --git a/src/serialization/resources/ats/types/AccountDetailsAndActionsIntegration.ts b/src/serialization/resources/ats/types/AccountDetailsAndActionsIntegration.ts index 5653703cf..0eaf78e35 100644 --- a/src/serialization/resources/ats/types/AccountDetailsAndActionsIntegration.ts +++ b/src/serialization/resources/ats/types/AccountDetailsAndActionsIntegration.ts @@ -2,18 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoriesEnum } from "./CategoriesEnum"; +import { ModelOperation } from "./ModelOperation"; export const AccountDetailsAndActionsIntegration: core.serialization.ObjectSchema< serializers.ats.AccountDetailsAndActionsIntegration.Raw, Merge.ats.AccountDetailsAndActionsIntegration > = core.serialization.object({ name: core.serialization.string(), - categories: core.serialization.list( - core.serialization.lazy(async () => (await import("../../..")).ats.CategoriesEnum) - ), + categories: core.serialization.list(CategoriesEnum), image: core.serialization.string().optional(), squareImage: core.serialization.property("square_image", core.serialization.string().optional()), color: core.serialization.string(), @@ -21,21 +21,19 @@ export const AccountDetailsAndActionsIntegration: core.serialization.ObjectSchem passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ModelOperation)) - .optional() + core.serialization.list(ModelOperation).optional() ), }); export declare namespace AccountDetailsAndActionsIntegration { interface Raw { name: string; - categories: serializers.ats.CategoriesEnum.Raw[]; + categories: CategoriesEnum.Raw[]; image?: string | null; square_image?: string | null; color: string; slug: string; passthrough_available: boolean; - available_model_operations?: serializers.ats.ModelOperation.Raw[] | null; + available_model_operations?: ModelOperation.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/AccountDetailsAndActionsStatusEnum.ts b/src/serialization/resources/ats/types/AccountDetailsAndActionsStatusEnum.ts index f2368c41c..f44948cd7 100644 --- a/src/serialization/resources/ats/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/serialization/resources/ats/types/AccountDetailsAndActionsStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AccountDetailsAndActionsStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/AccountIntegration.ts b/src/serialization/resources/ats/types/AccountIntegration.ts index 6424e2656..5b43d9260 100644 --- a/src/serialization/resources/ats/types/AccountIntegration.ts +++ b/src/serialization/resources/ats/types/AccountIntegration.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoriesEnum } from "./CategoriesEnum"; export const AccountIntegration: core.serialization.ObjectSchema< serializers.ats.AccountIntegration.Raw, @@ -12,9 +13,7 @@ export const AccountIntegration: core.serialization.ObjectSchema< > = core.serialization.object({ name: core.serialization.string(), abbreviatedName: core.serialization.property("abbreviated_name", core.serialization.string().optional()), - categories: core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).ats.CategoriesEnum)) - .optional(), + categories: core.serialization.list(CategoriesEnum).optional(), image: core.serialization.string().optional(), squareImage: core.serialization.property("square_image", core.serialization.string().optional()), color: core.serialization.string().optional(), @@ -37,7 +36,7 @@ export declare namespace AccountIntegration { interface Raw { name: string; abbreviated_name?: string | null; - categories?: serializers.ats.CategoriesEnum.Raw[] | null; + categories?: CategoriesEnum.Raw[] | null; image?: string | null; square_image?: string | null; color?: string | null; diff --git a/src/serialization/resources/ats/types/AccountToken.ts b/src/serialization/resources/ats/types/AccountToken.ts index fc3fa59b8..de4073b18 100644 --- a/src/serialization/resources/ats/types/AccountToken.ts +++ b/src/serialization/resources/ats/types/AccountToken.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountIntegration } from "./AccountIntegration"; export const AccountToken: core.serialization.ObjectSchema = core.serialization.object({ accountToken: core.serialization.property("account_token", core.serialization.string()), - integration: core.serialization.lazyObject(async () => (await import("../../..")).ats.AccountIntegration), + integration: AccountIntegration, }); export declare namespace AccountToken { interface Raw { account_token: string; - integration: serializers.ats.AccountIntegration.Raw; + integration: AccountIntegration.Raw; } } diff --git a/src/serialization/resources/ats/types/Activity.ts b/src/serialization/resources/ats/types/Activity.ts index 68ef420c7..040eeb4ad 100644 --- a/src/serialization/resources/ats/types/Activity.ts +++ b/src/serialization/resources/ats/types/Activity.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ActivityUser } from "./ActivityUser"; +import { ActivityActivityType } from "./ActivityActivityType"; +import { ActivityVisibility } from "./ActivityVisibility"; +import { RemoteData } from "./RemoteData"; export const Activity: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,27 +16,19 @@ export const Activity: core.serialization.ObjectSchema (await import("../../..")).ats.ActivityUser).optional(), + user: ActivityUser.optional(), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), - activityType: core.serialization.property( - "activity_type", - core.serialization.lazy(async () => (await import("../../..")).ats.ActivityActivityType).optional() - ), + activityType: core.serialization.property("activity_type", ActivityActivityType.optional()), subject: core.serialization.string().optional(), body: core.serialization.string().optional(), - visibility: core.serialization.lazy(async () => (await import("../../..")).ats.ActivityVisibility).optional(), + visibility: ActivityVisibility.optional(), candidate: core.serialization.string().optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Activity { @@ -41,15 +37,15 @@ export declare namespace Activity { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - user?: serializers.ats.ActivityUser.Raw | null; + user?: ActivityUser.Raw | null; remote_created_at?: string | null; - activity_type?: serializers.ats.ActivityActivityType.Raw | null; + activity_type?: ActivityActivityType.Raw | null; subject?: string | null; body?: string | null; - visibility?: serializers.ats.ActivityVisibility.Raw | null; + visibility?: ActivityVisibility.Raw | null; candidate?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/ActivityActivityType.ts b/src/serialization/resources/ats/types/ActivityActivityType.ts index 16c05efc8..e7d43ea0d 100644 --- a/src/serialization/resources/ats/types/ActivityActivityType.ts +++ b/src/serialization/resources/ats/types/ActivityActivityType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ActivityTypeEnum } from "./ActivityTypeEnum"; export const ActivityActivityType: core.serialization.Schema< serializers.ats.ActivityActivityType.Raw, Merge.ats.ActivityActivityType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.ActivityTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([ActivityTypeEnum, core.serialization.string()]); export declare namespace ActivityActivityType { - type Raw = serializers.ats.ActivityTypeEnum.Raw | string; + type Raw = ActivityTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ActivityRequest.ts b/src/serialization/resources/ats/types/ActivityRequest.ts index 810d429ec..326afff28 100644 --- a/src/serialization/resources/ats/types/ActivityRequest.ts +++ b/src/serialization/resources/ats/types/ActivityRequest.ts @@ -2,24 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ActivityRequestUser } from "./ActivityRequestUser"; +import { ActivityRequestActivityType } from "./ActivityRequestActivityType"; +import { ActivityRequestVisibility } from "./ActivityRequestVisibility"; export const ActivityRequest: core.serialization.ObjectSchema< serializers.ats.ActivityRequest.Raw, Merge.ats.ActivityRequest > = core.serialization.object({ - user: core.serialization.lazy(async () => (await import("../../..")).ats.ActivityRequestUser).optional(), - activityType: core.serialization.property( - "activity_type", - core.serialization.lazy(async () => (await import("../../..")).ats.ActivityRequestActivityType).optional() - ), + user: ActivityRequestUser.optional(), + activityType: core.serialization.property("activity_type", ActivityRequestActivityType.optional()), subject: core.serialization.string().optional(), body: core.serialization.string().optional(), - visibility: core.serialization - .lazy(async () => (await import("../../..")).ats.ActivityRequestVisibility) - .optional(), + visibility: ActivityRequestVisibility.optional(), candidate: core.serialization.string().optional(), integrationParams: core.serialization.property( "integration_params", @@ -33,11 +31,11 @@ export const ActivityRequest: core.serialization.ObjectSchema< export declare namespace ActivityRequest { interface Raw { - user?: serializers.ats.ActivityRequestUser.Raw | null; - activity_type?: serializers.ats.ActivityRequestActivityType.Raw | null; + user?: ActivityRequestUser.Raw | null; + activity_type?: ActivityRequestActivityType.Raw | null; subject?: string | null; body?: string | null; - visibility?: serializers.ats.ActivityRequestVisibility.Raw | null; + visibility?: ActivityRequestVisibility.Raw | null; candidate?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; diff --git a/src/serialization/resources/ats/types/ActivityRequestActivityType.ts b/src/serialization/resources/ats/types/ActivityRequestActivityType.ts index 1fe5f11bc..e0f5588a9 100644 --- a/src/serialization/resources/ats/types/ActivityRequestActivityType.ts +++ b/src/serialization/resources/ats/types/ActivityRequestActivityType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ActivityTypeEnum } from "./ActivityTypeEnum"; export const ActivityRequestActivityType: core.serialization.Schema< serializers.ats.ActivityRequestActivityType.Raw, Merge.ats.ActivityRequestActivityType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.ActivityTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([ActivityTypeEnum, core.serialization.string()]); export declare namespace ActivityRequestActivityType { - type Raw = serializers.ats.ActivityTypeEnum.Raw | string; + type Raw = ActivityTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ActivityRequestUser.ts b/src/serialization/resources/ats/types/ActivityRequestUser.ts index 60ab5968e..324ba7545 100644 --- a/src/serialization/resources/ats/types/ActivityRequestUser.ts +++ b/src/serialization/resources/ats/types/ActivityRequestUser.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteUser } from "./RemoteUser"; export const ActivityRequestUser: core.serialization.Schema< serializers.ats.ActivityRequestUser.Raw, Merge.ats.ActivityRequestUser -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteUser), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ActivityRequestUser { - type Raw = string | serializers.ats.RemoteUser.Raw; + type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ActivityRequestVisibility.ts b/src/serialization/resources/ats/types/ActivityRequestVisibility.ts index e2f72a31d..a389123f4 100644 --- a/src/serialization/resources/ats/types/ActivityRequestVisibility.ts +++ b/src/serialization/resources/ats/types/ActivityRequestVisibility.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { VisibilityEnum } from "./VisibilityEnum"; export const ActivityRequestVisibility: core.serialization.Schema< serializers.ats.ActivityRequestVisibility.Raw, Merge.ats.ActivityRequestVisibility -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.VisibilityEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([VisibilityEnum, core.serialization.string()]); export declare namespace ActivityRequestVisibility { - type Raw = serializers.ats.VisibilityEnum.Raw | string; + type Raw = VisibilityEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ActivityResponse.ts b/src/serialization/resources/ats/types/ActivityResponse.ts index f4fb5df29..3ed689ec9 100644 --- a/src/serialization/resources/ats/types/ActivityResponse.ts +++ b/src/serialization/resources/ats/types/ActivityResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Activity } from "./Activity"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const ActivityResponse: core.serialization.ObjectSchema< serializers.ats.ActivityResponse.Raw, Merge.ats.ActivityResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).ats.Activity), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ats.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ats.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.DebugModeLog)) - .optional(), + model: Activity, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace ActivityResponse { interface Raw { - model: serializers.ats.Activity.Raw; - warnings: serializers.ats.WarningValidationProblem.Raw[]; - errors: serializers.ats.ErrorValidationProblem.Raw[]; - logs?: serializers.ats.DebugModeLog.Raw[] | null; + model: Activity.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/ActivityTypeEnum.ts b/src/serialization/resources/ats/types/ActivityTypeEnum.ts index 35aa33fc6..2974dde41 100644 --- a/src/serialization/resources/ats/types/ActivityTypeEnum.ts +++ b/src/serialization/resources/ats/types/ActivityTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ActivityTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/ActivityUser.ts b/src/serialization/resources/ats/types/ActivityUser.ts index 007c1774d..38e99bb6d 100644 --- a/src/serialization/resources/ats/types/ActivityUser.ts +++ b/src/serialization/resources/ats/types/ActivityUser.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteUser } from "./RemoteUser"; export const ActivityUser: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteUser), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ActivityUser { - type Raw = string | serializers.ats.RemoteUser.Raw; + type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ActivityVisibility.ts b/src/serialization/resources/ats/types/ActivityVisibility.ts index 50151411a..33f386b1d 100644 --- a/src/serialization/resources/ats/types/ActivityVisibility.ts +++ b/src/serialization/resources/ats/types/ActivityVisibility.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { VisibilityEnum } from "./VisibilityEnum"; export const ActivityVisibility: core.serialization.Schema< serializers.ats.ActivityVisibility.Raw, Merge.ats.ActivityVisibility -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.VisibilityEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([VisibilityEnum, core.serialization.string()]); export declare namespace ActivityVisibility { - type Raw = serializers.ats.VisibilityEnum.Raw | string; + type Raw = VisibilityEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/AdvancedMetadata.ts b/src/serialization/resources/ats/types/AdvancedMetadata.ts index 2db82d23f..0ca8efb54 100644 --- a/src/serialization/resources/ats/types/AdvancedMetadata.ts +++ b/src/serialization/resources/ats/types/AdvancedMetadata.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AdvancedMetadata: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/Application.ts b/src/serialization/resources/ats/types/Application.ts index fee4e8239..f6916273b 100644 --- a/src/serialization/resources/ats/types/Application.ts +++ b/src/serialization/resources/ats/types/Application.ts @@ -2,9 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ApplicationJob } from "./ApplicationJob"; +import { ApplicationCreditedTo } from "./ApplicationCreditedTo"; +import { ApplicationScreeningQuestionAnswersItem } from "./ApplicationScreeningQuestionAnswersItem"; +import { ApplicationCurrentStage } from "./ApplicationCurrentStage"; +import { ApplicationRejectReason } from "./ApplicationRejectReason"; +import { RemoteData } from "./RemoteData"; export const Application: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,47 +18,27 @@ export const Application: core.serialization.ObjectSchema (await import("../../..")).ats.ApplicationCandidate).optional(), - job: core.serialization.lazy(async () => (await import("../../..")).ats.ApplicationJob).optional(), + candidate: core.serialization.lazy(() => serializers.ats.ApplicationCandidate).optional(), + job: ApplicationJob.optional(), appliedAt: core.serialization.property("applied_at", core.serialization.date().optional()), rejectedAt: core.serialization.property("rejected_at", core.serialization.date().optional()), offers: core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).ats.ApplicationOffersItem).optional()) + .list(core.serialization.lazy(() => serializers.ats.ApplicationOffersItem).optional()) .optional(), source: core.serialization.string().optional(), - creditedTo: core.serialization.property( - "credited_to", - core.serialization.lazy(async () => (await import("../../..")).ats.ApplicationCreditedTo).optional() - ), + creditedTo: core.serialization.property("credited_to", ApplicationCreditedTo.optional()), screeningQuestionAnswers: core.serialization.property( "screening_question_answers", - core.serialization - .list( - core.serialization.lazy( - async () => (await import("../../..")).ats.ApplicationScreeningQuestionAnswersItem - ) - ) - .optional() - ), - currentStage: core.serialization.property( - "current_stage", - core.serialization.lazy(async () => (await import("../../..")).ats.ApplicationCurrentStage).optional() - ), - rejectReason: core.serialization.property( - "reject_reason", - core.serialization.lazy(async () => (await import("../../..")).ats.ApplicationRejectReason).optional() + core.serialization.list(ApplicationScreeningQuestionAnswersItem).optional() ), + currentStage: core.serialization.property("current_stage", ApplicationCurrentStage.optional()), + rejectReason: core.serialization.property("reject_reason", ApplicationRejectReason.optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Application { @@ -62,17 +48,17 @@ export declare namespace Application { created_at?: string | null; modified_at?: string | null; candidate?: serializers.ats.ApplicationCandidate.Raw | null; - job?: serializers.ats.ApplicationJob.Raw | null; + job?: ApplicationJob.Raw | null; applied_at?: string | null; rejected_at?: string | null; offers?: (serializers.ats.ApplicationOffersItem.Raw | null | undefined)[] | null; source?: string | null; - credited_to?: serializers.ats.ApplicationCreditedTo.Raw | null; - screening_question_answers?: serializers.ats.ApplicationScreeningQuestionAnswersItem.Raw[] | null; - current_stage?: serializers.ats.ApplicationCurrentStage.Raw | null; - reject_reason?: serializers.ats.ApplicationRejectReason.Raw | null; + credited_to?: ApplicationCreditedTo.Raw | null; + screening_question_answers?: ApplicationScreeningQuestionAnswersItem.Raw[] | null; + current_stage?: ApplicationCurrentStage.Raw | null; + reject_reason?: ApplicationRejectReason.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/ApplicationCandidate.ts b/src/serialization/resources/ats/types/ApplicationCandidate.ts index f2c4c06c4..ed4d02ff3 100644 --- a/src/serialization/resources/ats/types/ApplicationCandidate.ts +++ b/src/serialization/resources/ats/types/ApplicationCandidate.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ApplicationCandidate: core.serialization.Schema< @@ -11,7 +11,7 @@ export const ApplicationCandidate: core.serialization.Schema< Merge.ats.ApplicationCandidate > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Candidate), + core.serialization.lazyObject(() => serializers.ats.Candidate), ]); export declare namespace ApplicationCandidate { diff --git a/src/serialization/resources/ats/types/ApplicationCreditedTo.ts b/src/serialization/resources/ats/types/ApplicationCreditedTo.ts index edc6f88c1..eceb59942 100644 --- a/src/serialization/resources/ats/types/ApplicationCreditedTo.ts +++ b/src/serialization/resources/ats/types/ApplicationCreditedTo.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteUser } from "./RemoteUser"; export const ApplicationCreditedTo: core.serialization.Schema< serializers.ats.ApplicationCreditedTo.Raw, Merge.ats.ApplicationCreditedTo -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteUser), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ApplicationCreditedTo { - type Raw = string | serializers.ats.RemoteUser.Raw; + type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationCurrentStage.ts b/src/serialization/resources/ats/types/ApplicationCurrentStage.ts index 2624c1a41..259b18e07 100644 --- a/src/serialization/resources/ats/types/ApplicationCurrentStage.ts +++ b/src/serialization/resources/ats/types/ApplicationCurrentStage.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JobInterviewStage } from "./JobInterviewStage"; export const ApplicationCurrentStage: core.serialization.Schema< serializers.ats.ApplicationCurrentStage.Raw, Merge.ats.ApplicationCurrentStage -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.JobInterviewStage), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), JobInterviewStage]); export declare namespace ApplicationCurrentStage { - type Raw = string | serializers.ats.JobInterviewStage.Raw; + type Raw = string | JobInterviewStage.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationJob.ts b/src/serialization/resources/ats/types/ApplicationJob.ts index 27e62ca71..1b029b5a0 100644 --- a/src/serialization/resources/ats/types/ApplicationJob.ts +++ b/src/serialization/resources/ats/types/ApplicationJob.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Job } from "./Job"; export const ApplicationJob: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Job), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), Job]); export declare namespace ApplicationJob { - type Raw = string | serializers.ats.Job.Raw; + type Raw = string | Job.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationOffersItem.ts b/src/serialization/resources/ats/types/ApplicationOffersItem.ts index 3a75b3548..9e8404dee 100644 --- a/src/serialization/resources/ats/types/ApplicationOffersItem.ts +++ b/src/serialization/resources/ats/types/ApplicationOffersItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ApplicationOffersItem: core.serialization.Schema< @@ -11,7 +11,7 @@ export const ApplicationOffersItem: core.serialization.Schema< Merge.ats.ApplicationOffersItem > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Offer), + core.serialization.lazyObject(() => serializers.ats.Offer), ]); export declare namespace ApplicationOffersItem { diff --git a/src/serialization/resources/ats/types/ApplicationRejectReason.ts b/src/serialization/resources/ats/types/ApplicationRejectReason.ts index 5962e7761..a0de41f3f 100644 --- a/src/serialization/resources/ats/types/ApplicationRejectReason.ts +++ b/src/serialization/resources/ats/types/ApplicationRejectReason.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RejectReason } from "./RejectReason"; export const ApplicationRejectReason: core.serialization.Schema< serializers.ats.ApplicationRejectReason.Raw, Merge.ats.ApplicationRejectReason -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.RejectReason), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RejectReason]); export declare namespace ApplicationRejectReason { - type Raw = string | serializers.ats.RejectReason.Raw; + type Raw = string | RejectReason.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationRequest.ts b/src/serialization/resources/ats/types/ApplicationRequest.ts index 6712dfd0c..21c9a309a 100644 --- a/src/serialization/resources/ats/types/ApplicationRequest.ts +++ b/src/serialization/resources/ats/types/ApplicationRequest.ts @@ -2,48 +2,34 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ApplicationRequestCandidate } from "./ApplicationRequestCandidate"; +import { ApplicationRequestJob } from "./ApplicationRequestJob"; +import { ApplicationRequestOffersItem } from "./ApplicationRequestOffersItem"; +import { ApplicationRequestCreditedTo } from "./ApplicationRequestCreditedTo"; +import { ApplicationRequestScreeningQuestionAnswersItem } from "./ApplicationRequestScreeningQuestionAnswersItem"; +import { ApplicationRequestCurrentStage } from "./ApplicationRequestCurrentStage"; +import { ApplicationRequestRejectReason } from "./ApplicationRequestRejectReason"; export const ApplicationRequest: core.serialization.ObjectSchema< serializers.ats.ApplicationRequest.Raw, Merge.ats.ApplicationRequest > = core.serialization.object({ - candidate: core.serialization - .lazy(async () => (await import("../../..")).ats.ApplicationRequestCandidate) - .optional(), - job: core.serialization.lazy(async () => (await import("../../..")).ats.ApplicationRequestJob).optional(), + candidate: ApplicationRequestCandidate.optional(), + job: ApplicationRequestJob.optional(), appliedAt: core.serialization.property("applied_at", core.serialization.date().optional()), rejectedAt: core.serialization.property("rejected_at", core.serialization.date().optional()), - offers: core.serialization - .list( - core.serialization.lazy(async () => (await import("../../..")).ats.ApplicationRequestOffersItem).optional() - ) - .optional(), + offers: core.serialization.list(ApplicationRequestOffersItem.optional()).optional(), source: core.serialization.string().optional(), - creditedTo: core.serialization.property( - "credited_to", - core.serialization.lazy(async () => (await import("../../..")).ats.ApplicationRequestCreditedTo).optional() - ), + creditedTo: core.serialization.property("credited_to", ApplicationRequestCreditedTo.optional()), screeningQuestionAnswers: core.serialization.property( "screening_question_answers", - core.serialization - .list( - core.serialization.lazy( - async () => (await import("../../..")).ats.ApplicationRequestScreeningQuestionAnswersItem - ) - ) - .optional() - ), - currentStage: core.serialization.property( - "current_stage", - core.serialization.lazy(async () => (await import("../../..")).ats.ApplicationRequestCurrentStage).optional() - ), - rejectReason: core.serialization.property( - "reject_reason", - core.serialization.lazy(async () => (await import("../../..")).ats.ApplicationRequestRejectReason).optional() + core.serialization.list(ApplicationRequestScreeningQuestionAnswersItem).optional() ), + currentStage: core.serialization.property("current_stage", ApplicationRequestCurrentStage.optional()), + rejectReason: core.serialization.property("reject_reason", ApplicationRequestRejectReason.optional()), remoteTemplateId: core.serialization.property("remote_template_id", core.serialization.string().optional()), integrationParams: core.serialization.property( "integration_params", @@ -57,16 +43,16 @@ export const ApplicationRequest: core.serialization.ObjectSchema< export declare namespace ApplicationRequest { interface Raw { - candidate?: serializers.ats.ApplicationRequestCandidate.Raw | null; - job?: serializers.ats.ApplicationRequestJob.Raw | null; + candidate?: ApplicationRequestCandidate.Raw | null; + job?: ApplicationRequestJob.Raw | null; applied_at?: string | null; rejected_at?: string | null; - offers?: (serializers.ats.ApplicationRequestOffersItem.Raw | null | undefined)[] | null; + offers?: (ApplicationRequestOffersItem.Raw | null | undefined)[] | null; source?: string | null; - credited_to?: serializers.ats.ApplicationRequestCreditedTo.Raw | null; - screening_question_answers?: serializers.ats.ApplicationRequestScreeningQuestionAnswersItem.Raw[] | null; - current_stage?: serializers.ats.ApplicationRequestCurrentStage.Raw | null; - reject_reason?: serializers.ats.ApplicationRequestRejectReason.Raw | null; + credited_to?: ApplicationRequestCreditedTo.Raw | null; + screening_question_answers?: ApplicationRequestScreeningQuestionAnswersItem.Raw[] | null; + current_stage?: ApplicationRequestCurrentStage.Raw | null; + reject_reason?: ApplicationRequestRejectReason.Raw | null; remote_template_id?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; diff --git a/src/serialization/resources/ats/types/ApplicationRequestCandidate.ts b/src/serialization/resources/ats/types/ApplicationRequestCandidate.ts index 38ded36ff..be0bcb449 100644 --- a/src/serialization/resources/ats/types/ApplicationRequestCandidate.ts +++ b/src/serialization/resources/ats/types/ApplicationRequestCandidate.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ApplicationRequestCandidate: core.serialization.Schema< @@ -11,7 +11,7 @@ export const ApplicationRequestCandidate: core.serialization.Schema< Merge.ats.ApplicationRequestCandidate > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Candidate), + core.serialization.lazyObject(() => serializers.ats.Candidate), ]); export declare namespace ApplicationRequestCandidate { diff --git a/src/serialization/resources/ats/types/ApplicationRequestCreditedTo.ts b/src/serialization/resources/ats/types/ApplicationRequestCreditedTo.ts index 842a507cd..8ce0388ca 100644 --- a/src/serialization/resources/ats/types/ApplicationRequestCreditedTo.ts +++ b/src/serialization/resources/ats/types/ApplicationRequestCreditedTo.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteUser } from "./RemoteUser"; export const ApplicationRequestCreditedTo: core.serialization.Schema< serializers.ats.ApplicationRequestCreditedTo.Raw, Merge.ats.ApplicationRequestCreditedTo -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteUser), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ApplicationRequestCreditedTo { - type Raw = string | serializers.ats.RemoteUser.Raw; + type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationRequestCurrentStage.ts b/src/serialization/resources/ats/types/ApplicationRequestCurrentStage.ts index d299c5144..f69e5dc19 100644 --- a/src/serialization/resources/ats/types/ApplicationRequestCurrentStage.ts +++ b/src/serialization/resources/ats/types/ApplicationRequestCurrentStage.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JobInterviewStage } from "./JobInterviewStage"; export const ApplicationRequestCurrentStage: core.serialization.Schema< serializers.ats.ApplicationRequestCurrentStage.Raw, Merge.ats.ApplicationRequestCurrentStage -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.JobInterviewStage), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), JobInterviewStage]); export declare namespace ApplicationRequestCurrentStage { - type Raw = string | serializers.ats.JobInterviewStage.Raw; + type Raw = string | JobInterviewStage.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationRequestJob.ts b/src/serialization/resources/ats/types/ApplicationRequestJob.ts index 233c08b2d..2860069df 100644 --- a/src/serialization/resources/ats/types/ApplicationRequestJob.ts +++ b/src/serialization/resources/ats/types/ApplicationRequestJob.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Job } from "./Job"; export const ApplicationRequestJob: core.serialization.Schema< serializers.ats.ApplicationRequestJob.Raw, Merge.ats.ApplicationRequestJob -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Job), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Job]); export declare namespace ApplicationRequestJob { - type Raw = string | serializers.ats.Job.Raw; + type Raw = string | Job.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationRequestOffersItem.ts b/src/serialization/resources/ats/types/ApplicationRequestOffersItem.ts index 3c6d77869..315745e31 100644 --- a/src/serialization/resources/ats/types/ApplicationRequestOffersItem.ts +++ b/src/serialization/resources/ats/types/ApplicationRequestOffersItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ApplicationRequestOffersItem: core.serialization.Schema< @@ -11,7 +11,7 @@ export const ApplicationRequestOffersItem: core.serialization.Schema< Merge.ats.ApplicationRequestOffersItem > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Offer), + core.serialization.lazyObject(() => serializers.ats.Offer), ]); export declare namespace ApplicationRequestOffersItem { diff --git a/src/serialization/resources/ats/types/ApplicationRequestRejectReason.ts b/src/serialization/resources/ats/types/ApplicationRequestRejectReason.ts index 61ed71a0a..144183f84 100644 --- a/src/serialization/resources/ats/types/ApplicationRequestRejectReason.ts +++ b/src/serialization/resources/ats/types/ApplicationRequestRejectReason.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RejectReason } from "./RejectReason"; export const ApplicationRequestRejectReason: core.serialization.Schema< serializers.ats.ApplicationRequestRejectReason.Raw, Merge.ats.ApplicationRequestRejectReason -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.RejectReason), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RejectReason]); export declare namespace ApplicationRequestRejectReason { - type Raw = string | serializers.ats.RejectReason.Raw; + type Raw = string | RejectReason.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationRequestScreeningQuestionAnswersItem.ts b/src/serialization/resources/ats/types/ApplicationRequestScreeningQuestionAnswersItem.ts index 106c46526..380761d90 100644 --- a/src/serialization/resources/ats/types/ApplicationRequestScreeningQuestionAnswersItem.ts +++ b/src/serialization/resources/ats/types/ApplicationRequestScreeningQuestionAnswersItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScreeningQuestionAnswerRequest } from "./ScreeningQuestionAnswerRequest"; export const ApplicationRequestScreeningQuestionAnswersItem: core.serialization.Schema< serializers.ats.ApplicationRequestScreeningQuestionAnswersItem.Raw, Merge.ats.ApplicationRequestScreeningQuestionAnswersItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.ScreeningQuestionAnswerRequest), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), ScreeningQuestionAnswerRequest]); export declare namespace ApplicationRequestScreeningQuestionAnswersItem { - type Raw = string | serializers.ats.ScreeningQuestionAnswerRequest.Raw; + type Raw = string | ScreeningQuestionAnswerRequest.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationResponse.ts b/src/serialization/resources/ats/types/ApplicationResponse.ts index 92d6a5780..e8957e6b2 100644 --- a/src/serialization/resources/ats/types/ApplicationResponse.ts +++ b/src/serialization/resources/ats/types/ApplicationResponse.ts @@ -2,31 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const ApplicationResponse: core.serialization.ObjectSchema< serializers.ats.ApplicationResponse.Raw, Merge.ats.ApplicationResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).ats.Application), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ats.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ats.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.DebugModeLog)) - .optional(), + model: core.serialization.lazyObject(() => serializers.ats.Application), + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace ApplicationResponse { interface Raw { model: serializers.ats.Application.Raw; - warnings: serializers.ats.WarningValidationProblem.Raw[]; - errors: serializers.ats.ErrorValidationProblem.Raw[]; - logs?: serializers.ats.DebugModeLog.Raw[] | null; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/ApplicationScreeningQuestionAnswersItem.ts b/src/serialization/resources/ats/types/ApplicationScreeningQuestionAnswersItem.ts index b38c17357..083ce4285 100644 --- a/src/serialization/resources/ats/types/ApplicationScreeningQuestionAnswersItem.ts +++ b/src/serialization/resources/ats/types/ApplicationScreeningQuestionAnswersItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScreeningQuestionAnswer } from "./ScreeningQuestionAnswer"; export const ApplicationScreeningQuestionAnswersItem: core.serialization.Schema< serializers.ats.ApplicationScreeningQuestionAnswersItem.Raw, Merge.ats.ApplicationScreeningQuestionAnswersItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.ScreeningQuestionAnswer), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), ScreeningQuestionAnswer]); export declare namespace ApplicationScreeningQuestionAnswersItem { - type Raw = string | serializers.ats.ScreeningQuestionAnswer.Raw; + type Raw = string | ScreeningQuestionAnswer.Raw; } diff --git a/src/serialization/resources/ats/types/AsyncPassthroughReciept.ts b/src/serialization/resources/ats/types/AsyncPassthroughReciept.ts index b5bb54421..7a1d69c84 100644 --- a/src/serialization/resources/ats/types/AsyncPassthroughReciept.ts +++ b/src/serialization/resources/ats/types/AsyncPassthroughReciept.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AsyncPassthroughReciept: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/Attachment.ts b/src/serialization/resources/ats/types/Attachment.ts index b29cfca08..14ceff8cf 100644 --- a/src/serialization/resources/ats/types/Attachment.ts +++ b/src/serialization/resources/ats/types/Attachment.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AttachmentAttachmentType } from "./AttachmentAttachmentType"; +import { RemoteData } from "./RemoteData"; export const Attachment: core.serialization.ObjectSchema = core.serialization.object({ @@ -15,21 +17,13 @@ export const Attachment: core.serialization.ObjectSchema (await import("../../..")).ats.AttachmentAttachmentType).optional() - ), + attachmentType: core.serialization.property("attachment_type", AttachmentAttachmentType.optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Attachment { @@ -41,9 +35,9 @@ export declare namespace Attachment { file_name?: string | null; file_url?: string | null; candidate?: string | null; - attachment_type?: serializers.ats.AttachmentAttachmentType.Raw | null; + attachment_type?: AttachmentAttachmentType.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/AttachmentAttachmentType.ts b/src/serialization/resources/ats/types/AttachmentAttachmentType.ts index d618ca43d..af0c0ce05 100644 --- a/src/serialization/resources/ats/types/AttachmentAttachmentType.ts +++ b/src/serialization/resources/ats/types/AttachmentAttachmentType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AttachmentTypeEnum } from "./AttachmentTypeEnum"; export const AttachmentAttachmentType: core.serialization.Schema< serializers.ats.AttachmentAttachmentType.Raw, Merge.ats.AttachmentAttachmentType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.AttachmentTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([AttachmentTypeEnum, core.serialization.string()]); export declare namespace AttachmentAttachmentType { - type Raw = serializers.ats.AttachmentTypeEnum.Raw | string; + type Raw = AttachmentTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/AttachmentRequest.ts b/src/serialization/resources/ats/types/AttachmentRequest.ts index 51ca0a146..8ba5f6994 100644 --- a/src/serialization/resources/ats/types/AttachmentRequest.ts +++ b/src/serialization/resources/ats/types/AttachmentRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AttachmentRequestAttachmentType } from "./AttachmentRequestAttachmentType"; export const AttachmentRequest: core.serialization.ObjectSchema< serializers.ats.AttachmentRequest.Raw, @@ -13,10 +14,7 @@ export const AttachmentRequest: core.serialization.ObjectSchema< fileName: core.serialization.property("file_name", core.serialization.string().optional()), fileUrl: core.serialization.property("file_url", core.serialization.string().optional()), candidate: core.serialization.string().optional(), - attachmentType: core.serialization.property( - "attachment_type", - core.serialization.lazy(async () => (await import("../../..")).ats.AttachmentRequestAttachmentType).optional() - ), + attachmentType: core.serialization.property("attachment_type", AttachmentRequestAttachmentType.optional()), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -32,7 +30,7 @@ export declare namespace AttachmentRequest { file_name?: string | null; file_url?: string | null; candidate?: string | null; - attachment_type?: serializers.ats.AttachmentRequestAttachmentType.Raw | null; + attachment_type?: AttachmentRequestAttachmentType.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; } diff --git a/src/serialization/resources/ats/types/AttachmentRequestAttachmentType.ts b/src/serialization/resources/ats/types/AttachmentRequestAttachmentType.ts index 241720d27..98af99124 100644 --- a/src/serialization/resources/ats/types/AttachmentRequestAttachmentType.ts +++ b/src/serialization/resources/ats/types/AttachmentRequestAttachmentType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AttachmentTypeEnum } from "./AttachmentTypeEnum"; export const AttachmentRequestAttachmentType: core.serialization.Schema< serializers.ats.AttachmentRequestAttachmentType.Raw, Merge.ats.AttachmentRequestAttachmentType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.AttachmentTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([AttachmentTypeEnum, core.serialization.string()]); export declare namespace AttachmentRequestAttachmentType { - type Raw = serializers.ats.AttachmentTypeEnum.Raw | string; + type Raw = AttachmentTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/AttachmentResponse.ts b/src/serialization/resources/ats/types/AttachmentResponse.ts index 4b0d62d35..7037b838b 100644 --- a/src/serialization/resources/ats/types/AttachmentResponse.ts +++ b/src/serialization/resources/ats/types/AttachmentResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Attachment } from "./Attachment"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const AttachmentResponse: core.serialization.ObjectSchema< serializers.ats.AttachmentResponse.Raw, Merge.ats.AttachmentResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).ats.Attachment), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ats.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ats.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.DebugModeLog)) - .optional(), + model: Attachment, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace AttachmentResponse { interface Raw { - model: serializers.ats.Attachment.Raw; - warnings: serializers.ats.WarningValidationProblem.Raw[]; - errors: serializers.ats.ErrorValidationProblem.Raw[]; - logs?: serializers.ats.DebugModeLog.Raw[] | null; + model: Attachment.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/AttachmentTypeEnum.ts b/src/serialization/resources/ats/types/AttachmentTypeEnum.ts index b42288ad0..043a32cad 100644 --- a/src/serialization/resources/ats/types/AttachmentTypeEnum.ts +++ b/src/serialization/resources/ats/types/AttachmentTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AttachmentTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/AuditLogEvent.ts b/src/serialization/resources/ats/types/AuditLogEvent.ts index a262e3eaa..4746aab88 100644 --- a/src/serialization/resources/ats/types/AuditLogEvent.ts +++ b/src/serialization/resources/ats/types/AuditLogEvent.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AuditLogEventRole } from "./AuditLogEventRole"; +import { AuditLogEventEventType } from "./AuditLogEventEventType"; export const AuditLogEvent: core.serialization.ObjectSchema< serializers.ats.AuditLogEvent.Raw, @@ -13,12 +15,9 @@ export const AuditLogEvent: core.serialization.ObjectSchema< id: core.serialization.string().optional(), userName: core.serialization.property("user_name", core.serialization.string().optional()), userEmail: core.serialization.property("user_email", core.serialization.string().optional()), - role: core.serialization.lazy(async () => (await import("../../..")).ats.AuditLogEventRole), + role: AuditLogEventRole, ipAddress: core.serialization.property("ip_address", core.serialization.string()), - eventType: core.serialization.property( - "event_type", - core.serialization.lazy(async () => (await import("../../..")).ats.AuditLogEventEventType) - ), + eventType: core.serialization.property("event_type", AuditLogEventEventType), eventDescription: core.serialization.property("event_description", core.serialization.string()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), }); @@ -28,9 +27,9 @@ export declare namespace AuditLogEvent { id?: string | null; user_name?: string | null; user_email?: string | null; - role: serializers.ats.AuditLogEventRole.Raw; + role: AuditLogEventRole.Raw; ip_address: string; - event_type: serializers.ats.AuditLogEventEventType.Raw; + event_type: AuditLogEventEventType.Raw; event_description: string; created_at?: string | null; } diff --git a/src/serialization/resources/ats/types/AuditLogEventEventType.ts b/src/serialization/resources/ats/types/AuditLogEventEventType.ts index bf0c3c15a..85e2bec14 100644 --- a/src/serialization/resources/ats/types/AuditLogEventEventType.ts +++ b/src/serialization/resources/ats/types/AuditLogEventEventType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EventTypeEnum } from "./EventTypeEnum"; export const AuditLogEventEventType: core.serialization.Schema< serializers.ats.AuditLogEventEventType.Raw, Merge.ats.AuditLogEventEventType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.EventTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EventTypeEnum, core.serialization.string()]); export declare namespace AuditLogEventEventType { - type Raw = serializers.ats.EventTypeEnum.Raw | string; + type Raw = EventTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/AuditLogEventRole.ts b/src/serialization/resources/ats/types/AuditLogEventRole.ts index 56073d3ad..a5a4ec388 100644 --- a/src/serialization/resources/ats/types/AuditLogEventRole.ts +++ b/src/serialization/resources/ats/types/AuditLogEventRole.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RoleEnum } from "./RoleEnum"; export const AuditLogEventRole: core.serialization.Schema< serializers.ats.AuditLogEventRole.Raw, Merge.ats.AuditLogEventRole -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.RoleEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RoleEnum, core.serialization.string()]); export declare namespace AuditLogEventRole { - type Raw = serializers.ats.RoleEnum.Raw | string; + type Raw = RoleEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/AvailableActions.ts b/src/serialization/resources/ats/types/AvailableActions.ts index 010a98c73..a69df5546 100644 --- a/src/serialization/resources/ats/types/AvailableActions.ts +++ b/src/serialization/resources/ats/types/AvailableActions.ts @@ -2,28 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountIntegration } from "./AccountIntegration"; +import { ModelOperation } from "./ModelOperation"; export const AvailableActions: core.serialization.ObjectSchema< serializers.ats.AvailableActions.Raw, Merge.ats.AvailableActions > = core.serialization.object({ - integration: core.serialization.lazyObject(async () => (await import("../../..")).ats.AccountIntegration), + integration: AccountIntegration, passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ModelOperation)) - .optional() + core.serialization.list(ModelOperation).optional() ), }); export declare namespace AvailableActions { interface Raw { - integration: serializers.ats.AccountIntegration.Raw; + integration: AccountIntegration.Raw; passthrough_available: boolean; - available_model_operations?: serializers.ats.ModelOperation.Raw[] | null; + available_model_operations?: ModelOperation.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/Candidate.ts b/src/serialization/resources/ats/types/Candidate.ts index 20cd584b2..1941f8f59 100644 --- a/src/serialization/resources/ats/types/Candidate.ts +++ b/src/serialization/resources/ats/types/Candidate.ts @@ -2,9 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PhoneNumber } from "./PhoneNumber"; +import { EmailAddress } from "./EmailAddress"; +import { Url } from "./Url"; +import { CandidateAttachmentsItem } from "./CandidateAttachmentsItem"; +import { RemoteData } from "./RemoteData"; export const Candidate: core.serialization.ObjectSchema = core.serialization.object({ @@ -22,43 +27,23 @@ export const Candidate: core.serialization.ObjectSchema (await import("../../..")).ats.PhoneNumber)) - .optional() - ), + phoneNumbers: core.serialization.property("phone_numbers", core.serialization.list(PhoneNumber).optional()), emailAddresses: core.serialization.property( "email_addresses", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.EmailAddress)) - .optional() + core.serialization.list(EmailAddress).optional() ), - urls: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.Url)) - .optional(), + urls: core.serialization.list(Url).optional(), tags: core.serialization.list(core.serialization.string().optional()).optional(), applications: core.serialization - .list( - core.serialization.lazy(async () => (await import("../../..")).ats.CandidateApplicationsItem).optional() - ) - .optional(), - attachments: core.serialization - .list( - core.serialization.lazy(async () => (await import("../../..")).ats.CandidateAttachmentsItem).optional() - ) + .list(core.serialization.lazy(() => serializers.ats.CandidateApplicationsItem).optional()) .optional(), + attachments: core.serialization.list(CandidateAttachmentsItem.optional()).optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Candidate { @@ -77,14 +62,14 @@ export declare namespace Candidate { is_private?: boolean | null; can_email?: boolean | null; locations?: (string | null | undefined)[] | null; - phone_numbers?: serializers.ats.PhoneNumber.Raw[] | null; - email_addresses?: serializers.ats.EmailAddress.Raw[] | null; - urls?: serializers.ats.Url.Raw[] | null; + phone_numbers?: PhoneNumber.Raw[] | null; + email_addresses?: EmailAddress.Raw[] | null; + urls?: Url.Raw[] | null; tags?: (string | null | undefined)[] | null; applications?: (serializers.ats.CandidateApplicationsItem.Raw | null | undefined)[] | null; - attachments?: (serializers.ats.CandidateAttachmentsItem.Raw | null | undefined)[] | null; + attachments?: (CandidateAttachmentsItem.Raw | null | undefined)[] | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/CandidateApplicationsItem.ts b/src/serialization/resources/ats/types/CandidateApplicationsItem.ts index 1c28eba98..d3d7ea0a2 100644 --- a/src/serialization/resources/ats/types/CandidateApplicationsItem.ts +++ b/src/serialization/resources/ats/types/CandidateApplicationsItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CandidateApplicationsItem: core.serialization.Schema< @@ -11,7 +11,7 @@ export const CandidateApplicationsItem: core.serialization.Schema< Merge.ats.CandidateApplicationsItem > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Application), + core.serialization.lazyObject(() => serializers.ats.Application), ]); export declare namespace CandidateApplicationsItem { diff --git a/src/serialization/resources/ats/types/CandidateAttachmentsItem.ts b/src/serialization/resources/ats/types/CandidateAttachmentsItem.ts index cb03660a7..50988d973 100644 --- a/src/serialization/resources/ats/types/CandidateAttachmentsItem.ts +++ b/src/serialization/resources/ats/types/CandidateAttachmentsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Attachment } from "./Attachment"; export const CandidateAttachmentsItem: core.serialization.Schema< serializers.ats.CandidateAttachmentsItem.Raw, Merge.ats.CandidateAttachmentsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Attachment), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Attachment]); export declare namespace CandidateAttachmentsItem { - type Raw = string | serializers.ats.Attachment.Raw; + type Raw = string | Attachment.Raw; } diff --git a/src/serialization/resources/ats/types/CandidateRequest.ts b/src/serialization/resources/ats/types/CandidateRequest.ts index 619fc1c0c..330bace63 100644 --- a/src/serialization/resources/ats/types/CandidateRequest.ts +++ b/src/serialization/resources/ats/types/CandidateRequest.ts @@ -2,9 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PhoneNumberRequest } from "./PhoneNumberRequest"; +import { EmailAddressRequest } from "./EmailAddressRequest"; +import { UrlRequest } from "./UrlRequest"; +import { CandidateRequestApplicationsItem } from "./CandidateRequestApplicationsItem"; +import { CandidateRequestAttachmentsItem } from "./CandidateRequestAttachmentsItem"; export const CandidateRequest: core.serialization.ObjectSchema< serializers.ats.CandidateRequest.Raw, @@ -18,36 +23,15 @@ export const CandidateRequest: core.serialization.ObjectSchema< isPrivate: core.serialization.property("is_private", core.serialization.boolean().optional()), canEmail: core.serialization.property("can_email", core.serialization.boolean().optional()), locations: core.serialization.list(core.serialization.string().optional()).optional(), - phoneNumbers: core.serialization.property( - "phone_numbers", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.PhoneNumberRequest)) - .optional() - ), + phoneNumbers: core.serialization.property("phone_numbers", core.serialization.list(PhoneNumberRequest).optional()), emailAddresses: core.serialization.property( "email_addresses", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.EmailAddressRequest)) - .optional() + core.serialization.list(EmailAddressRequest).optional() ), - urls: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.UrlRequest)) - .optional(), + urls: core.serialization.list(UrlRequest).optional(), tags: core.serialization.list(core.serialization.string().optional()).optional(), - applications: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).ats.CandidateRequestApplicationsItem) - .optional() - ) - .optional(), - attachments: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).ats.CandidateRequestAttachmentsItem) - .optional() - ) - .optional(), + applications: core.serialization.list(CandidateRequestApplicationsItem.optional()).optional(), + attachments: core.serialization.list(CandidateRequestAttachmentsItem.optional()).optional(), remoteTemplateId: core.serialization.property("remote_template_id", core.serialization.string().optional()), integrationParams: core.serialization.property( "integration_params", @@ -69,12 +53,12 @@ export declare namespace CandidateRequest { is_private?: boolean | null; can_email?: boolean | null; locations?: (string | null | undefined)[] | null; - phone_numbers?: serializers.ats.PhoneNumberRequest.Raw[] | null; - email_addresses?: serializers.ats.EmailAddressRequest.Raw[] | null; - urls?: serializers.ats.UrlRequest.Raw[] | null; + phone_numbers?: PhoneNumberRequest.Raw[] | null; + email_addresses?: EmailAddressRequest.Raw[] | null; + urls?: UrlRequest.Raw[] | null; tags?: (string | null | undefined)[] | null; - applications?: (serializers.ats.CandidateRequestApplicationsItem.Raw | null | undefined)[] | null; - attachments?: (serializers.ats.CandidateRequestAttachmentsItem.Raw | null | undefined)[] | null; + applications?: (CandidateRequestApplicationsItem.Raw | null | undefined)[] | null; + attachments?: (CandidateRequestAttachmentsItem.Raw | null | undefined)[] | null; remote_template_id?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; diff --git a/src/serialization/resources/ats/types/CandidateRequestApplicationsItem.ts b/src/serialization/resources/ats/types/CandidateRequestApplicationsItem.ts index df4f36824..ef775e37e 100644 --- a/src/serialization/resources/ats/types/CandidateRequestApplicationsItem.ts +++ b/src/serialization/resources/ats/types/CandidateRequestApplicationsItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CandidateRequestApplicationsItem: core.serialization.Schema< @@ -11,7 +11,7 @@ export const CandidateRequestApplicationsItem: core.serialization.Schema< Merge.ats.CandidateRequestApplicationsItem > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Application), + core.serialization.lazyObject(() => serializers.ats.Application), ]); export declare namespace CandidateRequestApplicationsItem { diff --git a/src/serialization/resources/ats/types/CandidateRequestAttachmentsItem.ts b/src/serialization/resources/ats/types/CandidateRequestAttachmentsItem.ts index 82af5c864..76af97d94 100644 --- a/src/serialization/resources/ats/types/CandidateRequestAttachmentsItem.ts +++ b/src/serialization/resources/ats/types/CandidateRequestAttachmentsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Attachment } from "./Attachment"; export const CandidateRequestAttachmentsItem: core.serialization.Schema< serializers.ats.CandidateRequestAttachmentsItem.Raw, Merge.ats.CandidateRequestAttachmentsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Attachment), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Attachment]); export declare namespace CandidateRequestAttachmentsItem { - type Raw = string | serializers.ats.Attachment.Raw; + type Raw = string | Attachment.Raw; } diff --git a/src/serialization/resources/ats/types/CandidateResponse.ts b/src/serialization/resources/ats/types/CandidateResponse.ts index fde8dfeeb..2395b1e3d 100644 --- a/src/serialization/resources/ats/types/CandidateResponse.ts +++ b/src/serialization/resources/ats/types/CandidateResponse.ts @@ -2,31 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const CandidateResponse: core.serialization.ObjectSchema< serializers.ats.CandidateResponse.Raw, Merge.ats.CandidateResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).ats.Candidate), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ats.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ats.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.DebugModeLog)) - .optional(), + model: core.serialization.lazyObject(() => serializers.ats.Candidate), + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace CandidateResponse { interface Raw { model: serializers.ats.Candidate.Raw; - warnings: serializers.ats.WarningValidationProblem.Raw[]; - errors: serializers.ats.ErrorValidationProblem.Raw[]; - logs?: serializers.ats.DebugModeLog.Raw[] | null; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/CategoriesEnum.ts b/src/serialization/resources/ats/types/CategoriesEnum.ts index 2a5f52137..9ef9683da 100644 --- a/src/serialization/resources/ats/types/CategoriesEnum.ts +++ b/src/serialization/resources/ats/types/CategoriesEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CategoriesEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/CategoryEnum.ts b/src/serialization/resources/ats/types/CategoryEnum.ts index 426719b98..2805db510 100644 --- a/src/serialization/resources/ats/types/CategoryEnum.ts +++ b/src/serialization/resources/ats/types/CategoryEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CategoryEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/CommonModelScopeApi.ts b/src/serialization/resources/ats/types/CommonModelScopeApi.ts index cf8f903bb..8e89497d8 100644 --- a/src/serialization/resources/ats/types/CommonModelScopeApi.ts +++ b/src/serialization/resources/ats/types/CommonModelScopeApi.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IndividualCommonModelScopeDeserializer } from "./IndividualCommonModelScopeDeserializer"; export const CommonModelScopeApi: core.serialization.ObjectSchema< serializers.ats.CommonModelScopeApi.Raw, @@ -12,16 +13,12 @@ export const CommonModelScopeApi: core.serialization.ObjectSchema< > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list( - core.serialization.lazyObject( - async () => (await import("../../..")).ats.IndividualCommonModelScopeDeserializer - ) - ) + core.serialization.list(IndividualCommonModelScopeDeserializer) ), }); export declare namespace CommonModelScopeApi { interface Raw { - common_models: serializers.ats.IndividualCommonModelScopeDeserializer.Raw[]; + common_models: IndividualCommonModelScopeDeserializer.Raw[]; } } diff --git a/src/serialization/resources/ats/types/CommonModelScopesBodyRequest.ts b/src/serialization/resources/ats/types/CommonModelScopesBodyRequest.ts index 05ca8fda8..f654a16ff 100644 --- a/src/serialization/resources/ats/types/CommonModelScopesBodyRequest.ts +++ b/src/serialization/resources/ats/types/CommonModelScopesBodyRequest.ts @@ -2,19 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EnabledActionsEnum } from "./EnabledActionsEnum"; export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< serializers.ats.CommonModelScopesBodyRequest.Raw, Merge.ats.CommonModelScopesBodyRequest > = core.serialization.object({ modelId: core.serialization.property("model_id", core.serialization.string()), - enabledActions: core.serialization.property( - "enabled_actions", - core.serialization.list(core.serialization.lazy(async () => (await import("../../..")).ats.EnabledActionsEnum)) - ), + enabledActions: core.serialization.property("enabled_actions", core.serialization.list(EnabledActionsEnum)), disabledFields: core.serialization.property( "disabled_fields", core.serialization.list(core.serialization.string()) @@ -24,7 +22,7 @@ export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< export declare namespace CommonModelScopesBodyRequest { interface Raw { model_id: string; - enabled_actions: serializers.ats.EnabledActionsEnum.Raw[]; + enabled_actions: EnabledActionsEnum.Raw[]; disabled_fields: string[]; } } diff --git a/src/serialization/resources/ats/types/DataPassthroughRequest.ts b/src/serialization/resources/ats/types/DataPassthroughRequest.ts index 95cb9376b..a8aa2b83a 100644 --- a/src/serialization/resources/ats/types/DataPassthroughRequest.ts +++ b/src/serialization/resources/ats/types/DataPassthroughRequest.ts @@ -2,41 +2,39 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { MethodEnum } from "./MethodEnum"; +import { MultipartFormFieldRequest } from "./MultipartFormFieldRequest"; +import { RequestFormatEnum } from "./RequestFormatEnum"; export const DataPassthroughRequest: core.serialization.ObjectSchema< serializers.ats.DataPassthroughRequest.Raw, Merge.ats.DataPassthroughRequest > = core.serialization.object({ - method: core.serialization.lazy(async () => (await import("../../..")).ats.MethodEnum), + method: MethodEnum, path: core.serialization.string(), baseUrlOverride: core.serialization.property("base_url_override", core.serialization.string().optional()), data: core.serialization.string().optional(), multipartFormData: core.serialization.property( "multipart_form_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.MultipartFormFieldRequest)) - .optional() + core.serialization.list(MultipartFormFieldRequest).optional() ), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), - requestFormat: core.serialization.property( - "request_format", - core.serialization.lazy(async () => (await import("../../..")).ats.RequestFormatEnum).optional() - ), + requestFormat: core.serialization.property("request_format", RequestFormatEnum.optional()), normalizeResponse: core.serialization.property("normalize_response", core.serialization.boolean().optional()), }); export declare namespace DataPassthroughRequest { interface Raw { - method: serializers.ats.MethodEnum.Raw; + method: MethodEnum.Raw; path: string; base_url_override?: string | null; data?: string | null; - multipart_form_data?: serializers.ats.MultipartFormFieldRequest.Raw[] | null; + multipart_form_data?: MultipartFormFieldRequest.Raw[] | null; headers?: Record | null; - request_format?: serializers.ats.RequestFormatEnum.Raw | null; + request_format?: RequestFormatEnum.Raw | null; normalize_response?: boolean | null; } } diff --git a/src/serialization/resources/ats/types/DebugModeLog.ts b/src/serialization/resources/ats/types/DebugModeLog.ts index b2979bb28..dafb54d14 100644 --- a/src/serialization/resources/ats/types/DebugModeLog.ts +++ b/src/serialization/resources/ats/types/DebugModeLog.ts @@ -2,24 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { DebugModelLogSummary } from "./DebugModelLogSummary"; export const DebugModeLog: core.serialization.ObjectSchema = core.serialization.object({ logId: core.serialization.property("log_id", core.serialization.string()), dashboardView: core.serialization.property("dashboard_view", core.serialization.string()), - logSummary: core.serialization.property( - "log_summary", - core.serialization.lazyObject(async () => (await import("../../..")).ats.DebugModelLogSummary) - ), + logSummary: core.serialization.property("log_summary", DebugModelLogSummary), }); export declare namespace DebugModeLog { interface Raw { log_id: string; dashboard_view: string; - log_summary: serializers.ats.DebugModelLogSummary.Raw; + log_summary: DebugModelLogSummary.Raw; } } diff --git a/src/serialization/resources/ats/types/DebugModelLogSummary.ts b/src/serialization/resources/ats/types/DebugModelLogSummary.ts index a0c6ec7f8..1c1493d49 100644 --- a/src/serialization/resources/ats/types/DebugModelLogSummary.ts +++ b/src/serialization/resources/ats/types/DebugModelLogSummary.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const DebugModelLogSummary: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/Department.ts b/src/serialization/resources/ats/types/Department.ts index 0161a5864..5fcae4458 100644 --- a/src/serialization/resources/ats/types/Department.ts +++ b/src/serialization/resources/ats/types/Department.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; export const Department: core.serialization.ObjectSchema = core.serialization.object({ @@ -18,12 +19,7 @@ export const Department: core.serialization.ObjectSchema (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Department { @@ -35,6 +31,6 @@ export declare namespace Department { name?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/DisabilityStatusEnum.ts b/src/serialization/resources/ats/types/DisabilityStatusEnum.ts index d38701a8e..14db1b274 100644 --- a/src/serialization/resources/ats/types/DisabilityStatusEnum.ts +++ b/src/serialization/resources/ats/types/DisabilityStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const DisabilityStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/Eeoc.ts b/src/serialization/resources/ats/types/Eeoc.ts index 560f0e290..e7486738d 100644 --- a/src/serialization/resources/ats/types/Eeoc.ts +++ b/src/serialization/resources/ats/types/Eeoc.ts @@ -2,9 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EeocCandidate } from "./EeocCandidate"; +import { EeocRace } from "./EeocRace"; +import { EeocGender } from "./EeocGender"; +import { EeocVeteranStatus } from "./EeocVeteranStatus"; +import { EeocDisabilityStatus } from "./EeocDisabilityStatus"; +import { RemoteData } from "./RemoteData"; export const Eeoc: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,29 +18,18 @@ export const Eeoc: core.serialization.ObjectSchema (await import("../../..")).ats.EeocCandidate).optional(), + candidate: EeocCandidate.optional(), submittedAt: core.serialization.property("submitted_at", core.serialization.date().optional()), - race: core.serialization.lazy(async () => (await import("../../..")).ats.EeocRace).optional(), - gender: core.serialization.lazy(async () => (await import("../../..")).ats.EeocGender).optional(), - veteranStatus: core.serialization.property( - "veteran_status", - core.serialization.lazy(async () => (await import("../../..")).ats.EeocVeteranStatus).optional() - ), - disabilityStatus: core.serialization.property( - "disability_status", - core.serialization.lazy(async () => (await import("../../..")).ats.EeocDisabilityStatus).optional() - ), + race: EeocRace.optional(), + gender: EeocGender.optional(), + veteranStatus: core.serialization.property("veteran_status", EeocVeteranStatus.optional()), + disabilityStatus: core.serialization.property("disability_status", EeocDisabilityStatus.optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Eeoc { @@ -43,14 +38,14 @@ export declare namespace Eeoc { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - candidate?: serializers.ats.EeocCandidate.Raw | null; + candidate?: EeocCandidate.Raw | null; submitted_at?: string | null; - race?: serializers.ats.EeocRace.Raw | null; - gender?: serializers.ats.EeocGender.Raw | null; - veteran_status?: serializers.ats.EeocVeteranStatus.Raw | null; - disability_status?: serializers.ats.EeocDisabilityStatus.Raw | null; + race?: EeocRace.Raw | null; + gender?: EeocGender.Raw | null; + veteran_status?: EeocVeteranStatus.Raw | null; + disability_status?: EeocDisabilityStatus.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/EeocCandidate.ts b/src/serialization/resources/ats/types/EeocCandidate.ts index af6be30dc..46a7d48b4 100644 --- a/src/serialization/resources/ats/types/EeocCandidate.ts +++ b/src/serialization/resources/ats/types/EeocCandidate.ts @@ -2,14 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EeocCandidate: core.serialization.Schema = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Candidate), + core.serialization.lazyObject(() => serializers.ats.Candidate), ]); export declare namespace EeocCandidate { diff --git a/src/serialization/resources/ats/types/EeocDisabilityStatus.ts b/src/serialization/resources/ats/types/EeocDisabilityStatus.ts index 7a716a018..497479669 100644 --- a/src/serialization/resources/ats/types/EeocDisabilityStatus.ts +++ b/src/serialization/resources/ats/types/EeocDisabilityStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { DisabilityStatusEnum } from "./DisabilityStatusEnum"; export const EeocDisabilityStatus: core.serialization.Schema< serializers.ats.EeocDisabilityStatus.Raw, Merge.ats.EeocDisabilityStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.DisabilityStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([DisabilityStatusEnum, core.serialization.string()]); export declare namespace EeocDisabilityStatus { - type Raw = serializers.ats.DisabilityStatusEnum.Raw | string; + type Raw = DisabilityStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/EeocGender.ts b/src/serialization/resources/ats/types/EeocGender.ts index 0d130cee2..502b89fb0 100644 --- a/src/serialization/resources/ats/types/EeocGender.ts +++ b/src/serialization/resources/ats/types/EeocGender.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { GenderEnum } from "./GenderEnum"; export const EeocGender: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.GenderEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([GenderEnum, core.serialization.string()]); export declare namespace EeocGender { - type Raw = serializers.ats.GenderEnum.Raw | string; + type Raw = GenderEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/EeocRace.ts b/src/serialization/resources/ats/types/EeocRace.ts index 6aac25371..757c984b6 100644 --- a/src/serialization/resources/ats/types/EeocRace.ts +++ b/src/serialization/resources/ats/types/EeocRace.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RaceEnum } from "./RaceEnum"; export const EeocRace: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.RaceEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([RaceEnum, core.serialization.string()]); export declare namespace EeocRace { - type Raw = serializers.ats.RaceEnum.Raw | string; + type Raw = RaceEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/EeocVeteranStatus.ts b/src/serialization/resources/ats/types/EeocVeteranStatus.ts index c22ce1d4d..9d2b263d4 100644 --- a/src/serialization/resources/ats/types/EeocVeteranStatus.ts +++ b/src/serialization/resources/ats/types/EeocVeteranStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { VeteranStatusEnum } from "./VeteranStatusEnum"; export const EeocVeteranStatus: core.serialization.Schema< serializers.ats.EeocVeteranStatus.Raw, Merge.ats.EeocVeteranStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.VeteranStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([VeteranStatusEnum, core.serialization.string()]); export declare namespace EeocVeteranStatus { - type Raw = serializers.ats.VeteranStatusEnum.Raw | string; + type Raw = VeteranStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/EmailAddress.ts b/src/serialization/resources/ats/types/EmailAddress.ts index 72aeec80c..dd66c88c7 100644 --- a/src/serialization/resources/ats/types/EmailAddress.ts +++ b/src/serialization/resources/ats/types/EmailAddress.ts @@ -2,19 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EmailAddressEmailAddressType } from "./EmailAddressEmailAddressType"; export const EmailAddress: core.serialization.ObjectSchema = core.serialization.object({ createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), value: core.serialization.string().optional(), - emailAddressType: core.serialization.property( - "email_address_type", - core.serialization.lazy(async () => (await import("../../..")).ats.EmailAddressEmailAddressType).optional() - ), + emailAddressType: core.serialization.property("email_address_type", EmailAddressEmailAddressType.optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), }); @@ -23,7 +21,7 @@ export declare namespace EmailAddress { created_at?: string | null; modified_at?: string | null; value?: string | null; - email_address_type?: serializers.ats.EmailAddressEmailAddressType.Raw | null; + email_address_type?: EmailAddressEmailAddressType.Raw | null; remote_was_deleted?: boolean | null; } } diff --git a/src/serialization/resources/ats/types/EmailAddressEmailAddressType.ts b/src/serialization/resources/ats/types/EmailAddressEmailAddressType.ts index 8bf910963..9b44912dc 100644 --- a/src/serialization/resources/ats/types/EmailAddressEmailAddressType.ts +++ b/src/serialization/resources/ats/types/EmailAddressEmailAddressType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EmailAddressTypeEnum } from "./EmailAddressTypeEnum"; export const EmailAddressEmailAddressType: core.serialization.Schema< serializers.ats.EmailAddressEmailAddressType.Raw, Merge.ats.EmailAddressEmailAddressType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.EmailAddressTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EmailAddressTypeEnum, core.serialization.string()]); export declare namespace EmailAddressEmailAddressType { - type Raw = serializers.ats.EmailAddressTypeEnum.Raw | string; + type Raw = EmailAddressTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/EmailAddressRequest.ts b/src/serialization/resources/ats/types/EmailAddressRequest.ts index 2ede8269f..a97f5f061 100644 --- a/src/serialization/resources/ats/types/EmailAddressRequest.ts +++ b/src/serialization/resources/ats/types/EmailAddressRequest.ts @@ -2,21 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EmailAddressRequestEmailAddressType } from "./EmailAddressRequestEmailAddressType"; export const EmailAddressRequest: core.serialization.ObjectSchema< serializers.ats.EmailAddressRequest.Raw, Merge.ats.EmailAddressRequest > = core.serialization.object({ value: core.serialization.string().optional(), - emailAddressType: core.serialization.property( - "email_address_type", - core.serialization - .lazy(async () => (await import("../../..")).ats.EmailAddressRequestEmailAddressType) - .optional() - ), + emailAddressType: core.serialization.property("email_address_type", EmailAddressRequestEmailAddressType.optional()), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -30,7 +26,7 @@ export const EmailAddressRequest: core.serialization.ObjectSchema< export declare namespace EmailAddressRequest { interface Raw { value?: string | null; - email_address_type?: serializers.ats.EmailAddressRequestEmailAddressType.Raw | null; + email_address_type?: EmailAddressRequestEmailAddressType.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; } diff --git a/src/serialization/resources/ats/types/EmailAddressRequestEmailAddressType.ts b/src/serialization/resources/ats/types/EmailAddressRequestEmailAddressType.ts index ae9ba9dcd..708c9a298 100644 --- a/src/serialization/resources/ats/types/EmailAddressRequestEmailAddressType.ts +++ b/src/serialization/resources/ats/types/EmailAddressRequestEmailAddressType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EmailAddressTypeEnum } from "./EmailAddressTypeEnum"; export const EmailAddressRequestEmailAddressType: core.serialization.Schema< serializers.ats.EmailAddressRequestEmailAddressType.Raw, Merge.ats.EmailAddressRequestEmailAddressType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.EmailAddressTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EmailAddressTypeEnum, core.serialization.string()]); export declare namespace EmailAddressRequestEmailAddressType { - type Raw = serializers.ats.EmailAddressTypeEnum.Raw | string; + type Raw = EmailAddressTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/EmailAddressTypeEnum.ts b/src/serialization/resources/ats/types/EmailAddressTypeEnum.ts index 21e3c254c..1d98a8673 100644 --- a/src/serialization/resources/ats/types/EmailAddressTypeEnum.ts +++ b/src/serialization/resources/ats/types/EmailAddressTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EmailAddressTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/EnabledActionsEnum.ts b/src/serialization/resources/ats/types/EnabledActionsEnum.ts index 750b77670..6a20a3676 100644 --- a/src/serialization/resources/ats/types/EnabledActionsEnum.ts +++ b/src/serialization/resources/ats/types/EnabledActionsEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EnabledActionsEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/EncodingEnum.ts b/src/serialization/resources/ats/types/EncodingEnum.ts index 2193eca69..d7ae9796a 100644 --- a/src/serialization/resources/ats/types/EncodingEnum.ts +++ b/src/serialization/resources/ats/types/EncodingEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EncodingEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/ErrorValidationProblem.ts b/src/serialization/resources/ats/types/ErrorValidationProblem.ts index 2e4484a8d..c24462aaf 100644 --- a/src/serialization/resources/ats/types/ErrorValidationProblem.ts +++ b/src/serialization/resources/ats/types/ErrorValidationProblem.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ValidationProblemSource } from "./ValidationProblemSource"; export const ErrorValidationProblem: core.serialization.ObjectSchema< serializers.ats.ErrorValidationProblem.Raw, Merge.ats.ErrorValidationProblem > = core.serialization.object({ - source: core.serialization - .lazyObject(async () => (await import("../../..")).ats.ValidationProblemSource) - .optional(), + source: ValidationProblemSource.optional(), title: core.serialization.string(), detail: core.serialization.string(), problemType: core.serialization.property("problem_type", core.serialization.string()), @@ -20,7 +19,7 @@ export const ErrorValidationProblem: core.serialization.ObjectSchema< export declare namespace ErrorValidationProblem { interface Raw { - source?: serializers.ats.ValidationProblemSource.Raw | null; + source?: ValidationProblemSource.Raw | null; title: string; detail: string; problem_type: string; diff --git a/src/serialization/resources/ats/types/EventTypeEnum.ts b/src/serialization/resources/ats/types/EventTypeEnum.ts index 78d582dd7..90e252c97 100644 --- a/src/serialization/resources/ats/types/EventTypeEnum.ts +++ b/src/serialization/resources/ats/types/EventTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EventTypeEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/ExternalTargetFieldApi.ts b/src/serialization/resources/ats/types/ExternalTargetFieldApi.ts index 13852cbd2..0c0eeb591 100644 --- a/src/serialization/resources/ats/types/ExternalTargetFieldApi.ts +++ b/src/serialization/resources/ats/types/ExternalTargetFieldApi.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ExternalTargetFieldApi: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/ExternalTargetFieldApiResponse.ts b/src/serialization/resources/ats/types/ExternalTargetFieldApiResponse.ts index e35794926..e71b4ebc4 100644 --- a/src/serialization/resources/ats/types/ExternalTargetFieldApiResponse.ts +++ b/src/serialization/resources/ats/types/ExternalTargetFieldApiResponse.ts @@ -2,129 +2,59 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ExternalTargetFieldApi } from "./ExternalTargetFieldApi"; export const ExternalTargetFieldApiResponse: core.serialization.ObjectSchema< serializers.ats.ExternalTargetFieldApiResponse.Raw, Merge.ats.ExternalTargetFieldApiResponse > = core.serialization.object({ - activity: core.serialization.property( - "Activity", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() - ), - application: core.serialization.property( - "Application", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() - ), - attachment: core.serialization.property( - "Attachment", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() - ), - candidate: core.serialization.property( - "Candidate", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() - ), - department: core.serialization.property( - "Department", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() - ), - eeoc: core.serialization.property( - "EEOC", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() - ), + activity: core.serialization.property("Activity", core.serialization.list(ExternalTargetFieldApi).optional()), + application: core.serialization.property("Application", core.serialization.list(ExternalTargetFieldApi).optional()), + attachment: core.serialization.property("Attachment", core.serialization.list(ExternalTargetFieldApi).optional()), + candidate: core.serialization.property("Candidate", core.serialization.list(ExternalTargetFieldApi).optional()), + department: core.serialization.property("Department", core.serialization.list(ExternalTargetFieldApi).optional()), + eeoc: core.serialization.property("EEOC", core.serialization.list(ExternalTargetFieldApi).optional()), scheduledInterview: core.serialization.property( "ScheduledInterview", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() - ), - job: core.serialization.property( - "Job", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() - ), - jobPosting: core.serialization.property( - "JobPosting", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), + job: core.serialization.property("Job", core.serialization.list(ExternalTargetFieldApi).optional()), + jobPosting: core.serialization.property("JobPosting", core.serialization.list(ExternalTargetFieldApi).optional()), jobInterviewStage: core.serialization.property( "JobInterviewStage", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() - ), - offer: core.serialization.property( - "Offer", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() - ), - office: core.serialization.property( - "Office", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), + offer: core.serialization.property("Offer", core.serialization.list(ExternalTargetFieldApi).optional()), + office: core.serialization.property("Office", core.serialization.list(ExternalTargetFieldApi).optional()), rejectReason: core.serialization.property( "RejectReason", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() - ), - scorecard: core.serialization.property( - "Scorecard", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() - ), - tag: core.serialization.property( - "Tag", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() - ), - remoteUser: core.serialization.property( - "RemoteUser", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ExternalTargetFieldApi)) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), + scorecard: core.serialization.property("Scorecard", core.serialization.list(ExternalTargetFieldApi).optional()), + tag: core.serialization.property("Tag", core.serialization.list(ExternalTargetFieldApi).optional()), + remoteUser: core.serialization.property("RemoteUser", core.serialization.list(ExternalTargetFieldApi).optional()), }); export declare namespace ExternalTargetFieldApiResponse { interface Raw { - Activity?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - Application?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - Attachment?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - Candidate?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - Department?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - EEOC?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - ScheduledInterview?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - Job?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - JobPosting?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - JobInterviewStage?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - Offer?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - Office?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - RejectReason?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - Scorecard?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - Tag?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; - RemoteUser?: serializers.ats.ExternalTargetFieldApi.Raw[] | null; + Activity?: ExternalTargetFieldApi.Raw[] | null; + Application?: ExternalTargetFieldApi.Raw[] | null; + Attachment?: ExternalTargetFieldApi.Raw[] | null; + Candidate?: ExternalTargetFieldApi.Raw[] | null; + Department?: ExternalTargetFieldApi.Raw[] | null; + EEOC?: ExternalTargetFieldApi.Raw[] | null; + ScheduledInterview?: ExternalTargetFieldApi.Raw[] | null; + Job?: ExternalTargetFieldApi.Raw[] | null; + JobPosting?: ExternalTargetFieldApi.Raw[] | null; + JobInterviewStage?: ExternalTargetFieldApi.Raw[] | null; + Offer?: ExternalTargetFieldApi.Raw[] | null; + Office?: ExternalTargetFieldApi.Raw[] | null; + RejectReason?: ExternalTargetFieldApi.Raw[] | null; + Scorecard?: ExternalTargetFieldApi.Raw[] | null; + Tag?: ExternalTargetFieldApi.Raw[] | null; + RemoteUser?: ExternalTargetFieldApi.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/FieldMappingApiInstance.ts b/src/serialization/resources/ats/types/FieldMappingApiInstance.ts index 0f3a40d2a..c1891fd8a 100644 --- a/src/serialization/resources/ats/types/FieldMappingApiInstance.ts +++ b/src/serialization/resources/ats/types/FieldMappingApiInstance.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstanceTargetField } from "./FieldMappingApiInstanceTargetField"; +import { FieldMappingApiInstanceRemoteField } from "./FieldMappingApiInstanceRemoteField"; export const FieldMappingApiInstance: core.serialization.ObjectSchema< serializers.ats.FieldMappingApiInstance.Raw, @@ -12,25 +14,15 @@ export const FieldMappingApiInstance: core.serialization.ObjectSchema< > = core.serialization.object({ id: core.serialization.string().optional(), isIntegrationWide: core.serialization.property("is_integration_wide", core.serialization.boolean().optional()), - targetField: core.serialization.property( - "target_field", - core.serialization - .lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstanceTargetField) - .optional() - ), - remoteField: core.serialization.property( - "remote_field", - core.serialization - .lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstanceRemoteField) - .optional() - ), + targetField: core.serialization.property("target_field", FieldMappingApiInstanceTargetField.optional()), + remoteField: core.serialization.property("remote_field", FieldMappingApiInstanceRemoteField.optional()), }); export declare namespace FieldMappingApiInstance { interface Raw { id?: string | null; is_integration_wide?: boolean | null; - target_field?: serializers.ats.FieldMappingApiInstanceTargetField.Raw | null; - remote_field?: serializers.ats.FieldMappingApiInstanceRemoteField.Raw | null; + target_field?: FieldMappingApiInstanceTargetField.Raw | null; + remote_field?: FieldMappingApiInstanceRemoteField.Raw | null; } } diff --git a/src/serialization/resources/ats/types/FieldMappingApiInstanceRemoteField.ts b/src/serialization/resources/ats/types/FieldMappingApiInstanceRemoteField.ts index b0526ec78..24436baef 100644 --- a/src/serialization/resources/ats/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/serialization/resources/ats/types/FieldMappingApiInstanceRemoteField.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo } from "./FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo"; export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema< serializers.ats.FieldMappingApiInstanceRemoteField.Raw, @@ -14,9 +15,7 @@ export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()), remoteEndpointInfo: core.serialization.property( "remote_endpoint_info", - core.serialization.lazyObject( - async () => (await import("../../..")).ats.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - ) + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo ), }); @@ -24,6 +23,6 @@ export declare namespace FieldMappingApiInstanceRemoteField { interface Raw { remote_key_name: string; schema: Record; - remote_endpoint_info: serializers.ats.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; } } diff --git a/src/serialization/resources/ats/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts b/src/serialization/resources/ats/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts index e465c47c7..718342ab6 100644 --- a/src/serialization/resources/ats/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts +++ b/src/serialization/resources/ats/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/FieldMappingApiInstanceResponse.ts b/src/serialization/resources/ats/types/FieldMappingApiInstanceResponse.ts index b27a3cd1e..11d13268f 100644 --- a/src/serialization/resources/ats/types/FieldMappingApiInstanceResponse.ts +++ b/src/serialization/resources/ats/types/FieldMappingApiInstanceResponse.ts @@ -2,129 +2,62 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstance } from "./FieldMappingApiInstance"; export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< serializers.ats.FieldMappingApiInstanceResponse.Raw, Merge.ats.FieldMappingApiInstanceResponse > = core.serialization.object({ - activity: core.serialization.property( - "Activity", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() - ), + activity: core.serialization.property("Activity", core.serialization.list(FieldMappingApiInstance).optional()), application: core.serialization.property( "Application", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() - ), - attachment: core.serialization.property( - "Attachment", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() - ), - candidate: core.serialization.property( - "Candidate", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() - ), - department: core.serialization.property( - "Department", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() - ), - eeoc: core.serialization.property( - "EEOC", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), + attachment: core.serialization.property("Attachment", core.serialization.list(FieldMappingApiInstance).optional()), + candidate: core.serialization.property("Candidate", core.serialization.list(FieldMappingApiInstance).optional()), + department: core.serialization.property("Department", core.serialization.list(FieldMappingApiInstance).optional()), + eeoc: core.serialization.property("EEOC", core.serialization.list(FieldMappingApiInstance).optional()), scheduledInterview: core.serialization.property( "ScheduledInterview", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() - ), - job: core.serialization.property( - "Job", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() - ), - jobPosting: core.serialization.property( - "JobPosting", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), + job: core.serialization.property("Job", core.serialization.list(FieldMappingApiInstance).optional()), + jobPosting: core.serialization.property("JobPosting", core.serialization.list(FieldMappingApiInstance).optional()), jobInterviewStage: core.serialization.property( "JobInterviewStage", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() - ), - offer: core.serialization.property( - "Offer", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() - ), - office: core.serialization.property( - "Office", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), + offer: core.serialization.property("Offer", core.serialization.list(FieldMappingApiInstance).optional()), + office: core.serialization.property("Office", core.serialization.list(FieldMappingApiInstance).optional()), rejectReason: core.serialization.property( "RejectReason", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() - ), - scorecard: core.serialization.property( - "Scorecard", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() - ), - tag: core.serialization.property( - "Tag", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() - ), - remoteUser: core.serialization.property( - "RemoteUser", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance)) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), + scorecard: core.serialization.property("Scorecard", core.serialization.list(FieldMappingApiInstance).optional()), + tag: core.serialization.property("Tag", core.serialization.list(FieldMappingApiInstance).optional()), + remoteUser: core.serialization.property("RemoteUser", core.serialization.list(FieldMappingApiInstance).optional()), }); export declare namespace FieldMappingApiInstanceResponse { interface Raw { - Activity?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - Application?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - Attachment?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - Candidate?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - Department?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - EEOC?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - ScheduledInterview?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - Job?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - JobPosting?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - JobInterviewStage?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - Offer?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - Office?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - RejectReason?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - Scorecard?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - Tag?: serializers.ats.FieldMappingApiInstance.Raw[] | null; - RemoteUser?: serializers.ats.FieldMappingApiInstance.Raw[] | null; + Activity?: FieldMappingApiInstance.Raw[] | null; + Application?: FieldMappingApiInstance.Raw[] | null; + Attachment?: FieldMappingApiInstance.Raw[] | null; + Candidate?: FieldMappingApiInstance.Raw[] | null; + Department?: FieldMappingApiInstance.Raw[] | null; + EEOC?: FieldMappingApiInstance.Raw[] | null; + ScheduledInterview?: FieldMappingApiInstance.Raw[] | null; + Job?: FieldMappingApiInstance.Raw[] | null; + JobPosting?: FieldMappingApiInstance.Raw[] | null; + JobInterviewStage?: FieldMappingApiInstance.Raw[] | null; + Offer?: FieldMappingApiInstance.Raw[] | null; + Office?: FieldMappingApiInstance.Raw[] | null; + RejectReason?: FieldMappingApiInstance.Raw[] | null; + Scorecard?: FieldMappingApiInstance.Raw[] | null; + Tag?: FieldMappingApiInstance.Raw[] | null; + RemoteUser?: FieldMappingApiInstance.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/FieldMappingApiInstanceTargetField.ts b/src/serialization/resources/ats/types/FieldMappingApiInstanceTargetField.ts index 38786f3b3..e06d37c75 100644 --- a/src/serialization/resources/ats/types/FieldMappingApiInstanceTargetField.ts +++ b/src/serialization/resources/ats/types/FieldMappingApiInstanceTargetField.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldMappingApiInstanceTargetField: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/FieldMappingInstanceResponse.ts b/src/serialization/resources/ats/types/FieldMappingInstanceResponse.ts index a2a7b58ac..dcda7336f 100644 --- a/src/serialization/resources/ats/types/FieldMappingInstanceResponse.ts +++ b/src/serialization/resources/ats/types/FieldMappingInstanceResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstance } from "./FieldMappingApiInstance"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const FieldMappingInstanceResponse: core.serialization.ObjectSchema< serializers.ats.FieldMappingInstanceResponse.Raw, Merge.ats.FieldMappingInstanceResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldMappingApiInstance), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ats.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ats.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.DebugModeLog)) - .optional(), + model: FieldMappingApiInstance, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace FieldMappingInstanceResponse { interface Raw { - model: serializers.ats.FieldMappingApiInstance.Raw; - warnings: serializers.ats.WarningValidationProblem.Raw[]; - errors: serializers.ats.ErrorValidationProblem.Raw[]; - logs?: serializers.ats.DebugModeLog.Raw[] | null; + model: FieldMappingApiInstance.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/FieldPermissionDeserializer.ts b/src/serialization/resources/ats/types/FieldPermissionDeserializer.ts index 14b76cbd0..16ad0534c 100644 --- a/src/serialization/resources/ats/types/FieldPermissionDeserializer.ts +++ b/src/serialization/resources/ats/types/FieldPermissionDeserializer.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldPermissionDeserializer: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/FieldPermissionDeserializerRequest.ts b/src/serialization/resources/ats/types/FieldPermissionDeserializerRequest.ts index 7790ef067..812dec412 100644 --- a/src/serialization/resources/ats/types/FieldPermissionDeserializerRequest.ts +++ b/src/serialization/resources/ats/types/FieldPermissionDeserializerRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldPermissionDeserializerRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/GenderEnum.ts b/src/serialization/resources/ats/types/GenderEnum.ts index 4b027c0a5..6394501f8 100644 --- a/src/serialization/resources/ats/types/GenderEnum.ts +++ b/src/serialization/resources/ats/types/GenderEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const GenderEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/IndividualCommonModelScopeDeserializer.ts b/src/serialization/resources/ats/types/IndividualCommonModelScopeDeserializer.ts index 0a25a5e65..3ce870222 100644 --- a/src/serialization/resources/ats/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/serialization/resources/ats/types/IndividualCommonModelScopeDeserializer.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ModelPermissionDeserializer } from "./ModelPermissionDeserializer"; +import { FieldPermissionDeserializer } from "./FieldPermissionDeserializer"; export const IndividualCommonModelScopeDeserializer: core.serialization.ObjectSchema< serializers.ats.IndividualCommonModelScopeDeserializer.Raw, @@ -13,23 +15,15 @@ export const IndividualCommonModelScopeDeserializer: core.serialization.ObjectSc modelName: core.serialization.property("model_name", core.serialization.string()), modelPermissions: core.serialization.property( "model_permissions", - core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.ModelPermissionDeserializer) - ) - .optional() - ), - fieldPermissions: core.serialization.property( - "field_permissions", - core.serialization.lazyObject(async () => (await import("../../..")).ats.FieldPermissionDeserializer).optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializer).optional() ), + fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializer.optional()), }); export declare namespace IndividualCommonModelScopeDeserializer { interface Raw { model_name: string; - model_permissions?: Record | null; - field_permissions?: serializers.ats.FieldPermissionDeserializer.Raw | null; + model_permissions?: Record | null; + field_permissions?: FieldPermissionDeserializer.Raw | null; } } diff --git a/src/serialization/resources/ats/types/IndividualCommonModelScopeDeserializerRequest.ts b/src/serialization/resources/ats/types/IndividualCommonModelScopeDeserializerRequest.ts index d12e3e489..50a45f808 100644 --- a/src/serialization/resources/ats/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/ats/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ModelPermissionDeserializerRequest } from "./ModelPermissionDeserializerRequest"; +import { FieldPermissionDeserializerRequest } from "./FieldPermissionDeserializerRequest"; export const IndividualCommonModelScopeDeserializerRequest: core.serialization.ObjectSchema< serializers.ats.IndividualCommonModelScopeDeserializerRequest.Raw, @@ -13,27 +15,15 @@ export const IndividualCommonModelScopeDeserializerRequest: core.serialization.O modelName: core.serialization.property("model_name", core.serialization.string()), modelPermissions: core.serialization.property( "model_permissions", - core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject( - async () => (await import("../../..")).ats.ModelPermissionDeserializerRequest - ) - ) - .optional() - ), - fieldPermissions: core.serialization.property( - "field_permissions", - core.serialization - .lazyObject(async () => (await import("../../..")).ats.FieldPermissionDeserializerRequest) - .optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializerRequest).optional() ), + fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializerRequest.optional()), }); export declare namespace IndividualCommonModelScopeDeserializerRequest { interface Raw { model_name: string; - model_permissions?: Record | null; - field_permissions?: serializers.ats.FieldPermissionDeserializerRequest.Raw | null; + model_permissions?: Record | null; + field_permissions?: FieldPermissionDeserializerRequest.Raw | null; } } diff --git a/src/serialization/resources/ats/types/Issue.ts b/src/serialization/resources/ats/types/Issue.ts index 2160b1fc7..e44754316 100644 --- a/src/serialization/resources/ats/types/Issue.ts +++ b/src/serialization/resources/ats/types/Issue.ts @@ -2,14 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IssueStatus } from "./IssueStatus"; export const Issue: core.serialization.ObjectSchema = core.serialization.object({ id: core.serialization.string().optional(), - status: core.serialization.lazy(async () => (await import("../../..")).ats.IssueStatus).optional(), + status: IssueStatus.optional(), errorDescription: core.serialization.property("error_description", core.serialization.string()), endUser: core.serialization.property( "end_user", @@ -27,7 +28,7 @@ export const Issue: core.serialization.ObjectSchema | null; first_incident_time?: string | null; diff --git a/src/serialization/resources/ats/types/IssueStatus.ts b/src/serialization/resources/ats/types/IssueStatus.ts index ed4f75b05..adc132965 100644 --- a/src/serialization/resources/ats/types/IssueStatus.ts +++ b/src/serialization/resources/ats/types/IssueStatus.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IssueStatusEnum } from "./IssueStatusEnum"; export const IssueStatus: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.IssueStatusEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([IssueStatusEnum, core.serialization.string()]); export declare namespace IssueStatus { - type Raw = serializers.ats.IssueStatusEnum.Raw | string; + type Raw = IssueStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/IssueStatusEnum.ts b/src/serialization/resources/ats/types/IssueStatusEnum.ts index 1dc946698..ac3617007 100644 --- a/src/serialization/resources/ats/types/IssueStatusEnum.ts +++ b/src/serialization/resources/ats/types/IssueStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const IssueStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/Job.ts b/src/serialization/resources/ats/types/Job.ts index 188083221..5c0470bda 100644 --- a/src/serialization/resources/ats/types/Job.ts +++ b/src/serialization/resources/ats/types/Job.ts @@ -2,9 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JobStatus } from "./JobStatus"; +import { JobTypeEnum } from "./JobTypeEnum"; +import { Url } from "./Url"; +import { JobDepartmentsItem } from "./JobDepartmentsItem"; +import { JobOfficesItem } from "./JobOfficesItem"; +import { JobHiringManagersItem } from "./JobHiringManagersItem"; +import { JobRecruitersItem } from "./JobRecruitersItem"; +import { RemoteData } from "./RemoteData"; export const Job: core.serialization.ObjectSchema = core.serialization.object({ id: core.serialization.string().optional(), @@ -14,47 +22,29 @@ export const Job: core.serialization.ObjectSchema (await import("../../..")).ats.JobStatus).optional(), - type: core.serialization.lazy(async () => (await import("../../..")).ats.JobTypeEnum).optional(), + status: JobStatus.optional(), + type: JobTypeEnum.optional(), jobPostings: core.serialization.property( "job_postings", core.serialization.list(core.serialization.string().optional()).optional() ), - jobPostingUrls: core.serialization.property( - "job_posting_urls", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.Url)) - .optional() - ), + jobPostingUrls: core.serialization.property("job_posting_urls", core.serialization.list(Url).optional()), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), confidential: core.serialization.boolean().optional(), - departments: core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).ats.JobDepartmentsItem).optional()) - .optional(), - offices: core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).ats.JobOfficesItem).optional()) - .optional(), + departments: core.serialization.list(JobDepartmentsItem.optional()).optional(), + offices: core.serialization.list(JobOfficesItem.optional()).optional(), hiringManagers: core.serialization.property( "hiring_managers", - core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).ats.JobHiringManagersItem).optional()) - .optional() + core.serialization.list(JobHiringManagersItem.optional()).optional() ), - recruiters: core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).ats.JobRecruitersItem).optional()) - .optional(), + recruiters: core.serialization.list(JobRecruitersItem.optional()).optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Job { @@ -66,19 +56,19 @@ export declare namespace Job { name?: string | null; description?: string | null; code?: string | null; - status?: serializers.ats.JobStatus.Raw | null; - type?: serializers.ats.JobTypeEnum.Raw | null; + status?: JobStatus.Raw | null; + type?: JobTypeEnum.Raw | null; job_postings?: (string | null | undefined)[] | null; - job_posting_urls?: serializers.ats.Url.Raw[] | null; + job_posting_urls?: Url.Raw[] | null; remote_created_at?: string | null; remote_updated_at?: string | null; confidential?: boolean | null; - departments?: (serializers.ats.JobDepartmentsItem.Raw | null | undefined)[] | null; - offices?: (serializers.ats.JobOfficesItem.Raw | null | undefined)[] | null; - hiring_managers?: (serializers.ats.JobHiringManagersItem.Raw | null | undefined)[] | null; - recruiters?: (serializers.ats.JobRecruitersItem.Raw | null | undefined)[] | null; + departments?: (JobDepartmentsItem.Raw | null | undefined)[] | null; + offices?: (JobOfficesItem.Raw | null | undefined)[] | null; + hiring_managers?: (JobHiringManagersItem.Raw | null | undefined)[] | null; + recruiters?: (JobRecruitersItem.Raw | null | undefined)[] | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/JobDepartmentsItem.ts b/src/serialization/resources/ats/types/JobDepartmentsItem.ts index 79d584655..d34442d8b 100644 --- a/src/serialization/resources/ats/types/JobDepartmentsItem.ts +++ b/src/serialization/resources/ats/types/JobDepartmentsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Department } from "./Department"; export const JobDepartmentsItem: core.serialization.Schema< serializers.ats.JobDepartmentsItem.Raw, Merge.ats.JobDepartmentsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Department), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Department]); export declare namespace JobDepartmentsItem { - type Raw = string | serializers.ats.Department.Raw; + type Raw = string | Department.Raw; } diff --git a/src/serialization/resources/ats/types/JobHiringManagersItem.ts b/src/serialization/resources/ats/types/JobHiringManagersItem.ts index b1dc71efe..9a4328165 100644 --- a/src/serialization/resources/ats/types/JobHiringManagersItem.ts +++ b/src/serialization/resources/ats/types/JobHiringManagersItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteUser } from "./RemoteUser"; export const JobHiringManagersItem: core.serialization.Schema< serializers.ats.JobHiringManagersItem.Raw, Merge.ats.JobHiringManagersItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteUser), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace JobHiringManagersItem { - type Raw = string | serializers.ats.RemoteUser.Raw; + type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/JobInterviewStage.ts b/src/serialization/resources/ats/types/JobInterviewStage.ts index a038271fc..cc87bd5f6 100644 --- a/src/serialization/resources/ats/types/JobInterviewStage.ts +++ b/src/serialization/resources/ats/types/JobInterviewStage.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JobInterviewStageJob } from "./JobInterviewStageJob"; +import { RemoteData } from "./RemoteData"; export const JobInterviewStage: core.serialization.ObjectSchema< serializers.ats.JobInterviewStage.Raw, @@ -15,19 +17,14 @@ export const JobInterviewStage: core.serialization.ObjectSchema< createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), name: core.serialization.string().optional(), - job: core.serialization.lazy(async () => (await import("../../..")).ats.JobInterviewStageJob).optional(), + job: JobInterviewStageJob.optional(), stageOrder: core.serialization.property("stage_order", core.serialization.number().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace JobInterviewStage { @@ -37,10 +34,10 @@ export declare namespace JobInterviewStage { created_at?: string | null; modified_at?: string | null; name?: string | null; - job?: serializers.ats.JobInterviewStageJob.Raw | null; + job?: JobInterviewStageJob.Raw | null; stage_order?: number | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/JobInterviewStageJob.ts b/src/serialization/resources/ats/types/JobInterviewStageJob.ts index 04cd1cd8b..7b900b3ab 100644 --- a/src/serialization/resources/ats/types/JobInterviewStageJob.ts +++ b/src/serialization/resources/ats/types/JobInterviewStageJob.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Job } from "./Job"; export const JobInterviewStageJob: core.serialization.Schema< serializers.ats.JobInterviewStageJob.Raw, Merge.ats.JobInterviewStageJob -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Job), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Job]); export declare namespace JobInterviewStageJob { - type Raw = string | serializers.ats.Job.Raw; + type Raw = string | Job.Raw; } diff --git a/src/serialization/resources/ats/types/JobOfficesItem.ts b/src/serialization/resources/ats/types/JobOfficesItem.ts index 98e9484b3..3bfaeed6b 100644 --- a/src/serialization/resources/ats/types/JobOfficesItem.ts +++ b/src/serialization/resources/ats/types/JobOfficesItem.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Office } from "./Office"; export const JobOfficesItem: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Office), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), Office]); export declare namespace JobOfficesItem { - type Raw = string | serializers.ats.Office.Raw; + type Raw = string | Office.Raw; } diff --git a/src/serialization/resources/ats/types/JobPosting.ts b/src/serialization/resources/ats/types/JobPosting.ts index 04d1f5ee3..25b3e4ade 100644 --- a/src/serialization/resources/ats/types/JobPosting.ts +++ b/src/serialization/resources/ats/types/JobPosting.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JobPostingJobPostingUrlsItem } from "./JobPostingJobPostingUrlsItem"; +import { JobPostingJob } from "./JobPostingJob"; +import { JobPostingStatusEnum } from "./JobPostingStatusEnum"; +import { RemoteData } from "./RemoteData"; export const JobPosting: core.serialization.ObjectSchema = core.serialization.object({ @@ -15,12 +19,10 @@ export const JobPosting: core.serialization.ObjectSchema (await import("../../..")).ats.JobPostingJobPostingUrlsItem)) - .optional() + core.serialization.list(JobPostingJobPostingUrlsItem).optional() ), - job: core.serialization.lazy(async () => (await import("../../..")).ats.JobPostingJob).optional(), - status: core.serialization.lazy(async () => (await import("../../..")).ats.JobPostingStatusEnum).optional(), + job: JobPostingJob.optional(), + status: JobPostingStatusEnum.optional(), content: core.serialization.string().optional(), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), @@ -30,12 +32,7 @@ export const JobPosting: core.serialization.ObjectSchema (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace JobPosting { @@ -45,15 +42,15 @@ export declare namespace JobPosting { created_at?: string | null; modified_at?: string | null; title?: string | null; - job_posting_urls?: serializers.ats.JobPostingJobPostingUrlsItem.Raw[] | null; - job?: serializers.ats.JobPostingJob.Raw | null; - status?: serializers.ats.JobPostingStatusEnum.Raw | null; + job_posting_urls?: JobPostingJobPostingUrlsItem.Raw[] | null; + job?: JobPostingJob.Raw | null; + status?: JobPostingStatusEnum.Raw | null; content?: string | null; remote_created_at?: string | null; remote_updated_at?: string | null; is_internal?: boolean | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/JobPostingJob.ts b/src/serialization/resources/ats/types/JobPostingJob.ts index 90ce0a6e2..a3e81929a 100644 --- a/src/serialization/resources/ats/types/JobPostingJob.ts +++ b/src/serialization/resources/ats/types/JobPostingJob.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Job } from "./Job"; export const JobPostingJob: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Job), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), Job]); export declare namespace JobPostingJob { - type Raw = string | serializers.ats.Job.Raw; + type Raw = string | Job.Raw; } diff --git a/src/serialization/resources/ats/types/JobPostingJobPostingUrlsItem.ts b/src/serialization/resources/ats/types/JobPostingJobPostingUrlsItem.ts index fc8bee8e9..135b5dd57 100644 --- a/src/serialization/resources/ats/types/JobPostingJobPostingUrlsItem.ts +++ b/src/serialization/resources/ats/types/JobPostingJobPostingUrlsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Url } from "./Url"; export const JobPostingJobPostingUrlsItem: core.serialization.Schema< serializers.ats.JobPostingJobPostingUrlsItem.Raw, Merge.ats.JobPostingJobPostingUrlsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Url), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Url]); export declare namespace JobPostingJobPostingUrlsItem { - type Raw = string | serializers.ats.Url.Raw; + type Raw = string | Url.Raw; } diff --git a/src/serialization/resources/ats/types/JobPostingStatusEnum.ts b/src/serialization/resources/ats/types/JobPostingStatusEnum.ts index 1a782e7a7..3d7f6356e 100644 --- a/src/serialization/resources/ats/types/JobPostingStatusEnum.ts +++ b/src/serialization/resources/ats/types/JobPostingStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const JobPostingStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/JobRecruitersItem.ts b/src/serialization/resources/ats/types/JobRecruitersItem.ts index 9c1b91c76..38042a0be 100644 --- a/src/serialization/resources/ats/types/JobRecruitersItem.ts +++ b/src/serialization/resources/ats/types/JobRecruitersItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteUser } from "./RemoteUser"; export const JobRecruitersItem: core.serialization.Schema< serializers.ats.JobRecruitersItem.Raw, Merge.ats.JobRecruitersItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteUser), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace JobRecruitersItem { - type Raw = string | serializers.ats.RemoteUser.Raw; + type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/JobStatus.ts b/src/serialization/resources/ats/types/JobStatus.ts index abefd8594..4c44cb383 100644 --- a/src/serialization/resources/ats/types/JobStatus.ts +++ b/src/serialization/resources/ats/types/JobStatus.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JobStatusEnum } from "./JobStatusEnum"; export const JobStatus: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.JobStatusEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([JobStatusEnum, core.serialization.string()]); export declare namespace JobStatus { - type Raw = serializers.ats.JobStatusEnum.Raw | string; + type Raw = JobStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/JobStatusEnum.ts b/src/serialization/resources/ats/types/JobStatusEnum.ts index a31347301..11fe50110 100644 --- a/src/serialization/resources/ats/types/JobStatusEnum.ts +++ b/src/serialization/resources/ats/types/JobStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const JobStatusEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/JobTypeEnum.ts b/src/serialization/resources/ats/types/JobTypeEnum.ts index 011dee775..7139b26df 100644 --- a/src/serialization/resources/ats/types/JobTypeEnum.ts +++ b/src/serialization/resources/ats/types/JobTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const JobTypeEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/LanguageEnum.ts b/src/serialization/resources/ats/types/LanguageEnum.ts index 2ed4a549b..ded55dfd0 100644 --- a/src/serialization/resources/ats/types/LanguageEnum.ts +++ b/src/serialization/resources/ats/types/LanguageEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LanguageEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/LinkToken.ts b/src/serialization/resources/ats/types/LinkToken.ts index e254bc250..bf7793340 100644 --- a/src/serialization/resources/ats/types/LinkToken.ts +++ b/src/serialization/resources/ats/types/LinkToken.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LinkToken: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/ats/types/LinkedAccountStatus.ts b/src/serialization/resources/ats/types/LinkedAccountStatus.ts index 3677a8a54..c93578bda 100644 --- a/src/serialization/resources/ats/types/LinkedAccountStatus.ts +++ b/src/serialization/resources/ats/types/LinkedAccountStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LinkedAccountStatus: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/MetaResponse.ts b/src/serialization/resources/ats/types/MetaResponse.ts index 9a976fc98..2573387b8 100644 --- a/src/serialization/resources/ats/types/MetaResponse.ts +++ b/src/serialization/resources/ats/types/MetaResponse.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { LinkedAccountStatus } from "./LinkedAccountStatus"; export const MetaResponse: core.serialization.ObjectSchema = core.serialization.object({ @@ -16,9 +17,7 @@ export const MetaResponse: core.serialization.ObjectSchema (await import("../../..")).ats.LinkedAccountStatus) - .optional(), + status: LinkedAccountStatus.optional(), hasConditionalParams: core.serialization.property("has_conditional_params", core.serialization.boolean()), hasRequiredLinkedAccountParams: core.serialization.property( "has_required_linked_account_params", @@ -30,7 +29,7 @@ export declare namespace MetaResponse { interface Raw { request_schema: Record; remote_field_classes?: Record | null; - status?: serializers.ats.LinkedAccountStatus.Raw | null; + status?: LinkedAccountStatus.Raw | null; has_conditional_params: boolean; has_required_linked_account_params: boolean; } diff --git a/src/serialization/resources/ats/types/MethodEnum.ts b/src/serialization/resources/ats/types/MethodEnum.ts index f0915e6f4..451269f5c 100644 --- a/src/serialization/resources/ats/types/MethodEnum.ts +++ b/src/serialization/resources/ats/types/MethodEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const MethodEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/ModelOperation.ts b/src/serialization/resources/ats/types/ModelOperation.ts index 4bc3e5233..5bec6f843 100644 --- a/src/serialization/resources/ats/types/ModelOperation.ts +++ b/src/serialization/resources/ats/types/ModelOperation.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelOperation: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/ModelPermissionDeserializer.ts b/src/serialization/resources/ats/types/ModelPermissionDeserializer.ts index 61710f849..7298a5937 100644 --- a/src/serialization/resources/ats/types/ModelPermissionDeserializer.ts +++ b/src/serialization/resources/ats/types/ModelPermissionDeserializer.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelPermissionDeserializer: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/ModelPermissionDeserializerRequest.ts b/src/serialization/resources/ats/types/ModelPermissionDeserializerRequest.ts index cc3c71dd4..027c3c74c 100644 --- a/src/serialization/resources/ats/types/ModelPermissionDeserializerRequest.ts +++ b/src/serialization/resources/ats/types/ModelPermissionDeserializerRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelPermissionDeserializerRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/MultipartFormFieldRequest.ts b/src/serialization/resources/ats/types/MultipartFormFieldRequest.ts index 24b5d7385..9a72f4e32 100644 --- a/src/serialization/resources/ats/types/MultipartFormFieldRequest.ts +++ b/src/serialization/resources/ats/types/MultipartFormFieldRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { MultipartFormFieldRequestEncoding } from "./MultipartFormFieldRequestEncoding"; export const MultipartFormFieldRequest: core.serialization.ObjectSchema< serializers.ats.MultipartFormFieldRequest.Raw, @@ -12,9 +13,7 @@ export const MultipartFormFieldRequest: core.serialization.ObjectSchema< > = core.serialization.object({ name: core.serialization.string(), data: core.serialization.string(), - encoding: core.serialization - .lazy(async () => (await import("../../..")).ats.MultipartFormFieldRequestEncoding) - .optional(), + encoding: MultipartFormFieldRequestEncoding.optional(), fileName: core.serialization.property("file_name", core.serialization.string().optional()), contentType: core.serialization.property("content_type", core.serialization.string().optional()), }); @@ -23,7 +22,7 @@ export declare namespace MultipartFormFieldRequest { interface Raw { name: string; data: string; - encoding?: serializers.ats.MultipartFormFieldRequestEncoding.Raw | null; + encoding?: MultipartFormFieldRequestEncoding.Raw | null; file_name?: string | null; content_type?: string | null; } diff --git a/src/serialization/resources/ats/types/MultipartFormFieldRequestEncoding.ts b/src/serialization/resources/ats/types/MultipartFormFieldRequestEncoding.ts index 42bdbd8de..a1b609196 100644 --- a/src/serialization/resources/ats/types/MultipartFormFieldRequestEncoding.ts +++ b/src/serialization/resources/ats/types/MultipartFormFieldRequestEncoding.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EncodingEnum } from "./EncodingEnum"; export const MultipartFormFieldRequestEncoding: core.serialization.Schema< serializers.ats.MultipartFormFieldRequestEncoding.Raw, Merge.ats.MultipartFormFieldRequestEncoding -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.EncodingEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EncodingEnum, core.serialization.string()]); export declare namespace MultipartFormFieldRequestEncoding { - type Raw = serializers.ats.EncodingEnum.Raw | string; + type Raw = EncodingEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/Offer.ts b/src/serialization/resources/ats/types/Offer.ts index 8c338e522..6fd9e9f0e 100644 --- a/src/serialization/resources/ats/types/Offer.ts +++ b/src/serialization/resources/ats/types/Offer.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { OfferCreator } from "./OfferCreator"; +import { OfferStatus } from "./OfferStatus"; +import { RemoteData } from "./RemoteData"; export const Offer: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,24 +15,19 @@ export const Offer: core.serialization.ObjectSchema (await import("../../..")).ats.OfferApplication).optional(), - creator: core.serialization.lazy(async () => (await import("../../..")).ats.OfferCreator).optional(), + application: core.serialization.lazy(() => serializers.ats.OfferApplication).optional(), + creator: OfferCreator.optional(), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), closedAt: core.serialization.property("closed_at", core.serialization.date().optional()), sentAt: core.serialization.property("sent_at", core.serialization.date().optional()), startDate: core.serialization.property("start_date", core.serialization.date().optional()), - status: core.serialization.lazy(async () => (await import("../../..")).ats.OfferStatus).optional(), + status: OfferStatus.optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Offer { @@ -39,14 +37,14 @@ export declare namespace Offer { created_at?: string | null; modified_at?: string | null; application?: serializers.ats.OfferApplication.Raw | null; - creator?: serializers.ats.OfferCreator.Raw | null; + creator?: OfferCreator.Raw | null; remote_created_at?: string | null; closed_at?: string | null; sent_at?: string | null; start_date?: string | null; - status?: serializers.ats.OfferStatus.Raw | null; + status?: OfferStatus.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/OfferApplication.ts b/src/serialization/resources/ats/types/OfferApplication.ts index 06b6196f9..ac7932ad8 100644 --- a/src/serialization/resources/ats/types/OfferApplication.ts +++ b/src/serialization/resources/ats/types/OfferApplication.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const OfferApplication: core.serialization.Schema< @@ -11,7 +11,7 @@ export const OfferApplication: core.serialization.Schema< Merge.ats.OfferApplication > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Application), + core.serialization.lazyObject(() => serializers.ats.Application), ]); export declare namespace OfferApplication { diff --git a/src/serialization/resources/ats/types/OfferCreator.ts b/src/serialization/resources/ats/types/OfferCreator.ts index 166b5c4ed..7afcee8ea 100644 --- a/src/serialization/resources/ats/types/OfferCreator.ts +++ b/src/serialization/resources/ats/types/OfferCreator.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteUser } from "./RemoteUser"; export const OfferCreator: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteUser), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace OfferCreator { - type Raw = string | serializers.ats.RemoteUser.Raw; + type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/OfferStatus.ts b/src/serialization/resources/ats/types/OfferStatus.ts index 2a96e28c1..1693eb7bf 100644 --- a/src/serialization/resources/ats/types/OfferStatus.ts +++ b/src/serialization/resources/ats/types/OfferStatus.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { OfferStatusEnum } from "./OfferStatusEnum"; export const OfferStatus: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.OfferStatusEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([OfferStatusEnum, core.serialization.string()]); export declare namespace OfferStatus { - type Raw = serializers.ats.OfferStatusEnum.Raw | string; + type Raw = OfferStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/OfferStatusEnum.ts b/src/serialization/resources/ats/types/OfferStatusEnum.ts index 4b8dda4f0..3d892db5c 100644 --- a/src/serialization/resources/ats/types/OfferStatusEnum.ts +++ b/src/serialization/resources/ats/types/OfferStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const OfferStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/Office.ts b/src/serialization/resources/ats/types/Office.ts index 0893c7775..d552d629f 100644 --- a/src/serialization/resources/ats/types/Office.ts +++ b/src/serialization/resources/ats/types/Office.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; export const Office: core.serialization.ObjectSchema = core.serialization.object({ @@ -19,12 +20,7 @@ export const Office: core.serialization.ObjectSchema (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Office { @@ -37,6 +33,6 @@ export declare namespace Office { location?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/OverallRecommendationEnum.ts b/src/serialization/resources/ats/types/OverallRecommendationEnum.ts index 66dcc4c66..de690a345 100644 --- a/src/serialization/resources/ats/types/OverallRecommendationEnum.ts +++ b/src/serialization/resources/ats/types/OverallRecommendationEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const OverallRecommendationEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/PaginatedAccountDetailsAndActionsList.ts b/src/serialization/resources/ats/types/PaginatedAccountDetailsAndActionsList.ts index e8b43e5f2..7e99f155c 100644 --- a/src/serialization/resources/ats/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/serialization/resources/ats/types/PaginatedAccountDetailsAndActionsList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountDetailsAndActions } from "./AccountDetailsAndActions"; export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSchema< serializers.ats.PaginatedAccountDetailsAndActionsList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSch > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.AccountDetailsAndActions)) - .optional(), + results: core.serialization.list(AccountDetailsAndActions).optional(), }); export declare namespace PaginatedAccountDetailsAndActionsList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.AccountDetailsAndActions.Raw[] | null; + results?: AccountDetailsAndActions.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedActivityList.ts b/src/serialization/resources/ats/types/PaginatedActivityList.ts index de3b06693..4a1cb5c03 100644 --- a/src/serialization/resources/ats/types/PaginatedActivityList.ts +++ b/src/serialization/resources/ats/types/PaginatedActivityList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Activity } from "./Activity"; export const PaginatedActivityList: core.serialization.ObjectSchema< serializers.ats.PaginatedActivityList.Raw, @@ -12,15 +13,13 @@ export const PaginatedActivityList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.Activity)) - .optional(), + results: core.serialization.list(Activity).optional(), }); export declare namespace PaginatedActivityList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.Activity.Raw[] | null; + results?: Activity.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedApplicationList.ts b/src/serialization/resources/ats/types/PaginatedApplicationList.ts index 80fde60fb..74c9293cd 100644 --- a/src/serialization/resources/ats/types/PaginatedApplicationList.ts +++ b/src/serialization/resources/ats/types/PaginatedApplicationList.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PaginatedApplicationList: core.serialization.ObjectSchema< @@ -12,9 +12,7 @@ export const PaginatedApplicationList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.Application)) - .optional(), + results: core.serialization.list(core.serialization.lazyObject(() => serializers.ats.Application)).optional(), }); export declare namespace PaginatedApplicationList { diff --git a/src/serialization/resources/ats/types/PaginatedAttachmentList.ts b/src/serialization/resources/ats/types/PaginatedAttachmentList.ts index 94c4b5cdc..945473b11 100644 --- a/src/serialization/resources/ats/types/PaginatedAttachmentList.ts +++ b/src/serialization/resources/ats/types/PaginatedAttachmentList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Attachment } from "./Attachment"; export const PaginatedAttachmentList: core.serialization.ObjectSchema< serializers.ats.PaginatedAttachmentList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAttachmentList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.Attachment)) - .optional(), + results: core.serialization.list(Attachment).optional(), }); export declare namespace PaginatedAttachmentList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.Attachment.Raw[] | null; + results?: Attachment.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedAuditLogEventList.ts b/src/serialization/resources/ats/types/PaginatedAuditLogEventList.ts index 906f3e6df..413266c5f 100644 --- a/src/serialization/resources/ats/types/PaginatedAuditLogEventList.ts +++ b/src/serialization/resources/ats/types/PaginatedAuditLogEventList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AuditLogEvent } from "./AuditLogEvent"; export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< serializers.ats.PaginatedAuditLogEventList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.AuditLogEvent)) - .optional(), + results: core.serialization.list(AuditLogEvent).optional(), }); export declare namespace PaginatedAuditLogEventList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.AuditLogEvent.Raw[] | null; + results?: AuditLogEvent.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedCandidateList.ts b/src/serialization/resources/ats/types/PaginatedCandidateList.ts index a6ccc934a..44f88ab6e 100644 --- a/src/serialization/resources/ats/types/PaginatedCandidateList.ts +++ b/src/serialization/resources/ats/types/PaginatedCandidateList.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PaginatedCandidateList: core.serialization.ObjectSchema< @@ -12,9 +12,7 @@ export const PaginatedCandidateList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.Candidate)) - .optional(), + results: core.serialization.list(core.serialization.lazyObject(() => serializers.ats.Candidate)).optional(), }); export declare namespace PaginatedCandidateList { diff --git a/src/serialization/resources/ats/types/PaginatedDepartmentList.ts b/src/serialization/resources/ats/types/PaginatedDepartmentList.ts index 0d1c589ba..8de1477a0 100644 --- a/src/serialization/resources/ats/types/PaginatedDepartmentList.ts +++ b/src/serialization/resources/ats/types/PaginatedDepartmentList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Department } from "./Department"; export const PaginatedDepartmentList: core.serialization.ObjectSchema< serializers.ats.PaginatedDepartmentList.Raw, @@ -12,15 +13,13 @@ export const PaginatedDepartmentList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.Department)) - .optional(), + results: core.serialization.list(Department).optional(), }); export declare namespace PaginatedDepartmentList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.Department.Raw[] | null; + results?: Department.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedEeocList.ts b/src/serialization/resources/ats/types/PaginatedEeocList.ts index 9b3284f35..e10c14610 100644 --- a/src/serialization/resources/ats/types/PaginatedEeocList.ts +++ b/src/serialization/resources/ats/types/PaginatedEeocList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Eeoc } from "./Eeoc"; export const PaginatedEeocList: core.serialization.ObjectSchema< serializers.ats.PaginatedEeocList.Raw, @@ -12,15 +13,13 @@ export const PaginatedEeocList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.Eeoc)) - .optional(), + results: core.serialization.list(Eeoc).optional(), }); export declare namespace PaginatedEeocList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.Eeoc.Raw[] | null; + results?: Eeoc.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedIssueList.ts b/src/serialization/resources/ats/types/PaginatedIssueList.ts index 901a539a9..3aa22d19c 100644 --- a/src/serialization/resources/ats/types/PaginatedIssueList.ts +++ b/src/serialization/resources/ats/types/PaginatedIssueList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Issue } from "./Issue"; export const PaginatedIssueList: core.serialization.ObjectSchema< serializers.ats.PaginatedIssueList.Raw, @@ -12,15 +13,13 @@ export const PaginatedIssueList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.Issue)) - .optional(), + results: core.serialization.list(Issue).optional(), }); export declare namespace PaginatedIssueList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.Issue.Raw[] | null; + results?: Issue.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedJobInterviewStageList.ts b/src/serialization/resources/ats/types/PaginatedJobInterviewStageList.ts index a221f3412..0df0ef21f 100644 --- a/src/serialization/resources/ats/types/PaginatedJobInterviewStageList.ts +++ b/src/serialization/resources/ats/types/PaginatedJobInterviewStageList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JobInterviewStage } from "./JobInterviewStage"; export const PaginatedJobInterviewStageList: core.serialization.ObjectSchema< serializers.ats.PaginatedJobInterviewStageList.Raw, @@ -12,15 +13,13 @@ export const PaginatedJobInterviewStageList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.JobInterviewStage)) - .optional(), + results: core.serialization.list(JobInterviewStage).optional(), }); export declare namespace PaginatedJobInterviewStageList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.JobInterviewStage.Raw[] | null; + results?: JobInterviewStage.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedJobList.ts b/src/serialization/resources/ats/types/PaginatedJobList.ts index 3de9212c4..25a168ad9 100644 --- a/src/serialization/resources/ats/types/PaginatedJobList.ts +++ b/src/serialization/resources/ats/types/PaginatedJobList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Job } from "./Job"; export const PaginatedJobList: core.serialization.ObjectSchema< serializers.ats.PaginatedJobList.Raw, @@ -12,15 +13,13 @@ export const PaginatedJobList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.Job)) - .optional(), + results: core.serialization.list(Job).optional(), }); export declare namespace PaginatedJobList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.Job.Raw[] | null; + results?: Job.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedJobPostingList.ts b/src/serialization/resources/ats/types/PaginatedJobPostingList.ts index b4237608a..d9d629a50 100644 --- a/src/serialization/resources/ats/types/PaginatedJobPostingList.ts +++ b/src/serialization/resources/ats/types/PaginatedJobPostingList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JobPosting } from "./JobPosting"; export const PaginatedJobPostingList: core.serialization.ObjectSchema< serializers.ats.PaginatedJobPostingList.Raw, @@ -12,15 +13,13 @@ export const PaginatedJobPostingList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.JobPosting)) - .optional(), + results: core.serialization.list(JobPosting).optional(), }); export declare namespace PaginatedJobPostingList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.JobPosting.Raw[] | null; + results?: JobPosting.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedOfferList.ts b/src/serialization/resources/ats/types/PaginatedOfferList.ts index c45ac582f..fbca99029 100644 --- a/src/serialization/resources/ats/types/PaginatedOfferList.ts +++ b/src/serialization/resources/ats/types/PaginatedOfferList.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PaginatedOfferList: core.serialization.ObjectSchema< @@ -12,9 +12,7 @@ export const PaginatedOfferList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.Offer)) - .optional(), + results: core.serialization.list(core.serialization.lazyObject(() => serializers.ats.Offer)).optional(), }); export declare namespace PaginatedOfferList { diff --git a/src/serialization/resources/ats/types/PaginatedOfficeList.ts b/src/serialization/resources/ats/types/PaginatedOfficeList.ts index 99147347c..927b1144e 100644 --- a/src/serialization/resources/ats/types/PaginatedOfficeList.ts +++ b/src/serialization/resources/ats/types/PaginatedOfficeList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Office } from "./Office"; export const PaginatedOfficeList: core.serialization.ObjectSchema< serializers.ats.PaginatedOfficeList.Raw, @@ -12,15 +13,13 @@ export const PaginatedOfficeList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.Office)) - .optional(), + results: core.serialization.list(Office).optional(), }); export declare namespace PaginatedOfficeList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.Office.Raw[] | null; + results?: Office.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedRejectReasonList.ts b/src/serialization/resources/ats/types/PaginatedRejectReasonList.ts index 3bef91b47..7d5821885 100644 --- a/src/serialization/resources/ats/types/PaginatedRejectReasonList.ts +++ b/src/serialization/resources/ats/types/PaginatedRejectReasonList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RejectReason } from "./RejectReason"; export const PaginatedRejectReasonList: core.serialization.ObjectSchema< serializers.ats.PaginatedRejectReasonList.Raw, @@ -12,15 +13,13 @@ export const PaginatedRejectReasonList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RejectReason)) - .optional(), + results: core.serialization.list(RejectReason).optional(), }); export declare namespace PaginatedRejectReasonList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.RejectReason.Raw[] | null; + results?: RejectReason.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedRemoteUserList.ts b/src/serialization/resources/ats/types/PaginatedRemoteUserList.ts index 78871713f..ccaf330ee 100644 --- a/src/serialization/resources/ats/types/PaginatedRemoteUserList.ts +++ b/src/serialization/resources/ats/types/PaginatedRemoteUserList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteUser } from "./RemoteUser"; export const PaginatedRemoteUserList: core.serialization.ObjectSchema< serializers.ats.PaginatedRemoteUserList.Raw, @@ -12,15 +13,13 @@ export const PaginatedRemoteUserList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteUser)) - .optional(), + results: core.serialization.list(RemoteUser).optional(), }); export declare namespace PaginatedRemoteUserList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.RemoteUser.Raw[] | null; + results?: RemoteUser.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedScheduledInterviewList.ts b/src/serialization/resources/ats/types/PaginatedScheduledInterviewList.ts index 640c4a711..2a3172801 100644 --- a/src/serialization/resources/ats/types/PaginatedScheduledInterviewList.ts +++ b/src/serialization/resources/ats/types/PaginatedScheduledInterviewList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScheduledInterview } from "./ScheduledInterview"; export const PaginatedScheduledInterviewList: core.serialization.ObjectSchema< serializers.ats.PaginatedScheduledInterviewList.Raw, @@ -12,15 +13,13 @@ export const PaginatedScheduledInterviewList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ScheduledInterview)) - .optional(), + results: core.serialization.list(ScheduledInterview).optional(), }); export declare namespace PaginatedScheduledInterviewList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.ScheduledInterview.Raw[] | null; + results?: ScheduledInterview.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedScorecardList.ts b/src/serialization/resources/ats/types/PaginatedScorecardList.ts index 716139f51..f90ae0380 100644 --- a/src/serialization/resources/ats/types/PaginatedScorecardList.ts +++ b/src/serialization/resources/ats/types/PaginatedScorecardList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Scorecard } from "./Scorecard"; export const PaginatedScorecardList: core.serialization.ObjectSchema< serializers.ats.PaginatedScorecardList.Raw, @@ -12,15 +13,13 @@ export const PaginatedScorecardList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.Scorecard)) - .optional(), + results: core.serialization.list(Scorecard).optional(), }); export declare namespace PaginatedScorecardList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.Scorecard.Raw[] | null; + results?: Scorecard.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedScreeningQuestionList.ts b/src/serialization/resources/ats/types/PaginatedScreeningQuestionList.ts index a42a0954d..bc1d4deb8 100644 --- a/src/serialization/resources/ats/types/PaginatedScreeningQuestionList.ts +++ b/src/serialization/resources/ats/types/PaginatedScreeningQuestionList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScreeningQuestion } from "./ScreeningQuestion"; export const PaginatedScreeningQuestionList: core.serialization.ObjectSchema< serializers.ats.PaginatedScreeningQuestionList.Raw, @@ -12,15 +13,13 @@ export const PaginatedScreeningQuestionList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.ScreeningQuestion)) - .optional(), + results: core.serialization.list(ScreeningQuestion).optional(), }); export declare namespace PaginatedScreeningQuestionList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.ScreeningQuestion.Raw[] | null; + results?: ScreeningQuestion.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedSyncStatusList.ts b/src/serialization/resources/ats/types/PaginatedSyncStatusList.ts index 6ff6c87ae..40bdef77f 100644 --- a/src/serialization/resources/ats/types/PaginatedSyncStatusList.ts +++ b/src/serialization/resources/ats/types/PaginatedSyncStatusList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { SyncStatus } from "./SyncStatus"; export const PaginatedSyncStatusList: core.serialization.ObjectSchema< serializers.ats.PaginatedSyncStatusList.Raw, @@ -12,15 +13,13 @@ export const PaginatedSyncStatusList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.SyncStatus)) - .optional(), + results: core.serialization.list(SyncStatus).optional(), }); export declare namespace PaginatedSyncStatusList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.SyncStatus.Raw[] | null; + results?: SyncStatus.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PaginatedTagList.ts b/src/serialization/resources/ats/types/PaginatedTagList.ts index ebfbc7a83..f924f36ef 100644 --- a/src/serialization/resources/ats/types/PaginatedTagList.ts +++ b/src/serialization/resources/ats/types/PaginatedTagList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Tag } from "./Tag"; export const PaginatedTagList: core.serialization.ObjectSchema< serializers.ats.PaginatedTagList.Raw, @@ -12,15 +13,13 @@ export const PaginatedTagList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.Tag)) - .optional(), + results: core.serialization.list(Tag).optional(), }); export declare namespace PaginatedTagList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ats.Tag.Raw[] | null; + results?: Tag.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/PatchedCandidateRequest.ts b/src/serialization/resources/ats/types/PatchedCandidateRequest.ts index 41a7ef265..359800244 100644 --- a/src/serialization/resources/ats/types/PatchedCandidateRequest.ts +++ b/src/serialization/resources/ats/types/PatchedCandidateRequest.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PhoneNumberRequest } from "./PhoneNumberRequest"; +import { EmailAddressRequest } from "./EmailAddressRequest"; +import { UrlRequest } from "./UrlRequest"; export const PatchedCandidateRequest: core.serialization.ObjectSchema< serializers.ats.PatchedCandidateRequest.Raw, @@ -18,21 +21,12 @@ export const PatchedCandidateRequest: core.serialization.ObjectSchema< isPrivate: core.serialization.property("is_private", core.serialization.boolean().optional()), canEmail: core.serialization.property("can_email", core.serialization.boolean().optional()), locations: core.serialization.list(core.serialization.string().optional()).optional(), - phoneNumbers: core.serialization.property( - "phone_numbers", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.PhoneNumberRequest)) - .optional() - ), + phoneNumbers: core.serialization.property("phone_numbers", core.serialization.list(PhoneNumberRequest).optional()), emailAddresses: core.serialization.property( "email_addresses", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.EmailAddressRequest)) - .optional() + core.serialization.list(EmailAddressRequest).optional() ), - urls: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.UrlRequest)) - .optional(), + urls: core.serialization.list(UrlRequest).optional(), tags: core.serialization.list(core.serialization.string().optional()).optional(), applications: core.serialization.list(core.serialization.string().optional()).optional(), attachments: core.serialization.list(core.serialization.string().optional()).optional(), @@ -57,9 +51,9 @@ export declare namespace PatchedCandidateRequest { is_private?: boolean | null; can_email?: boolean | null; locations?: (string | null | undefined)[] | null; - phone_numbers?: serializers.ats.PhoneNumberRequest.Raw[] | null; - email_addresses?: serializers.ats.EmailAddressRequest.Raw[] | null; - urls?: serializers.ats.UrlRequest.Raw[] | null; + phone_numbers?: PhoneNumberRequest.Raw[] | null; + email_addresses?: EmailAddressRequest.Raw[] | null; + urls?: UrlRequest.Raw[] | null; tags?: (string | null | undefined)[] | null; applications?: (string | null | undefined)[] | null; attachments?: (string | null | undefined)[] | null; diff --git a/src/serialization/resources/ats/types/PhoneNumber.ts b/src/serialization/resources/ats/types/PhoneNumber.ts index f65eb35c4..b4ac7d7be 100644 --- a/src/serialization/resources/ats/types/PhoneNumber.ts +++ b/src/serialization/resources/ats/types/PhoneNumber.ts @@ -2,19 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PhoneNumberPhoneNumberType } from "./PhoneNumberPhoneNumberType"; export const PhoneNumber: core.serialization.ObjectSchema = core.serialization.object({ createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), value: core.serialization.string().optional(), - phoneNumberType: core.serialization.property( - "phone_number_type", - core.serialization.lazy(async () => (await import("../../..")).ats.PhoneNumberPhoneNumberType).optional() - ), + phoneNumberType: core.serialization.property("phone_number_type", PhoneNumberPhoneNumberType.optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), }); @@ -23,7 +21,7 @@ export declare namespace PhoneNumber { created_at?: string | null; modified_at?: string | null; value?: string | null; - phone_number_type?: serializers.ats.PhoneNumberPhoneNumberType.Raw | null; + phone_number_type?: PhoneNumberPhoneNumberType.Raw | null; remote_was_deleted?: boolean | null; } } diff --git a/src/serialization/resources/ats/types/PhoneNumberPhoneNumberType.ts b/src/serialization/resources/ats/types/PhoneNumberPhoneNumberType.ts index 2a98bc271..b296f3608 100644 --- a/src/serialization/resources/ats/types/PhoneNumberPhoneNumberType.ts +++ b/src/serialization/resources/ats/types/PhoneNumberPhoneNumberType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PhoneNumberTypeEnum } from "./PhoneNumberTypeEnum"; export const PhoneNumberPhoneNumberType: core.serialization.Schema< serializers.ats.PhoneNumberPhoneNumberType.Raw, Merge.ats.PhoneNumberPhoneNumberType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.PhoneNumberTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PhoneNumberTypeEnum, core.serialization.string()]); export declare namespace PhoneNumberPhoneNumberType { - type Raw = serializers.ats.PhoneNumberTypeEnum.Raw | string; + type Raw = PhoneNumberTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/PhoneNumberRequest.ts b/src/serialization/resources/ats/types/PhoneNumberRequest.ts index babe58a23..356f07aa7 100644 --- a/src/serialization/resources/ats/types/PhoneNumberRequest.ts +++ b/src/serialization/resources/ats/types/PhoneNumberRequest.ts @@ -2,19 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PhoneNumberRequestPhoneNumberType } from "./PhoneNumberRequestPhoneNumberType"; export const PhoneNumberRequest: core.serialization.ObjectSchema< serializers.ats.PhoneNumberRequest.Raw, Merge.ats.PhoneNumberRequest > = core.serialization.object({ value: core.serialization.string().optional(), - phoneNumberType: core.serialization.property( - "phone_number_type", - core.serialization.lazy(async () => (await import("../../..")).ats.PhoneNumberRequestPhoneNumberType).optional() - ), + phoneNumberType: core.serialization.property("phone_number_type", PhoneNumberRequestPhoneNumberType.optional()), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -28,7 +26,7 @@ export const PhoneNumberRequest: core.serialization.ObjectSchema< export declare namespace PhoneNumberRequest { interface Raw { value?: string | null; - phone_number_type?: serializers.ats.PhoneNumberRequestPhoneNumberType.Raw | null; + phone_number_type?: PhoneNumberRequestPhoneNumberType.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; } diff --git a/src/serialization/resources/ats/types/PhoneNumberRequestPhoneNumberType.ts b/src/serialization/resources/ats/types/PhoneNumberRequestPhoneNumberType.ts index 49fae71f3..82405f1e4 100644 --- a/src/serialization/resources/ats/types/PhoneNumberRequestPhoneNumberType.ts +++ b/src/serialization/resources/ats/types/PhoneNumberRequestPhoneNumberType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PhoneNumberTypeEnum } from "./PhoneNumberTypeEnum"; export const PhoneNumberRequestPhoneNumberType: core.serialization.Schema< serializers.ats.PhoneNumberRequestPhoneNumberType.Raw, Merge.ats.PhoneNumberRequestPhoneNumberType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.PhoneNumberTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PhoneNumberTypeEnum, core.serialization.string()]); export declare namespace PhoneNumberRequestPhoneNumberType { - type Raw = serializers.ats.PhoneNumberTypeEnum.Raw | string; + type Raw = PhoneNumberTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/PhoneNumberTypeEnum.ts b/src/serialization/resources/ats/types/PhoneNumberTypeEnum.ts index 03a1f87b3..facdb166b 100644 --- a/src/serialization/resources/ats/types/PhoneNumberTypeEnum.ts +++ b/src/serialization/resources/ats/types/PhoneNumberTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PhoneNumberTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/RaceEnum.ts b/src/serialization/resources/ats/types/RaceEnum.ts index 4a73a3fdb..61e144ea7 100644 --- a/src/serialization/resources/ats/types/RaceEnum.ts +++ b/src/serialization/resources/ats/types/RaceEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RaceEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/ReasonEnum.ts b/src/serialization/resources/ats/types/ReasonEnum.ts index 931f8f237..ee2204fb6 100644 --- a/src/serialization/resources/ats/types/ReasonEnum.ts +++ b/src/serialization/resources/ats/types/ReasonEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ReasonEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/RejectReason.ts b/src/serialization/resources/ats/types/RejectReason.ts index 5fdd000fe..32f31c5c1 100644 --- a/src/serialization/resources/ats/types/RejectReason.ts +++ b/src/serialization/resources/ats/types/RejectReason.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; export const RejectReason: core.serialization.ObjectSchema = core.serialization.object({ @@ -18,12 +19,7 @@ export const RejectReason: core.serialization.ObjectSchema (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace RejectReason { @@ -35,6 +31,6 @@ export declare namespace RejectReason { name?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/RemoteData.ts b/src/serialization/resources/ats/types/RemoteData.ts index 5cf51cc91..4af3572d5 100644 --- a/src/serialization/resources/ats/types/RemoteData.ts +++ b/src/serialization/resources/ats/types/RemoteData.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteData: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/ats/types/RemoteEndpointInfo.ts b/src/serialization/resources/ats/types/RemoteEndpointInfo.ts index 3cb31f272..2abf65c2d 100644 --- a/src/serialization/resources/ats/types/RemoteEndpointInfo.ts +++ b/src/serialization/resources/ats/types/RemoteEndpointInfo.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteEndpointInfo: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/RemoteFieldApi.ts b/src/serialization/resources/ats/types/RemoteFieldApi.ts index 0f4d95468..0d2a18be1 100644 --- a/src/serialization/resources/ats/types/RemoteFieldApi.ts +++ b/src/serialization/resources/ats/types/RemoteFieldApi.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteEndpointInfo } from "./RemoteEndpointInfo"; +import { AdvancedMetadata } from "./AdvancedMetadata"; +import { RemoteFieldApiCoverage } from "./RemoteFieldApiCoverage"; export const RemoteFieldApi: core.serialization.ObjectSchema< serializers.ats.RemoteFieldApi.Raw, @@ -12,28 +15,22 @@ export const RemoteFieldApi: core.serialization.ObjectSchema< > = core.serialization.object({ schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()), remoteKeyName: core.serialization.property("remote_key_name", core.serialization.string()), - remoteEndpointInfo: core.serialization.property( - "remote_endpoint_info", - core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteEndpointInfo) - ), + remoteEndpointInfo: core.serialization.property("remote_endpoint_info", RemoteEndpointInfo), exampleValues: core.serialization.property( "example_values", core.serialization.list(core.serialization.unknown()).optional() ), - advancedMetadata: core.serialization.property( - "advanced_metadata", - core.serialization.lazyObject(async () => (await import("../../..")).ats.AdvancedMetadata).optional() - ), - coverage: core.serialization.lazy(async () => (await import("../../..")).ats.RemoteFieldApiCoverage).optional(), + advancedMetadata: core.serialization.property("advanced_metadata", AdvancedMetadata.optional()), + coverage: RemoteFieldApiCoverage.optional(), }); export declare namespace RemoteFieldApi { interface Raw { schema: Record; remote_key_name: string; - remote_endpoint_info: serializers.ats.RemoteEndpointInfo.Raw; + remote_endpoint_info: RemoteEndpointInfo.Raw; example_values?: unknown[] | null; - advanced_metadata?: serializers.ats.AdvancedMetadata.Raw | null; - coverage?: serializers.ats.RemoteFieldApiCoverage.Raw | null; + advanced_metadata?: AdvancedMetadata.Raw | null; + coverage?: RemoteFieldApiCoverage.Raw | null; } } diff --git a/src/serialization/resources/ats/types/RemoteFieldApiCoverage.ts b/src/serialization/resources/ats/types/RemoteFieldApiCoverage.ts index dc45d23b0..103fc8a4c 100644 --- a/src/serialization/resources/ats/types/RemoteFieldApiCoverage.ts +++ b/src/serialization/resources/ats/types/RemoteFieldApiCoverage.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteFieldApiCoverage: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/RemoteFieldApiResponse.ts b/src/serialization/resources/ats/types/RemoteFieldApiResponse.ts index 1ab565be5..a5bd78d86 100644 --- a/src/serialization/resources/ats/types/RemoteFieldApiResponse.ts +++ b/src/serialization/resources/ats/types/RemoteFieldApiResponse.ts @@ -2,129 +2,56 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldApi } from "./RemoteFieldApi"; export const RemoteFieldApiResponse: core.serialization.ObjectSchema< serializers.ats.RemoteFieldApiResponse.Raw, Merge.ats.RemoteFieldApiResponse > = core.serialization.object({ - activity: core.serialization.property( - "Activity", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), - application: core.serialization.property( - "Application", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), - attachment: core.serialization.property( - "Attachment", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), - candidate: core.serialization.property( - "Candidate", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), - department: core.serialization.property( - "Department", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), - eeoc: core.serialization.property( - "EEOC", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), + activity: core.serialization.property("Activity", core.serialization.list(RemoteFieldApi).optional()), + application: core.serialization.property("Application", core.serialization.list(RemoteFieldApi).optional()), + attachment: core.serialization.property("Attachment", core.serialization.list(RemoteFieldApi).optional()), + candidate: core.serialization.property("Candidate", core.serialization.list(RemoteFieldApi).optional()), + department: core.serialization.property("Department", core.serialization.list(RemoteFieldApi).optional()), + eeoc: core.serialization.property("EEOC", core.serialization.list(RemoteFieldApi).optional()), scheduledInterview: core.serialization.property( "ScheduledInterview", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), - job: core.serialization.property( - "Job", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), - jobPosting: core.serialization.property( - "JobPosting", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() + core.serialization.list(RemoteFieldApi).optional() ), + job: core.serialization.property("Job", core.serialization.list(RemoteFieldApi).optional()), + jobPosting: core.serialization.property("JobPosting", core.serialization.list(RemoteFieldApi).optional()), jobInterviewStage: core.serialization.property( "JobInterviewStage", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), - offer: core.serialization.property( - "Offer", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), - office: core.serialization.property( - "Office", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), - rejectReason: core.serialization.property( - "RejectReason", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), - scorecard: core.serialization.property( - "Scorecard", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), - tag: core.serialization.property( - "Tag", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), - remoteUser: core.serialization.property( - "RemoteUser", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteFieldApi)) - .optional() - ), + core.serialization.list(RemoteFieldApi).optional() + ), + offer: core.serialization.property("Offer", core.serialization.list(RemoteFieldApi).optional()), + office: core.serialization.property("Office", core.serialization.list(RemoteFieldApi).optional()), + rejectReason: core.serialization.property("RejectReason", core.serialization.list(RemoteFieldApi).optional()), + scorecard: core.serialization.property("Scorecard", core.serialization.list(RemoteFieldApi).optional()), + tag: core.serialization.property("Tag", core.serialization.list(RemoteFieldApi).optional()), + remoteUser: core.serialization.property("RemoteUser", core.serialization.list(RemoteFieldApi).optional()), }); export declare namespace RemoteFieldApiResponse { interface Raw { - Activity?: serializers.ats.RemoteFieldApi.Raw[] | null; - Application?: serializers.ats.RemoteFieldApi.Raw[] | null; - Attachment?: serializers.ats.RemoteFieldApi.Raw[] | null; - Candidate?: serializers.ats.RemoteFieldApi.Raw[] | null; - Department?: serializers.ats.RemoteFieldApi.Raw[] | null; - EEOC?: serializers.ats.RemoteFieldApi.Raw[] | null; - ScheduledInterview?: serializers.ats.RemoteFieldApi.Raw[] | null; - Job?: serializers.ats.RemoteFieldApi.Raw[] | null; - JobPosting?: serializers.ats.RemoteFieldApi.Raw[] | null; - JobInterviewStage?: serializers.ats.RemoteFieldApi.Raw[] | null; - Offer?: serializers.ats.RemoteFieldApi.Raw[] | null; - Office?: serializers.ats.RemoteFieldApi.Raw[] | null; - RejectReason?: serializers.ats.RemoteFieldApi.Raw[] | null; - Scorecard?: serializers.ats.RemoteFieldApi.Raw[] | null; - Tag?: serializers.ats.RemoteFieldApi.Raw[] | null; - RemoteUser?: serializers.ats.RemoteFieldApi.Raw[] | null; + Activity?: RemoteFieldApi.Raw[] | null; + Application?: RemoteFieldApi.Raw[] | null; + Attachment?: RemoteFieldApi.Raw[] | null; + Candidate?: RemoteFieldApi.Raw[] | null; + Department?: RemoteFieldApi.Raw[] | null; + EEOC?: RemoteFieldApi.Raw[] | null; + ScheduledInterview?: RemoteFieldApi.Raw[] | null; + Job?: RemoteFieldApi.Raw[] | null; + JobPosting?: RemoteFieldApi.Raw[] | null; + JobInterviewStage?: RemoteFieldApi.Raw[] | null; + Offer?: RemoteFieldApi.Raw[] | null; + Office?: RemoteFieldApi.Raw[] | null; + RejectReason?: RemoteFieldApi.Raw[] | null; + Scorecard?: RemoteFieldApi.Raw[] | null; + Tag?: RemoteFieldApi.Raw[] | null; + RemoteUser?: RemoteFieldApi.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/RemoteKey.ts b/src/serialization/resources/ats/types/RemoteKey.ts index 37af66175..4c4c338f3 100644 --- a/src/serialization/resources/ats/types/RemoteKey.ts +++ b/src/serialization/resources/ats/types/RemoteKey.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteKey: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/ats/types/RemoteResponse.ts b/src/serialization/resources/ats/types/RemoteResponse.ts index 4cfa242ca..d3da3a46a 100644 --- a/src/serialization/resources/ats/types/RemoteResponse.ts +++ b/src/serialization/resources/ats/types/RemoteResponse.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteResponseResponseType } from "./RemoteResponseResponseType"; export const RemoteResponse: core.serialization.ObjectSchema< serializers.ats.RemoteResponse.Raw, @@ -18,10 +19,7 @@ export const RemoteResponse: core.serialization.ObjectSchema< "response_headers", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - responseType: core.serialization.property( - "response_type", - core.serialization.lazy(async () => (await import("../../..")).ats.RemoteResponseResponseType).optional() - ), + responseType: core.serialization.property("response_type", RemoteResponseResponseType.optional()), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), }); @@ -32,7 +30,7 @@ export declare namespace RemoteResponse { status: number; response?: unknown; response_headers?: Record | null; - response_type?: serializers.ats.RemoteResponseResponseType.Raw | null; + response_type?: RemoteResponseResponseType.Raw | null; headers?: Record | null; } } diff --git a/src/serialization/resources/ats/types/RemoteResponseResponseType.ts b/src/serialization/resources/ats/types/RemoteResponseResponseType.ts index e1cf806a9..fc3af28d2 100644 --- a/src/serialization/resources/ats/types/RemoteResponseResponseType.ts +++ b/src/serialization/resources/ats/types/RemoteResponseResponseType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ResponseTypeEnum } from "./ResponseTypeEnum"; export const RemoteResponseResponseType: core.serialization.Schema< serializers.ats.RemoteResponseResponseType.Raw, Merge.ats.RemoteResponseResponseType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.ResponseTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([ResponseTypeEnum, core.serialization.string()]); export declare namespace RemoteResponseResponseType { - type Raw = serializers.ats.ResponseTypeEnum.Raw | string; + type Raw = ResponseTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/RemoteUser.ts b/src/serialization/resources/ats/types/RemoteUser.ts index 0ecbbb948..db6d6ad30 100644 --- a/src/serialization/resources/ats/types/RemoteUser.ts +++ b/src/serialization/resources/ats/types/RemoteUser.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteUserAccessRole } from "./RemoteUserAccessRole"; +import { RemoteData } from "./RemoteData"; export const RemoteUser: core.serialization.ObjectSchema = core.serialization.object({ @@ -17,21 +19,13 @@ export const RemoteUser: core.serialization.ObjectSchema (await import("../../..")).ats.RemoteUserAccessRole).optional() - ), + accessRole: core.serialization.property("access_role", RemoteUserAccessRole.optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace RemoteUser { @@ -45,9 +39,9 @@ export declare namespace RemoteUser { email?: string | null; disabled?: boolean | null; remote_created_at?: string | null; - access_role?: serializers.ats.RemoteUserAccessRole.Raw | null; + access_role?: RemoteUserAccessRole.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/RemoteUserAccessRole.ts b/src/serialization/resources/ats/types/RemoteUserAccessRole.ts index 1637605fd..2f4f4a320 100644 --- a/src/serialization/resources/ats/types/RemoteUserAccessRole.ts +++ b/src/serialization/resources/ats/types/RemoteUserAccessRole.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccessRoleEnum } from "./AccessRoleEnum"; export const RemoteUserAccessRole: core.serialization.Schema< serializers.ats.RemoteUserAccessRole.Raw, Merge.ats.RemoteUserAccessRole -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.AccessRoleEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([AccessRoleEnum, core.serialization.string()]); export declare namespace RemoteUserAccessRole { - type Raw = serializers.ats.AccessRoleEnum.Raw | string; + type Raw = AccessRoleEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/RequestFormatEnum.ts b/src/serialization/resources/ats/types/RequestFormatEnum.ts index ae7298cf1..9c8818d0d 100644 --- a/src/serialization/resources/ats/types/RequestFormatEnum.ts +++ b/src/serialization/resources/ats/types/RequestFormatEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RequestFormatEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/ResponseTypeEnum.ts b/src/serialization/resources/ats/types/ResponseTypeEnum.ts index e1a179d9e..f4adc53a3 100644 --- a/src/serialization/resources/ats/types/ResponseTypeEnum.ts +++ b/src/serialization/resources/ats/types/ResponseTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ResponseTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/RoleEnum.ts b/src/serialization/resources/ats/types/RoleEnum.ts index b8905b1c9..248cb7ae4 100644 --- a/src/serialization/resources/ats/types/RoleEnum.ts +++ b/src/serialization/resources/ats/types/RoleEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RoleEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/ScheduledInterview.ts b/src/serialization/resources/ats/types/ScheduledInterview.ts index 18cc0d318..5ec74e3b8 100644 --- a/src/serialization/resources/ats/types/ScheduledInterview.ts +++ b/src/serialization/resources/ats/types/ScheduledInterview.ts @@ -2,9 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScheduledInterviewApplication } from "./ScheduledInterviewApplication"; +import { ScheduledInterviewJobInterviewStage } from "./ScheduledInterviewJobInterviewStage"; +import { ScheduledInterviewOrganizer } from "./ScheduledInterviewOrganizer"; +import { ScheduledInterviewInterviewersItem } from "./ScheduledInterviewInterviewersItem"; +import { ScheduledInterviewStatus } from "./ScheduledInterviewStatus"; +import { RemoteData } from "./RemoteData"; export const ScheduledInterview: core.serialization.ObjectSchema< serializers.ats.ScheduledInterview.Raw, @@ -14,42 +20,25 @@ export const ScheduledInterview: core.serialization.ObjectSchema< remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), - application: core.serialization - .lazy(async () => (await import("../../..")).ats.ScheduledInterviewApplication) - .optional(), + application: ScheduledInterviewApplication.optional(), jobInterviewStage: core.serialization.property( "job_interview_stage", - core.serialization - .lazy(async () => (await import("../../..")).ats.ScheduledInterviewJobInterviewStage) - .optional() + ScheduledInterviewJobInterviewStage.optional() ), - organizer: core.serialization - .lazy(async () => (await import("../../..")).ats.ScheduledInterviewOrganizer) - .optional(), - interviewers: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).ats.ScheduledInterviewInterviewersItem) - .optional() - ) - .optional(), + organizer: ScheduledInterviewOrganizer.optional(), + interviewers: core.serialization.list(ScheduledInterviewInterviewersItem.optional()).optional(), location: core.serialization.string().optional(), startAt: core.serialization.property("start_at", core.serialization.date().optional()), endAt: core.serialization.property("end_at", core.serialization.date().optional()), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), - status: core.serialization.lazy(async () => (await import("../../..")).ats.ScheduledInterviewStatus).optional(), + status: ScheduledInterviewStatus.optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace ScheduledInterview { @@ -58,18 +47,18 @@ export declare namespace ScheduledInterview { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - application?: serializers.ats.ScheduledInterviewApplication.Raw | null; - job_interview_stage?: serializers.ats.ScheduledInterviewJobInterviewStage.Raw | null; - organizer?: serializers.ats.ScheduledInterviewOrganizer.Raw | null; - interviewers?: (serializers.ats.ScheduledInterviewInterviewersItem.Raw | null | undefined)[] | null; + application?: ScheduledInterviewApplication.Raw | null; + job_interview_stage?: ScheduledInterviewJobInterviewStage.Raw | null; + organizer?: ScheduledInterviewOrganizer.Raw | null; + interviewers?: (ScheduledInterviewInterviewersItem.Raw | null | undefined)[] | null; location?: string | null; start_at?: string | null; end_at?: string | null; remote_created_at?: string | null; remote_updated_at?: string | null; - status?: serializers.ats.ScheduledInterviewStatus.Raw | null; + status?: ScheduledInterviewStatus.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewApplication.ts b/src/serialization/resources/ats/types/ScheduledInterviewApplication.ts index f1fce1846..f1f712603 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewApplication.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewApplication.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ScheduledInterviewApplication: core.serialization.Schema< @@ -11,7 +11,7 @@ export const ScheduledInterviewApplication: core.serialization.Schema< Merge.ats.ScheduledInterviewApplication > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Application), + core.serialization.lazyObject(() => serializers.ats.Application), ]); export declare namespace ScheduledInterviewApplication { diff --git a/src/serialization/resources/ats/types/ScheduledInterviewInterviewersItem.ts b/src/serialization/resources/ats/types/ScheduledInterviewInterviewersItem.ts index 0df14b075..ffbfb82e5 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewInterviewersItem.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewInterviewersItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteUser } from "./RemoteUser"; export const ScheduledInterviewInterviewersItem: core.serialization.Schema< serializers.ats.ScheduledInterviewInterviewersItem.Raw, Merge.ats.ScheduledInterviewInterviewersItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteUser), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ScheduledInterviewInterviewersItem { - type Raw = string | serializers.ats.RemoteUser.Raw; + type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewJobInterviewStage.ts b/src/serialization/resources/ats/types/ScheduledInterviewJobInterviewStage.ts index f6823de4f..25b2698e6 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewJobInterviewStage.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewJobInterviewStage.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JobInterviewStage } from "./JobInterviewStage"; export const ScheduledInterviewJobInterviewStage: core.serialization.Schema< serializers.ats.ScheduledInterviewJobInterviewStage.Raw, Merge.ats.ScheduledInterviewJobInterviewStage -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.JobInterviewStage), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), JobInterviewStage]); export declare namespace ScheduledInterviewJobInterviewStage { - type Raw = string | serializers.ats.JobInterviewStage.Raw; + type Raw = string | JobInterviewStage.Raw; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewOrganizer.ts b/src/serialization/resources/ats/types/ScheduledInterviewOrganizer.ts index a2602dc11..cfa3df9e0 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewOrganizer.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewOrganizer.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteUser } from "./RemoteUser"; export const ScheduledInterviewOrganizer: core.serialization.Schema< serializers.ats.ScheduledInterviewOrganizer.Raw, Merge.ats.ScheduledInterviewOrganizer -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteUser), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ScheduledInterviewOrganizer { - type Raw = string | serializers.ats.RemoteUser.Raw; + type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewRequest.ts b/src/serialization/resources/ats/types/ScheduledInterviewRequest.ts index 109eb8760..b6a4a5232 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewRequest.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewRequest.ts @@ -2,39 +2,30 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScheduledInterviewRequestApplication } from "./ScheduledInterviewRequestApplication"; +import { ScheduledInterviewRequestJobInterviewStage } from "./ScheduledInterviewRequestJobInterviewStage"; +import { ScheduledInterviewRequestOrganizer } from "./ScheduledInterviewRequestOrganizer"; +import { ScheduledInterviewRequestInterviewersItem } from "./ScheduledInterviewRequestInterviewersItem"; +import { ScheduledInterviewRequestStatus } from "./ScheduledInterviewRequestStatus"; export const ScheduledInterviewRequest: core.serialization.ObjectSchema< serializers.ats.ScheduledInterviewRequest.Raw, Merge.ats.ScheduledInterviewRequest > = core.serialization.object({ - application: core.serialization - .lazy(async () => (await import("../../..")).ats.ScheduledInterviewRequestApplication) - .optional(), + application: ScheduledInterviewRequestApplication.optional(), jobInterviewStage: core.serialization.property( "job_interview_stage", - core.serialization - .lazy(async () => (await import("../../..")).ats.ScheduledInterviewRequestJobInterviewStage) - .optional() + ScheduledInterviewRequestJobInterviewStage.optional() ), - organizer: core.serialization - .lazy(async () => (await import("../../..")).ats.ScheduledInterviewRequestOrganizer) - .optional(), - interviewers: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).ats.ScheduledInterviewRequestInterviewersItem) - .optional() - ) - .optional(), + organizer: ScheduledInterviewRequestOrganizer.optional(), + interviewers: core.serialization.list(ScheduledInterviewRequestInterviewersItem.optional()).optional(), location: core.serialization.string().optional(), startAt: core.serialization.property("start_at", core.serialization.date().optional()), endAt: core.serialization.property("end_at", core.serialization.date().optional()), - status: core.serialization - .lazy(async () => (await import("../../..")).ats.ScheduledInterviewRequestStatus) - .optional(), + status: ScheduledInterviewRequestStatus.optional(), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -47,14 +38,14 @@ export const ScheduledInterviewRequest: core.serialization.ObjectSchema< export declare namespace ScheduledInterviewRequest { interface Raw { - application?: serializers.ats.ScheduledInterviewRequestApplication.Raw | null; - job_interview_stage?: serializers.ats.ScheduledInterviewRequestJobInterviewStage.Raw | null; - organizer?: serializers.ats.ScheduledInterviewRequestOrganizer.Raw | null; - interviewers?: (serializers.ats.ScheduledInterviewRequestInterviewersItem.Raw | null | undefined)[] | null; + application?: ScheduledInterviewRequestApplication.Raw | null; + job_interview_stage?: ScheduledInterviewRequestJobInterviewStage.Raw | null; + organizer?: ScheduledInterviewRequestOrganizer.Raw | null; + interviewers?: (ScheduledInterviewRequestInterviewersItem.Raw | null | undefined)[] | null; location?: string | null; start_at?: string | null; end_at?: string | null; - status?: serializers.ats.ScheduledInterviewRequestStatus.Raw | null; + status?: ScheduledInterviewRequestStatus.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewRequestApplication.ts b/src/serialization/resources/ats/types/ScheduledInterviewRequestApplication.ts index 704646609..b027425a5 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewRequestApplication.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewRequestApplication.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ScheduledInterviewRequestApplication: core.serialization.Schema< @@ -11,7 +11,7 @@ export const ScheduledInterviewRequestApplication: core.serialization.Schema< Merge.ats.ScheduledInterviewRequestApplication > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Application), + core.serialization.lazyObject(() => serializers.ats.Application), ]); export declare namespace ScheduledInterviewRequestApplication { diff --git a/src/serialization/resources/ats/types/ScheduledInterviewRequestInterviewersItem.ts b/src/serialization/resources/ats/types/ScheduledInterviewRequestInterviewersItem.ts index 9887a737b..486727872 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewRequestInterviewersItem.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewRequestInterviewersItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteUser } from "./RemoteUser"; export const ScheduledInterviewRequestInterviewersItem: core.serialization.Schema< serializers.ats.ScheduledInterviewRequestInterviewersItem.Raw, Merge.ats.ScheduledInterviewRequestInterviewersItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteUser), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ScheduledInterviewRequestInterviewersItem { - type Raw = string | serializers.ats.RemoteUser.Raw; + type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewRequestJobInterviewStage.ts b/src/serialization/resources/ats/types/ScheduledInterviewRequestJobInterviewStage.ts index a57a0c852..d799166e7 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewRequestJobInterviewStage.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewRequestJobInterviewStage.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { JobInterviewStage } from "./JobInterviewStage"; export const ScheduledInterviewRequestJobInterviewStage: core.serialization.Schema< serializers.ats.ScheduledInterviewRequestJobInterviewStage.Raw, Merge.ats.ScheduledInterviewRequestJobInterviewStage -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.JobInterviewStage), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), JobInterviewStage]); export declare namespace ScheduledInterviewRequestJobInterviewStage { - type Raw = string | serializers.ats.JobInterviewStage.Raw; + type Raw = string | JobInterviewStage.Raw; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewRequestOrganizer.ts b/src/serialization/resources/ats/types/ScheduledInterviewRequestOrganizer.ts index 7e2f31ca4..4796c30d2 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewRequestOrganizer.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewRequestOrganizer.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteUser } from "./RemoteUser"; export const ScheduledInterviewRequestOrganizer: core.serialization.Schema< serializers.ats.ScheduledInterviewRequestOrganizer.Raw, Merge.ats.ScheduledInterviewRequestOrganizer -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteUser), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ScheduledInterviewRequestOrganizer { - type Raw = string | serializers.ats.RemoteUser.Raw; + type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewRequestStatus.ts b/src/serialization/resources/ats/types/ScheduledInterviewRequestStatus.ts index e6587d5db..2d8e01d64 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewRequestStatus.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewRequestStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScheduledInterviewStatusEnum } from "./ScheduledInterviewStatusEnum"; export const ScheduledInterviewRequestStatus: core.serialization.Schema< serializers.ats.ScheduledInterviewRequestStatus.Raw, Merge.ats.ScheduledInterviewRequestStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.ScheduledInterviewStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([ScheduledInterviewStatusEnum, core.serialization.string()]); export declare namespace ScheduledInterviewRequestStatus { - type Raw = serializers.ats.ScheduledInterviewStatusEnum.Raw | string; + type Raw = ScheduledInterviewStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewResponse.ts b/src/serialization/resources/ats/types/ScheduledInterviewResponse.ts index 42ad2ba55..0450341c1 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewResponse.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScheduledInterview } from "./ScheduledInterview"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const ScheduledInterviewResponse: core.serialization.ObjectSchema< serializers.ats.ScheduledInterviewResponse.Raw, Merge.ats.ScheduledInterviewResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).ats.ScheduledInterview), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ats.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ats.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.DebugModeLog)) - .optional(), + model: ScheduledInterview, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace ScheduledInterviewResponse { interface Raw { - model: serializers.ats.ScheduledInterview.Raw; - warnings: serializers.ats.WarningValidationProblem.Raw[]; - errors: serializers.ats.ErrorValidationProblem.Raw[]; - logs?: serializers.ats.DebugModeLog.Raw[] | null; + model: ScheduledInterview.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewStatus.ts b/src/serialization/resources/ats/types/ScheduledInterviewStatus.ts index a5cd3c5e6..9d786451f 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewStatus.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScheduledInterviewStatusEnum } from "./ScheduledInterviewStatusEnum"; export const ScheduledInterviewStatus: core.serialization.Schema< serializers.ats.ScheduledInterviewStatus.Raw, Merge.ats.ScheduledInterviewStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.ScheduledInterviewStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([ScheduledInterviewStatusEnum, core.serialization.string()]); export declare namespace ScheduledInterviewStatus { - type Raw = serializers.ats.ScheduledInterviewStatusEnum.Raw | string; + type Raw = ScheduledInterviewStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewStatusEnum.ts b/src/serialization/resources/ats/types/ScheduledInterviewStatusEnum.ts index 29ba094c4..9d137e0dd 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewStatusEnum.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ScheduledInterviewStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/Scorecard.ts b/src/serialization/resources/ats/types/Scorecard.ts index 23d416be6..844ab6d58 100644 --- a/src/serialization/resources/ats/types/Scorecard.ts +++ b/src/serialization/resources/ats/types/Scorecard.ts @@ -2,9 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScorecardApplication } from "./ScorecardApplication"; +import { ScorecardInterview } from "./ScorecardInterview"; +import { ScorecardInterviewer } from "./ScorecardInterviewer"; +import { ScorecardOverallRecommendation } from "./ScorecardOverallRecommendation"; +import { RemoteData } from "./RemoteData"; export const Scorecard: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,32 +17,21 @@ export const Scorecard: core.serialization.ObjectSchema (await import("../../..")).ats.ScorecardApplication) - .optional(), - interview: core.serialization.lazy(async () => (await import("../../..")).ats.ScorecardInterview).optional(), - interviewer: core.serialization - .lazy(async () => (await import("../../..")).ats.ScorecardInterviewer) - .optional(), + application: ScorecardApplication.optional(), + interview: ScorecardInterview.optional(), + interviewer: ScorecardInterviewer.optional(), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), submittedAt: core.serialization.property("submitted_at", core.serialization.date().optional()), overallRecommendation: core.serialization.property( "overall_recommendation", - core.serialization - .lazy(async () => (await import("../../..")).ats.ScorecardOverallRecommendation) - .optional() + ScorecardOverallRecommendation.optional() ), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Scorecard { @@ -46,14 +40,14 @@ export declare namespace Scorecard { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - application?: serializers.ats.ScorecardApplication.Raw | null; - interview?: serializers.ats.ScorecardInterview.Raw | null; - interviewer?: serializers.ats.ScorecardInterviewer.Raw | null; + application?: ScorecardApplication.Raw | null; + interview?: ScorecardInterview.Raw | null; + interviewer?: ScorecardInterviewer.Raw | null; remote_created_at?: string | null; submitted_at?: string | null; - overall_recommendation?: serializers.ats.ScorecardOverallRecommendation.Raw | null; + overall_recommendation?: ScorecardOverallRecommendation.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ats.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ats/types/ScorecardApplication.ts b/src/serialization/resources/ats/types/ScorecardApplication.ts index cb8691593..3704f5e8a 100644 --- a/src/serialization/resources/ats/types/ScorecardApplication.ts +++ b/src/serialization/resources/ats/types/ScorecardApplication.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ScorecardApplication: core.serialization.Schema< @@ -11,7 +11,7 @@ export const ScorecardApplication: core.serialization.Schema< Merge.ats.ScorecardApplication > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Application), + core.serialization.lazyObject(() => serializers.ats.Application), ]); export declare namespace ScorecardApplication { diff --git a/src/serialization/resources/ats/types/ScorecardInterview.ts b/src/serialization/resources/ats/types/ScorecardInterview.ts index 42a26a71f..a05e4740b 100644 --- a/src/serialization/resources/ats/types/ScorecardInterview.ts +++ b/src/serialization/resources/ats/types/ScorecardInterview.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScheduledInterview } from "./ScheduledInterview"; export const ScorecardInterview: core.serialization.Schema< serializers.ats.ScorecardInterview.Raw, Merge.ats.ScorecardInterview -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.ScheduledInterview), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), ScheduledInterview]); export declare namespace ScorecardInterview { - type Raw = string | serializers.ats.ScheduledInterview.Raw; + type Raw = string | ScheduledInterview.Raw; } diff --git a/src/serialization/resources/ats/types/ScorecardInterviewer.ts b/src/serialization/resources/ats/types/ScorecardInterviewer.ts index 26f7b827c..d7bccc68b 100644 --- a/src/serialization/resources/ats/types/ScorecardInterviewer.ts +++ b/src/serialization/resources/ats/types/ScorecardInterviewer.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteUser } from "./RemoteUser"; export const ScorecardInterviewer: core.serialization.Schema< serializers.ats.ScorecardInterviewer.Raw, Merge.ats.ScorecardInterviewer -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.RemoteUser), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ScorecardInterviewer { - type Raw = string | serializers.ats.RemoteUser.Raw; + type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ScorecardOverallRecommendation.ts b/src/serialization/resources/ats/types/ScorecardOverallRecommendation.ts index 21851fb91..836a3d0af 100644 --- a/src/serialization/resources/ats/types/ScorecardOverallRecommendation.ts +++ b/src/serialization/resources/ats/types/ScorecardOverallRecommendation.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { OverallRecommendationEnum } from "./OverallRecommendationEnum"; export const ScorecardOverallRecommendation: core.serialization.Schema< serializers.ats.ScorecardOverallRecommendation.Raw, Merge.ats.ScorecardOverallRecommendation -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.OverallRecommendationEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([OverallRecommendationEnum, core.serialization.string()]); export declare namespace ScorecardOverallRecommendation { - type Raw = serializers.ats.OverallRecommendationEnum.Raw | string; + type Raw = OverallRecommendationEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ScreeningQuestion.ts b/src/serialization/resources/ats/types/ScreeningQuestion.ts index b5ec9e808..2c7b2b908 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestion.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestion.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScreeningQuestionJob } from "./ScreeningQuestionJob"; +import { ScreeningQuestionType } from "./ScreeningQuestionType"; export const ScreeningQuestion: core.serialization.ObjectSchema< serializers.ats.ScreeningQuestion.Raw, @@ -14,10 +16,10 @@ export const ScreeningQuestion: core.serialization.ObjectSchema< remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), - job: core.serialization.lazy(async () => (await import("../../..")).ats.ScreeningQuestionJob).optional(), + job: ScreeningQuestionJob.optional(), description: core.serialization.string().optional(), title: core.serialization.string().optional(), - type: core.serialization.lazy(async () => (await import("../../..")).ats.ScreeningQuestionType).optional(), + type: ScreeningQuestionType.optional(), required: core.serialization.boolean().optional(), options: core.serialization.list(core.serialization.unknown()).optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), @@ -29,10 +31,10 @@ export declare namespace ScreeningQuestion { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - job?: serializers.ats.ScreeningQuestionJob.Raw | null; + job?: ScreeningQuestionJob.Raw | null; description?: string | null; title?: string | null; - type?: serializers.ats.ScreeningQuestionType.Raw | null; + type?: ScreeningQuestionType.Raw | null; required?: boolean | null; options?: unknown[] | null; remote_was_deleted?: boolean | null; diff --git a/src/serialization/resources/ats/types/ScreeningQuestionAnswer.ts b/src/serialization/resources/ats/types/ScreeningQuestionAnswer.ts index bbd9a1f55..18d28c280 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionAnswer.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionAnswer.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScreeningQuestionAnswerQuestion } from "./ScreeningQuestionAnswerQuestion"; export const ScreeningQuestionAnswer: core.serialization.ObjectSchema< serializers.ats.ScreeningQuestionAnswer.Raw, @@ -14,9 +15,7 @@ export const ScreeningQuestionAnswer: core.serialization.ObjectSchema< remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), - question: core.serialization - .lazy(async () => (await import("../../..")).ats.ScreeningQuestionAnswerQuestion) - .optional(), + question: ScreeningQuestionAnswerQuestion.optional(), answer: core.serialization.string().optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), }); @@ -27,7 +26,7 @@ export declare namespace ScreeningQuestionAnswer { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - question?: serializers.ats.ScreeningQuestionAnswerQuestion.Raw | null; + question?: ScreeningQuestionAnswerQuestion.Raw | null; answer?: string | null; remote_was_deleted?: boolean | null; } diff --git a/src/serialization/resources/ats/types/ScreeningQuestionAnswerQuestion.ts b/src/serialization/resources/ats/types/ScreeningQuestionAnswerQuestion.ts index b5ec1c3dd..5dea5eaee 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionAnswerQuestion.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionAnswerQuestion.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScreeningQuestion } from "./ScreeningQuestion"; export const ScreeningQuestionAnswerQuestion: core.serialization.Schema< serializers.ats.ScreeningQuestionAnswerQuestion.Raw, Merge.ats.ScreeningQuestionAnswerQuestion -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.ScreeningQuestion), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), ScreeningQuestion]); export declare namespace ScreeningQuestionAnswerQuestion { - type Raw = string | serializers.ats.ScreeningQuestion.Raw; + type Raw = string | ScreeningQuestion.Raw; } diff --git a/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequest.ts b/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequest.ts index 59ef1925b..16c71ddb4 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequest.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequest.ts @@ -2,18 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScreeningQuestionAnswerRequestQuestion } from "./ScreeningQuestionAnswerRequestQuestion"; export const ScreeningQuestionAnswerRequest: core.serialization.ObjectSchema< serializers.ats.ScreeningQuestionAnswerRequest.Raw, Merge.ats.ScreeningQuestionAnswerRequest > = core.serialization.object({ remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), - question: core.serialization - .lazy(async () => (await import("../../..")).ats.ScreeningQuestionAnswerRequestQuestion) - .optional(), + question: ScreeningQuestionAnswerRequestQuestion.optional(), answer: core.serialization.string().optional(), integrationParams: core.serialization.property( "integration_params", @@ -28,7 +27,7 @@ export const ScreeningQuestionAnswerRequest: core.serialization.ObjectSchema< export declare namespace ScreeningQuestionAnswerRequest { interface Raw { remote_id?: string | null; - question?: serializers.ats.ScreeningQuestionAnswerRequestQuestion.Raw | null; + question?: ScreeningQuestionAnswerRequestQuestion.Raw | null; answer?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; diff --git a/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequestQuestion.ts b/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequestQuestion.ts index cdb0bf8f8..2b02219e1 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequestQuestion.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequestQuestion.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScreeningQuestion } from "./ScreeningQuestion"; export const ScreeningQuestionAnswerRequestQuestion: core.serialization.Schema< serializers.ats.ScreeningQuestionAnswerRequestQuestion.Raw, Merge.ats.ScreeningQuestionAnswerRequestQuestion -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.ScreeningQuestion), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), ScreeningQuestion]); export declare namespace ScreeningQuestionAnswerRequestQuestion { - type Raw = string | serializers.ats.ScreeningQuestion.Raw; + type Raw = string | ScreeningQuestion.Raw; } diff --git a/src/serialization/resources/ats/types/ScreeningQuestionJob.ts b/src/serialization/resources/ats/types/ScreeningQuestionJob.ts index 7d01a24ce..44149aae5 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionJob.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionJob.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Job } from "./Job"; export const ScreeningQuestionJob: core.serialization.Schema< serializers.ats.ScreeningQuestionJob.Raw, Merge.ats.ScreeningQuestionJob -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ats.Job), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Job]); export declare namespace ScreeningQuestionJob { - type Raw = string | serializers.ats.Job.Raw; + type Raw = string | Job.Raw; } diff --git a/src/serialization/resources/ats/types/ScreeningQuestionOption.ts b/src/serialization/resources/ats/types/ScreeningQuestionOption.ts index 588b057ce..597be83a2 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionOption.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionOption.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ScreeningQuestionOption: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/ScreeningQuestionType.ts b/src/serialization/resources/ats/types/ScreeningQuestionType.ts index ec3f63eb9..d14e5bc2e 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionType.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ScreeningQuestionTypeEnum } from "./ScreeningQuestionTypeEnum"; export const ScreeningQuestionType: core.serialization.Schema< serializers.ats.ScreeningQuestionType.Raw, Merge.ats.ScreeningQuestionType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.ScreeningQuestionTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([ScreeningQuestionTypeEnum, core.serialization.string()]); export declare namespace ScreeningQuestionType { - type Raw = serializers.ats.ScreeningQuestionTypeEnum.Raw | string; + type Raw = ScreeningQuestionTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ScreeningQuestionTypeEnum.ts b/src/serialization/resources/ats/types/ScreeningQuestionTypeEnum.ts index 78669246b..f8e024146 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionTypeEnum.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ScreeningQuestionTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/serialization/resources/ats/types/SelectiveSyncConfigurationsUsageEnum.ts index edd53c220..62f1e3985 100644 --- a/src/serialization/resources/ats/types/SelectiveSyncConfigurationsUsageEnum.ts +++ b/src/serialization/resources/ats/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const SelectiveSyncConfigurationsUsageEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/SyncStatus.ts b/src/serialization/resources/ats/types/SyncStatus.ts index 42871ed1e..e51d8298e 100644 --- a/src/serialization/resources/ats/types/SyncStatus.ts +++ b/src/serialization/resources/ats/types/SyncStatus.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { SyncStatusStatusEnum } from "./SyncStatusStatusEnum"; +import { SelectiveSyncConfigurationsUsageEnum } from "./SelectiveSyncConfigurationsUsageEnum"; export const SyncStatus: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,13 +14,11 @@ export const SyncStatus: core.serialization.ObjectSchema (await import("../../..")).ats.SyncStatusStatusEnum), + status: SyncStatusStatusEnum, isInitialSync: core.serialization.property("is_initial_sync", core.serialization.boolean()), selectiveSyncConfigurationsUsage: core.serialization.property( "selective_sync_configurations_usage", - core.serialization - .lazy(async () => (await import("../../..")).ats.SelectiveSyncConfigurationsUsageEnum) - .optional() + SelectiveSyncConfigurationsUsageEnum.optional() ), }); @@ -28,8 +28,8 @@ export declare namespace SyncStatus { model_id: string; last_sync_start?: string | null; next_sync_start?: string | null; - status: serializers.ats.SyncStatusStatusEnum.Raw; + status: SyncStatusStatusEnum.Raw; is_initial_sync: boolean; - selective_sync_configurations_usage?: serializers.ats.SelectiveSyncConfigurationsUsageEnum.Raw | null; + selective_sync_configurations_usage?: SelectiveSyncConfigurationsUsageEnum.Raw | null; } } diff --git a/src/serialization/resources/ats/types/SyncStatusStatusEnum.ts b/src/serialization/resources/ats/types/SyncStatusStatusEnum.ts index 906932b50..8a19f8660 100644 --- a/src/serialization/resources/ats/types/SyncStatusStatusEnum.ts +++ b/src/serialization/resources/ats/types/SyncStatusStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const SyncStatusStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/Tag.ts b/src/serialization/resources/ats/types/Tag.ts index 189ecc99a..188f6523e 100644 --- a/src/serialization/resources/ats/types/Tag.ts +++ b/src/serialization/resources/ats/types/Tag.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const Tag: core.serialization.ObjectSchema = core.serialization.object({ diff --git a/src/serialization/resources/ats/types/Url.ts b/src/serialization/resources/ats/types/Url.ts index 9b7c6b19d..cb63585a8 100644 --- a/src/serialization/resources/ats/types/Url.ts +++ b/src/serialization/resources/ats/types/Url.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { UrlUrlType } from "./UrlUrlType"; export const Url: core.serialization.ObjectSchema = core.serialization.object({ createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), value: core.serialization.string().optional(), - urlType: core.serialization.property( - "url_type", - core.serialization.lazy(async () => (await import("../../..")).ats.UrlUrlType).optional() - ), + urlType: core.serialization.property("url_type", UrlUrlType.optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), }); @@ -22,7 +20,7 @@ export declare namespace Url { created_at?: string | null; modified_at?: string | null; value?: string | null; - url_type?: serializers.ats.UrlUrlType.Raw | null; + url_type?: UrlUrlType.Raw | null; remote_was_deleted?: boolean | null; } } diff --git a/src/serialization/resources/ats/types/UrlRequest.ts b/src/serialization/resources/ats/types/UrlRequest.ts index cc27d5cd2..85e45f8cf 100644 --- a/src/serialization/resources/ats/types/UrlRequest.ts +++ b/src/serialization/resources/ats/types/UrlRequest.ts @@ -2,17 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { UrlRequestUrlType } from "./UrlRequestUrlType"; export const UrlRequest: core.serialization.ObjectSchema = core.serialization.object({ value: core.serialization.string().optional(), - urlType: core.serialization.property( - "url_type", - core.serialization.lazy(async () => (await import("../../..")).ats.UrlRequestUrlType).optional() - ), + urlType: core.serialization.property("url_type", UrlRequestUrlType.optional()), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -26,7 +24,7 @@ export const UrlRequest: core.serialization.ObjectSchema | null; linked_account_params?: Record | null; } diff --git a/src/serialization/resources/ats/types/UrlRequestUrlType.ts b/src/serialization/resources/ats/types/UrlRequestUrlType.ts index 5d5033543..f91c9a67e 100644 --- a/src/serialization/resources/ats/types/UrlRequestUrlType.ts +++ b/src/serialization/resources/ats/types/UrlRequestUrlType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { UrlTypeEnum } from "./UrlTypeEnum"; export const UrlRequestUrlType: core.serialization.Schema< serializers.ats.UrlRequestUrlType.Raw, Merge.ats.UrlRequestUrlType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.UrlTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([UrlTypeEnum, core.serialization.string()]); export declare namespace UrlRequestUrlType { - type Raw = serializers.ats.UrlTypeEnum.Raw | string; + type Raw = UrlTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/UrlTypeEnum.ts b/src/serialization/resources/ats/types/UrlTypeEnum.ts index a113644f6..9b7eaee5f 100644 --- a/src/serialization/resources/ats/types/UrlTypeEnum.ts +++ b/src/serialization/resources/ats/types/UrlTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const UrlTypeEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/UrlUrlType.ts b/src/serialization/resources/ats/types/UrlUrlType.ts index 54de5e187..97d4286d9 100644 --- a/src/serialization/resources/ats/types/UrlUrlType.ts +++ b/src/serialization/resources/ats/types/UrlUrlType.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { UrlTypeEnum } from "./UrlTypeEnum"; export const UrlUrlType: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ats.UrlTypeEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([UrlTypeEnum, core.serialization.string()]); export declare namespace UrlUrlType { - type Raw = serializers.ats.UrlTypeEnum.Raw | string; + type Raw = UrlTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ValidationProblemSource.ts b/src/serialization/resources/ats/types/ValidationProblemSource.ts index 59c7a76cb..da56bec8a 100644 --- a/src/serialization/resources/ats/types/ValidationProblemSource.ts +++ b/src/serialization/resources/ats/types/ValidationProblemSource.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ValidationProblemSource: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ats/types/VeteranStatusEnum.ts b/src/serialization/resources/ats/types/VeteranStatusEnum.ts index df341d03e..e8ab57f4d 100644 --- a/src/serialization/resources/ats/types/VeteranStatusEnum.ts +++ b/src/serialization/resources/ats/types/VeteranStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const VeteranStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ats/types/VisibilityEnum.ts b/src/serialization/resources/ats/types/VisibilityEnum.ts index 99e6ef6e9..bcbc10062 100644 --- a/src/serialization/resources/ats/types/VisibilityEnum.ts +++ b/src/serialization/resources/ats/types/VisibilityEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const VisibilityEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ats/types/WarningValidationProblem.ts b/src/serialization/resources/ats/types/WarningValidationProblem.ts index dc56650f6..83a505b21 100644 --- a/src/serialization/resources/ats/types/WarningValidationProblem.ts +++ b/src/serialization/resources/ats/types/WarningValidationProblem.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ValidationProblemSource } from "./ValidationProblemSource"; export const WarningValidationProblem: core.serialization.ObjectSchema< serializers.ats.WarningValidationProblem.Raw, Merge.ats.WarningValidationProblem > = core.serialization.object({ - source: core.serialization - .lazyObject(async () => (await import("../../..")).ats.ValidationProblemSource) - .optional(), + source: ValidationProblemSource.optional(), title: core.serialization.string(), detail: core.serialization.string(), problemType: core.serialization.property("problem_type", core.serialization.string()), @@ -20,7 +19,7 @@ export const WarningValidationProblem: core.serialization.ObjectSchema< export declare namespace WarningValidationProblem { interface Raw { - source?: serializers.ats.ValidationProblemSource.Raw | null; + source?: ValidationProblemSource.Raw | null; title: string; detail: string; problem_type: string; diff --git a/src/serialization/resources/ats/types/WebhookReceiver.ts b/src/serialization/resources/ats/types/WebhookReceiver.ts index a739be9c9..cd46b7a06 100644 --- a/src/serialization/resources/ats/types/WebhookReceiver.ts +++ b/src/serialization/resources/ats/types/WebhookReceiver.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const WebhookReceiver: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/resources/accounts/client/requests/CrmAccountEndpointRequest.ts b/src/serialization/resources/crm/resources/accounts/client/requests/CrmAccountEndpointRequest.ts index 2e0634035..cc65fb4ef 100644 --- a/src/serialization/resources/crm/resources/accounts/client/requests/CrmAccountEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/accounts/client/requests/CrmAccountEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { AccountRequest } from "../../../../types/AccountRequest"; export const CrmAccountEndpointRequest: core.serialization.Schema< serializers.crm.CrmAccountEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).crm.AccountRequest), + model: AccountRequest, }); export declare namespace CrmAccountEndpointRequest { interface Raw { - model: serializers.crm.AccountRequest.Raw; + model: AccountRequest.Raw; } } diff --git a/src/serialization/resources/crm/resources/accounts/client/requests/PatchedCrmAccountEndpointRequest.ts b/src/serialization/resources/crm/resources/accounts/client/requests/PatchedCrmAccountEndpointRequest.ts index 7fff99dce..bbde85086 100644 --- a/src/serialization/resources/crm/resources/accounts/client/requests/PatchedCrmAccountEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/accounts/client/requests/PatchedCrmAccountEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { PatchedAccountRequest } from "../../../../types/PatchedAccountRequest"; export const PatchedCrmAccountEndpointRequest: core.serialization.Schema< serializers.crm.PatchedCrmAccountEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).crm.PatchedAccountRequest), + model: PatchedAccountRequest, }); export declare namespace PatchedCrmAccountEndpointRequest { interface Raw { - model: serializers.crm.PatchedAccountRequest.Raw; + model: PatchedAccountRequest.Raw; } } diff --git a/src/serialization/resources/crm/resources/associationTypes/client/requests/CrmAssociationTypeEndpointRequest.ts b/src/serialization/resources/crm/resources/associationTypes/client/requests/CrmAssociationTypeEndpointRequest.ts index 82cfcca35..1eadd106b 100644 --- a/src/serialization/resources/crm/resources/associationTypes/client/requests/CrmAssociationTypeEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/associationTypes/client/requests/CrmAssociationTypeEndpointRequest.ts @@ -2,21 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { AssociationTypeRequestRequest } from "../../../../types/AssociationTypeRequestRequest"; export const CrmAssociationTypeEndpointRequest: core.serialization.Schema< serializers.crm.CrmAssociationTypeEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject( - async () => (await import("../../../../../..")).crm.AssociationTypeRequestRequest - ), + model: AssociationTypeRequestRequest, }); export declare namespace CrmAssociationTypeEndpointRequest { interface Raw { - model: serializers.crm.AssociationTypeRequestRequest.Raw; + model: AssociationTypeRequestRequest.Raw; } } diff --git a/src/serialization/resources/crm/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/serialization/resources/crm/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts index 4290d677c..dc20e4a5b 100644 --- a/src/serialization/resources/crm/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts +++ b/src/serialization/resources/crm/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { RemoteResponse } from "../../../types/RemoteResponse"; export const AsyncPassthroughRetrieveResponse: core.serialization.Schema< serializers.crm.AsyncPassthroughRetrieveResponse.Raw, Merge.crm.AsyncPassthroughRetrieveResponse -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazyObject(async () => (await import("../../../../..")).crm.RemoteResponse), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RemoteResponse, core.serialization.string()]); export declare namespace AsyncPassthroughRetrieveResponse { - type Raw = serializers.crm.RemoteResponse.Raw | string; + type Raw = RemoteResponse.Raw | string; } diff --git a/src/serialization/resources/crm/resources/contacts/client/requests/CrmContactEndpointRequest.ts b/src/serialization/resources/crm/resources/contacts/client/requests/CrmContactEndpointRequest.ts index 51793e439..177dbaf41 100644 --- a/src/serialization/resources/crm/resources/contacts/client/requests/CrmContactEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/contacts/client/requests/CrmContactEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { ContactRequest } from "../../../../types/ContactRequest"; export const CrmContactEndpointRequest: core.serialization.Schema< serializers.crm.CrmContactEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).crm.ContactRequest), + model: ContactRequest, }); export declare namespace CrmContactEndpointRequest { interface Raw { - model: serializers.crm.ContactRequest.Raw; + model: ContactRequest.Raw; } } diff --git a/src/serialization/resources/crm/resources/contacts/client/requests/PatchedCrmContactEndpointRequest.ts b/src/serialization/resources/crm/resources/contacts/client/requests/PatchedCrmContactEndpointRequest.ts index 83210eada..4902b6940 100644 --- a/src/serialization/resources/crm/resources/contacts/client/requests/PatchedCrmContactEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/contacts/client/requests/PatchedCrmContactEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { PatchedContactRequest } from "../../../../types/PatchedContactRequest"; export const PatchedCrmContactEndpointRequest: core.serialization.Schema< serializers.crm.PatchedCrmContactEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).crm.PatchedContactRequest), + model: PatchedContactRequest, }); export declare namespace PatchedCrmContactEndpointRequest { interface Raw { - model: serializers.crm.PatchedContactRequest.Raw; + model: PatchedContactRequest.Raw; } } diff --git a/src/serialization/resources/crm/resources/contacts/types/ContactsListRequestExpand.ts b/src/serialization/resources/crm/resources/contacts/types/ContactsListRequestExpand.ts index b1067d65a..788b390ff 100644 --- a/src/serialization/resources/crm/resources/contacts/types/ContactsListRequestExpand.ts +++ b/src/serialization/resources/crm/resources/contacts/types/ContactsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ContactsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/contacts/types/ContactsRetrieveRequestExpand.ts b/src/serialization/resources/crm/resources/contacts/types/ContactsRetrieveRequestExpand.ts index bcb7b1b95..5c9698f28 100644 --- a/src/serialization/resources/crm/resources/contacts/types/ContactsRetrieveRequestExpand.ts +++ b/src/serialization/resources/crm/resources/contacts/types/ContactsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ContactsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/customObjects/client/requests/CrmCustomObjectEndpointRequest.ts b/src/serialization/resources/crm/resources/customObjects/client/requests/CrmCustomObjectEndpointRequest.ts index 24b359348..844214d0a 100644 --- a/src/serialization/resources/crm/resources/customObjects/client/requests/CrmCustomObjectEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/customObjects/client/requests/CrmCustomObjectEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { CustomObjectRequest } from "../../../../types/CustomObjectRequest"; export const CrmCustomObjectEndpointRequest: core.serialization.Schema< serializers.crm.CrmCustomObjectEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).crm.CustomObjectRequest), + model: CustomObjectRequest, }); export declare namespace CrmCustomObjectEndpointRequest { interface Raw { - model: serializers.crm.CustomObjectRequest.Raw; + model: CustomObjectRequest.Raw; } } diff --git a/src/serialization/resources/crm/resources/engagements/client/requests/EngagementEndpointRequest.ts b/src/serialization/resources/crm/resources/engagements/client/requests/EngagementEndpointRequest.ts index 874299ddc..1fd7287f4 100644 --- a/src/serialization/resources/crm/resources/engagements/client/requests/EngagementEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/engagements/client/requests/EngagementEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { EngagementRequest } from "../../../../types/EngagementRequest"; export const EngagementEndpointRequest: core.serialization.Schema< serializers.crm.EngagementEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).crm.EngagementRequest), + model: EngagementRequest, }); export declare namespace EngagementEndpointRequest { interface Raw { - model: serializers.crm.EngagementRequest.Raw; + model: EngagementRequest.Raw; } } diff --git a/src/serialization/resources/crm/resources/engagements/client/requests/PatchedEngagementEndpointRequest.ts b/src/serialization/resources/crm/resources/engagements/client/requests/PatchedEngagementEndpointRequest.ts index efb2f08a9..37d3e4864 100644 --- a/src/serialization/resources/crm/resources/engagements/client/requests/PatchedEngagementEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/engagements/client/requests/PatchedEngagementEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { PatchedEngagementRequest } from "../../../../types/PatchedEngagementRequest"; export const PatchedEngagementEndpointRequest: core.serialization.Schema< serializers.crm.PatchedEngagementEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).crm.PatchedEngagementRequest), + model: PatchedEngagementRequest, }); export declare namespace PatchedEngagementEndpointRequest { interface Raw { - model: serializers.crm.PatchedEngagementRequest.Raw; + model: PatchedEngagementRequest.Raw; } } diff --git a/src/serialization/resources/crm/resources/engagements/types/EngagementsListRequestExpand.ts b/src/serialization/resources/crm/resources/engagements/types/EngagementsListRequestExpand.ts index 95612ac6c..3aca48edf 100644 --- a/src/serialization/resources/crm/resources/engagements/types/EngagementsListRequestExpand.ts +++ b/src/serialization/resources/crm/resources/engagements/types/EngagementsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EngagementsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/engagements/types/EngagementsRetrieveRequestExpand.ts b/src/serialization/resources/crm/resources/engagements/types/EngagementsRetrieveRequestExpand.ts index 74deb2759..0f893dfd4 100644 --- a/src/serialization/resources/crm/resources/engagements/types/EngagementsRetrieveRequestExpand.ts +++ b/src/serialization/resources/crm/resources/engagements/types/EngagementsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EngagementsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts b/src/serialization/resources/crm/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts index 8f9a06cb6..476154ac3 100644 --- a/src/serialization/resources/crm/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/serialization/resources/crm/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const CreateFieldMappingRequest: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts b/src/serialization/resources/crm/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts index 60708249b..10ff02266 100644 --- a/src/serialization/resources/crm/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts +++ b/src/serialization/resources/crm/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const PatchedEditFieldMappingRequest: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/forceResync/client/syncStatusResyncCreate.ts b/src/serialization/resources/crm/resources/forceResync/client/syncStatusResyncCreate.ts index dbf634980..81d9c5fdb 100644 --- a/src/serialization/resources/crm/resources/forceResync/client/syncStatusResyncCreate.ts +++ b/src/serialization/resources/crm/resources/forceResync/client/syncStatusResyncCreate.ts @@ -2,15 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { SyncStatus } from "../../../types/SyncStatus"; export const Response: core.serialization.Schema< serializers.crm.forceResync.syncStatusResyncCreate.Response.Raw, Merge.crm.SyncStatus[] -> = core.serialization.list(core.serialization.lazyObject(async () => (await import("../../../../..")).crm.SyncStatus)); +> = core.serialization.list(SyncStatus); export declare namespace Response { - type Raw = serializers.crm.SyncStatus.Raw[]; + type Raw = SyncStatus.Raw[]; } diff --git a/src/serialization/resources/crm/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts b/src/serialization/resources/crm/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts index c2883aa82..155cb4709 100644 --- a/src/serialization/resources/crm/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts +++ b/src/serialization/resources/crm/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const GenerateRemoteKeyRequest: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/issues/types/IssuesListRequestStatus.ts b/src/serialization/resources/crm/resources/issues/types/IssuesListRequestStatus.ts index 10f7413c7..86fff93d1 100644 --- a/src/serialization/resources/crm/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/serialization/resources/crm/resources/issues/types/IssuesListRequestStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const IssuesListRequestStatus: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/leads/client/requests/LeadEndpointRequest.ts b/src/serialization/resources/crm/resources/leads/client/requests/LeadEndpointRequest.ts index e3612b847..05ba3b5a8 100644 --- a/src/serialization/resources/crm/resources/leads/client/requests/LeadEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/leads/client/requests/LeadEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { LeadRequest } from "../../../../types/LeadRequest"; export const LeadEndpointRequest: core.serialization.Schema< serializers.crm.LeadEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).crm.LeadRequest), + model: LeadRequest, }); export declare namespace LeadEndpointRequest { interface Raw { - model: serializers.crm.LeadRequest.Raw; + model: LeadRequest.Raw; } } diff --git a/src/serialization/resources/crm/resources/leads/types/LeadsListRequestExpand.ts b/src/serialization/resources/crm/resources/leads/types/LeadsListRequestExpand.ts index 300223c1b..e060234f8 100644 --- a/src/serialization/resources/crm/resources/leads/types/LeadsListRequestExpand.ts +++ b/src/serialization/resources/crm/resources/leads/types/LeadsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const LeadsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/leads/types/LeadsRetrieveRequestExpand.ts b/src/serialization/resources/crm/resources/leads/types/LeadsRetrieveRequestExpand.ts index 187f71822..cfe484d7b 100644 --- a/src/serialization/resources/crm/resources/leads/types/LeadsRetrieveRequestExpand.ts +++ b/src/serialization/resources/crm/resources/leads/types/LeadsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const LeadsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/linkToken/client/requests/EndUserDetailsRequest.ts b/src/serialization/resources/crm/resources/linkToken/client/requests/EndUserDetailsRequest.ts index b55945320..a6f18da29 100644 --- a/src/serialization/resources/crm/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/serialization/resources/crm/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { CategoriesEnum } from "../../../../types/CategoriesEnum"; +import { CommonModelScopesBodyRequest } from "../../../../types/CommonModelScopesBodyRequest"; +import { IndividualCommonModelScopeDeserializerRequest } from "../../../../types/IndividualCommonModelScopeDeserializerRequest"; +import { LanguageEnum } from "../../../../types/LanguageEnum"; export const EndUserDetailsRequest: core.serialization.Schema< serializers.crm.EndUserDetailsRequest.Raw, @@ -13,9 +17,7 @@ export const EndUserDetailsRequest: core.serialization.Schema< endUserEmailAddress: core.serialization.property("end_user_email_address", core.serialization.string()), endUserOrganizationName: core.serialization.property("end_user_organization_name", core.serialization.string()), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string()), - categories: core.serialization.list( - core.serialization.lazy(async () => (await import("../../../../../..")).crm.CategoriesEnum) - ), + categories: core.serialization.list(CategoriesEnum), integration: core.serialization.string().optional(), linkExpiryMins: core.serialization.property("link_expiry_mins", core.serialization.number().optional()), shouldCreateMagicLinkUrl: core.serialization.property( @@ -25,31 +27,18 @@ export const EndUserDetailsRequest: core.serialization.Schema< hideAdminMagicLink: core.serialization.property("hide_admin_magic_link", core.serialization.boolean().optional()), commonModels: core.serialization.property( "common_models", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../../../../..")).crm.CommonModelScopesBodyRequest - ) - ) - .optional() + core.serialization.list(CommonModelScopesBodyRequest).optional() ), categoryCommonModelScopes: core.serialization.property( "category_common_model_scopes", core.serialization .record( core.serialization.string(), - core.serialization - .list( - core.serialization.lazyObject( - async () => - (await import("../../../../../..")).crm.IndividualCommonModelScopeDeserializerRequest - ) - ) - .optional() + core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional() ) .optional() ), - language: core.serialization.lazy(async () => (await import("../../../../../..")).crm.LanguageEnum).optional(), + language: LanguageEnum.optional(), integrationSpecificConfig: core.serialization.property( "integration_specific_config", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -61,17 +50,17 @@ export declare namespace EndUserDetailsRequest { end_user_email_address: string; end_user_organization_name: string; end_user_origin_id: string; - categories: serializers.crm.CategoriesEnum.Raw[]; + categories: CategoriesEnum.Raw[]; integration?: string | null; link_expiry_mins?: number | null; should_create_magic_link_url?: boolean | null; hide_admin_magic_link?: boolean | null; - common_models?: serializers.crm.CommonModelScopesBodyRequest.Raw[] | null; + common_models?: CommonModelScopesBodyRequest.Raw[] | null; category_common_model_scopes?: Record< string, - serializers.crm.IndividualCommonModelScopeDeserializerRequest.Raw[] | null | undefined + IndividualCommonModelScopeDeserializerRequest.Raw[] | null | undefined > | null; - language?: serializers.crm.LanguageEnum.Raw | null; + language?: LanguageEnum.Raw | null; integration_specific_config?: Record | null; } } diff --git a/src/serialization/resources/crm/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/serialization/resources/crm/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index 37d2866a9..c5d93cd30 100644 --- a/src/serialization/resources/crm/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/serialization/resources/crm/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const LinkedAccountsListRequestCategory: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/notes/client/requests/NoteEndpointRequest.ts b/src/serialization/resources/crm/resources/notes/client/requests/NoteEndpointRequest.ts index 054528c76..50d65c2a7 100644 --- a/src/serialization/resources/crm/resources/notes/client/requests/NoteEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/notes/client/requests/NoteEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { NoteRequest } from "../../../../types/NoteRequest"; export const NoteEndpointRequest: core.serialization.Schema< serializers.crm.NoteEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).crm.NoteRequest), + model: NoteRequest, }); export declare namespace NoteEndpointRequest { interface Raw { - model: serializers.crm.NoteRequest.Raw; + model: NoteRequest.Raw; } } diff --git a/src/serialization/resources/crm/resources/notes/types/NotesListRequestExpand.ts b/src/serialization/resources/crm/resources/notes/types/NotesListRequestExpand.ts index 8c3bcddbb..df0ca3167 100644 --- a/src/serialization/resources/crm/resources/notes/types/NotesListRequestExpand.ts +++ b/src/serialization/resources/crm/resources/notes/types/NotesListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const NotesListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/notes/types/NotesRetrieveRequestExpand.ts b/src/serialization/resources/crm/resources/notes/types/NotesRetrieveRequestExpand.ts index 2c59e3268..6a2f74528 100644 --- a/src/serialization/resources/crm/resources/notes/types/NotesRetrieveRequestExpand.ts +++ b/src/serialization/resources/crm/resources/notes/types/NotesRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const NotesRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/opportunities/client/requests/OpportunityEndpointRequest.ts b/src/serialization/resources/crm/resources/opportunities/client/requests/OpportunityEndpointRequest.ts index 5f3b0ea6f..7879d4254 100644 --- a/src/serialization/resources/crm/resources/opportunities/client/requests/OpportunityEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/opportunities/client/requests/OpportunityEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { OpportunityRequest } from "../../../../types/OpportunityRequest"; export const OpportunityEndpointRequest: core.serialization.Schema< serializers.crm.OpportunityEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).crm.OpportunityRequest), + model: OpportunityRequest, }); export declare namespace OpportunityEndpointRequest { interface Raw { - model: serializers.crm.OpportunityRequest.Raw; + model: OpportunityRequest.Raw; } } diff --git a/src/serialization/resources/crm/resources/opportunities/client/requests/PatchedOpportunityEndpointRequest.ts b/src/serialization/resources/crm/resources/opportunities/client/requests/PatchedOpportunityEndpointRequest.ts index a308ac7cf..c10f6292e 100644 --- a/src/serialization/resources/crm/resources/opportunities/client/requests/PatchedOpportunityEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/opportunities/client/requests/PatchedOpportunityEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { PatchedOpportunityRequest } from "../../../../types/PatchedOpportunityRequest"; export const PatchedOpportunityEndpointRequest: core.serialization.Schema< serializers.crm.PatchedOpportunityEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).crm.PatchedOpportunityRequest), + model: PatchedOpportunityRequest, }); export declare namespace PatchedOpportunityEndpointRequest { interface Raw { - model: serializers.crm.PatchedOpportunityRequest.Raw; + model: PatchedOpportunityRequest.Raw; } } diff --git a/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesListRequestExpand.ts b/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesListRequestExpand.ts index e71847afa..3bafe1c79 100644 --- a/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesListRequestExpand.ts +++ b/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const OpportunitiesListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesListRequestStatus.ts b/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesListRequestStatus.ts index 495bfeb3e..53651e033 100644 --- a/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesListRequestStatus.ts +++ b/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesListRequestStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const OpportunitiesListRequestStatus: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesRetrieveRequestExpand.ts b/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesRetrieveRequestExpand.ts index aefcb0bdb..177d36c10 100644 --- a/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesRetrieveRequestExpand.ts +++ b/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const OpportunitiesRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts b/src/serialization/resources/crm/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts index 2387a642b..aade4d43f 100644 --- a/src/serialization/resources/crm/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts +++ b/src/serialization/resources/crm/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const RemoteKeyForRegenerationRequest: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts b/src/serialization/resources/crm/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts index 81429f971..72474d90b 100644 --- a/src/serialization/resources/crm/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/crm/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { IndividualCommonModelScopeDeserializerRequest } from "../../../../types/IndividualCommonModelScopeDeserializerRequest"; export const LinkedAccountCommonModelScopeDeserializerRequest: core.serialization.Schema< serializers.crm.LinkedAccountCommonModelScopeDeserializerRequest.Raw, @@ -12,16 +13,12 @@ export const LinkedAccountCommonModelScopeDeserializerRequest: core.serializatio > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list( - core.serialization.lazyObject( - async () => (await import("../../../../../..")).crm.IndividualCommonModelScopeDeserializerRequest - ) - ) + core.serialization.list(IndividualCommonModelScopeDeserializerRequest) ), }); export declare namespace LinkedAccountCommonModelScopeDeserializerRequest { interface Raw { - common_models: serializers.crm.IndividualCommonModelScopeDeserializerRequest.Raw[]; + common_models: IndividualCommonModelScopeDeserializerRequest.Raw[]; } } diff --git a/src/serialization/resources/crm/resources/tasks/client/requests/PatchedTaskEndpointRequest.ts b/src/serialization/resources/crm/resources/tasks/client/requests/PatchedTaskEndpointRequest.ts index c5495401c..1b01fec79 100644 --- a/src/serialization/resources/crm/resources/tasks/client/requests/PatchedTaskEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/tasks/client/requests/PatchedTaskEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { PatchedTaskRequest } from "../../../../types/PatchedTaskRequest"; export const PatchedTaskEndpointRequest: core.serialization.Schema< serializers.crm.PatchedTaskEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).crm.PatchedTaskRequest), + model: PatchedTaskRequest, }); export declare namespace PatchedTaskEndpointRequest { interface Raw { - model: serializers.crm.PatchedTaskRequest.Raw; + model: PatchedTaskRequest.Raw; } } diff --git a/src/serialization/resources/crm/resources/tasks/client/requests/TaskEndpointRequest.ts b/src/serialization/resources/crm/resources/tasks/client/requests/TaskEndpointRequest.ts index 7c477eb2d..2201e4297 100644 --- a/src/serialization/resources/crm/resources/tasks/client/requests/TaskEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/tasks/client/requests/TaskEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { TaskRequest } from "../../../../types/TaskRequest"; export const TaskEndpointRequest: core.serialization.Schema< serializers.crm.TaskEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).crm.TaskRequest), + model: TaskRequest, }); export declare namespace TaskEndpointRequest { interface Raw { - model: serializers.crm.TaskRequest.Raw; + model: TaskRequest.Raw; } } diff --git a/src/serialization/resources/crm/resources/tasks/types/TasksListRequestExpand.ts b/src/serialization/resources/crm/resources/tasks/types/TasksListRequestExpand.ts index d206df3fd..c34123aa0 100644 --- a/src/serialization/resources/crm/resources/tasks/types/TasksListRequestExpand.ts +++ b/src/serialization/resources/crm/resources/tasks/types/TasksListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TasksListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/tasks/types/TasksRetrieveRequestExpand.ts b/src/serialization/resources/crm/resources/tasks/types/TasksRetrieveRequestExpand.ts index ca2243e98..3a2c7168d 100644 --- a/src/serialization/resources/crm/resources/tasks/types/TasksRetrieveRequestExpand.ts +++ b/src/serialization/resources/crm/resources/tasks/types/TasksRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TasksRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/crm/resources/webhookReceivers/client/list.ts b/src/serialization/resources/crm/resources/webhookReceivers/client/list.ts index 99e601848..3e0411191 100644 --- a/src/serialization/resources/crm/resources/webhookReceivers/client/list.ts +++ b/src/serialization/resources/crm/resources/webhookReceivers/client/list.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { WebhookReceiver } from "../../../types/WebhookReceiver"; export const Response: core.serialization.Schema< serializers.crm.webhookReceivers.list.Response.Raw, Merge.crm.WebhookReceiver[] -> = core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).crm.WebhookReceiver) -); +> = core.serialization.list(WebhookReceiver); export declare namespace Response { - type Raw = serializers.crm.WebhookReceiver.Raw[]; + type Raw = WebhookReceiver.Raw[]; } diff --git a/src/serialization/resources/crm/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts b/src/serialization/resources/crm/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts index ede2cfa48..66e7b4e43 100644 --- a/src/serialization/resources/crm/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts +++ b/src/serialization/resources/crm/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const WebhookReceiverRequest: core.serialization.Schema< diff --git a/src/serialization/resources/crm/types/Account.ts b/src/serialization/resources/crm/types/Account.ts index 822e0f149..e38c1c884 100644 --- a/src/serialization/resources/crm/types/Account.ts +++ b/src/serialization/resources/crm/types/Account.ts @@ -2,9 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountOwner } from "./AccountOwner"; +import { Address } from "./Address"; +import { PhoneNumber } from "./PhoneNumber"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const Account: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,21 +17,14 @@ export const Account: core.serialization.ObjectSchema (await import("../../..")).crm.AccountOwner).optional(), + owner: AccountOwner.optional(), name: core.serialization.string().optional(), description: core.serialization.string().optional(), industry: core.serialization.string().optional(), website: core.serialization.string().optional(), numberOfEmployees: core.serialization.property("number_of_employees", core.serialization.number().optional()), - addresses: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.Address)) - .optional(), - phoneNumbers: core.serialization.property( - "phone_numbers", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.PhoneNumber)) - .optional() - ), + addresses: core.serialization.list(Address).optional(), + phoneNumbers: core.serialization.property("phone_numbers", core.serialization.list(PhoneNumber).optional()), lastActivityAt: core.serialization.property("last_activity_at", core.serialization.date().optional()), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), @@ -35,18 +33,8 @@ export const Account: core.serialization.ObjectSchema (await import("../../..")).crm.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace Account { @@ -55,20 +43,20 @@ export declare namespace Account { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - owner?: serializers.crm.AccountOwner.Raw | null; + owner?: AccountOwner.Raw | null; name?: string | null; description?: string | null; industry?: string | null; website?: string | null; number_of_employees?: number | null; - addresses?: serializers.crm.Address.Raw[] | null; - phone_numbers?: serializers.crm.PhoneNumber.Raw[] | null; + addresses?: Address.Raw[] | null; + phone_numbers?: PhoneNumber.Raw[] | null; last_activity_at?: string | null; remote_updated_at?: string | null; remote_created_at?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.crm.RemoteData.Raw[] | null; - remote_fields?: serializers.crm.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/AccountDetails.ts b/src/serialization/resources/crm/types/AccountDetails.ts index 2186501f3..3cd492ae7 100644 --- a/src/serialization/resources/crm/types/AccountDetails.ts +++ b/src/serialization/resources/crm/types/AccountDetails.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoryEnum } from "./CategoryEnum"; export const AccountDetails: core.serialization.ObjectSchema< serializers.crm.AccountDetails.Raw, @@ -13,7 +14,7 @@ export const AccountDetails: core.serialization.ObjectSchema< id: core.serialization.string().optional(), integration: core.serialization.string().optional(), integrationSlug: core.serialization.property("integration_slug", core.serialization.string().optional()), - category: core.serialization.lazy(async () => (await import("../../..")).crm.CategoryEnum).optional(), + category: CategoryEnum.optional(), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property( "end_user_organization_name", @@ -32,7 +33,7 @@ export declare namespace AccountDetails { id?: string | null; integration?: string | null; integration_slug?: string | null; - category?: serializers.crm.CategoryEnum.Raw | null; + category?: CategoryEnum.Raw | null; end_user_origin_id?: string | null; end_user_organization_name?: string | null; end_user_email_address?: string | null; diff --git a/src/serialization/resources/crm/types/AccountDetailsAndActions.ts b/src/serialization/resources/crm/types/AccountDetailsAndActions.ts index edae40533..0b39cded4 100644 --- a/src/serialization/resources/crm/types/AccountDetailsAndActions.ts +++ b/src/serialization/resources/crm/types/AccountDetailsAndActions.ts @@ -2,17 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoryEnum } from "./CategoryEnum"; +import { AccountDetailsAndActionsStatusEnum } from "./AccountDetailsAndActionsStatusEnum"; +import { AccountDetailsAndActionsIntegration } from "./AccountDetailsAndActionsIntegration"; export const AccountDetailsAndActions: core.serialization.ObjectSchema< serializers.crm.AccountDetailsAndActions.Raw, Merge.crm.AccountDetailsAndActions > = core.serialization.object({ id: core.serialization.string(), - category: core.serialization.lazy(async () => (await import("../../..")).crm.CategoryEnum).optional(), - status: core.serialization.lazy(async () => (await import("../../..")).crm.AccountDetailsAndActionsStatusEnum), + category: CategoryEnum.optional(), + status: AccountDetailsAndActionsStatusEnum, statusDetail: core.serialization.property("status_detail", core.serialization.string().optional()), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property("end_user_organization_name", core.serialization.string()), @@ -20,9 +23,7 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< subdomain: core.serialization.string().optional(), webhookListenerUrl: core.serialization.property("webhook_listener_url", core.serialization.string()), isDuplicate: core.serialization.property("is_duplicate", core.serialization.boolean().optional()), - integration: core.serialization - .lazyObject(async () => (await import("../../..")).crm.AccountDetailsAndActionsIntegration) - .optional(), + integration: AccountDetailsAndActionsIntegration.optional(), accountType: core.serialization.property("account_type", core.serialization.string()), completedAt: core.serialization.property("completed_at", core.serialization.date()), }); @@ -30,8 +31,8 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< export declare namespace AccountDetailsAndActions { interface Raw { id: string; - category?: serializers.crm.CategoryEnum.Raw | null; - status: serializers.crm.AccountDetailsAndActionsStatusEnum.Raw; + category?: CategoryEnum.Raw | null; + status: AccountDetailsAndActionsStatusEnum.Raw; status_detail?: string | null; end_user_origin_id?: string | null; end_user_organization_name: string; @@ -39,7 +40,7 @@ export declare namespace AccountDetailsAndActions { subdomain?: string | null; webhook_listener_url: string; is_duplicate?: boolean | null; - integration?: serializers.crm.AccountDetailsAndActionsIntegration.Raw | null; + integration?: AccountDetailsAndActionsIntegration.Raw | null; account_type: string; completed_at: string; } diff --git a/src/serialization/resources/crm/types/AccountDetailsAndActionsIntegration.ts b/src/serialization/resources/crm/types/AccountDetailsAndActionsIntegration.ts index d38b0b2b0..b24873080 100644 --- a/src/serialization/resources/crm/types/AccountDetailsAndActionsIntegration.ts +++ b/src/serialization/resources/crm/types/AccountDetailsAndActionsIntegration.ts @@ -2,18 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoriesEnum } from "./CategoriesEnum"; +import { ModelOperation } from "./ModelOperation"; export const AccountDetailsAndActionsIntegration: core.serialization.ObjectSchema< serializers.crm.AccountDetailsAndActionsIntegration.Raw, Merge.crm.AccountDetailsAndActionsIntegration > = core.serialization.object({ name: core.serialization.string(), - categories: core.serialization.list( - core.serialization.lazy(async () => (await import("../../..")).crm.CategoriesEnum) - ), + categories: core.serialization.list(CategoriesEnum), image: core.serialization.string().optional(), squareImage: core.serialization.property("square_image", core.serialization.string().optional()), color: core.serialization.string(), @@ -21,21 +21,19 @@ export const AccountDetailsAndActionsIntegration: core.serialization.ObjectSchem passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.ModelOperation)) - .optional() + core.serialization.list(ModelOperation).optional() ), }); export declare namespace AccountDetailsAndActionsIntegration { interface Raw { name: string; - categories: serializers.crm.CategoriesEnum.Raw[]; + categories: CategoriesEnum.Raw[]; image?: string | null; square_image?: string | null; color: string; slug: string; passthrough_available: boolean; - available_model_operations?: serializers.crm.ModelOperation.Raw[] | null; + available_model_operations?: ModelOperation.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/AccountDetailsAndActionsStatusEnum.ts b/src/serialization/resources/crm/types/AccountDetailsAndActionsStatusEnum.ts index 8aa585ad7..b5c78bdea 100644 --- a/src/serialization/resources/crm/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/serialization/resources/crm/types/AccountDetailsAndActionsStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AccountDetailsAndActionsStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/crm/types/AccountIntegration.ts b/src/serialization/resources/crm/types/AccountIntegration.ts index 4bf1a2d74..36d1ae348 100644 --- a/src/serialization/resources/crm/types/AccountIntegration.ts +++ b/src/serialization/resources/crm/types/AccountIntegration.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoriesEnum } from "./CategoriesEnum"; export const AccountIntegration: core.serialization.ObjectSchema< serializers.crm.AccountIntegration.Raw, @@ -12,9 +13,7 @@ export const AccountIntegration: core.serialization.ObjectSchema< > = core.serialization.object({ name: core.serialization.string(), abbreviatedName: core.serialization.property("abbreviated_name", core.serialization.string().optional()), - categories: core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).crm.CategoriesEnum)) - .optional(), + categories: core.serialization.list(CategoriesEnum).optional(), image: core.serialization.string().optional(), squareImage: core.serialization.property("square_image", core.serialization.string().optional()), color: core.serialization.string().optional(), @@ -37,7 +36,7 @@ export declare namespace AccountIntegration { interface Raw { name: string; abbreviated_name?: string | null; - categories?: serializers.crm.CategoriesEnum.Raw[] | null; + categories?: CategoriesEnum.Raw[] | null; image?: string | null; square_image?: string | null; color?: string | null; diff --git a/src/serialization/resources/crm/types/AccountOwner.ts b/src/serialization/resources/crm/types/AccountOwner.ts index 447ff8f0c..021e91401 100644 --- a/src/serialization/resources/crm/types/AccountOwner.ts +++ b/src/serialization/resources/crm/types/AccountOwner.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const AccountOwner: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace AccountOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/AccountRequest.ts b/src/serialization/resources/crm/types/AccountRequest.ts index f967f4ffc..57abf68eb 100644 --- a/src/serialization/resources/crm/types/AccountRequest.ts +++ b/src/serialization/resources/crm/types/AccountRequest.ts @@ -2,23 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountRequestOwner } from "./AccountRequestOwner"; +import { AddressRequest } from "./AddressRequest"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const AccountRequest: core.serialization.ObjectSchema< serializers.crm.AccountRequest.Raw, Merge.crm.AccountRequest > = core.serialization.object({ - owner: core.serialization.lazy(async () => (await import("../../..")).crm.AccountRequestOwner).optional(), + owner: AccountRequestOwner.optional(), name: core.serialization.string().optional(), description: core.serialization.string().optional(), industry: core.serialization.string().optional(), website: core.serialization.string().optional(), numberOfEmployees: core.serialization.property("number_of_employees", core.serialization.number().optional()), - addresses: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.AddressRequest)) - .optional(), + addresses: core.serialization.list(AddressRequest).optional(), lastActivityAt: core.serialization.property("last_activity_at", core.serialization.date().optional()), integrationParams: core.serialization.property( "integration_params", @@ -28,26 +29,21 @@ export const AccountRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace AccountRequest { interface Raw { - owner?: serializers.crm.AccountRequestOwner.Raw | null; + owner?: AccountRequestOwner.Raw | null; name?: string | null; description?: string | null; industry?: string | null; website?: string | null; number_of_employees?: number | null; - addresses?: serializers.crm.AddressRequest.Raw[] | null; + addresses?: AddressRequest.Raw[] | null; last_activity_at?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.crm.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/AccountRequestOwner.ts b/src/serialization/resources/crm/types/AccountRequestOwner.ts index ddef2b753..c6b4e6829 100644 --- a/src/serialization/resources/crm/types/AccountRequestOwner.ts +++ b/src/serialization/resources/crm/types/AccountRequestOwner.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const AccountRequestOwner: core.serialization.Schema< serializers.crm.AccountRequestOwner.Raw, Merge.crm.AccountRequestOwner -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace AccountRequestOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/AccountToken.ts b/src/serialization/resources/crm/types/AccountToken.ts index e31ad7bfe..06a785578 100644 --- a/src/serialization/resources/crm/types/AccountToken.ts +++ b/src/serialization/resources/crm/types/AccountToken.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountIntegration } from "./AccountIntegration"; export const AccountToken: core.serialization.ObjectSchema = core.serialization.object({ accountToken: core.serialization.property("account_token", core.serialization.string()), - integration: core.serialization.lazyObject(async () => (await import("../../..")).crm.AccountIntegration), + integration: AccountIntegration, }); export declare namespace AccountToken { interface Raw { account_token: string; - integration: serializers.crm.AccountIntegration.Raw; + integration: AccountIntegration.Raw; } } diff --git a/src/serialization/resources/crm/types/ActivityTypeEnum.ts b/src/serialization/resources/crm/types/ActivityTypeEnum.ts index 030e08c3d..d10100c27 100644 --- a/src/serialization/resources/crm/types/ActivityTypeEnum.ts +++ b/src/serialization/resources/crm/types/ActivityTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ActivityTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/crm/types/Address.ts b/src/serialization/resources/crm/types/Address.ts index 058ea2fa6..a2c7e3f8b 100644 --- a/src/serialization/resources/crm/types/Address.ts +++ b/src/serialization/resources/crm/types/Address.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AddressCountry } from "./AddressCountry"; +import { AddressAddressType } from "./AddressAddressType"; export const Address: core.serialization.ObjectSchema = core.serialization.object({ @@ -15,11 +17,8 @@ export const Address: core.serialization.ObjectSchema (await import("../../..")).crm.AddressCountry).optional(), - addressType: core.serialization.property( - "address_type", - core.serialization.lazy(async () => (await import("../../..")).crm.AddressAddressType).optional() - ), + country: AddressCountry.optional(), + addressType: core.serialization.property("address_type", AddressAddressType.optional()), }); export declare namespace Address { @@ -31,7 +30,7 @@ export declare namespace Address { city?: string | null; state?: string | null; postal_code?: string | null; - country?: serializers.crm.AddressCountry.Raw | null; - address_type?: serializers.crm.AddressAddressType.Raw | null; + country?: AddressCountry.Raw | null; + address_type?: AddressAddressType.Raw | null; } } diff --git a/src/serialization/resources/crm/types/AddressAddressType.ts b/src/serialization/resources/crm/types/AddressAddressType.ts index 4520e2b7e..b3b847935 100644 --- a/src/serialization/resources/crm/types/AddressAddressType.ts +++ b/src/serialization/resources/crm/types/AddressAddressType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AddressTypeEnum } from "./AddressTypeEnum"; export const AddressAddressType: core.serialization.Schema< serializers.crm.AddressAddressType.Raw, Merge.crm.AddressAddressType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.AddressTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([AddressTypeEnum, core.serialization.string()]); export declare namespace AddressAddressType { - type Raw = serializers.crm.AddressTypeEnum.Raw | string; + type Raw = AddressTypeEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/AddressCountry.ts b/src/serialization/resources/crm/types/AddressCountry.ts index f4a615948..e8fed71ff 100644 --- a/src/serialization/resources/crm/types/AddressCountry.ts +++ b/src/serialization/resources/crm/types/AddressCountry.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CountryEnum } from "./CountryEnum"; export const AddressCountry: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.CountryEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([CountryEnum, core.serialization.string()]); export declare namespace AddressCountry { - type Raw = serializers.crm.CountryEnum.Raw | string; + type Raw = CountryEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/AddressRequest.ts b/src/serialization/resources/crm/types/AddressRequest.ts index de7c9fb09..a26a620e3 100644 --- a/src/serialization/resources/crm/types/AddressRequest.ts +++ b/src/serialization/resources/crm/types/AddressRequest.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AddressRequestCountry } from "./AddressRequestCountry"; +import { AddressRequestAddressType } from "./AddressRequestAddressType"; export const AddressRequest: core.serialization.ObjectSchema< serializers.crm.AddressRequest.Raw, @@ -15,11 +17,8 @@ export const AddressRequest: core.serialization.ObjectSchema< city: core.serialization.string().optional(), state: core.serialization.string().optional(), postalCode: core.serialization.property("postal_code", core.serialization.string().optional()), - country: core.serialization.lazy(async () => (await import("../../..")).crm.AddressRequestCountry).optional(), - addressType: core.serialization.property( - "address_type", - core.serialization.lazy(async () => (await import("../../..")).crm.AddressRequestAddressType).optional() - ), + country: AddressRequestCountry.optional(), + addressType: core.serialization.property("address_type", AddressRequestAddressType.optional()), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -37,8 +36,8 @@ export declare namespace AddressRequest { city?: string | null; state?: string | null; postal_code?: string | null; - country?: serializers.crm.AddressRequestCountry.Raw | null; - address_type?: serializers.crm.AddressRequestAddressType.Raw | null; + country?: AddressRequestCountry.Raw | null; + address_type?: AddressRequestAddressType.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; } diff --git a/src/serialization/resources/crm/types/AddressRequestAddressType.ts b/src/serialization/resources/crm/types/AddressRequestAddressType.ts index 804c9d1d3..07861ee94 100644 --- a/src/serialization/resources/crm/types/AddressRequestAddressType.ts +++ b/src/serialization/resources/crm/types/AddressRequestAddressType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AddressTypeEnum } from "./AddressTypeEnum"; export const AddressRequestAddressType: core.serialization.Schema< serializers.crm.AddressRequestAddressType.Raw, Merge.crm.AddressRequestAddressType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.AddressTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([AddressTypeEnum, core.serialization.string()]); export declare namespace AddressRequestAddressType { - type Raw = serializers.crm.AddressTypeEnum.Raw | string; + type Raw = AddressTypeEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/AddressRequestCountry.ts b/src/serialization/resources/crm/types/AddressRequestCountry.ts index 5b52e150b..ae3c2f721 100644 --- a/src/serialization/resources/crm/types/AddressRequestCountry.ts +++ b/src/serialization/resources/crm/types/AddressRequestCountry.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CountryEnum } from "./CountryEnum"; export const AddressRequestCountry: core.serialization.Schema< serializers.crm.AddressRequestCountry.Raw, Merge.crm.AddressRequestCountry -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.CountryEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CountryEnum, core.serialization.string()]); export declare namespace AddressRequestCountry { - type Raw = serializers.crm.CountryEnum.Raw | string; + type Raw = CountryEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/AddressTypeEnum.ts b/src/serialization/resources/crm/types/AddressTypeEnum.ts index a28c7e6e3..7ea67a8ec 100644 --- a/src/serialization/resources/crm/types/AddressTypeEnum.ts +++ b/src/serialization/resources/crm/types/AddressTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AddressTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/crm/types/AdvancedMetadata.ts b/src/serialization/resources/crm/types/AdvancedMetadata.ts index 39ed83e80..15cc03577 100644 --- a/src/serialization/resources/crm/types/AdvancedMetadata.ts +++ b/src/serialization/resources/crm/types/AdvancedMetadata.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AdvancedMetadata: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/Association.ts b/src/serialization/resources/crm/types/Association.ts index d6edbed32..c68338f5c 100644 --- a/src/serialization/resources/crm/types/Association.ts +++ b/src/serialization/resources/crm/types/Association.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AssociationAssociationType } from "./AssociationAssociationType"; export const Association: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,10 +13,7 @@ export const Association: core.serialization.ObjectSchema (await import("../../..")).crm.AssociationAssociationType).optional() - ), + associationType: core.serialization.property("association_type", AssociationAssociationType.optional()), }); export declare namespace Association { @@ -24,6 +22,6 @@ export declare namespace Association { modified_at?: string | null; source_object?: string | null; target_object?: string | null; - association_type?: serializers.crm.AssociationAssociationType.Raw | null; + association_type?: AssociationAssociationType.Raw | null; } } diff --git a/src/serialization/resources/crm/types/AssociationAssociationType.ts b/src/serialization/resources/crm/types/AssociationAssociationType.ts index a22b8cc7f..1c75e70ab 100644 --- a/src/serialization/resources/crm/types/AssociationAssociationType.ts +++ b/src/serialization/resources/crm/types/AssociationAssociationType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AssociationType } from "./AssociationType"; export const AssociationAssociationType: core.serialization.Schema< serializers.crm.AssociationAssociationType.Raw, Merge.crm.AssociationAssociationType -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.AssociationType), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), AssociationType]); export declare namespace AssociationAssociationType { - type Raw = string | serializers.crm.AssociationType.Raw; + type Raw = string | AssociationType.Raw; } diff --git a/src/serialization/resources/crm/types/AssociationSubType.ts b/src/serialization/resources/crm/types/AssociationSubType.ts index 28a2ea3aa..ca5b5e60c 100644 --- a/src/serialization/resources/crm/types/AssociationSubType.ts +++ b/src/serialization/resources/crm/types/AssociationSubType.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AssociationSubType: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/AssociationType.ts b/src/serialization/resources/crm/types/AssociationType.ts index c8e5643b2..0ad564264 100644 --- a/src/serialization/resources/crm/types/AssociationType.ts +++ b/src/serialization/resources/crm/types/AssociationType.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AssociationSubType } from "./AssociationSubType"; +import { AssociationTypeCardinality } from "./AssociationTypeCardinality"; export const AssociationType: core.serialization.ObjectSchema< serializers.crm.AssociationType.Raw, @@ -20,15 +22,11 @@ export const AssociationType: core.serialization.ObjectSchema< ), targetObjectClasses: core.serialization.property( "target_object_classes", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.AssociationSubType)) - .optional() + core.serialization.list(AssociationSubType).optional() ), remoteKeyName: core.serialization.property("remote_key_name", core.serialization.string().optional()), displayName: core.serialization.property("display_name", core.serialization.string().optional()), - cardinality: core.serialization - .lazy(async () => (await import("../../..")).crm.AssociationTypeCardinality) - .optional(), + cardinality: AssociationTypeCardinality.optional(), isRequired: core.serialization.property("is_required", core.serialization.boolean().optional()), }); @@ -39,10 +37,10 @@ export declare namespace AssociationType { created_at?: string | null; modified_at?: string | null; source_object_class?: Record | null; - target_object_classes?: serializers.crm.AssociationSubType.Raw[] | null; + target_object_classes?: AssociationSubType.Raw[] | null; remote_key_name?: string | null; display_name?: string | null; - cardinality?: serializers.crm.AssociationTypeCardinality.Raw | null; + cardinality?: AssociationTypeCardinality.Raw | null; is_required?: boolean | null; } } diff --git a/src/serialization/resources/crm/types/AssociationTypeCardinality.ts b/src/serialization/resources/crm/types/AssociationTypeCardinality.ts index 8aca6ae5a..0a4737c01 100644 --- a/src/serialization/resources/crm/types/AssociationTypeCardinality.ts +++ b/src/serialization/resources/crm/types/AssociationTypeCardinality.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CardinalityEnum } from "./CardinalityEnum"; export const AssociationTypeCardinality: core.serialization.Schema< serializers.crm.AssociationTypeCardinality.Raw, Merge.crm.AssociationTypeCardinality -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.CardinalityEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CardinalityEnum, core.serialization.string()]); export declare namespace AssociationTypeCardinality { - type Raw = serializers.crm.CardinalityEnum.Raw | string; + type Raw = CardinalityEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/AssociationTypeRequestRequest.ts b/src/serialization/resources/crm/types/AssociationTypeRequestRequest.ts index 552e3aae9..02b41d3bb 100644 --- a/src/serialization/resources/crm/types/AssociationTypeRequestRequest.ts +++ b/src/serialization/resources/crm/types/AssociationTypeRequestRequest.ts @@ -2,37 +2,34 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ObjectClassDescriptionRequest } from "./ObjectClassDescriptionRequest"; +import { CardinalityEnum } from "./CardinalityEnum"; export const AssociationTypeRequestRequest: core.serialization.ObjectSchema< serializers.crm.AssociationTypeRequestRequest.Raw, Merge.crm.AssociationTypeRequestRequest > = core.serialization.object({ - sourceObjectClass: core.serialization.property( - "source_object_class", - core.serialization.lazyObject(async () => (await import("../../..")).crm.ObjectClassDescriptionRequest) - ), + sourceObjectClass: core.serialization.property("source_object_class", ObjectClassDescriptionRequest), targetObjectClasses: core.serialization.property( "target_object_classes", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.ObjectClassDescriptionRequest) - ) + core.serialization.list(ObjectClassDescriptionRequest) ), remoteKeyName: core.serialization.property("remote_key_name", core.serialization.string()), displayName: core.serialization.property("display_name", core.serialization.string().optional()), - cardinality: core.serialization.lazy(async () => (await import("../../..")).crm.CardinalityEnum).optional(), + cardinality: CardinalityEnum.optional(), isRequired: core.serialization.property("is_required", core.serialization.boolean().optional()), }); export declare namespace AssociationTypeRequestRequest { interface Raw { - source_object_class: serializers.crm.ObjectClassDescriptionRequest.Raw; - target_object_classes: serializers.crm.ObjectClassDescriptionRequest.Raw[]; + source_object_class: ObjectClassDescriptionRequest.Raw; + target_object_classes: ObjectClassDescriptionRequest.Raw[]; remote_key_name: string; display_name?: string | null; - cardinality?: serializers.crm.CardinalityEnum.Raw | null; + cardinality?: CardinalityEnum.Raw | null; is_required?: boolean | null; } } diff --git a/src/serialization/resources/crm/types/AsyncPassthroughReciept.ts b/src/serialization/resources/crm/types/AsyncPassthroughReciept.ts index ec96901cb..ed15bd943 100644 --- a/src/serialization/resources/crm/types/AsyncPassthroughReciept.ts +++ b/src/serialization/resources/crm/types/AsyncPassthroughReciept.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AsyncPassthroughReciept: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/AuditLogEvent.ts b/src/serialization/resources/crm/types/AuditLogEvent.ts index 01c1ba8cf..aa59eb6c4 100644 --- a/src/serialization/resources/crm/types/AuditLogEvent.ts +++ b/src/serialization/resources/crm/types/AuditLogEvent.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AuditLogEventRole } from "./AuditLogEventRole"; +import { AuditLogEventEventType } from "./AuditLogEventEventType"; export const AuditLogEvent: core.serialization.ObjectSchema< serializers.crm.AuditLogEvent.Raw, @@ -13,12 +15,9 @@ export const AuditLogEvent: core.serialization.ObjectSchema< id: core.serialization.string().optional(), userName: core.serialization.property("user_name", core.serialization.string().optional()), userEmail: core.serialization.property("user_email", core.serialization.string().optional()), - role: core.serialization.lazy(async () => (await import("../../..")).crm.AuditLogEventRole), + role: AuditLogEventRole, ipAddress: core.serialization.property("ip_address", core.serialization.string()), - eventType: core.serialization.property( - "event_type", - core.serialization.lazy(async () => (await import("../../..")).crm.AuditLogEventEventType) - ), + eventType: core.serialization.property("event_type", AuditLogEventEventType), eventDescription: core.serialization.property("event_description", core.serialization.string()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), }); @@ -28,9 +27,9 @@ export declare namespace AuditLogEvent { id?: string | null; user_name?: string | null; user_email?: string | null; - role: serializers.crm.AuditLogEventRole.Raw; + role: AuditLogEventRole.Raw; ip_address: string; - event_type: serializers.crm.AuditLogEventEventType.Raw; + event_type: AuditLogEventEventType.Raw; event_description: string; created_at?: string | null; } diff --git a/src/serialization/resources/crm/types/AuditLogEventEventType.ts b/src/serialization/resources/crm/types/AuditLogEventEventType.ts index 803156855..4fe108d69 100644 --- a/src/serialization/resources/crm/types/AuditLogEventEventType.ts +++ b/src/serialization/resources/crm/types/AuditLogEventEventType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EventTypeEnum } from "./EventTypeEnum"; export const AuditLogEventEventType: core.serialization.Schema< serializers.crm.AuditLogEventEventType.Raw, Merge.crm.AuditLogEventEventType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.EventTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EventTypeEnum, core.serialization.string()]); export declare namespace AuditLogEventEventType { - type Raw = serializers.crm.EventTypeEnum.Raw | string; + type Raw = EventTypeEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/AuditLogEventRole.ts b/src/serialization/resources/crm/types/AuditLogEventRole.ts index abcbca5fc..65d590dac 100644 --- a/src/serialization/resources/crm/types/AuditLogEventRole.ts +++ b/src/serialization/resources/crm/types/AuditLogEventRole.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RoleEnum } from "./RoleEnum"; export const AuditLogEventRole: core.serialization.Schema< serializers.crm.AuditLogEventRole.Raw, Merge.crm.AuditLogEventRole -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.RoleEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RoleEnum, core.serialization.string()]); export declare namespace AuditLogEventRole { - type Raw = serializers.crm.RoleEnum.Raw | string; + type Raw = RoleEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/AvailableActions.ts b/src/serialization/resources/crm/types/AvailableActions.ts index 9f83d0b3b..a09b963c8 100644 --- a/src/serialization/resources/crm/types/AvailableActions.ts +++ b/src/serialization/resources/crm/types/AvailableActions.ts @@ -2,28 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountIntegration } from "./AccountIntegration"; +import { ModelOperation } from "./ModelOperation"; export const AvailableActions: core.serialization.ObjectSchema< serializers.crm.AvailableActions.Raw, Merge.crm.AvailableActions > = core.serialization.object({ - integration: core.serialization.lazyObject(async () => (await import("../../..")).crm.AccountIntegration), + integration: AccountIntegration, passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.ModelOperation)) - .optional() + core.serialization.list(ModelOperation).optional() ), }); export declare namespace AvailableActions { interface Raw { - integration: serializers.crm.AccountIntegration.Raw; + integration: AccountIntegration.Raw; passthrough_available: boolean; - available_model_operations?: serializers.crm.ModelOperation.Raw[] | null; + available_model_operations?: ModelOperation.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/CardinalityEnum.ts b/src/serialization/resources/crm/types/CardinalityEnum.ts index 345814024..8297ebd65 100644 --- a/src/serialization/resources/crm/types/CardinalityEnum.ts +++ b/src/serialization/resources/crm/types/CardinalityEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CardinalityEnum: core.serialization.Schema< diff --git a/src/serialization/resources/crm/types/CategoriesEnum.ts b/src/serialization/resources/crm/types/CategoriesEnum.ts index d54beb7ce..e6e7d390b 100644 --- a/src/serialization/resources/crm/types/CategoriesEnum.ts +++ b/src/serialization/resources/crm/types/CategoriesEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CategoriesEnum: core.serialization.Schema = diff --git a/src/serialization/resources/crm/types/CategoryEnum.ts b/src/serialization/resources/crm/types/CategoryEnum.ts index d0726106a..ac7a6bce4 100644 --- a/src/serialization/resources/crm/types/CategoryEnum.ts +++ b/src/serialization/resources/crm/types/CategoryEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CategoryEnum: core.serialization.Schema = diff --git a/src/serialization/resources/crm/types/CommonModelScopeApi.ts b/src/serialization/resources/crm/types/CommonModelScopeApi.ts index 161fabbd7..ffa46d99d 100644 --- a/src/serialization/resources/crm/types/CommonModelScopeApi.ts +++ b/src/serialization/resources/crm/types/CommonModelScopeApi.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IndividualCommonModelScopeDeserializer } from "./IndividualCommonModelScopeDeserializer"; export const CommonModelScopeApi: core.serialization.ObjectSchema< serializers.crm.CommonModelScopeApi.Raw, @@ -12,16 +13,12 @@ export const CommonModelScopeApi: core.serialization.ObjectSchema< > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list( - core.serialization.lazyObject( - async () => (await import("../../..")).crm.IndividualCommonModelScopeDeserializer - ) - ) + core.serialization.list(IndividualCommonModelScopeDeserializer) ), }); export declare namespace CommonModelScopeApi { interface Raw { - common_models: serializers.crm.IndividualCommonModelScopeDeserializer.Raw[]; + common_models: IndividualCommonModelScopeDeserializer.Raw[]; } } diff --git a/src/serialization/resources/crm/types/CommonModelScopesBodyRequest.ts b/src/serialization/resources/crm/types/CommonModelScopesBodyRequest.ts index eaef8b4a4..008d5e6b1 100644 --- a/src/serialization/resources/crm/types/CommonModelScopesBodyRequest.ts +++ b/src/serialization/resources/crm/types/CommonModelScopesBodyRequest.ts @@ -2,19 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EnabledActionsEnum } from "./EnabledActionsEnum"; export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< serializers.crm.CommonModelScopesBodyRequest.Raw, Merge.crm.CommonModelScopesBodyRequest > = core.serialization.object({ modelId: core.serialization.property("model_id", core.serialization.string()), - enabledActions: core.serialization.property( - "enabled_actions", - core.serialization.list(core.serialization.lazy(async () => (await import("../../..")).crm.EnabledActionsEnum)) - ), + enabledActions: core.serialization.property("enabled_actions", core.serialization.list(EnabledActionsEnum)), disabledFields: core.serialization.property( "disabled_fields", core.serialization.list(core.serialization.string()) @@ -24,7 +22,7 @@ export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< export declare namespace CommonModelScopesBodyRequest { interface Raw { model_id: string; - enabled_actions: serializers.crm.EnabledActionsEnum.Raw[]; + enabled_actions: EnabledActionsEnum.Raw[]; disabled_fields: string[]; } } diff --git a/src/serialization/resources/crm/types/Contact.ts b/src/serialization/resources/crm/types/Contact.ts index 09139b6ea..e5e333f78 100644 --- a/src/serialization/resources/crm/types/Contact.ts +++ b/src/serialization/resources/crm/types/Contact.ts @@ -2,9 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ContactAccount } from "./ContactAccount"; +import { ContactOwner } from "./ContactOwner"; +import { Address } from "./Address"; +import { EmailAddress } from "./EmailAddress"; +import { PhoneNumber } from "./PhoneNumber"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const Contact: core.serialization.ObjectSchema = core.serialization.object({ @@ -14,23 +21,14 @@ export const Contact: core.serialization.ObjectSchema (await import("../../..")).crm.ContactAccount).optional(), - owner: core.serialization.lazy(async () => (await import("../../..")).crm.ContactOwner).optional(), - addresses: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.Address)) - .optional(), + account: ContactAccount.optional(), + owner: ContactOwner.optional(), + addresses: core.serialization.list(Address).optional(), emailAddresses: core.serialization.property( "email_addresses", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.EmailAddress)) - .optional() - ), - phoneNumbers: core.serialization.property( - "phone_numbers", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.PhoneNumber)) - .optional() + core.serialization.list(EmailAddress).optional() ), + phoneNumbers: core.serialization.property("phone_numbers", core.serialization.list(PhoneNumber).optional()), lastActivityAt: core.serialization.property("last_activity_at", core.serialization.date().optional()), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), @@ -38,18 +36,8 @@ export const Contact: core.serialization.ObjectSchema (await import("../../..")).crm.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace Contact { @@ -60,16 +48,16 @@ export declare namespace Contact { modified_at?: string | null; first_name?: string | null; last_name?: string | null; - account?: serializers.crm.ContactAccount.Raw | null; - owner?: serializers.crm.ContactOwner.Raw | null; - addresses?: serializers.crm.Address.Raw[] | null; - email_addresses?: serializers.crm.EmailAddress.Raw[] | null; - phone_numbers?: serializers.crm.PhoneNumber.Raw[] | null; + account?: ContactAccount.Raw | null; + owner?: ContactOwner.Raw | null; + addresses?: Address.Raw[] | null; + email_addresses?: EmailAddress.Raw[] | null; + phone_numbers?: PhoneNumber.Raw[] | null; last_activity_at?: string | null; remote_created_at?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.crm.RemoteData.Raw[] | null; - remote_fields?: serializers.crm.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/ContactAccount.ts b/src/serialization/resources/crm/types/ContactAccount.ts index aa4b450e2..855e1285d 100644 --- a/src/serialization/resources/crm/types/ContactAccount.ts +++ b/src/serialization/resources/crm/types/ContactAccount.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const ContactAccount: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Account), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ContactAccount { - type Raw = string | serializers.crm.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/ContactOwner.ts b/src/serialization/resources/crm/types/ContactOwner.ts index 740f42912..9398127ae 100644 --- a/src/serialization/resources/crm/types/ContactOwner.ts +++ b/src/serialization/resources/crm/types/ContactOwner.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const ContactOwner: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace ContactOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/ContactRequest.ts b/src/serialization/resources/crm/types/ContactRequest.ts index 25417d875..ae6a79559 100644 --- a/src/serialization/resources/crm/types/ContactRequest.ts +++ b/src/serialization/resources/crm/types/ContactRequest.ts @@ -2,9 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ContactRequestAccount } from "./ContactRequestAccount"; +import { ContactRequestOwner } from "./ContactRequestOwner"; +import { AddressRequest } from "./AddressRequest"; +import { EmailAddressRequest } from "./EmailAddressRequest"; +import { PhoneNumberRequest } from "./PhoneNumberRequest"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const ContactRequest: core.serialization.ObjectSchema< serializers.crm.ContactRequest.Raw, @@ -12,23 +18,14 @@ export const ContactRequest: core.serialization.ObjectSchema< > = core.serialization.object({ firstName: core.serialization.property("first_name", core.serialization.string().optional()), lastName: core.serialization.property("last_name", core.serialization.string().optional()), - account: core.serialization.lazy(async () => (await import("../../..")).crm.ContactRequestAccount).optional(), - owner: core.serialization.lazy(async () => (await import("../../..")).crm.ContactRequestOwner).optional(), - addresses: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.AddressRequest)) - .optional(), + account: ContactRequestAccount.optional(), + owner: ContactRequestOwner.optional(), + addresses: core.serialization.list(AddressRequest).optional(), emailAddresses: core.serialization.property( "email_addresses", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.EmailAddressRequest)) - .optional() - ), - phoneNumbers: core.serialization.property( - "phone_numbers", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.PhoneNumberRequest)) - .optional() + core.serialization.list(EmailAddressRequest).optional() ), + phoneNumbers: core.serialization.property("phone_numbers", core.serialization.list(PhoneNumberRequest).optional()), lastActivityAt: core.serialization.property("last_activity_at", core.serialization.date().optional()), integrationParams: core.serialization.property( "integration_params", @@ -38,26 +35,21 @@ export const ContactRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace ContactRequest { interface Raw { first_name?: string | null; last_name?: string | null; - account?: serializers.crm.ContactRequestAccount.Raw | null; - owner?: serializers.crm.ContactRequestOwner.Raw | null; - addresses?: serializers.crm.AddressRequest.Raw[] | null; - email_addresses?: serializers.crm.EmailAddressRequest.Raw[] | null; - phone_numbers?: serializers.crm.PhoneNumberRequest.Raw[] | null; + account?: ContactRequestAccount.Raw | null; + owner?: ContactRequestOwner.Raw | null; + addresses?: AddressRequest.Raw[] | null; + email_addresses?: EmailAddressRequest.Raw[] | null; + phone_numbers?: PhoneNumberRequest.Raw[] | null; last_activity_at?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.crm.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/ContactRequestAccount.ts b/src/serialization/resources/crm/types/ContactRequestAccount.ts index 5589d3c11..7a6878dcd 100644 --- a/src/serialization/resources/crm/types/ContactRequestAccount.ts +++ b/src/serialization/resources/crm/types/ContactRequestAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const ContactRequestAccount: core.serialization.Schema< serializers.crm.ContactRequestAccount.Raw, Merge.crm.ContactRequestAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ContactRequestAccount { - type Raw = string | serializers.crm.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/ContactRequestOwner.ts b/src/serialization/resources/crm/types/ContactRequestOwner.ts index cd953d9d3..bc6e8d94a 100644 --- a/src/serialization/resources/crm/types/ContactRequestOwner.ts +++ b/src/serialization/resources/crm/types/ContactRequestOwner.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const ContactRequestOwner: core.serialization.Schema< serializers.crm.ContactRequestOwner.Raw, Merge.crm.ContactRequestOwner -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace ContactRequestOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/CountryEnum.ts b/src/serialization/resources/crm/types/CountryEnum.ts index 276ac49a2..527da822d 100644 --- a/src/serialization/resources/crm/types/CountryEnum.ts +++ b/src/serialization/resources/crm/types/CountryEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CountryEnum: core.serialization.Schema = diff --git a/src/serialization/resources/crm/types/CrmAccountResponse.ts b/src/serialization/resources/crm/types/CrmAccountResponse.ts index 1964f9f4d..391a1d782 100644 --- a/src/serialization/resources/crm/types/CrmAccountResponse.ts +++ b/src/serialization/resources/crm/types/CrmAccountResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const CrmAccountResponse: core.serialization.ObjectSchema< serializers.crm.CrmAccountResponse.Raw, Merge.crm.CrmAccountResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).crm.Account), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.DebugModeLog)) - .optional(), + model: Account, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace CrmAccountResponse { interface Raw { - model: serializers.crm.Account.Raw; - warnings: serializers.crm.WarningValidationProblem.Raw[]; - errors: serializers.crm.ErrorValidationProblem.Raw[]; - logs?: serializers.crm.DebugModeLog.Raw[] | null; + model: Account.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/CrmAssociationTypeResponse.ts b/src/serialization/resources/crm/types/CrmAssociationTypeResponse.ts index 0c79cffc8..688f81efa 100644 --- a/src/serialization/resources/crm/types/CrmAssociationTypeResponse.ts +++ b/src/serialization/resources/crm/types/CrmAssociationTypeResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AssociationType } from "./AssociationType"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const CrmAssociationTypeResponse: core.serialization.ObjectSchema< serializers.crm.CrmAssociationTypeResponse.Raw, Merge.crm.CrmAssociationTypeResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).crm.AssociationType), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.DebugModeLog)) - .optional(), + model: AssociationType, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace CrmAssociationTypeResponse { interface Raw { - model: serializers.crm.AssociationType.Raw; - warnings: serializers.crm.WarningValidationProblem.Raw[]; - errors: serializers.crm.ErrorValidationProblem.Raw[]; - logs?: serializers.crm.DebugModeLog.Raw[] | null; + model: AssociationType.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/CrmContactResponse.ts b/src/serialization/resources/crm/types/CrmContactResponse.ts index 086762392..11704f3f5 100644 --- a/src/serialization/resources/crm/types/CrmContactResponse.ts +++ b/src/serialization/resources/crm/types/CrmContactResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const CrmContactResponse: core.serialization.ObjectSchema< serializers.crm.CrmContactResponse.Raw, Merge.crm.CrmContactResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).crm.Contact), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.DebugModeLog)) - .optional(), + model: Contact, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace CrmContactResponse { interface Raw { - model: serializers.crm.Contact.Raw; - warnings: serializers.crm.WarningValidationProblem.Raw[]; - errors: serializers.crm.ErrorValidationProblem.Raw[]; - logs?: serializers.crm.DebugModeLog.Raw[] | null; + model: Contact.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/CrmCustomObjectResponse.ts b/src/serialization/resources/crm/types/CrmCustomObjectResponse.ts index 0bdc20faf..75576ed7d 100644 --- a/src/serialization/resources/crm/types/CrmCustomObjectResponse.ts +++ b/src/serialization/resources/crm/types/CrmCustomObjectResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CustomObject } from "./CustomObject"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const CrmCustomObjectResponse: core.serialization.ObjectSchema< serializers.crm.CrmCustomObjectResponse.Raw, Merge.crm.CrmCustomObjectResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).crm.CustomObject), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.DebugModeLog)) - .optional(), + model: CustomObject, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace CrmCustomObjectResponse { interface Raw { - model: serializers.crm.CustomObject.Raw; - warnings: serializers.crm.WarningValidationProblem.Raw[]; - errors: serializers.crm.ErrorValidationProblem.Raw[]; - logs?: serializers.crm.DebugModeLog.Raw[] | null; + model: CustomObject.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/CustomObject.ts b/src/serialization/resources/crm/types/CustomObject.ts index a71879b8b..4559e31c7 100644 --- a/src/serialization/resources/crm/types/CustomObject.ts +++ b/src/serialization/resources/crm/types/CustomObject.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteField } from "./RemoteField"; export const CustomObject: core.serialization.ObjectSchema = core.serialization.object({ @@ -14,12 +15,7 @@ export const CustomObject: core.serialization.ObjectSchema (await import("../../..")).crm.RemoteField)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace CustomObject { @@ -30,6 +26,6 @@ export declare namespace CustomObject { modified_at?: string | null; object_class?: string | null; fields?: Record | null; - remote_fields?: serializers.crm.RemoteField.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/CustomObjectClass.ts b/src/serialization/resources/crm/types/CustomObjectClass.ts index 3c37926b2..3de6de397 100644 --- a/src/serialization/resources/crm/types/CustomObjectClass.ts +++ b/src/serialization/resources/crm/types/CustomObjectClass.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldClassForCustomObjectClass } from "./RemoteFieldClassForCustomObjectClass"; export const CustomObjectClass: core.serialization.ObjectSchema< serializers.crm.CustomObjectClass.Raw, @@ -17,13 +18,7 @@ export const CustomObjectClass: core.serialization.ObjectSchema< name: core.serialization.string().optional(), description: core.serialization.string().optional(), labels: core.serialization.record(core.serialization.string(), core.serialization.string().optional()).optional(), - fields: core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).crm.RemoteFieldClassForCustomObjectClass - ) - ) - .optional(), + fields: core.serialization.list(RemoteFieldClassForCustomObjectClass).optional(), associationTypes: core.serialization.property( "association_types", core.serialization @@ -41,7 +36,7 @@ export declare namespace CustomObjectClass { name?: string | null; description?: string | null; labels?: Record | null; - fields?: serializers.crm.RemoteFieldClassForCustomObjectClass.Raw[] | null; + fields?: RemoteFieldClassForCustomObjectClass.Raw[] | null; association_types?: Record[] | null; } } diff --git a/src/serialization/resources/crm/types/CustomObjectRequest.ts b/src/serialization/resources/crm/types/CustomObjectRequest.ts index 5c3f9e6b4..a4c130115 100644 --- a/src/serialization/resources/crm/types/CustomObjectRequest.ts +++ b/src/serialization/resources/crm/types/CustomObjectRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CustomObjectRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/DataPassthroughRequest.ts b/src/serialization/resources/crm/types/DataPassthroughRequest.ts index 0e0fbf8ca..b214f0824 100644 --- a/src/serialization/resources/crm/types/DataPassthroughRequest.ts +++ b/src/serialization/resources/crm/types/DataPassthroughRequest.ts @@ -2,41 +2,39 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { MethodEnum } from "./MethodEnum"; +import { MultipartFormFieldRequest } from "./MultipartFormFieldRequest"; +import { RequestFormatEnum } from "./RequestFormatEnum"; export const DataPassthroughRequest: core.serialization.ObjectSchema< serializers.crm.DataPassthroughRequest.Raw, Merge.crm.DataPassthroughRequest > = core.serialization.object({ - method: core.serialization.lazy(async () => (await import("../../..")).crm.MethodEnum), + method: MethodEnum, path: core.serialization.string(), baseUrlOverride: core.serialization.property("base_url_override", core.serialization.string().optional()), data: core.serialization.string().optional(), multipartFormData: core.serialization.property( "multipart_form_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.MultipartFormFieldRequest)) - .optional() + core.serialization.list(MultipartFormFieldRequest).optional() ), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), - requestFormat: core.serialization.property( - "request_format", - core.serialization.lazy(async () => (await import("../../..")).crm.RequestFormatEnum).optional() - ), + requestFormat: core.serialization.property("request_format", RequestFormatEnum.optional()), normalizeResponse: core.serialization.property("normalize_response", core.serialization.boolean().optional()), }); export declare namespace DataPassthroughRequest { interface Raw { - method: serializers.crm.MethodEnum.Raw; + method: MethodEnum.Raw; path: string; base_url_override?: string | null; data?: string | null; - multipart_form_data?: serializers.crm.MultipartFormFieldRequest.Raw[] | null; + multipart_form_data?: MultipartFormFieldRequest.Raw[] | null; headers?: Record | null; - request_format?: serializers.crm.RequestFormatEnum.Raw | null; + request_format?: RequestFormatEnum.Raw | null; normalize_response?: boolean | null; } } diff --git a/src/serialization/resources/crm/types/DebugModeLog.ts b/src/serialization/resources/crm/types/DebugModeLog.ts index eb86bef63..972d25b70 100644 --- a/src/serialization/resources/crm/types/DebugModeLog.ts +++ b/src/serialization/resources/crm/types/DebugModeLog.ts @@ -2,24 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { DebugModelLogSummary } from "./DebugModelLogSummary"; export const DebugModeLog: core.serialization.ObjectSchema = core.serialization.object({ logId: core.serialization.property("log_id", core.serialization.string()), dashboardView: core.serialization.property("dashboard_view", core.serialization.string()), - logSummary: core.serialization.property( - "log_summary", - core.serialization.lazyObject(async () => (await import("../../..")).crm.DebugModelLogSummary) - ), + logSummary: core.serialization.property("log_summary", DebugModelLogSummary), }); export declare namespace DebugModeLog { interface Raw { log_id: string; dashboard_view: string; - log_summary: serializers.crm.DebugModelLogSummary.Raw; + log_summary: DebugModelLogSummary.Raw; } } diff --git a/src/serialization/resources/crm/types/DebugModelLogSummary.ts b/src/serialization/resources/crm/types/DebugModelLogSummary.ts index 77e6885e8..e2d1d63d5 100644 --- a/src/serialization/resources/crm/types/DebugModelLogSummary.ts +++ b/src/serialization/resources/crm/types/DebugModelLogSummary.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const DebugModelLogSummary: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/DirectionEnum.ts b/src/serialization/resources/crm/types/DirectionEnum.ts index a3b0ee25b..0d116786a 100644 --- a/src/serialization/resources/crm/types/DirectionEnum.ts +++ b/src/serialization/resources/crm/types/DirectionEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const DirectionEnum: core.serialization.Schema = diff --git a/src/serialization/resources/crm/types/EmailAddress.ts b/src/serialization/resources/crm/types/EmailAddress.ts index ef279618d..3e5a34a28 100644 --- a/src/serialization/resources/crm/types/EmailAddress.ts +++ b/src/serialization/resources/crm/types/EmailAddress.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EmailAddress: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/crm/types/EmailAddressRequest.ts b/src/serialization/resources/crm/types/EmailAddressRequest.ts index a37362b80..2d904dc79 100644 --- a/src/serialization/resources/crm/types/EmailAddressRequest.ts +++ b/src/serialization/resources/crm/types/EmailAddressRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EmailAddressRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/EnabledActionsEnum.ts b/src/serialization/resources/crm/types/EnabledActionsEnum.ts index 327ca9137..f354290ff 100644 --- a/src/serialization/resources/crm/types/EnabledActionsEnum.ts +++ b/src/serialization/resources/crm/types/EnabledActionsEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EnabledActionsEnum: core.serialization.Schema< diff --git a/src/serialization/resources/crm/types/EncodingEnum.ts b/src/serialization/resources/crm/types/EncodingEnum.ts index 47605fb9c..60cec848b 100644 --- a/src/serialization/resources/crm/types/EncodingEnum.ts +++ b/src/serialization/resources/crm/types/EncodingEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EncodingEnum: core.serialization.Schema = diff --git a/src/serialization/resources/crm/types/Engagement.ts b/src/serialization/resources/crm/types/Engagement.ts index 52637e3c2..bb8082daa 100644 --- a/src/serialization/resources/crm/types/Engagement.ts +++ b/src/serialization/resources/crm/types/Engagement.ts @@ -2,9 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EngagementOwner } from "./EngagementOwner"; +import { EngagementDirection } from "./EngagementDirection"; +import { EngagementEngagementType } from "./EngagementEngagementType"; +import { EngagementAccount } from "./EngagementAccount"; +import { EngagementContactsItem } from "./EngagementContactsItem"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const Engagement: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,37 +19,22 @@ export const Engagement: core.serialization.ObjectSchema (await import("../../..")).crm.EngagementOwner).optional(), + owner: EngagementOwner.optional(), content: core.serialization.string().optional(), subject: core.serialization.string().optional(), - direction: core.serialization.lazy(async () => (await import("../../..")).crm.EngagementDirection).optional(), - engagementType: core.serialization.property( - "engagement_type", - core.serialization.lazy(async () => (await import("../../..")).crm.EngagementEngagementType).optional() - ), + direction: EngagementDirection.optional(), + engagementType: core.serialization.property("engagement_type", EngagementEngagementType.optional()), startTime: core.serialization.property("start_time", core.serialization.date().optional()), endTime: core.serialization.property("end_time", core.serialization.date().optional()), - account: core.serialization.lazy(async () => (await import("../../..")).crm.EngagementAccount).optional(), - contacts: core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).crm.EngagementContactsItem).optional()) - .optional(), + account: EngagementAccount.optional(), + contacts: core.serialization.list(EngagementContactsItem.optional()).optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace Engagement { @@ -51,18 +43,18 @@ export declare namespace Engagement { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - owner?: serializers.crm.EngagementOwner.Raw | null; + owner?: EngagementOwner.Raw | null; content?: string | null; subject?: string | null; - direction?: serializers.crm.EngagementDirection.Raw | null; - engagement_type?: serializers.crm.EngagementEngagementType.Raw | null; + direction?: EngagementDirection.Raw | null; + engagement_type?: EngagementEngagementType.Raw | null; start_time?: string | null; end_time?: string | null; - account?: serializers.crm.EngagementAccount.Raw | null; - contacts?: (serializers.crm.EngagementContactsItem.Raw | null | undefined)[] | null; + account?: EngagementAccount.Raw | null; + contacts?: (EngagementContactsItem.Raw | null | undefined)[] | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.crm.RemoteData.Raw[] | null; - remote_fields?: serializers.crm.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/EngagementAccount.ts b/src/serialization/resources/crm/types/EngagementAccount.ts index 3141f17fc..ca91d79d8 100644 --- a/src/serialization/resources/crm/types/EngagementAccount.ts +++ b/src/serialization/resources/crm/types/EngagementAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const EngagementAccount: core.serialization.Schema< serializers.crm.EngagementAccount.Raw, Merge.crm.EngagementAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace EngagementAccount { - type Raw = string | serializers.crm.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementContactsItem.ts b/src/serialization/resources/crm/types/EngagementContactsItem.ts index 5b863807a..72bf23142 100644 --- a/src/serialization/resources/crm/types/EngagementContactsItem.ts +++ b/src/serialization/resources/crm/types/EngagementContactsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const EngagementContactsItem: core.serialization.Schema< serializers.crm.EngagementContactsItem.Raw, Merge.crm.EngagementContactsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace EngagementContactsItem { - type Raw = string | serializers.crm.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementDirection.ts b/src/serialization/resources/crm/types/EngagementDirection.ts index 7c658afbf..b53f2d79d 100644 --- a/src/serialization/resources/crm/types/EngagementDirection.ts +++ b/src/serialization/resources/crm/types/EngagementDirection.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { DirectionEnum } from "./DirectionEnum"; export const EngagementDirection: core.serialization.Schema< serializers.crm.EngagementDirection.Raw, Merge.crm.EngagementDirection -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.DirectionEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([DirectionEnum, core.serialization.string()]); export declare namespace EngagementDirection { - type Raw = serializers.crm.DirectionEnum.Raw | string; + type Raw = DirectionEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/EngagementEngagementType.ts b/src/serialization/resources/crm/types/EngagementEngagementType.ts index 6103e6a52..e5a7da3df 100644 --- a/src/serialization/resources/crm/types/EngagementEngagementType.ts +++ b/src/serialization/resources/crm/types/EngagementEngagementType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EngagementType } from "./EngagementType"; export const EngagementEngagementType: core.serialization.Schema< serializers.crm.EngagementEngagementType.Raw, Merge.crm.EngagementEngagementType -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.EngagementType), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), EngagementType]); export declare namespace EngagementEngagementType { - type Raw = string | serializers.crm.EngagementType.Raw; + type Raw = string | EngagementType.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementOwner.ts b/src/serialization/resources/crm/types/EngagementOwner.ts index b81f3dde5..79ab58520 100644 --- a/src/serialization/resources/crm/types/EngagementOwner.ts +++ b/src/serialization/resources/crm/types/EngagementOwner.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const EngagementOwner: core.serialization.Schema< serializers.crm.EngagementOwner.Raw, Merge.crm.EngagementOwner -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace EngagementOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementRequest.ts b/src/serialization/resources/crm/types/EngagementRequest.ts index 6e9ba3a5d..aa8d24efa 100644 --- a/src/serialization/resources/crm/types/EngagementRequest.ts +++ b/src/serialization/resources/crm/types/EngagementRequest.ts @@ -2,32 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EngagementRequestOwner } from "./EngagementRequestOwner"; +import { EngagementRequestDirection } from "./EngagementRequestDirection"; +import { EngagementRequestEngagementType } from "./EngagementRequestEngagementType"; +import { EngagementRequestAccount } from "./EngagementRequestAccount"; +import { EngagementRequestContactsItem } from "./EngagementRequestContactsItem"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const EngagementRequest: core.serialization.ObjectSchema< serializers.crm.EngagementRequest.Raw, Merge.crm.EngagementRequest > = core.serialization.object({ - owner: core.serialization.lazy(async () => (await import("../../..")).crm.EngagementRequestOwner).optional(), + owner: EngagementRequestOwner.optional(), content: core.serialization.string().optional(), subject: core.serialization.string().optional(), - direction: core.serialization - .lazy(async () => (await import("../../..")).crm.EngagementRequestDirection) - .optional(), - engagementType: core.serialization.property( - "engagement_type", - core.serialization.lazy(async () => (await import("../../..")).crm.EngagementRequestEngagementType).optional() - ), + direction: EngagementRequestDirection.optional(), + engagementType: core.serialization.property("engagement_type", EngagementRequestEngagementType.optional()), startTime: core.serialization.property("start_time", core.serialization.date().optional()), endTime: core.serialization.property("end_time", core.serialization.date().optional()), - account: core.serialization.lazy(async () => (await import("../../..")).crm.EngagementRequestAccount).optional(), - contacts: core.serialization - .list( - core.serialization.lazy(async () => (await import("../../..")).crm.EngagementRequestContactsItem).optional() - ) - .optional(), + account: EngagementRequestAccount.optional(), + contacts: core.serialization.list(EngagementRequestContactsItem.optional()).optional(), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -36,27 +33,22 @@ export const EngagementRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace EngagementRequest { interface Raw { - owner?: serializers.crm.EngagementRequestOwner.Raw | null; + owner?: EngagementRequestOwner.Raw | null; content?: string | null; subject?: string | null; - direction?: serializers.crm.EngagementRequestDirection.Raw | null; - engagement_type?: serializers.crm.EngagementRequestEngagementType.Raw | null; + direction?: EngagementRequestDirection.Raw | null; + engagement_type?: EngagementRequestEngagementType.Raw | null; start_time?: string | null; end_time?: string | null; - account?: serializers.crm.EngagementRequestAccount.Raw | null; - contacts?: (serializers.crm.EngagementRequestContactsItem.Raw | null | undefined)[] | null; + account?: EngagementRequestAccount.Raw | null; + contacts?: (EngagementRequestContactsItem.Raw | null | undefined)[] | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.crm.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/EngagementRequestAccount.ts b/src/serialization/resources/crm/types/EngagementRequestAccount.ts index c62098516..b3895e2ef 100644 --- a/src/serialization/resources/crm/types/EngagementRequestAccount.ts +++ b/src/serialization/resources/crm/types/EngagementRequestAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const EngagementRequestAccount: core.serialization.Schema< serializers.crm.EngagementRequestAccount.Raw, Merge.crm.EngagementRequestAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace EngagementRequestAccount { - type Raw = string | serializers.crm.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementRequestContactsItem.ts b/src/serialization/resources/crm/types/EngagementRequestContactsItem.ts index 0e43cf539..176a7f1db 100644 --- a/src/serialization/resources/crm/types/EngagementRequestContactsItem.ts +++ b/src/serialization/resources/crm/types/EngagementRequestContactsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const EngagementRequestContactsItem: core.serialization.Schema< serializers.crm.EngagementRequestContactsItem.Raw, Merge.crm.EngagementRequestContactsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace EngagementRequestContactsItem { - type Raw = string | serializers.crm.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementRequestDirection.ts b/src/serialization/resources/crm/types/EngagementRequestDirection.ts index b6e9b5a94..29cb187fd 100644 --- a/src/serialization/resources/crm/types/EngagementRequestDirection.ts +++ b/src/serialization/resources/crm/types/EngagementRequestDirection.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { DirectionEnum } from "./DirectionEnum"; export const EngagementRequestDirection: core.serialization.Schema< serializers.crm.EngagementRequestDirection.Raw, Merge.crm.EngagementRequestDirection -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.DirectionEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([DirectionEnum, core.serialization.string()]); export declare namespace EngagementRequestDirection { - type Raw = serializers.crm.DirectionEnum.Raw | string; + type Raw = DirectionEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/EngagementRequestEngagementType.ts b/src/serialization/resources/crm/types/EngagementRequestEngagementType.ts index c2584e119..0c701325d 100644 --- a/src/serialization/resources/crm/types/EngagementRequestEngagementType.ts +++ b/src/serialization/resources/crm/types/EngagementRequestEngagementType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EngagementType } from "./EngagementType"; export const EngagementRequestEngagementType: core.serialization.Schema< serializers.crm.EngagementRequestEngagementType.Raw, Merge.crm.EngagementRequestEngagementType -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.EngagementType), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), EngagementType]); export declare namespace EngagementRequestEngagementType { - type Raw = string | serializers.crm.EngagementType.Raw; + type Raw = string | EngagementType.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementRequestOwner.ts b/src/serialization/resources/crm/types/EngagementRequestOwner.ts index 866558a9c..bfbbbb231 100644 --- a/src/serialization/resources/crm/types/EngagementRequestOwner.ts +++ b/src/serialization/resources/crm/types/EngagementRequestOwner.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const EngagementRequestOwner: core.serialization.Schema< serializers.crm.EngagementRequestOwner.Raw, Merge.crm.EngagementRequestOwner -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace EngagementRequestOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementResponse.ts b/src/serialization/resources/crm/types/EngagementResponse.ts index 696f0433a..0d0cfac0d 100644 --- a/src/serialization/resources/crm/types/EngagementResponse.ts +++ b/src/serialization/resources/crm/types/EngagementResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Engagement } from "./Engagement"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const EngagementResponse: core.serialization.ObjectSchema< serializers.crm.EngagementResponse.Raw, Merge.crm.EngagementResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).crm.Engagement), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.DebugModeLog)) - .optional(), + model: Engagement, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace EngagementResponse { interface Raw { - model: serializers.crm.Engagement.Raw; - warnings: serializers.crm.WarningValidationProblem.Raw[]; - errors: serializers.crm.ErrorValidationProblem.Raw[]; - logs?: serializers.crm.DebugModeLog.Raw[] | null; + model: Engagement.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/EngagementType.ts b/src/serialization/resources/crm/types/EngagementType.ts index 13cda2826..ad9711352 100644 --- a/src/serialization/resources/crm/types/EngagementType.ts +++ b/src/serialization/resources/crm/types/EngagementType.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EngagementTypeActivityType } from "./EngagementTypeActivityType"; +import { RemoteField } from "./RemoteField"; export const EngagementType: core.serialization.ObjectSchema< serializers.crm.EngagementType.Raw, @@ -14,17 +16,9 @@ export const EngagementType: core.serialization.ObjectSchema< remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), - activityType: core.serialization.property( - "activity_type", - core.serialization.lazy(async () => (await import("../../..")).crm.EngagementTypeActivityType).optional() - ), + activityType: core.serialization.property("activity_type", EngagementTypeActivityType.optional()), name: core.serialization.string().optional(), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteField)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace EngagementType { @@ -33,8 +27,8 @@ export declare namespace EngagementType { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - activity_type?: serializers.crm.EngagementTypeActivityType.Raw | null; + activity_type?: EngagementTypeActivityType.Raw | null; name?: string | null; - remote_fields?: serializers.crm.RemoteField.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/EngagementTypeActivityType.ts b/src/serialization/resources/crm/types/EngagementTypeActivityType.ts index c4f61fc4a..46cc8f462 100644 --- a/src/serialization/resources/crm/types/EngagementTypeActivityType.ts +++ b/src/serialization/resources/crm/types/EngagementTypeActivityType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ActivityTypeEnum } from "./ActivityTypeEnum"; export const EngagementTypeActivityType: core.serialization.Schema< serializers.crm.EngagementTypeActivityType.Raw, Merge.crm.EngagementTypeActivityType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.ActivityTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([ActivityTypeEnum, core.serialization.string()]); export declare namespace EngagementTypeActivityType { - type Raw = serializers.crm.ActivityTypeEnum.Raw | string; + type Raw = ActivityTypeEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/ErrorValidationProblem.ts b/src/serialization/resources/crm/types/ErrorValidationProblem.ts index 047172bf3..73a500d65 100644 --- a/src/serialization/resources/crm/types/ErrorValidationProblem.ts +++ b/src/serialization/resources/crm/types/ErrorValidationProblem.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ValidationProblemSource } from "./ValidationProblemSource"; export const ErrorValidationProblem: core.serialization.ObjectSchema< serializers.crm.ErrorValidationProblem.Raw, Merge.crm.ErrorValidationProblem > = core.serialization.object({ - source: core.serialization - .lazyObject(async () => (await import("../../..")).crm.ValidationProblemSource) - .optional(), + source: ValidationProblemSource.optional(), title: core.serialization.string(), detail: core.serialization.string(), problemType: core.serialization.property("problem_type", core.serialization.string()), @@ -20,7 +19,7 @@ export const ErrorValidationProblem: core.serialization.ObjectSchema< export declare namespace ErrorValidationProblem { interface Raw { - source?: serializers.crm.ValidationProblemSource.Raw | null; + source?: ValidationProblemSource.Raw | null; title: string; detail: string; problem_type: string; diff --git a/src/serialization/resources/crm/types/EventTypeEnum.ts b/src/serialization/resources/crm/types/EventTypeEnum.ts index 746e42336..0b837837d 100644 --- a/src/serialization/resources/crm/types/EventTypeEnum.ts +++ b/src/serialization/resources/crm/types/EventTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EventTypeEnum: core.serialization.Schema = diff --git a/src/serialization/resources/crm/types/ExternalTargetFieldApi.ts b/src/serialization/resources/crm/types/ExternalTargetFieldApi.ts index 3217c429c..9807ba32e 100644 --- a/src/serialization/resources/crm/types/ExternalTargetFieldApi.ts +++ b/src/serialization/resources/crm/types/ExternalTargetFieldApi.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ExternalTargetFieldApi: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/ExternalTargetFieldApiResponse.ts b/src/serialization/resources/crm/types/ExternalTargetFieldApiResponse.ts index 337922347..efa8b3fc5 100644 --- a/src/serialization/resources/crm/types/ExternalTargetFieldApiResponse.ts +++ b/src/serialization/resources/crm/types/ExternalTargetFieldApiResponse.ts @@ -2,80 +2,36 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ExternalTargetFieldApi } from "./ExternalTargetFieldApi"; export const ExternalTargetFieldApiResponse: core.serialization.ObjectSchema< serializers.crm.ExternalTargetFieldApiResponse.Raw, Merge.crm.ExternalTargetFieldApiResponse > = core.serialization.object({ - account: core.serialization.property( - "Account", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.ExternalTargetFieldApi)) - .optional() - ), - contact: core.serialization.property( - "Contact", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.ExternalTargetFieldApi)) - .optional() - ), - lead: core.serialization.property( - "Lead", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.ExternalTargetFieldApi)) - .optional() - ), - note: core.serialization.property( - "Note", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.ExternalTargetFieldApi)) - .optional() - ), - opportunity: core.serialization.property( - "Opportunity", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.ExternalTargetFieldApi)) - .optional() - ), - stage: core.serialization.property( - "Stage", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.ExternalTargetFieldApi)) - .optional() - ), - user: core.serialization.property( - "User", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.ExternalTargetFieldApi)) - .optional() - ), - task: core.serialization.property( - "Task", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.ExternalTargetFieldApi)) - .optional() - ), - engagement: core.serialization.property( - "Engagement", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.ExternalTargetFieldApi)) - .optional() - ), + account: core.serialization.property("Account", core.serialization.list(ExternalTargetFieldApi).optional()), + contact: core.serialization.property("Contact", core.serialization.list(ExternalTargetFieldApi).optional()), + lead: core.serialization.property("Lead", core.serialization.list(ExternalTargetFieldApi).optional()), + note: core.serialization.property("Note", core.serialization.list(ExternalTargetFieldApi).optional()), + opportunity: core.serialization.property("Opportunity", core.serialization.list(ExternalTargetFieldApi).optional()), + stage: core.serialization.property("Stage", core.serialization.list(ExternalTargetFieldApi).optional()), + user: core.serialization.property("User", core.serialization.list(ExternalTargetFieldApi).optional()), + task: core.serialization.property("Task", core.serialization.list(ExternalTargetFieldApi).optional()), + engagement: core.serialization.property("Engagement", core.serialization.list(ExternalTargetFieldApi).optional()), }); export declare namespace ExternalTargetFieldApiResponse { interface Raw { - Account?: serializers.crm.ExternalTargetFieldApi.Raw[] | null; - Contact?: serializers.crm.ExternalTargetFieldApi.Raw[] | null; - Lead?: serializers.crm.ExternalTargetFieldApi.Raw[] | null; - Note?: serializers.crm.ExternalTargetFieldApi.Raw[] | null; - Opportunity?: serializers.crm.ExternalTargetFieldApi.Raw[] | null; - Stage?: serializers.crm.ExternalTargetFieldApi.Raw[] | null; - User?: serializers.crm.ExternalTargetFieldApi.Raw[] | null; - Task?: serializers.crm.ExternalTargetFieldApi.Raw[] | null; - Engagement?: serializers.crm.ExternalTargetFieldApi.Raw[] | null; + Account?: ExternalTargetFieldApi.Raw[] | null; + Contact?: ExternalTargetFieldApi.Raw[] | null; + Lead?: ExternalTargetFieldApi.Raw[] | null; + Note?: ExternalTargetFieldApi.Raw[] | null; + Opportunity?: ExternalTargetFieldApi.Raw[] | null; + Stage?: ExternalTargetFieldApi.Raw[] | null; + User?: ExternalTargetFieldApi.Raw[] | null; + Task?: ExternalTargetFieldApi.Raw[] | null; + Engagement?: ExternalTargetFieldApi.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/FieldFormatEnum.ts b/src/serialization/resources/crm/types/FieldFormatEnum.ts index 85ceac4f3..93c5d4c9d 100644 --- a/src/serialization/resources/crm/types/FieldFormatEnum.ts +++ b/src/serialization/resources/crm/types/FieldFormatEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldFormatEnum: core.serialization.Schema< diff --git a/src/serialization/resources/crm/types/FieldMappingApiInstance.ts b/src/serialization/resources/crm/types/FieldMappingApiInstance.ts index 50badc14f..7689c4684 100644 --- a/src/serialization/resources/crm/types/FieldMappingApiInstance.ts +++ b/src/serialization/resources/crm/types/FieldMappingApiInstance.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstanceTargetField } from "./FieldMappingApiInstanceTargetField"; +import { FieldMappingApiInstanceRemoteField } from "./FieldMappingApiInstanceRemoteField"; export const FieldMappingApiInstance: core.serialization.ObjectSchema< serializers.crm.FieldMappingApiInstance.Raw, @@ -12,25 +14,15 @@ export const FieldMappingApiInstance: core.serialization.ObjectSchema< > = core.serialization.object({ id: core.serialization.string().optional(), isIntegrationWide: core.serialization.property("is_integration_wide", core.serialization.boolean().optional()), - targetField: core.serialization.property( - "target_field", - core.serialization - .lazyObject(async () => (await import("../../..")).crm.FieldMappingApiInstanceTargetField) - .optional() - ), - remoteField: core.serialization.property( - "remote_field", - core.serialization - .lazyObject(async () => (await import("../../..")).crm.FieldMappingApiInstanceRemoteField) - .optional() - ), + targetField: core.serialization.property("target_field", FieldMappingApiInstanceTargetField.optional()), + remoteField: core.serialization.property("remote_field", FieldMappingApiInstanceRemoteField.optional()), }); export declare namespace FieldMappingApiInstance { interface Raw { id?: string | null; is_integration_wide?: boolean | null; - target_field?: serializers.crm.FieldMappingApiInstanceTargetField.Raw | null; - remote_field?: serializers.crm.FieldMappingApiInstanceRemoteField.Raw | null; + target_field?: FieldMappingApiInstanceTargetField.Raw | null; + remote_field?: FieldMappingApiInstanceRemoteField.Raw | null; } } diff --git a/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteField.ts b/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteField.ts index 919a19b50..66fbf81fd 100644 --- a/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteField.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo } from "./FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo"; export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema< serializers.crm.FieldMappingApiInstanceRemoteField.Raw, @@ -14,9 +15,7 @@ export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()), remoteEndpointInfo: core.serialization.property( "remote_endpoint_info", - core.serialization.lazyObject( - async () => (await import("../../..")).crm.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - ) + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo ), }); @@ -24,6 +23,6 @@ export declare namespace FieldMappingApiInstanceRemoteField { interface Raw { remote_key_name: string; schema: Record; - remote_endpoint_info: serializers.crm.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; } } diff --git a/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts b/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts index 123f90e60..06b22d167 100644 --- a/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts +++ b/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/FieldMappingApiInstanceResponse.ts b/src/serialization/resources/crm/types/FieldMappingApiInstanceResponse.ts index d2bab800b..b3d5ebd8c 100644 --- a/src/serialization/resources/crm/types/FieldMappingApiInstanceResponse.ts +++ b/src/serialization/resources/crm/types/FieldMappingApiInstanceResponse.ts @@ -2,80 +2,39 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstance } from "./FieldMappingApiInstance"; export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< serializers.crm.FieldMappingApiInstanceResponse.Raw, Merge.crm.FieldMappingApiInstanceResponse > = core.serialization.object({ - account: core.serialization.property( - "Account", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.FieldMappingApiInstance)) - .optional() - ), - contact: core.serialization.property( - "Contact", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.FieldMappingApiInstance)) - .optional() - ), - lead: core.serialization.property( - "Lead", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.FieldMappingApiInstance)) - .optional() - ), - note: core.serialization.property( - "Note", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.FieldMappingApiInstance)) - .optional() - ), + account: core.serialization.property("Account", core.serialization.list(FieldMappingApiInstance).optional()), + contact: core.serialization.property("Contact", core.serialization.list(FieldMappingApiInstance).optional()), + lead: core.serialization.property("Lead", core.serialization.list(FieldMappingApiInstance).optional()), + note: core.serialization.property("Note", core.serialization.list(FieldMappingApiInstance).optional()), opportunity: core.serialization.property( "Opportunity", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.FieldMappingApiInstance)) - .optional() - ), - stage: core.serialization.property( - "Stage", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.FieldMappingApiInstance)) - .optional() - ), - user: core.serialization.property( - "User", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.FieldMappingApiInstance)) - .optional() - ), - task: core.serialization.property( - "Task", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.FieldMappingApiInstance)) - .optional() - ), - engagement: core.serialization.property( - "Engagement", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.FieldMappingApiInstance)) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), + stage: core.serialization.property("Stage", core.serialization.list(FieldMappingApiInstance).optional()), + user: core.serialization.property("User", core.serialization.list(FieldMappingApiInstance).optional()), + task: core.serialization.property("Task", core.serialization.list(FieldMappingApiInstance).optional()), + engagement: core.serialization.property("Engagement", core.serialization.list(FieldMappingApiInstance).optional()), }); export declare namespace FieldMappingApiInstanceResponse { interface Raw { - Account?: serializers.crm.FieldMappingApiInstance.Raw[] | null; - Contact?: serializers.crm.FieldMappingApiInstance.Raw[] | null; - Lead?: serializers.crm.FieldMappingApiInstance.Raw[] | null; - Note?: serializers.crm.FieldMappingApiInstance.Raw[] | null; - Opportunity?: serializers.crm.FieldMappingApiInstance.Raw[] | null; - Stage?: serializers.crm.FieldMappingApiInstance.Raw[] | null; - User?: serializers.crm.FieldMappingApiInstance.Raw[] | null; - Task?: serializers.crm.FieldMappingApiInstance.Raw[] | null; - Engagement?: serializers.crm.FieldMappingApiInstance.Raw[] | null; + Account?: FieldMappingApiInstance.Raw[] | null; + Contact?: FieldMappingApiInstance.Raw[] | null; + Lead?: FieldMappingApiInstance.Raw[] | null; + Note?: FieldMappingApiInstance.Raw[] | null; + Opportunity?: FieldMappingApiInstance.Raw[] | null; + Stage?: FieldMappingApiInstance.Raw[] | null; + User?: FieldMappingApiInstance.Raw[] | null; + Task?: FieldMappingApiInstance.Raw[] | null; + Engagement?: FieldMappingApiInstance.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/FieldMappingApiInstanceTargetField.ts b/src/serialization/resources/crm/types/FieldMappingApiInstanceTargetField.ts index ea8b5b3d5..2b14bd3fb 100644 --- a/src/serialization/resources/crm/types/FieldMappingApiInstanceTargetField.ts +++ b/src/serialization/resources/crm/types/FieldMappingApiInstanceTargetField.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldMappingApiInstanceTargetField: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/FieldMappingInstanceResponse.ts b/src/serialization/resources/crm/types/FieldMappingInstanceResponse.ts index 1aff78afe..9e7120041 100644 --- a/src/serialization/resources/crm/types/FieldMappingInstanceResponse.ts +++ b/src/serialization/resources/crm/types/FieldMappingInstanceResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstance } from "./FieldMappingApiInstance"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const FieldMappingInstanceResponse: core.serialization.ObjectSchema< serializers.crm.FieldMappingInstanceResponse.Raw, Merge.crm.FieldMappingInstanceResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).crm.FieldMappingApiInstance), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.DebugModeLog)) - .optional(), + model: FieldMappingApiInstance, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace FieldMappingInstanceResponse { interface Raw { - model: serializers.crm.FieldMappingApiInstance.Raw; - warnings: serializers.crm.WarningValidationProblem.Raw[]; - errors: serializers.crm.ErrorValidationProblem.Raw[]; - logs?: serializers.crm.DebugModeLog.Raw[] | null; + model: FieldMappingApiInstance.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/FieldPermissionDeserializer.ts b/src/serialization/resources/crm/types/FieldPermissionDeserializer.ts index 706e00166..f1a2f09b9 100644 --- a/src/serialization/resources/crm/types/FieldPermissionDeserializer.ts +++ b/src/serialization/resources/crm/types/FieldPermissionDeserializer.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldPermissionDeserializer: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/FieldPermissionDeserializerRequest.ts b/src/serialization/resources/crm/types/FieldPermissionDeserializerRequest.ts index 71f4d42e5..452abceb1 100644 --- a/src/serialization/resources/crm/types/FieldPermissionDeserializerRequest.ts +++ b/src/serialization/resources/crm/types/FieldPermissionDeserializerRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldPermissionDeserializerRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/FieldTypeEnum.ts b/src/serialization/resources/crm/types/FieldTypeEnum.ts index fcefdac54..f8d952382 100644 --- a/src/serialization/resources/crm/types/FieldTypeEnum.ts +++ b/src/serialization/resources/crm/types/FieldTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldTypeEnum: core.serialization.Schema = diff --git a/src/serialization/resources/crm/types/IgnoreCommonModelRequest.ts b/src/serialization/resources/crm/types/IgnoreCommonModelRequest.ts index 19e460ea0..3485a5c2c 100644 --- a/src/serialization/resources/crm/types/IgnoreCommonModelRequest.ts +++ b/src/serialization/resources/crm/types/IgnoreCommonModelRequest.ts @@ -2,21 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ReasonEnum } from "./ReasonEnum"; export const IgnoreCommonModelRequest: core.serialization.ObjectSchema< serializers.crm.IgnoreCommonModelRequest.Raw, Merge.crm.IgnoreCommonModelRequest > = core.serialization.object({ - reason: core.serialization.lazy(async () => (await import("../../..")).crm.ReasonEnum), + reason: ReasonEnum, message: core.serialization.string().optional(), }); export declare namespace IgnoreCommonModelRequest { interface Raw { - reason: serializers.crm.ReasonEnum.Raw; + reason: ReasonEnum.Raw; message?: string | null; } } diff --git a/src/serialization/resources/crm/types/IndividualCommonModelScopeDeserializer.ts b/src/serialization/resources/crm/types/IndividualCommonModelScopeDeserializer.ts index a2d59ad00..d8af5e028 100644 --- a/src/serialization/resources/crm/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/serialization/resources/crm/types/IndividualCommonModelScopeDeserializer.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ModelPermissionDeserializer } from "./ModelPermissionDeserializer"; +import { FieldPermissionDeserializer } from "./FieldPermissionDeserializer"; export const IndividualCommonModelScopeDeserializer: core.serialization.ObjectSchema< serializers.crm.IndividualCommonModelScopeDeserializer.Raw, @@ -13,23 +15,15 @@ export const IndividualCommonModelScopeDeserializer: core.serialization.ObjectSc modelName: core.serialization.property("model_name", core.serialization.string()), modelPermissions: core.serialization.property( "model_permissions", - core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.ModelPermissionDeserializer) - ) - .optional() - ), - fieldPermissions: core.serialization.property( - "field_permissions", - core.serialization.lazyObject(async () => (await import("../../..")).crm.FieldPermissionDeserializer).optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializer).optional() ), + fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializer.optional()), }); export declare namespace IndividualCommonModelScopeDeserializer { interface Raw { model_name: string; - model_permissions?: Record | null; - field_permissions?: serializers.crm.FieldPermissionDeserializer.Raw | null; + model_permissions?: Record | null; + field_permissions?: FieldPermissionDeserializer.Raw | null; } } diff --git a/src/serialization/resources/crm/types/IndividualCommonModelScopeDeserializerRequest.ts b/src/serialization/resources/crm/types/IndividualCommonModelScopeDeserializerRequest.ts index 42f81007f..1c9606ca9 100644 --- a/src/serialization/resources/crm/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/crm/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ModelPermissionDeserializerRequest } from "./ModelPermissionDeserializerRequest"; +import { FieldPermissionDeserializerRequest } from "./FieldPermissionDeserializerRequest"; export const IndividualCommonModelScopeDeserializerRequest: core.serialization.ObjectSchema< serializers.crm.IndividualCommonModelScopeDeserializerRequest.Raw, @@ -13,27 +15,15 @@ export const IndividualCommonModelScopeDeserializerRequest: core.serialization.O modelName: core.serialization.property("model_name", core.serialization.string()), modelPermissions: core.serialization.property( "model_permissions", - core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject( - async () => (await import("../../..")).crm.ModelPermissionDeserializerRequest - ) - ) - .optional() - ), - fieldPermissions: core.serialization.property( - "field_permissions", - core.serialization - .lazyObject(async () => (await import("../../..")).crm.FieldPermissionDeserializerRequest) - .optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializerRequest).optional() ), + fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializerRequest.optional()), }); export declare namespace IndividualCommonModelScopeDeserializerRequest { interface Raw { model_name: string; - model_permissions?: Record | null; - field_permissions?: serializers.crm.FieldPermissionDeserializerRequest.Raw | null; + model_permissions?: Record | null; + field_permissions?: FieldPermissionDeserializerRequest.Raw | null; } } diff --git a/src/serialization/resources/crm/types/Issue.ts b/src/serialization/resources/crm/types/Issue.ts index f6b3f3e8a..ba2a08b68 100644 --- a/src/serialization/resources/crm/types/Issue.ts +++ b/src/serialization/resources/crm/types/Issue.ts @@ -2,14 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IssueStatus } from "./IssueStatus"; export const Issue: core.serialization.ObjectSchema = core.serialization.object({ id: core.serialization.string().optional(), - status: core.serialization.lazy(async () => (await import("../../..")).crm.IssueStatus).optional(), + status: IssueStatus.optional(), errorDescription: core.serialization.property("error_description", core.serialization.string()), endUser: core.serialization.property( "end_user", @@ -27,7 +28,7 @@ export const Issue: core.serialization.ObjectSchema | null; first_incident_time?: string | null; diff --git a/src/serialization/resources/crm/types/IssueStatus.ts b/src/serialization/resources/crm/types/IssueStatus.ts index cedc1e338..7d2e2bfc2 100644 --- a/src/serialization/resources/crm/types/IssueStatus.ts +++ b/src/serialization/resources/crm/types/IssueStatus.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IssueStatusEnum } from "./IssueStatusEnum"; export const IssueStatus: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.IssueStatusEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([IssueStatusEnum, core.serialization.string()]); export declare namespace IssueStatus { - type Raw = serializers.crm.IssueStatusEnum.Raw | string; + type Raw = IssueStatusEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/IssueStatusEnum.ts b/src/serialization/resources/crm/types/IssueStatusEnum.ts index 9278e90e2..111de161b 100644 --- a/src/serialization/resources/crm/types/IssueStatusEnum.ts +++ b/src/serialization/resources/crm/types/IssueStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const IssueStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/crm/types/ItemFormatEnum.ts b/src/serialization/resources/crm/types/ItemFormatEnum.ts index 1a9cd4cc3..bb433cb5f 100644 --- a/src/serialization/resources/crm/types/ItemFormatEnum.ts +++ b/src/serialization/resources/crm/types/ItemFormatEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ItemFormatEnum: core.serialization.Schema = diff --git a/src/serialization/resources/crm/types/ItemSchema.ts b/src/serialization/resources/crm/types/ItemSchema.ts index 6e0e28436..a0e6d7c7e 100644 --- a/src/serialization/resources/crm/types/ItemSchema.ts +++ b/src/serialization/resources/crm/types/ItemSchema.ts @@ -2,20 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ItemTypeEnum } from "./ItemTypeEnum"; +import { ItemFormatEnum } from "./ItemFormatEnum"; export const ItemSchema: core.serialization.ObjectSchema = core.serialization.object({ - itemType: core.serialization.property( - "item_type", - core.serialization.lazy(async () => (await import("../../..")).crm.ItemTypeEnum).optional() - ), - itemFormat: core.serialization.property( - "item_format", - core.serialization.lazy(async () => (await import("../../..")).crm.ItemFormatEnum).optional() - ), + itemType: core.serialization.property("item_type", ItemTypeEnum.optional()), + itemFormat: core.serialization.property("item_format", ItemFormatEnum.optional()), itemChoices: core.serialization.property( "item_choices", core.serialization.list(core.serialization.string()).optional() @@ -24,8 +20,8 @@ export const ItemSchema: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/crm/types/LanguageEnum.ts b/src/serialization/resources/crm/types/LanguageEnum.ts index 43a67833b..10d48fec8 100644 --- a/src/serialization/resources/crm/types/LanguageEnum.ts +++ b/src/serialization/resources/crm/types/LanguageEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LanguageEnum: core.serialization.Schema = diff --git a/src/serialization/resources/crm/types/Lead.ts b/src/serialization/resources/crm/types/Lead.ts index 81b2df9fc..67961df4a 100644 --- a/src/serialization/resources/crm/types/Lead.ts +++ b/src/serialization/resources/crm/types/Lead.ts @@ -2,9 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { LeadOwner } from "./LeadOwner"; +import { Address } from "./Address"; +import { EmailAddress } from "./EmailAddress"; +import { PhoneNumber } from "./PhoneNumber"; +import { LeadConvertedContact } from "./LeadConvertedContact"; +import { LeadConvertedAccount } from "./LeadConvertedAccount"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const Lead: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,55 +20,30 @@ export const Lead: core.serialization.ObjectSchema (await import("../../..")).crm.LeadOwner).optional(), + owner: LeadOwner.optional(), leadSource: core.serialization.property("lead_source", core.serialization.string().optional()), title: core.serialization.string().optional(), company: core.serialization.string().optional(), firstName: core.serialization.property("first_name", core.serialization.string().optional()), lastName: core.serialization.property("last_name", core.serialization.string().optional()), - addresses: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.Address)) - .optional(), + addresses: core.serialization.list(Address).optional(), emailAddresses: core.serialization.property( "email_addresses", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.EmailAddress)) - .optional() - ), - phoneNumbers: core.serialization.property( - "phone_numbers", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.PhoneNumber)) - .optional() + core.serialization.list(EmailAddress).optional() ), + phoneNumbers: core.serialization.property("phone_numbers", core.serialization.list(PhoneNumber).optional()), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), convertedDate: core.serialization.property("converted_date", core.serialization.date().optional()), - convertedContact: core.serialization.property( - "converted_contact", - core.serialization.lazy(async () => (await import("../../..")).crm.LeadConvertedContact).optional() - ), - convertedAccount: core.serialization.property( - "converted_account", - core.serialization.lazy(async () => (await import("../../..")).crm.LeadConvertedAccount).optional() - ), + convertedContact: core.serialization.property("converted_contact", LeadConvertedContact.optional()), + convertedAccount: core.serialization.property("converted_account", LeadConvertedAccount.optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace Lead { @@ -69,23 +52,23 @@ export declare namespace Lead { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - owner?: serializers.crm.LeadOwner.Raw | null; + owner?: LeadOwner.Raw | null; lead_source?: string | null; title?: string | null; company?: string | null; first_name?: string | null; last_name?: string | null; - addresses?: serializers.crm.Address.Raw[] | null; - email_addresses?: serializers.crm.EmailAddress.Raw[] | null; - phone_numbers?: serializers.crm.PhoneNumber.Raw[] | null; + addresses?: Address.Raw[] | null; + email_addresses?: EmailAddress.Raw[] | null; + phone_numbers?: PhoneNumber.Raw[] | null; remote_updated_at?: string | null; remote_created_at?: string | null; converted_date?: string | null; - converted_contact?: serializers.crm.LeadConvertedContact.Raw | null; - converted_account?: serializers.crm.LeadConvertedAccount.Raw | null; + converted_contact?: LeadConvertedContact.Raw | null; + converted_account?: LeadConvertedAccount.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.crm.RemoteData.Raw[] | null; - remote_fields?: serializers.crm.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/LeadConvertedAccount.ts b/src/serialization/resources/crm/types/LeadConvertedAccount.ts index d2ab000bb..d02ba6d4a 100644 --- a/src/serialization/resources/crm/types/LeadConvertedAccount.ts +++ b/src/serialization/resources/crm/types/LeadConvertedAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const LeadConvertedAccount: core.serialization.Schema< serializers.crm.LeadConvertedAccount.Raw, Merge.crm.LeadConvertedAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace LeadConvertedAccount { - type Raw = string | serializers.crm.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/LeadConvertedContact.ts b/src/serialization/resources/crm/types/LeadConvertedContact.ts index 16fcc3397..f0a80f04a 100644 --- a/src/serialization/resources/crm/types/LeadConvertedContact.ts +++ b/src/serialization/resources/crm/types/LeadConvertedContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const LeadConvertedContact: core.serialization.Schema< serializers.crm.LeadConvertedContact.Raw, Merge.crm.LeadConvertedContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace LeadConvertedContact { - type Raw = string | serializers.crm.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/crm/types/LeadOwner.ts b/src/serialization/resources/crm/types/LeadOwner.ts index a2373dfac..8290d8d38 100644 --- a/src/serialization/resources/crm/types/LeadOwner.ts +++ b/src/serialization/resources/crm/types/LeadOwner.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const LeadOwner: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace LeadOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/LeadRequest.ts b/src/serialization/resources/crm/types/LeadRequest.ts index 6236fd471..c6e3b18e0 100644 --- a/src/serialization/resources/crm/types/LeadRequest.ts +++ b/src/serialization/resources/crm/types/LeadRequest.ts @@ -2,42 +2,37 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { LeadRequestOwner } from "./LeadRequestOwner"; +import { AddressRequest } from "./AddressRequest"; +import { EmailAddressRequest } from "./EmailAddressRequest"; +import { PhoneNumberRequest } from "./PhoneNumberRequest"; +import { LeadRequestConvertedContact } from "./LeadRequestConvertedContact"; +import { LeadRequestConvertedAccount } from "./LeadRequestConvertedAccount"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const LeadRequest: core.serialization.ObjectSchema = core.serialization.object({ - owner: core.serialization.lazy(async () => (await import("../../..")).crm.LeadRequestOwner).optional(), + owner: LeadRequestOwner.optional(), leadSource: core.serialization.property("lead_source", core.serialization.string().optional()), title: core.serialization.string().optional(), company: core.serialization.string().optional(), firstName: core.serialization.property("first_name", core.serialization.string().optional()), lastName: core.serialization.property("last_name", core.serialization.string().optional()), - addresses: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.AddressRequest)) - .optional(), + addresses: core.serialization.list(AddressRequest).optional(), emailAddresses: core.serialization.property( "email_addresses", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.EmailAddressRequest)) - .optional() + core.serialization.list(EmailAddressRequest).optional() ), phoneNumbers: core.serialization.property( "phone_numbers", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.PhoneNumberRequest)) - .optional() + core.serialization.list(PhoneNumberRequest).optional() ), convertedDate: core.serialization.property("converted_date", core.serialization.date().optional()), - convertedContact: core.serialization.property( - "converted_contact", - core.serialization.lazy(async () => (await import("../../..")).crm.LeadRequestConvertedContact).optional() - ), - convertedAccount: core.serialization.property( - "converted_account", - core.serialization.lazy(async () => (await import("../../..")).crm.LeadRequestConvertedAccount).optional() - ), + convertedContact: core.serialization.property("converted_contact", LeadRequestConvertedContact.optional()), + convertedAccount: core.serialization.property("converted_account", LeadRequestConvertedAccount.optional()), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -48,28 +43,26 @@ export const LeadRequest: core.serialization.ObjectSchema (await import("../../..")).crm.RemoteFieldRequest)) - .optional() + core.serialization.list(RemoteFieldRequest).optional() ), }); export declare namespace LeadRequest { interface Raw { - owner?: serializers.crm.LeadRequestOwner.Raw | null; + owner?: LeadRequestOwner.Raw | null; lead_source?: string | null; title?: string | null; company?: string | null; first_name?: string | null; last_name?: string | null; - addresses?: serializers.crm.AddressRequest.Raw[] | null; - email_addresses?: serializers.crm.EmailAddressRequest.Raw[] | null; - phone_numbers?: serializers.crm.PhoneNumberRequest.Raw[] | null; + addresses?: AddressRequest.Raw[] | null; + email_addresses?: EmailAddressRequest.Raw[] | null; + phone_numbers?: PhoneNumberRequest.Raw[] | null; converted_date?: string | null; - converted_contact?: serializers.crm.LeadRequestConvertedContact.Raw | null; - converted_account?: serializers.crm.LeadRequestConvertedAccount.Raw | null; + converted_contact?: LeadRequestConvertedContact.Raw | null; + converted_account?: LeadRequestConvertedAccount.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.crm.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/LeadRequestConvertedAccount.ts b/src/serialization/resources/crm/types/LeadRequestConvertedAccount.ts index 39b9ef396..5d4ee0299 100644 --- a/src/serialization/resources/crm/types/LeadRequestConvertedAccount.ts +++ b/src/serialization/resources/crm/types/LeadRequestConvertedAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const LeadRequestConvertedAccount: core.serialization.Schema< serializers.crm.LeadRequestConvertedAccount.Raw, Merge.crm.LeadRequestConvertedAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace LeadRequestConvertedAccount { - type Raw = string | serializers.crm.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/LeadRequestConvertedContact.ts b/src/serialization/resources/crm/types/LeadRequestConvertedContact.ts index cab75d8d3..459cf42d8 100644 --- a/src/serialization/resources/crm/types/LeadRequestConvertedContact.ts +++ b/src/serialization/resources/crm/types/LeadRequestConvertedContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const LeadRequestConvertedContact: core.serialization.Schema< serializers.crm.LeadRequestConvertedContact.Raw, Merge.crm.LeadRequestConvertedContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace LeadRequestConvertedContact { - type Raw = string | serializers.crm.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/crm/types/LeadRequestOwner.ts b/src/serialization/resources/crm/types/LeadRequestOwner.ts index 33643476c..2da66431c 100644 --- a/src/serialization/resources/crm/types/LeadRequestOwner.ts +++ b/src/serialization/resources/crm/types/LeadRequestOwner.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const LeadRequestOwner: core.serialization.Schema< serializers.crm.LeadRequestOwner.Raw, Merge.crm.LeadRequestOwner -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace LeadRequestOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/LeadResponse.ts b/src/serialization/resources/crm/types/LeadResponse.ts index 26f43e46a..b0743bb0d 100644 --- a/src/serialization/resources/crm/types/LeadResponse.ts +++ b/src/serialization/resources/crm/types/LeadResponse.ts @@ -2,29 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Lead } from "./Lead"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const LeadResponse: core.serialization.ObjectSchema = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).crm.Lead), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.DebugModeLog)) - .optional(), + model: Lead, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace LeadResponse { interface Raw { - model: serializers.crm.Lead.Raw; - warnings: serializers.crm.WarningValidationProblem.Raw[]; - errors: serializers.crm.ErrorValidationProblem.Raw[]; - logs?: serializers.crm.DebugModeLog.Raw[] | null; + model: Lead.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/LinkToken.ts b/src/serialization/resources/crm/types/LinkToken.ts index be7e9618a..aebf7c15e 100644 --- a/src/serialization/resources/crm/types/LinkToken.ts +++ b/src/serialization/resources/crm/types/LinkToken.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LinkToken: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/crm/types/LinkedAccountStatus.ts b/src/serialization/resources/crm/types/LinkedAccountStatus.ts index 4ffeb8259..84f40fe8f 100644 --- a/src/serialization/resources/crm/types/LinkedAccountStatus.ts +++ b/src/serialization/resources/crm/types/LinkedAccountStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LinkedAccountStatus: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/MetaResponse.ts b/src/serialization/resources/crm/types/MetaResponse.ts index a41a5eecf..0d883f5b7 100644 --- a/src/serialization/resources/crm/types/MetaResponse.ts +++ b/src/serialization/resources/crm/types/MetaResponse.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { LinkedAccountStatus } from "./LinkedAccountStatus"; export const MetaResponse: core.serialization.ObjectSchema = core.serialization.object({ @@ -16,9 +17,7 @@ export const MetaResponse: core.serialization.ObjectSchema (await import("../../..")).crm.LinkedAccountStatus) - .optional(), + status: LinkedAccountStatus.optional(), hasConditionalParams: core.serialization.property("has_conditional_params", core.serialization.boolean()), hasRequiredLinkedAccountParams: core.serialization.property( "has_required_linked_account_params", @@ -30,7 +29,7 @@ export declare namespace MetaResponse { interface Raw { request_schema: Record; remote_field_classes?: Record | null; - status?: serializers.crm.LinkedAccountStatus.Raw | null; + status?: LinkedAccountStatus.Raw | null; has_conditional_params: boolean; has_required_linked_account_params: boolean; } diff --git a/src/serialization/resources/crm/types/MethodEnum.ts b/src/serialization/resources/crm/types/MethodEnum.ts index 9df191a33..6b1621588 100644 --- a/src/serialization/resources/crm/types/MethodEnum.ts +++ b/src/serialization/resources/crm/types/MethodEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const MethodEnum: core.serialization.Schema = diff --git a/src/serialization/resources/crm/types/ModelOperation.ts b/src/serialization/resources/crm/types/ModelOperation.ts index e9320d384..6a722760c 100644 --- a/src/serialization/resources/crm/types/ModelOperation.ts +++ b/src/serialization/resources/crm/types/ModelOperation.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelOperation: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/ModelPermissionDeserializer.ts b/src/serialization/resources/crm/types/ModelPermissionDeserializer.ts index 24a3216aa..3e991b417 100644 --- a/src/serialization/resources/crm/types/ModelPermissionDeserializer.ts +++ b/src/serialization/resources/crm/types/ModelPermissionDeserializer.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelPermissionDeserializer: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/ModelPermissionDeserializerRequest.ts b/src/serialization/resources/crm/types/ModelPermissionDeserializerRequest.ts index ff324af28..3407353d9 100644 --- a/src/serialization/resources/crm/types/ModelPermissionDeserializerRequest.ts +++ b/src/serialization/resources/crm/types/ModelPermissionDeserializerRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelPermissionDeserializerRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/MultipartFormFieldRequest.ts b/src/serialization/resources/crm/types/MultipartFormFieldRequest.ts index 2b0d7b764..9187486b1 100644 --- a/src/serialization/resources/crm/types/MultipartFormFieldRequest.ts +++ b/src/serialization/resources/crm/types/MultipartFormFieldRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { MultipartFormFieldRequestEncoding } from "./MultipartFormFieldRequestEncoding"; export const MultipartFormFieldRequest: core.serialization.ObjectSchema< serializers.crm.MultipartFormFieldRequest.Raw, @@ -12,9 +13,7 @@ export const MultipartFormFieldRequest: core.serialization.ObjectSchema< > = core.serialization.object({ name: core.serialization.string(), data: core.serialization.string(), - encoding: core.serialization - .lazy(async () => (await import("../../..")).crm.MultipartFormFieldRequestEncoding) - .optional(), + encoding: MultipartFormFieldRequestEncoding.optional(), fileName: core.serialization.property("file_name", core.serialization.string().optional()), contentType: core.serialization.property("content_type", core.serialization.string().optional()), }); @@ -23,7 +22,7 @@ export declare namespace MultipartFormFieldRequest { interface Raw { name: string; data: string; - encoding?: serializers.crm.MultipartFormFieldRequestEncoding.Raw | null; + encoding?: MultipartFormFieldRequestEncoding.Raw | null; file_name?: string | null; content_type?: string | null; } diff --git a/src/serialization/resources/crm/types/MultipartFormFieldRequestEncoding.ts b/src/serialization/resources/crm/types/MultipartFormFieldRequestEncoding.ts index 3267bc7fe..a12ecf115 100644 --- a/src/serialization/resources/crm/types/MultipartFormFieldRequestEncoding.ts +++ b/src/serialization/resources/crm/types/MultipartFormFieldRequestEncoding.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EncodingEnum } from "./EncodingEnum"; export const MultipartFormFieldRequestEncoding: core.serialization.Schema< serializers.crm.MultipartFormFieldRequestEncoding.Raw, Merge.crm.MultipartFormFieldRequestEncoding -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.EncodingEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EncodingEnum, core.serialization.string()]); export declare namespace MultipartFormFieldRequestEncoding { - type Raw = serializers.crm.EncodingEnum.Raw | string; + type Raw = EncodingEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/Note.ts b/src/serialization/resources/crm/types/Note.ts index 5de2a177f..0eb0d0024 100644 --- a/src/serialization/resources/crm/types/Note.ts +++ b/src/serialization/resources/crm/types/Note.ts @@ -2,9 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { NoteOwner } from "./NoteOwner"; +import { NoteContact } from "./NoteContact"; +import { NoteAccount } from "./NoteAccount"; +import { NoteOpportunity } from "./NoteOpportunity"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const Note: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,11 +18,11 @@ export const Note: core.serialization.ObjectSchema (await import("../../..")).crm.NoteOwner).optional(), + owner: NoteOwner.optional(), content: core.serialization.string().optional(), - contact: core.serialization.lazy(async () => (await import("../../..")).crm.NoteContact).optional(), - account: core.serialization.lazy(async () => (await import("../../..")).crm.NoteAccount).optional(), - opportunity: core.serialization.lazy(async () => (await import("../../..")).crm.NoteOpportunity).optional(), + contact: NoteContact.optional(), + account: NoteAccount.optional(), + opportunity: NoteOpportunity.optional(), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), @@ -24,18 +30,8 @@ export const Note: core.serialization.ObjectSchema (await import("../../..")).crm.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace Note { @@ -44,16 +40,16 @@ export declare namespace Note { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - owner?: serializers.crm.NoteOwner.Raw | null; + owner?: NoteOwner.Raw | null; content?: string | null; - contact?: serializers.crm.NoteContact.Raw | null; - account?: serializers.crm.NoteAccount.Raw | null; - opportunity?: serializers.crm.NoteOpportunity.Raw | null; + contact?: NoteContact.Raw | null; + account?: NoteAccount.Raw | null; + opportunity?: NoteOpportunity.Raw | null; remote_updated_at?: string | null; remote_created_at?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.crm.RemoteData.Raw[] | null; - remote_fields?: serializers.crm.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/NoteAccount.ts b/src/serialization/resources/crm/types/NoteAccount.ts index 3834c8775..3f5f3aa55 100644 --- a/src/serialization/resources/crm/types/NoteAccount.ts +++ b/src/serialization/resources/crm/types/NoteAccount.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const NoteAccount: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Account), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace NoteAccount { - type Raw = string | serializers.crm.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/NoteContact.ts b/src/serialization/resources/crm/types/NoteContact.ts index 42cefc755..3d1a1f985 100644 --- a/src/serialization/resources/crm/types/NoteContact.ts +++ b/src/serialization/resources/crm/types/NoteContact.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const NoteContact: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Contact), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace NoteContact { - type Raw = string | serializers.crm.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/crm/types/NoteOpportunity.ts b/src/serialization/resources/crm/types/NoteOpportunity.ts index becbd36c6..a29aeaf75 100644 --- a/src/serialization/resources/crm/types/NoteOpportunity.ts +++ b/src/serialization/resources/crm/types/NoteOpportunity.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Opportunity } from "./Opportunity"; export const NoteOpportunity: core.serialization.Schema< serializers.crm.NoteOpportunity.Raw, Merge.crm.NoteOpportunity -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Opportunity), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Opportunity]); export declare namespace NoteOpportunity { - type Raw = string | serializers.crm.Opportunity.Raw; + type Raw = string | Opportunity.Raw; } diff --git a/src/serialization/resources/crm/types/NoteOwner.ts b/src/serialization/resources/crm/types/NoteOwner.ts index 3787c83f4..4c7b01a0b 100644 --- a/src/serialization/resources/crm/types/NoteOwner.ts +++ b/src/serialization/resources/crm/types/NoteOwner.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const NoteOwner: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace NoteOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/NoteRequest.ts b/src/serialization/resources/crm/types/NoteRequest.ts index 5fe5206ee..8512b0cf1 100644 --- a/src/serialization/resources/crm/types/NoteRequest.ts +++ b/src/serialization/resources/crm/types/NoteRequest.ts @@ -2,19 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { NoteRequestOwner } from "./NoteRequestOwner"; +import { NoteRequestContact } from "./NoteRequestContact"; +import { NoteRequestAccount } from "./NoteRequestAccount"; +import { NoteRequestOpportunity } from "./NoteRequestOpportunity"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const NoteRequest: core.serialization.ObjectSchema = core.serialization.object({ - owner: core.serialization.lazy(async () => (await import("../../..")).crm.NoteRequestOwner).optional(), + owner: NoteRequestOwner.optional(), content: core.serialization.string().optional(), - contact: core.serialization.lazy(async () => (await import("../../..")).crm.NoteRequestContact).optional(), - account: core.serialization.lazy(async () => (await import("../../..")).crm.NoteRequestAccount).optional(), - opportunity: core.serialization - .lazy(async () => (await import("../../..")).crm.NoteRequestOpportunity) - .optional(), + contact: NoteRequestContact.optional(), + account: NoteRequestAccount.optional(), + opportunity: NoteRequestOpportunity.optional(), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -25,21 +28,19 @@ export const NoteRequest: core.serialization.ObjectSchema (await import("../../..")).crm.RemoteFieldRequest)) - .optional() + core.serialization.list(RemoteFieldRequest).optional() ), }); export declare namespace NoteRequest { interface Raw { - owner?: serializers.crm.NoteRequestOwner.Raw | null; + owner?: NoteRequestOwner.Raw | null; content?: string | null; - contact?: serializers.crm.NoteRequestContact.Raw | null; - account?: serializers.crm.NoteRequestAccount.Raw | null; - opportunity?: serializers.crm.NoteRequestOpportunity.Raw | null; + contact?: NoteRequestContact.Raw | null; + account?: NoteRequestAccount.Raw | null; + opportunity?: NoteRequestOpportunity.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.crm.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/NoteRequestAccount.ts b/src/serialization/resources/crm/types/NoteRequestAccount.ts index 8b338ae13..8609f2798 100644 --- a/src/serialization/resources/crm/types/NoteRequestAccount.ts +++ b/src/serialization/resources/crm/types/NoteRequestAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const NoteRequestAccount: core.serialization.Schema< serializers.crm.NoteRequestAccount.Raw, Merge.crm.NoteRequestAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace NoteRequestAccount { - type Raw = string | serializers.crm.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/NoteRequestContact.ts b/src/serialization/resources/crm/types/NoteRequestContact.ts index df0b0e1bf..e8a1a3e6e 100644 --- a/src/serialization/resources/crm/types/NoteRequestContact.ts +++ b/src/serialization/resources/crm/types/NoteRequestContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const NoteRequestContact: core.serialization.Schema< serializers.crm.NoteRequestContact.Raw, Merge.crm.NoteRequestContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace NoteRequestContact { - type Raw = string | serializers.crm.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/crm/types/NoteRequestOpportunity.ts b/src/serialization/resources/crm/types/NoteRequestOpportunity.ts index a462a41a2..b020d4ce5 100644 --- a/src/serialization/resources/crm/types/NoteRequestOpportunity.ts +++ b/src/serialization/resources/crm/types/NoteRequestOpportunity.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Opportunity } from "./Opportunity"; export const NoteRequestOpportunity: core.serialization.Schema< serializers.crm.NoteRequestOpportunity.Raw, Merge.crm.NoteRequestOpportunity -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Opportunity), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Opportunity]); export declare namespace NoteRequestOpportunity { - type Raw = string | serializers.crm.Opportunity.Raw; + type Raw = string | Opportunity.Raw; } diff --git a/src/serialization/resources/crm/types/NoteRequestOwner.ts b/src/serialization/resources/crm/types/NoteRequestOwner.ts index 7a63b7926..b654e27e9 100644 --- a/src/serialization/resources/crm/types/NoteRequestOwner.ts +++ b/src/serialization/resources/crm/types/NoteRequestOwner.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const NoteRequestOwner: core.serialization.Schema< serializers.crm.NoteRequestOwner.Raw, Merge.crm.NoteRequestOwner -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace NoteRequestOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/NoteResponse.ts b/src/serialization/resources/crm/types/NoteResponse.ts index 6eb8a8450..d37060d13 100644 --- a/src/serialization/resources/crm/types/NoteResponse.ts +++ b/src/serialization/resources/crm/types/NoteResponse.ts @@ -2,29 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Note } from "./Note"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const NoteResponse: core.serialization.ObjectSchema = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).crm.Note), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.DebugModeLog)) - .optional(), + model: Note, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace NoteResponse { interface Raw { - model: serializers.crm.Note.Raw; - warnings: serializers.crm.WarningValidationProblem.Raw[]; - errors: serializers.crm.ErrorValidationProblem.Raw[]; - logs?: serializers.crm.DebugModeLog.Raw[] | null; + model: Note.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/ObjectClassDescriptionRequest.ts b/src/serialization/resources/crm/types/ObjectClassDescriptionRequest.ts index 9b49bac47..7d70fa864 100644 --- a/src/serialization/resources/crm/types/ObjectClassDescriptionRequest.ts +++ b/src/serialization/resources/crm/types/ObjectClassDescriptionRequest.ts @@ -2,24 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { OriginTypeEnum } from "./OriginTypeEnum"; export const ObjectClassDescriptionRequest: core.serialization.ObjectSchema< serializers.crm.ObjectClassDescriptionRequest.Raw, Merge.crm.ObjectClassDescriptionRequest > = core.serialization.object({ id: core.serialization.string(), - originType: core.serialization.property( - "origin_type", - core.serialization.lazy(async () => (await import("../../..")).crm.OriginTypeEnum) - ), + originType: core.serialization.property("origin_type", OriginTypeEnum), }); export declare namespace ObjectClassDescriptionRequest { interface Raw { id: string; - origin_type: serializers.crm.OriginTypeEnum.Raw; + origin_type: OriginTypeEnum.Raw; } } diff --git a/src/serialization/resources/crm/types/Opportunity.ts b/src/serialization/resources/crm/types/Opportunity.ts index 755a0443d..3a608d58b 100644 --- a/src/serialization/resources/crm/types/Opportunity.ts +++ b/src/serialization/resources/crm/types/Opportunity.ts @@ -2,9 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { OpportunityOwner } from "./OpportunityOwner"; +import { OpportunityAccount } from "./OpportunityAccount"; +import { OpportunityStage } from "./OpportunityStage"; +import { OpportunityStatus } from "./OpportunityStatus"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const Opportunity: core.serialization.ObjectSchema = core.serialization.object({ @@ -15,10 +21,10 @@ export const Opportunity: core.serialization.ObjectSchema (await import("../../..")).crm.OpportunityOwner).optional(), - account: core.serialization.lazy(async () => (await import("../../..")).crm.OpportunityAccount).optional(), - stage: core.serialization.lazy(async () => (await import("../../..")).crm.OpportunityStage).optional(), - status: core.serialization.lazy(async () => (await import("../../..")).crm.OpportunityStatus).optional(), + owner: OpportunityOwner.optional(), + account: OpportunityAccount.optional(), + stage: OpportunityStage.optional(), + status: OpportunityStatus.optional(), lastActivityAt: core.serialization.property("last_activity_at", core.serialization.date().optional()), closeDate: core.serialization.property("close_date", core.serialization.date().optional()), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), @@ -27,18 +33,8 @@ export const Opportunity: core.serialization.ObjectSchema (await import("../../..")).crm.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace Opportunity { @@ -50,16 +46,16 @@ export declare namespace Opportunity { name?: string | null; description?: string | null; amount?: number | null; - owner?: serializers.crm.OpportunityOwner.Raw | null; - account?: serializers.crm.OpportunityAccount.Raw | null; - stage?: serializers.crm.OpportunityStage.Raw | null; - status?: serializers.crm.OpportunityStatus.Raw | null; + owner?: OpportunityOwner.Raw | null; + account?: OpportunityAccount.Raw | null; + stage?: OpportunityStage.Raw | null; + status?: OpportunityStatus.Raw | null; last_activity_at?: string | null; close_date?: string | null; remote_created_at?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.crm.RemoteData.Raw[] | null; - remote_fields?: serializers.crm.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/OpportunityAccount.ts b/src/serialization/resources/crm/types/OpportunityAccount.ts index f736a1c75..5eba82a7f 100644 --- a/src/serialization/resources/crm/types/OpportunityAccount.ts +++ b/src/serialization/resources/crm/types/OpportunityAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const OpportunityAccount: core.serialization.Schema< serializers.crm.OpportunityAccount.Raw, Merge.crm.OpportunityAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace OpportunityAccount { - type Raw = string | serializers.crm.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/OpportunityOwner.ts b/src/serialization/resources/crm/types/OpportunityOwner.ts index 82ce2792e..40def5c2c 100644 --- a/src/serialization/resources/crm/types/OpportunityOwner.ts +++ b/src/serialization/resources/crm/types/OpportunityOwner.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const OpportunityOwner: core.serialization.Schema< serializers.crm.OpportunityOwner.Raw, Merge.crm.OpportunityOwner -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace OpportunityOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/OpportunityRequest.ts b/src/serialization/resources/crm/types/OpportunityRequest.ts index afada3add..36e8b3cdf 100644 --- a/src/serialization/resources/crm/types/OpportunityRequest.ts +++ b/src/serialization/resources/crm/types/OpportunityRequest.ts @@ -2,9 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { OpportunityRequestOwner } from "./OpportunityRequestOwner"; +import { OpportunityRequestAccount } from "./OpportunityRequestAccount"; +import { OpportunityRequestStage } from "./OpportunityRequestStage"; +import { OpportunityRequestStatus } from "./OpportunityRequestStatus"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const OpportunityRequest: core.serialization.ObjectSchema< serializers.crm.OpportunityRequest.Raw, @@ -13,10 +18,10 @@ export const OpportunityRequest: core.serialization.ObjectSchema< name: core.serialization.string().optional(), description: core.serialization.string().optional(), amount: core.serialization.number().optional(), - owner: core.serialization.lazy(async () => (await import("../../..")).crm.OpportunityRequestOwner).optional(), - account: core.serialization.lazy(async () => (await import("../../..")).crm.OpportunityRequestAccount).optional(), - stage: core.serialization.lazy(async () => (await import("../../..")).crm.OpportunityRequestStage).optional(), - status: core.serialization.lazy(async () => (await import("../../..")).crm.OpportunityRequestStatus).optional(), + owner: OpportunityRequestOwner.optional(), + account: OpportunityRequestAccount.optional(), + stage: OpportunityRequestStage.optional(), + status: OpportunityRequestStatus.optional(), lastActivityAt: core.serialization.property("last_activity_at", core.serialization.date().optional()), closeDate: core.serialization.property("close_date", core.serialization.date().optional()), integrationParams: core.serialization.property( @@ -27,12 +32,7 @@ export const OpportunityRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace OpportunityRequest { @@ -40,14 +40,14 @@ export declare namespace OpportunityRequest { name?: string | null; description?: string | null; amount?: number | null; - owner?: serializers.crm.OpportunityRequestOwner.Raw | null; - account?: serializers.crm.OpportunityRequestAccount.Raw | null; - stage?: serializers.crm.OpportunityRequestStage.Raw | null; - status?: serializers.crm.OpportunityRequestStatus.Raw | null; + owner?: OpportunityRequestOwner.Raw | null; + account?: OpportunityRequestAccount.Raw | null; + stage?: OpportunityRequestStage.Raw | null; + status?: OpportunityRequestStatus.Raw | null; last_activity_at?: string | null; close_date?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.crm.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/OpportunityRequestAccount.ts b/src/serialization/resources/crm/types/OpportunityRequestAccount.ts index 78974e9c5..59a356225 100644 --- a/src/serialization/resources/crm/types/OpportunityRequestAccount.ts +++ b/src/serialization/resources/crm/types/OpportunityRequestAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const OpportunityRequestAccount: core.serialization.Schema< serializers.crm.OpportunityRequestAccount.Raw, Merge.crm.OpportunityRequestAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace OpportunityRequestAccount { - type Raw = string | serializers.crm.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/OpportunityRequestOwner.ts b/src/serialization/resources/crm/types/OpportunityRequestOwner.ts index eb7101789..67cff97c8 100644 --- a/src/serialization/resources/crm/types/OpportunityRequestOwner.ts +++ b/src/serialization/resources/crm/types/OpportunityRequestOwner.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const OpportunityRequestOwner: core.serialization.Schema< serializers.crm.OpportunityRequestOwner.Raw, Merge.crm.OpportunityRequestOwner -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace OpportunityRequestOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/OpportunityRequestStage.ts b/src/serialization/resources/crm/types/OpportunityRequestStage.ts index d92f4323f..caa0997d4 100644 --- a/src/serialization/resources/crm/types/OpportunityRequestStage.ts +++ b/src/serialization/resources/crm/types/OpportunityRequestStage.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Stage } from "./Stage"; export const OpportunityRequestStage: core.serialization.Schema< serializers.crm.OpportunityRequestStage.Raw, Merge.crm.OpportunityRequestStage -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Stage), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Stage]); export declare namespace OpportunityRequestStage { - type Raw = string | serializers.crm.Stage.Raw; + type Raw = string | Stage.Raw; } diff --git a/src/serialization/resources/crm/types/OpportunityRequestStatus.ts b/src/serialization/resources/crm/types/OpportunityRequestStatus.ts index b44011172..92a81a5ed 100644 --- a/src/serialization/resources/crm/types/OpportunityRequestStatus.ts +++ b/src/serialization/resources/crm/types/OpportunityRequestStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { OpportunityStatusEnum } from "./OpportunityStatusEnum"; export const OpportunityRequestStatus: core.serialization.Schema< serializers.crm.OpportunityRequestStatus.Raw, Merge.crm.OpportunityRequestStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.OpportunityStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([OpportunityStatusEnum, core.serialization.string()]); export declare namespace OpportunityRequestStatus { - type Raw = serializers.crm.OpportunityStatusEnum.Raw | string; + type Raw = OpportunityStatusEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/OpportunityResponse.ts b/src/serialization/resources/crm/types/OpportunityResponse.ts index a25696b1b..9a15b24cb 100644 --- a/src/serialization/resources/crm/types/OpportunityResponse.ts +++ b/src/serialization/resources/crm/types/OpportunityResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Opportunity } from "./Opportunity"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const OpportunityResponse: core.serialization.ObjectSchema< serializers.crm.OpportunityResponse.Raw, Merge.crm.OpportunityResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).crm.Opportunity), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.DebugModeLog)) - .optional(), + model: Opportunity, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace OpportunityResponse { interface Raw { - model: serializers.crm.Opportunity.Raw; - warnings: serializers.crm.WarningValidationProblem.Raw[]; - errors: serializers.crm.ErrorValidationProblem.Raw[]; - logs?: serializers.crm.DebugModeLog.Raw[] | null; + model: Opportunity.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/OpportunityStage.ts b/src/serialization/resources/crm/types/OpportunityStage.ts index 697a4e23c..8e9d67eeb 100644 --- a/src/serialization/resources/crm/types/OpportunityStage.ts +++ b/src/serialization/resources/crm/types/OpportunityStage.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Stage } from "./Stage"; export const OpportunityStage: core.serialization.Schema< serializers.crm.OpportunityStage.Raw, Merge.crm.OpportunityStage -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Stage), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Stage]); export declare namespace OpportunityStage { - type Raw = string | serializers.crm.Stage.Raw; + type Raw = string | Stage.Raw; } diff --git a/src/serialization/resources/crm/types/OpportunityStatus.ts b/src/serialization/resources/crm/types/OpportunityStatus.ts index c287c77c9..af884a0d1 100644 --- a/src/serialization/resources/crm/types/OpportunityStatus.ts +++ b/src/serialization/resources/crm/types/OpportunityStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { OpportunityStatusEnum } from "./OpportunityStatusEnum"; export const OpportunityStatus: core.serialization.Schema< serializers.crm.OpportunityStatus.Raw, Merge.crm.OpportunityStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.OpportunityStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([OpportunityStatusEnum, core.serialization.string()]); export declare namespace OpportunityStatus { - type Raw = serializers.crm.OpportunityStatusEnum.Raw | string; + type Raw = OpportunityStatusEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/OpportunityStatusEnum.ts b/src/serialization/resources/crm/types/OpportunityStatusEnum.ts index b459965c1..058b9496f 100644 --- a/src/serialization/resources/crm/types/OpportunityStatusEnum.ts +++ b/src/serialization/resources/crm/types/OpportunityStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const OpportunityStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/crm/types/OriginTypeEnum.ts b/src/serialization/resources/crm/types/OriginTypeEnum.ts index 5b12d655b..269413389 100644 --- a/src/serialization/resources/crm/types/OriginTypeEnum.ts +++ b/src/serialization/resources/crm/types/OriginTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const OriginTypeEnum: core.serialization.Schema = diff --git a/src/serialization/resources/crm/types/PaginatedAccountDetailsAndActionsList.ts b/src/serialization/resources/crm/types/PaginatedAccountDetailsAndActionsList.ts index ff625752c..35bbaabc5 100644 --- a/src/serialization/resources/crm/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/serialization/resources/crm/types/PaginatedAccountDetailsAndActionsList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountDetailsAndActions } from "./AccountDetailsAndActions"; export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSchema< serializers.crm.PaginatedAccountDetailsAndActionsList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSch > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.AccountDetailsAndActions)) - .optional(), + results: core.serialization.list(AccountDetailsAndActions).optional(), }); export declare namespace PaginatedAccountDetailsAndActionsList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.AccountDetailsAndActions.Raw[] | null; + results?: AccountDetailsAndActions.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedAccountList.ts b/src/serialization/resources/crm/types/PaginatedAccountList.ts index ebfa2b2ff..4396e49a2 100644 --- a/src/serialization/resources/crm/types/PaginatedAccountList.ts +++ b/src/serialization/resources/crm/types/PaginatedAccountList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const PaginatedAccountList: core.serialization.ObjectSchema< serializers.crm.PaginatedAccountList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAccountList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.Account)) - .optional(), + results: core.serialization.list(Account).optional(), }); export declare namespace PaginatedAccountList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.Account.Raw[] | null; + results?: Account.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedAssociationList.ts b/src/serialization/resources/crm/types/PaginatedAssociationList.ts index db14b4355..bf69a3346 100644 --- a/src/serialization/resources/crm/types/PaginatedAssociationList.ts +++ b/src/serialization/resources/crm/types/PaginatedAssociationList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Association } from "./Association"; export const PaginatedAssociationList: core.serialization.ObjectSchema< serializers.crm.PaginatedAssociationList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAssociationList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.Association)) - .optional(), + results: core.serialization.list(Association).optional(), }); export declare namespace PaginatedAssociationList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.Association.Raw[] | null; + results?: Association.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedAssociationTypeList.ts b/src/serialization/resources/crm/types/PaginatedAssociationTypeList.ts index 5df99c4f5..6c1d68c73 100644 --- a/src/serialization/resources/crm/types/PaginatedAssociationTypeList.ts +++ b/src/serialization/resources/crm/types/PaginatedAssociationTypeList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AssociationType } from "./AssociationType"; export const PaginatedAssociationTypeList: core.serialization.ObjectSchema< serializers.crm.PaginatedAssociationTypeList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAssociationTypeList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.AssociationType)) - .optional(), + results: core.serialization.list(AssociationType).optional(), }); export declare namespace PaginatedAssociationTypeList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.AssociationType.Raw[] | null; + results?: AssociationType.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedAuditLogEventList.ts b/src/serialization/resources/crm/types/PaginatedAuditLogEventList.ts index 2005a7dce..246afd128 100644 --- a/src/serialization/resources/crm/types/PaginatedAuditLogEventList.ts +++ b/src/serialization/resources/crm/types/PaginatedAuditLogEventList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AuditLogEvent } from "./AuditLogEvent"; export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< serializers.crm.PaginatedAuditLogEventList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.AuditLogEvent)) - .optional(), + results: core.serialization.list(AuditLogEvent).optional(), }); export declare namespace PaginatedAuditLogEventList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.AuditLogEvent.Raw[] | null; + results?: AuditLogEvent.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedContactList.ts b/src/serialization/resources/crm/types/PaginatedContactList.ts index 5c8948a6a..07f2ec736 100644 --- a/src/serialization/resources/crm/types/PaginatedContactList.ts +++ b/src/serialization/resources/crm/types/PaginatedContactList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const PaginatedContactList: core.serialization.ObjectSchema< serializers.crm.PaginatedContactList.Raw, @@ -12,15 +13,13 @@ export const PaginatedContactList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.Contact)) - .optional(), + results: core.serialization.list(Contact).optional(), }); export declare namespace PaginatedContactList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.Contact.Raw[] | null; + results?: Contact.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedCustomObjectClassList.ts b/src/serialization/resources/crm/types/PaginatedCustomObjectClassList.ts index d421336d7..16220af06 100644 --- a/src/serialization/resources/crm/types/PaginatedCustomObjectClassList.ts +++ b/src/serialization/resources/crm/types/PaginatedCustomObjectClassList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CustomObjectClass } from "./CustomObjectClass"; export const PaginatedCustomObjectClassList: core.serialization.ObjectSchema< serializers.crm.PaginatedCustomObjectClassList.Raw, @@ -12,15 +13,13 @@ export const PaginatedCustomObjectClassList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.CustomObjectClass)) - .optional(), + results: core.serialization.list(CustomObjectClass).optional(), }); export declare namespace PaginatedCustomObjectClassList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.CustomObjectClass.Raw[] | null; + results?: CustomObjectClass.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedCustomObjectList.ts b/src/serialization/resources/crm/types/PaginatedCustomObjectList.ts index dc988bfbd..220952fbf 100644 --- a/src/serialization/resources/crm/types/PaginatedCustomObjectList.ts +++ b/src/serialization/resources/crm/types/PaginatedCustomObjectList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CustomObject } from "./CustomObject"; export const PaginatedCustomObjectList: core.serialization.ObjectSchema< serializers.crm.PaginatedCustomObjectList.Raw, @@ -12,15 +13,13 @@ export const PaginatedCustomObjectList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.CustomObject)) - .optional(), + results: core.serialization.list(CustomObject).optional(), }); export declare namespace PaginatedCustomObjectList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.CustomObject.Raw[] | null; + results?: CustomObject.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedEngagementList.ts b/src/serialization/resources/crm/types/PaginatedEngagementList.ts index 8b932c603..a451513eb 100644 --- a/src/serialization/resources/crm/types/PaginatedEngagementList.ts +++ b/src/serialization/resources/crm/types/PaginatedEngagementList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Engagement } from "./Engagement"; export const PaginatedEngagementList: core.serialization.ObjectSchema< serializers.crm.PaginatedEngagementList.Raw, @@ -12,15 +13,13 @@ export const PaginatedEngagementList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.Engagement)) - .optional(), + results: core.serialization.list(Engagement).optional(), }); export declare namespace PaginatedEngagementList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.Engagement.Raw[] | null; + results?: Engagement.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedEngagementTypeList.ts b/src/serialization/resources/crm/types/PaginatedEngagementTypeList.ts index 6dc53fd40..146571888 100644 --- a/src/serialization/resources/crm/types/PaginatedEngagementTypeList.ts +++ b/src/serialization/resources/crm/types/PaginatedEngagementTypeList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EngagementType } from "./EngagementType"; export const PaginatedEngagementTypeList: core.serialization.ObjectSchema< serializers.crm.PaginatedEngagementTypeList.Raw, @@ -12,15 +13,13 @@ export const PaginatedEngagementTypeList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.EngagementType)) - .optional(), + results: core.serialization.list(EngagementType).optional(), }); export declare namespace PaginatedEngagementTypeList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.EngagementType.Raw[] | null; + results?: EngagementType.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedIssueList.ts b/src/serialization/resources/crm/types/PaginatedIssueList.ts index 4b238b6c6..d5c3b9c17 100644 --- a/src/serialization/resources/crm/types/PaginatedIssueList.ts +++ b/src/serialization/resources/crm/types/PaginatedIssueList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Issue } from "./Issue"; export const PaginatedIssueList: core.serialization.ObjectSchema< serializers.crm.PaginatedIssueList.Raw, @@ -12,15 +13,13 @@ export const PaginatedIssueList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.Issue)) - .optional(), + results: core.serialization.list(Issue).optional(), }); export declare namespace PaginatedIssueList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.Issue.Raw[] | null; + results?: Issue.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedLeadList.ts b/src/serialization/resources/crm/types/PaginatedLeadList.ts index 459cca08d..5e5a6c2d8 100644 --- a/src/serialization/resources/crm/types/PaginatedLeadList.ts +++ b/src/serialization/resources/crm/types/PaginatedLeadList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Lead } from "./Lead"; export const PaginatedLeadList: core.serialization.ObjectSchema< serializers.crm.PaginatedLeadList.Raw, @@ -12,15 +13,13 @@ export const PaginatedLeadList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.Lead)) - .optional(), + results: core.serialization.list(Lead).optional(), }); export declare namespace PaginatedLeadList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.Lead.Raw[] | null; + results?: Lead.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedNoteList.ts b/src/serialization/resources/crm/types/PaginatedNoteList.ts index f36fa3d76..99b5b3df2 100644 --- a/src/serialization/resources/crm/types/PaginatedNoteList.ts +++ b/src/serialization/resources/crm/types/PaginatedNoteList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Note } from "./Note"; export const PaginatedNoteList: core.serialization.ObjectSchema< serializers.crm.PaginatedNoteList.Raw, @@ -12,15 +13,13 @@ export const PaginatedNoteList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.Note)) - .optional(), + results: core.serialization.list(Note).optional(), }); export declare namespace PaginatedNoteList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.Note.Raw[] | null; + results?: Note.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedOpportunityList.ts b/src/serialization/resources/crm/types/PaginatedOpportunityList.ts index b917155a6..41507f343 100644 --- a/src/serialization/resources/crm/types/PaginatedOpportunityList.ts +++ b/src/serialization/resources/crm/types/PaginatedOpportunityList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Opportunity } from "./Opportunity"; export const PaginatedOpportunityList: core.serialization.ObjectSchema< serializers.crm.PaginatedOpportunityList.Raw, @@ -12,15 +13,13 @@ export const PaginatedOpportunityList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.Opportunity)) - .optional(), + results: core.serialization.list(Opportunity).optional(), }); export declare namespace PaginatedOpportunityList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.Opportunity.Raw[] | null; + results?: Opportunity.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedRemoteFieldClassList.ts b/src/serialization/resources/crm/types/PaginatedRemoteFieldClassList.ts index 2091b643f..fdaa58e69 100644 --- a/src/serialization/resources/crm/types/PaginatedRemoteFieldClassList.ts +++ b/src/serialization/resources/crm/types/PaginatedRemoteFieldClassList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldClass } from "./RemoteFieldClass"; export const PaginatedRemoteFieldClassList: core.serialization.ObjectSchema< serializers.crm.PaginatedRemoteFieldClassList.Raw, @@ -12,15 +13,13 @@ export const PaginatedRemoteFieldClassList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldClass)) - .optional(), + results: core.serialization.list(RemoteFieldClass).optional(), }); export declare namespace PaginatedRemoteFieldClassList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.RemoteFieldClass.Raw[] | null; + results?: RemoteFieldClass.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedStageList.ts b/src/serialization/resources/crm/types/PaginatedStageList.ts index 3943beef2..f0bef123e 100644 --- a/src/serialization/resources/crm/types/PaginatedStageList.ts +++ b/src/serialization/resources/crm/types/PaginatedStageList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Stage } from "./Stage"; export const PaginatedStageList: core.serialization.ObjectSchema< serializers.crm.PaginatedStageList.Raw, @@ -12,15 +13,13 @@ export const PaginatedStageList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.Stage)) - .optional(), + results: core.serialization.list(Stage).optional(), }); export declare namespace PaginatedStageList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.Stage.Raw[] | null; + results?: Stage.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedSyncStatusList.ts b/src/serialization/resources/crm/types/PaginatedSyncStatusList.ts index b5f8eb5ad..ed0a04772 100644 --- a/src/serialization/resources/crm/types/PaginatedSyncStatusList.ts +++ b/src/serialization/resources/crm/types/PaginatedSyncStatusList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { SyncStatus } from "./SyncStatus"; export const PaginatedSyncStatusList: core.serialization.ObjectSchema< serializers.crm.PaginatedSyncStatusList.Raw, @@ -12,15 +13,13 @@ export const PaginatedSyncStatusList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.SyncStatus)) - .optional(), + results: core.serialization.list(SyncStatus).optional(), }); export declare namespace PaginatedSyncStatusList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.SyncStatus.Raw[] | null; + results?: SyncStatus.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedTaskList.ts b/src/serialization/resources/crm/types/PaginatedTaskList.ts index 3b99057f2..59a7af092 100644 --- a/src/serialization/resources/crm/types/PaginatedTaskList.ts +++ b/src/serialization/resources/crm/types/PaginatedTaskList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Task } from "./Task"; export const PaginatedTaskList: core.serialization.ObjectSchema< serializers.crm.PaginatedTaskList.Raw, @@ -12,15 +13,13 @@ export const PaginatedTaskList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.Task)) - .optional(), + results: core.serialization.list(Task).optional(), }); export declare namespace PaginatedTaskList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.Task.Raw[] | null; + results?: Task.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PaginatedUserList.ts b/src/serialization/resources/crm/types/PaginatedUserList.ts index 2382cfe25..8f7236c8e 100644 --- a/src/serialization/resources/crm/types/PaginatedUserList.ts +++ b/src/serialization/resources/crm/types/PaginatedUserList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const PaginatedUserList: core.serialization.ObjectSchema< serializers.crm.PaginatedUserList.Raw, @@ -12,15 +13,13 @@ export const PaginatedUserList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.User)) - .optional(), + results: core.serialization.list(User).optional(), }); export declare namespace PaginatedUserList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.crm.User.Raw[] | null; + results?: User.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PatchedAccountRequest.ts b/src/serialization/resources/crm/types/PatchedAccountRequest.ts index 99271d244..213e174ab 100644 --- a/src/serialization/resources/crm/types/PatchedAccountRequest.ts +++ b/src/serialization/resources/crm/types/PatchedAccountRequest.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AddressRequest } from "./AddressRequest"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const PatchedAccountRequest: core.serialization.ObjectSchema< serializers.crm.PatchedAccountRequest.Raw, @@ -16,9 +18,7 @@ export const PatchedAccountRequest: core.serialization.ObjectSchema< industry: core.serialization.string().optional(), website: core.serialization.string().optional(), numberOfEmployees: core.serialization.property("number_of_employees", core.serialization.number().optional()), - addresses: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.AddressRequest)) - .optional(), + addresses: core.serialization.list(AddressRequest).optional(), lastActivityAt: core.serialization.property("last_activity_at", core.serialization.date().optional()), integrationParams: core.serialization.property( "integration_params", @@ -28,12 +28,7 @@ export const PatchedAccountRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PatchedAccountRequest { @@ -44,10 +39,10 @@ export declare namespace PatchedAccountRequest { industry?: string | null; website?: string | null; number_of_employees?: number | null; - addresses?: serializers.crm.AddressRequest.Raw[] | null; + addresses?: AddressRequest.Raw[] | null; last_activity_at?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.crm.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PatchedContactRequest.ts b/src/serialization/resources/crm/types/PatchedContactRequest.ts index d2950ac34..54ec13768 100644 --- a/src/serialization/resources/crm/types/PatchedContactRequest.ts +++ b/src/serialization/resources/crm/types/PatchedContactRequest.ts @@ -2,9 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PatchedContactRequestOwner } from "./PatchedContactRequestOwner"; +import { AddressRequest } from "./AddressRequest"; +import { EmailAddressRequest } from "./EmailAddressRequest"; +import { PhoneNumberRequest } from "./PhoneNumberRequest"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const PatchedContactRequest: core.serialization.ObjectSchema< serializers.crm.PatchedContactRequest.Raw, @@ -13,22 +18,13 @@ export const PatchedContactRequest: core.serialization.ObjectSchema< firstName: core.serialization.property("first_name", core.serialization.string().optional()), lastName: core.serialization.property("last_name", core.serialization.string().optional()), account: core.serialization.string().optional(), - owner: core.serialization.lazy(async () => (await import("../../..")).crm.PatchedContactRequestOwner).optional(), - addresses: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.AddressRequest)) - .optional(), + owner: PatchedContactRequestOwner.optional(), + addresses: core.serialization.list(AddressRequest).optional(), emailAddresses: core.serialization.property( "email_addresses", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.EmailAddressRequest)) - .optional() - ), - phoneNumbers: core.serialization.property( - "phone_numbers", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.PhoneNumberRequest)) - .optional() + core.serialization.list(EmailAddressRequest).optional() ), + phoneNumbers: core.serialization.property("phone_numbers", core.serialization.list(PhoneNumberRequest).optional()), lastActivityAt: core.serialization.property("last_activity_at", core.serialization.date().optional()), integrationParams: core.serialization.property( "integration_params", @@ -38,12 +34,7 @@ export const PatchedContactRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PatchedContactRequest { @@ -51,13 +42,13 @@ export declare namespace PatchedContactRequest { first_name?: string | null; last_name?: string | null; account?: string | null; - owner?: serializers.crm.PatchedContactRequestOwner.Raw | null; - addresses?: serializers.crm.AddressRequest.Raw[] | null; - email_addresses?: serializers.crm.EmailAddressRequest.Raw[] | null; - phone_numbers?: serializers.crm.PhoneNumberRequest.Raw[] | null; + owner?: PatchedContactRequestOwner.Raw | null; + addresses?: AddressRequest.Raw[] | null; + email_addresses?: EmailAddressRequest.Raw[] | null; + phone_numbers?: PhoneNumberRequest.Raw[] | null; last_activity_at?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.crm.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PatchedContactRequestOwner.ts b/src/serialization/resources/crm/types/PatchedContactRequestOwner.ts index e598d2649..495418a56 100644 --- a/src/serialization/resources/crm/types/PatchedContactRequestOwner.ts +++ b/src/serialization/resources/crm/types/PatchedContactRequestOwner.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const PatchedContactRequestOwner: core.serialization.Schema< serializers.crm.PatchedContactRequestOwner.Raw, Merge.crm.PatchedContactRequestOwner -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace PatchedContactRequestOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/PatchedEngagementRequest.ts b/src/serialization/resources/crm/types/PatchedEngagementRequest.ts index 90a0b7c3e..2a25fd177 100644 --- a/src/serialization/resources/crm/types/PatchedEngagementRequest.ts +++ b/src/serialization/resources/crm/types/PatchedEngagementRequest.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PatchedEngagementRequestDirection } from "./PatchedEngagementRequestDirection"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const PatchedEngagementRequest: core.serialization.ObjectSchema< serializers.crm.PatchedEngagementRequest.Raw, @@ -13,9 +15,7 @@ export const PatchedEngagementRequest: core.serialization.ObjectSchema< owner: core.serialization.string().optional(), content: core.serialization.string().optional(), subject: core.serialization.string().optional(), - direction: core.serialization - .lazy(async () => (await import("../../..")).crm.PatchedEngagementRequestDirection) - .optional(), + direction: PatchedEngagementRequestDirection.optional(), engagementType: core.serialization.property("engagement_type", core.serialization.string().optional()), startTime: core.serialization.property("start_time", core.serialization.date().optional()), endTime: core.serialization.property("end_time", core.serialization.date().optional()), @@ -29,12 +29,7 @@ export const PatchedEngagementRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PatchedEngagementRequest { @@ -42,7 +37,7 @@ export declare namespace PatchedEngagementRequest { owner?: string | null; content?: string | null; subject?: string | null; - direction?: serializers.crm.PatchedEngagementRequestDirection.Raw | null; + direction?: PatchedEngagementRequestDirection.Raw | null; engagement_type?: string | null; start_time?: string | null; end_time?: string | null; @@ -50,6 +45,6 @@ export declare namespace PatchedEngagementRequest { contacts?: (string | null | undefined)[] | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.crm.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PatchedEngagementRequestDirection.ts b/src/serialization/resources/crm/types/PatchedEngagementRequestDirection.ts index 79c95263c..1a0117c9c 100644 --- a/src/serialization/resources/crm/types/PatchedEngagementRequestDirection.ts +++ b/src/serialization/resources/crm/types/PatchedEngagementRequestDirection.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { DirectionEnum } from "./DirectionEnum"; export const PatchedEngagementRequestDirection: core.serialization.Schema< serializers.crm.PatchedEngagementRequestDirection.Raw, Merge.crm.PatchedEngagementRequestDirection -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.DirectionEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([DirectionEnum, core.serialization.string()]); export declare namespace PatchedEngagementRequestDirection { - type Raw = serializers.crm.DirectionEnum.Raw | string; + type Raw = DirectionEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/PatchedOpportunityRequest.ts b/src/serialization/resources/crm/types/PatchedOpportunityRequest.ts index bb279a6b1..f37d6e1a7 100644 --- a/src/serialization/resources/crm/types/PatchedOpportunityRequest.ts +++ b/src/serialization/resources/crm/types/PatchedOpportunityRequest.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PatchedOpportunityRequestStatus } from "./PatchedOpportunityRequestStatus"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const PatchedOpportunityRequest: core.serialization.ObjectSchema< serializers.crm.PatchedOpportunityRequest.Raw, @@ -16,9 +18,7 @@ export const PatchedOpportunityRequest: core.serialization.ObjectSchema< owner: core.serialization.string().optional(), account: core.serialization.string().optional(), stage: core.serialization.string().optional(), - status: core.serialization - .lazy(async () => (await import("../../..")).crm.PatchedOpportunityRequestStatus) - .optional(), + status: PatchedOpportunityRequestStatus.optional(), lastActivityAt: core.serialization.property("last_activity_at", core.serialization.date().optional()), closeDate: core.serialization.property("close_date", core.serialization.date().optional()), integrationParams: core.serialization.property( @@ -29,12 +29,7 @@ export const PatchedOpportunityRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PatchedOpportunityRequest { @@ -45,11 +40,11 @@ export declare namespace PatchedOpportunityRequest { owner?: string | null; account?: string | null; stage?: string | null; - status?: serializers.crm.PatchedOpportunityRequestStatus.Raw | null; + status?: PatchedOpportunityRequestStatus.Raw | null; last_activity_at?: string | null; close_date?: string | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.crm.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PatchedOpportunityRequestStatus.ts b/src/serialization/resources/crm/types/PatchedOpportunityRequestStatus.ts index 5ef6ec55a..35b9725a2 100644 --- a/src/serialization/resources/crm/types/PatchedOpportunityRequestStatus.ts +++ b/src/serialization/resources/crm/types/PatchedOpportunityRequestStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { OpportunityStatusEnum } from "./OpportunityStatusEnum"; export const PatchedOpportunityRequestStatus: core.serialization.Schema< serializers.crm.PatchedOpportunityRequestStatus.Raw, Merge.crm.PatchedOpportunityRequestStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.OpportunityStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([OpportunityStatusEnum, core.serialization.string()]); export declare namespace PatchedOpportunityRequestStatus { - type Raw = serializers.crm.OpportunityStatusEnum.Raw | string; + type Raw = OpportunityStatusEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/PatchedTaskRequest.ts b/src/serialization/resources/crm/types/PatchedTaskRequest.ts index 05a96c0ec..cc89338f9 100644 --- a/src/serialization/resources/crm/types/PatchedTaskRequest.ts +++ b/src/serialization/resources/crm/types/PatchedTaskRequest.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PatchedTaskRequestStatus } from "./PatchedTaskRequestStatus"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const PatchedTaskRequest: core.serialization.ObjectSchema< serializers.crm.PatchedTaskRequest.Raw, @@ -17,7 +19,7 @@ export const PatchedTaskRequest: core.serialization.ObjectSchema< opportunity: core.serialization.string().optional(), completedDate: core.serialization.property("completed_date", core.serialization.date().optional()), dueDate: core.serialization.property("due_date", core.serialization.date().optional()), - status: core.serialization.lazy(async () => (await import("../../..")).crm.PatchedTaskRequestStatus).optional(), + status: PatchedTaskRequestStatus.optional(), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -26,12 +28,7 @@ export const PatchedTaskRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PatchedTaskRequest { @@ -43,9 +40,9 @@ export declare namespace PatchedTaskRequest { opportunity?: string | null; completed_date?: string | null; due_date?: string | null; - status?: serializers.crm.PatchedTaskRequestStatus.Raw | null; + status?: PatchedTaskRequestStatus.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.crm.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/PatchedTaskRequestStatus.ts b/src/serialization/resources/crm/types/PatchedTaskRequestStatus.ts index 165bea177..0a677d498 100644 --- a/src/serialization/resources/crm/types/PatchedTaskRequestStatus.ts +++ b/src/serialization/resources/crm/types/PatchedTaskRequestStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TaskStatusEnum } from "./TaskStatusEnum"; export const PatchedTaskRequestStatus: core.serialization.Schema< serializers.crm.PatchedTaskRequestStatus.Raw, Merge.crm.PatchedTaskRequestStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.TaskStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([TaskStatusEnum, core.serialization.string()]); export declare namespace PatchedTaskRequestStatus { - type Raw = serializers.crm.TaskStatusEnum.Raw | string; + type Raw = TaskStatusEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/PhoneNumber.ts b/src/serialization/resources/crm/types/PhoneNumber.ts index 170071650..e5d037d8b 100644 --- a/src/serialization/resources/crm/types/PhoneNumber.ts +++ b/src/serialization/resources/crm/types/PhoneNumber.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PhoneNumber: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/crm/types/PhoneNumberRequest.ts b/src/serialization/resources/crm/types/PhoneNumberRequest.ts index 8bf897901..f082587b9 100644 --- a/src/serialization/resources/crm/types/PhoneNumberRequest.ts +++ b/src/serialization/resources/crm/types/PhoneNumberRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PhoneNumberRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/ReasonEnum.ts b/src/serialization/resources/crm/types/ReasonEnum.ts index 66c9a7218..038cf2657 100644 --- a/src/serialization/resources/crm/types/ReasonEnum.ts +++ b/src/serialization/resources/crm/types/ReasonEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ReasonEnum: core.serialization.Schema = diff --git a/src/serialization/resources/crm/types/RemoteData.ts b/src/serialization/resources/crm/types/RemoteData.ts index 224ad3964..5b687523b 100644 --- a/src/serialization/resources/crm/types/RemoteData.ts +++ b/src/serialization/resources/crm/types/RemoteData.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteData: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/crm/types/RemoteEndpointInfo.ts b/src/serialization/resources/crm/types/RemoteEndpointInfo.ts index 1071c8802..45ca2c791 100644 --- a/src/serialization/resources/crm/types/RemoteEndpointInfo.ts +++ b/src/serialization/resources/crm/types/RemoteEndpointInfo.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteEndpointInfo: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/RemoteField.ts b/src/serialization/resources/crm/types/RemoteField.ts index 976f4bc0c..7cb61f365 100644 --- a/src/serialization/resources/crm/types/RemoteField.ts +++ b/src/serialization/resources/crm/types/RemoteField.ts @@ -2,22 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldRemoteFieldClass } from "./RemoteFieldRemoteFieldClass"; export const RemoteField: core.serialization.ObjectSchema = core.serialization.object({ - remoteFieldClass: core.serialization.property( - "remote_field_class", - core.serialization.lazy(async () => (await import("../../..")).crm.RemoteFieldRemoteFieldClass) - ), + remoteFieldClass: core.serialization.property("remote_field_class", RemoteFieldRemoteFieldClass), value: core.serialization.unknown().optional(), }); export declare namespace RemoteField { interface Raw { - remote_field_class: serializers.crm.RemoteFieldRemoteFieldClass.Raw; + remote_field_class: RemoteFieldRemoteFieldClass.Raw; value?: unknown | null; } } diff --git a/src/serialization/resources/crm/types/RemoteFieldApi.ts b/src/serialization/resources/crm/types/RemoteFieldApi.ts index acd5d85cd..02d66cefe 100644 --- a/src/serialization/resources/crm/types/RemoteFieldApi.ts +++ b/src/serialization/resources/crm/types/RemoteFieldApi.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteEndpointInfo } from "./RemoteEndpointInfo"; +import { AdvancedMetadata } from "./AdvancedMetadata"; +import { RemoteFieldApiCoverage } from "./RemoteFieldApiCoverage"; export const RemoteFieldApi: core.serialization.ObjectSchema< serializers.crm.RemoteFieldApi.Raw, @@ -12,28 +15,22 @@ export const RemoteFieldApi: core.serialization.ObjectSchema< > = core.serialization.object({ schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()), remoteKeyName: core.serialization.property("remote_key_name", core.serialization.string()), - remoteEndpointInfo: core.serialization.property( - "remote_endpoint_info", - core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteEndpointInfo) - ), + remoteEndpointInfo: core.serialization.property("remote_endpoint_info", RemoteEndpointInfo), exampleValues: core.serialization.property( "example_values", core.serialization.list(core.serialization.unknown()).optional() ), - advancedMetadata: core.serialization.property( - "advanced_metadata", - core.serialization.lazyObject(async () => (await import("../../..")).crm.AdvancedMetadata).optional() - ), - coverage: core.serialization.lazy(async () => (await import("../../..")).crm.RemoteFieldApiCoverage).optional(), + advancedMetadata: core.serialization.property("advanced_metadata", AdvancedMetadata.optional()), + coverage: RemoteFieldApiCoverage.optional(), }); export declare namespace RemoteFieldApi { interface Raw { schema: Record; remote_key_name: string; - remote_endpoint_info: serializers.crm.RemoteEndpointInfo.Raw; + remote_endpoint_info: RemoteEndpointInfo.Raw; example_values?: unknown[] | null; - advanced_metadata?: serializers.crm.AdvancedMetadata.Raw | null; - coverage?: serializers.crm.RemoteFieldApiCoverage.Raw | null; + advanced_metadata?: AdvancedMetadata.Raw | null; + coverage?: RemoteFieldApiCoverage.Raw | null; } } diff --git a/src/serialization/resources/crm/types/RemoteFieldApiCoverage.ts b/src/serialization/resources/crm/types/RemoteFieldApiCoverage.ts index b96bb12fb..899e86127 100644 --- a/src/serialization/resources/crm/types/RemoteFieldApiCoverage.ts +++ b/src/serialization/resources/crm/types/RemoteFieldApiCoverage.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteFieldApiCoverage: core.serialization.Schema< diff --git a/src/serialization/resources/crm/types/RemoteFieldApiResponse.ts b/src/serialization/resources/crm/types/RemoteFieldApiResponse.ts index 358de942f..068d716ce 100644 --- a/src/serialization/resources/crm/types/RemoteFieldApiResponse.ts +++ b/src/serialization/resources/crm/types/RemoteFieldApiResponse.ts @@ -2,80 +2,36 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldApi } from "./RemoteFieldApi"; export const RemoteFieldApiResponse: core.serialization.ObjectSchema< serializers.crm.RemoteFieldApiResponse.Raw, Merge.crm.RemoteFieldApiResponse > = core.serialization.object({ - account: core.serialization.property( - "Account", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldApi)) - .optional() - ), - contact: core.serialization.property( - "Contact", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldApi)) - .optional() - ), - lead: core.serialization.property( - "Lead", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldApi)) - .optional() - ), - note: core.serialization.property( - "Note", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldApi)) - .optional() - ), - opportunity: core.serialization.property( - "Opportunity", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldApi)) - .optional() - ), - stage: core.serialization.property( - "Stage", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldApi)) - .optional() - ), - user: core.serialization.property( - "User", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldApi)) - .optional() - ), - task: core.serialization.property( - "Task", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldApi)) - .optional() - ), - engagement: core.serialization.property( - "Engagement", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldApi)) - .optional() - ), + account: core.serialization.property("Account", core.serialization.list(RemoteFieldApi).optional()), + contact: core.serialization.property("Contact", core.serialization.list(RemoteFieldApi).optional()), + lead: core.serialization.property("Lead", core.serialization.list(RemoteFieldApi).optional()), + note: core.serialization.property("Note", core.serialization.list(RemoteFieldApi).optional()), + opportunity: core.serialization.property("Opportunity", core.serialization.list(RemoteFieldApi).optional()), + stage: core.serialization.property("Stage", core.serialization.list(RemoteFieldApi).optional()), + user: core.serialization.property("User", core.serialization.list(RemoteFieldApi).optional()), + task: core.serialization.property("Task", core.serialization.list(RemoteFieldApi).optional()), + engagement: core.serialization.property("Engagement", core.serialization.list(RemoteFieldApi).optional()), }); export declare namespace RemoteFieldApiResponse { interface Raw { - Account?: serializers.crm.RemoteFieldApi.Raw[] | null; - Contact?: serializers.crm.RemoteFieldApi.Raw[] | null; - Lead?: serializers.crm.RemoteFieldApi.Raw[] | null; - Note?: serializers.crm.RemoteFieldApi.Raw[] | null; - Opportunity?: serializers.crm.RemoteFieldApi.Raw[] | null; - Stage?: serializers.crm.RemoteFieldApi.Raw[] | null; - User?: serializers.crm.RemoteFieldApi.Raw[] | null; - Task?: serializers.crm.RemoteFieldApi.Raw[] | null; - Engagement?: serializers.crm.RemoteFieldApi.Raw[] | null; + Account?: RemoteFieldApi.Raw[] | null; + Contact?: RemoteFieldApi.Raw[] | null; + Lead?: RemoteFieldApi.Raw[] | null; + Note?: RemoteFieldApi.Raw[] | null; + Opportunity?: RemoteFieldApi.Raw[] | null; + Stage?: RemoteFieldApi.Raw[] | null; + User?: RemoteFieldApi.Raw[] | null; + Task?: RemoteFieldApi.Raw[] | null; + Engagement?: RemoteFieldApi.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/RemoteFieldClass.ts b/src/serialization/resources/crm/types/RemoteFieldClass.ts index e8962edd8..b1e4a2dd5 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClass.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClass.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldClassFieldType } from "./RemoteFieldClassFieldType"; +import { RemoteFieldClassFieldFormat } from "./RemoteFieldClassFieldFormat"; +import { RemoteFieldClassFieldChoicesItem } from "./RemoteFieldClassFieldChoicesItem"; +import { ItemSchema } from "./ItemSchema"; export const RemoteFieldClass: core.serialization.ObjectSchema< serializers.crm.RemoteFieldClass.Raw, @@ -16,28 +20,13 @@ export const RemoteFieldClass: core.serialization.ObjectSchema< description: core.serialization.string().optional(), isCustom: core.serialization.property("is_custom", core.serialization.boolean().optional()), isRequired: core.serialization.property("is_required", core.serialization.boolean().optional()), - fieldType: core.serialization.property( - "field_type", - core.serialization.lazy(async () => (await import("../../..")).crm.RemoteFieldClassFieldType).optional() - ), - fieldFormat: core.serialization.property( - "field_format", - core.serialization.lazy(async () => (await import("../../..")).crm.RemoteFieldClassFieldFormat).optional() - ), + fieldType: core.serialization.property("field_type", RemoteFieldClassFieldType.optional()), + fieldFormat: core.serialization.property("field_format", RemoteFieldClassFieldFormat.optional()), fieldChoices: core.serialization.property( "field_choices", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).crm.RemoteFieldClassFieldChoicesItem - ) - ) - .optional() - ), - itemSchema: core.serialization.property( - "item_schema", - core.serialization.lazyObject(async () => (await import("../../..")).crm.ItemSchema).optional() + core.serialization.list(RemoteFieldClassFieldChoicesItem).optional() ), + itemSchema: core.serialization.property("item_schema", ItemSchema.optional()), }); export declare namespace RemoteFieldClass { @@ -48,9 +37,9 @@ export declare namespace RemoteFieldClass { description?: string | null; is_custom?: boolean | null; is_required?: boolean | null; - field_type?: serializers.crm.RemoteFieldClassFieldType.Raw | null; - field_format?: serializers.crm.RemoteFieldClassFieldFormat.Raw | null; - field_choices?: serializers.crm.RemoteFieldClassFieldChoicesItem.Raw[] | null; - item_schema?: serializers.crm.ItemSchema.Raw | null; + field_type?: RemoteFieldClassFieldType.Raw | null; + field_format?: RemoteFieldClassFieldFormat.Raw | null; + field_choices?: RemoteFieldClassFieldChoicesItem.Raw[] | null; + item_schema?: ItemSchema.Raw | null; } } diff --git a/src/serialization/resources/crm/types/RemoteFieldClassFieldChoicesItem.ts b/src/serialization/resources/crm/types/RemoteFieldClassFieldChoicesItem.ts index de36539d5..2d6473b22 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassFieldChoicesItem.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassFieldChoicesItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteFieldClassFieldChoicesItem: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/RemoteFieldClassFieldFormat.ts b/src/serialization/resources/crm/types/RemoteFieldClassFieldFormat.ts index 626bc7551..b5fee1c42 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassFieldFormat.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassFieldFormat.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldFormatEnum } from "./FieldFormatEnum"; export const RemoteFieldClassFieldFormat: core.serialization.Schema< serializers.crm.RemoteFieldClassFieldFormat.Raw, Merge.crm.RemoteFieldClassFieldFormat -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.FieldFormatEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([FieldFormatEnum, core.serialization.string()]); export declare namespace RemoteFieldClassFieldFormat { - type Raw = serializers.crm.FieldFormatEnum.Raw | string; + type Raw = FieldFormatEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/RemoteFieldClassFieldType.ts b/src/serialization/resources/crm/types/RemoteFieldClassFieldType.ts index 9f376bc42..c142c6fea 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassFieldType.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassFieldType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldTypeEnum } from "./FieldTypeEnum"; export const RemoteFieldClassFieldType: core.serialization.Schema< serializers.crm.RemoteFieldClassFieldType.Raw, Merge.crm.RemoteFieldClassFieldType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.FieldTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([FieldTypeEnum, core.serialization.string()]); export declare namespace RemoteFieldClassFieldType { - type Raw = serializers.crm.FieldTypeEnum.Raw | string; + type Raw = FieldTypeEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClass.ts b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClass.ts index 763840637..69697b764 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClass.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClass.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldClassForCustomObjectClassFieldType } from "./RemoteFieldClassForCustomObjectClassFieldType"; +import { RemoteFieldClassForCustomObjectClassFieldFormat } from "./RemoteFieldClassForCustomObjectClassFieldFormat"; +import { RemoteFieldClassForCustomObjectClassFieldChoicesItem } from "./RemoteFieldClassForCustomObjectClassFieldChoicesItem"; +import { RemoteFieldClassForCustomObjectClassItemSchema } from "./RemoteFieldClassForCustomObjectClassItemSchema"; export const RemoteFieldClassForCustomObjectClass: core.serialization.ObjectSchema< serializers.crm.RemoteFieldClassForCustomObjectClass.Raw, @@ -16,34 +20,16 @@ export const RemoteFieldClassForCustomObjectClass: core.serialization.ObjectSche remoteKeyName: core.serialization.property("remote_key_name", core.serialization.string().optional()), description: core.serialization.string().optional(), isRequired: core.serialization.property("is_required", core.serialization.boolean().optional()), - fieldType: core.serialization.property( - "field_type", - core.serialization - .lazy(async () => (await import("../../..")).crm.RemoteFieldClassForCustomObjectClassFieldType) - .optional() - ), + fieldType: core.serialization.property("field_type", RemoteFieldClassForCustomObjectClassFieldType.optional()), fieldFormat: core.serialization.property( "field_format", - core.serialization - .lazy(async () => (await import("../../..")).crm.RemoteFieldClassForCustomObjectClassFieldFormat) - .optional() + RemoteFieldClassForCustomObjectClassFieldFormat.optional() ), fieldChoices: core.serialization.property( "field_choices", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).crm.RemoteFieldClassForCustomObjectClassFieldChoicesItem - ) - ) - .optional() - ), - itemSchema: core.serialization.property( - "item_schema", - core.serialization - .lazyObject(async () => (await import("../../..")).crm.RemoteFieldClassForCustomObjectClassItemSchema) - .optional() + core.serialization.list(RemoteFieldClassForCustomObjectClassFieldChoicesItem).optional() ), + itemSchema: core.serialization.property("item_schema", RemoteFieldClassForCustomObjectClassItemSchema.optional()), }); export declare namespace RemoteFieldClassForCustomObjectClass { @@ -54,9 +40,9 @@ export declare namespace RemoteFieldClassForCustomObjectClass { remote_key_name?: string | null; description?: string | null; is_required?: boolean | null; - field_type?: serializers.crm.RemoteFieldClassForCustomObjectClassFieldType.Raw | null; - field_format?: serializers.crm.RemoteFieldClassForCustomObjectClassFieldFormat.Raw | null; - field_choices?: serializers.crm.RemoteFieldClassForCustomObjectClassFieldChoicesItem.Raw[] | null; - item_schema?: serializers.crm.RemoteFieldClassForCustomObjectClassItemSchema.Raw | null; + field_type?: RemoteFieldClassForCustomObjectClassFieldType.Raw | null; + field_format?: RemoteFieldClassForCustomObjectClassFieldFormat.Raw | null; + field_choices?: RemoteFieldClassForCustomObjectClassFieldChoicesItem.Raw[] | null; + item_schema?: RemoteFieldClassForCustomObjectClassItemSchema.Raw | null; } } diff --git a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldChoicesItem.ts b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldChoicesItem.ts index 0579715bb..ccc8194c8 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldChoicesItem.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldChoicesItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteFieldClassForCustomObjectClassFieldChoicesItem: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.ts b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.ts index 35d057bed..720e73ad3 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldFormatEnum } from "./FieldFormatEnum"; export const RemoteFieldClassForCustomObjectClassFieldFormat: core.serialization.Schema< serializers.crm.RemoteFieldClassForCustomObjectClassFieldFormat.Raw, Merge.crm.RemoteFieldClassForCustomObjectClassFieldFormat -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.FieldFormatEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([FieldFormatEnum, core.serialization.string()]); export declare namespace RemoteFieldClassForCustomObjectClassFieldFormat { - type Raw = serializers.crm.FieldFormatEnum.Raw | string; + type Raw = FieldFormatEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldType.ts b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldType.ts index 669e34587..dcc51954a 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldType.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldTypeEnum } from "./FieldTypeEnum"; export const RemoteFieldClassForCustomObjectClassFieldType: core.serialization.Schema< serializers.crm.RemoteFieldClassForCustomObjectClassFieldType.Raw, Merge.crm.RemoteFieldClassForCustomObjectClassFieldType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.FieldTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([FieldTypeEnum, core.serialization.string()]); export declare namespace RemoteFieldClassForCustomObjectClassFieldType { - type Raw = serializers.crm.FieldTypeEnum.Raw | string; + type Raw = FieldTypeEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassItemSchema.ts b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassItemSchema.ts index 53022aa97..bf5f66604 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassItemSchema.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassItemSchema.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteFieldClassForCustomObjectClassItemSchema: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/RemoteFieldRemoteFieldClass.ts b/src/serialization/resources/crm/types/RemoteFieldRemoteFieldClass.ts index f5b192dd5..ec1106a9b 100644 --- a/src/serialization/resources/crm/types/RemoteFieldRemoteFieldClass.ts +++ b/src/serialization/resources/crm/types/RemoteFieldRemoteFieldClass.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldClass } from "./RemoteFieldClass"; export const RemoteFieldRemoteFieldClass: core.serialization.Schema< serializers.crm.RemoteFieldRemoteFieldClass.Raw, Merge.crm.RemoteFieldRemoteFieldClass -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldClass), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteFieldClass]); export declare namespace RemoteFieldRemoteFieldClass { - type Raw = string | serializers.crm.RemoteFieldClass.Raw; + type Raw = string | RemoteFieldClass.Raw; } diff --git a/src/serialization/resources/crm/types/RemoteFieldRequest.ts b/src/serialization/resources/crm/types/RemoteFieldRequest.ts index 251799392..442374d07 100644 --- a/src/serialization/resources/crm/types/RemoteFieldRequest.ts +++ b/src/serialization/resources/crm/types/RemoteFieldRequest.ts @@ -2,24 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldRequestRemoteFieldClass } from "./RemoteFieldRequestRemoteFieldClass"; export const RemoteFieldRequest: core.serialization.ObjectSchema< serializers.crm.RemoteFieldRequest.Raw, Merge.crm.RemoteFieldRequest > = core.serialization.object({ - remoteFieldClass: core.serialization.property( - "remote_field_class", - core.serialization.lazy(async () => (await import("../../..")).crm.RemoteFieldRequestRemoteFieldClass) - ), + remoteFieldClass: core.serialization.property("remote_field_class", RemoteFieldRequestRemoteFieldClass), value: core.serialization.unknown().optional(), }); export declare namespace RemoteFieldRequest { interface Raw { - remote_field_class: serializers.crm.RemoteFieldRequestRemoteFieldClass.Raw; + remote_field_class: RemoteFieldRequestRemoteFieldClass.Raw; value?: unknown | null; } } diff --git a/src/serialization/resources/crm/types/RemoteFieldRequestRemoteFieldClass.ts b/src/serialization/resources/crm/types/RemoteFieldRequestRemoteFieldClass.ts index e0cd925d5..9ec5fe125 100644 --- a/src/serialization/resources/crm/types/RemoteFieldRequestRemoteFieldClass.ts +++ b/src/serialization/resources/crm/types/RemoteFieldRequestRemoteFieldClass.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldClass } from "./RemoteFieldClass"; export const RemoteFieldRequestRemoteFieldClass: core.serialization.Schema< serializers.crm.RemoteFieldRequestRemoteFieldClass.Raw, Merge.crm.RemoteFieldRequestRemoteFieldClass -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteFieldClass), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteFieldClass]); export declare namespace RemoteFieldRequestRemoteFieldClass { - type Raw = string | serializers.crm.RemoteFieldClass.Raw; + type Raw = string | RemoteFieldClass.Raw; } diff --git a/src/serialization/resources/crm/types/RemoteKey.ts b/src/serialization/resources/crm/types/RemoteKey.ts index 33ffab51d..4b1ce4ca4 100644 --- a/src/serialization/resources/crm/types/RemoteKey.ts +++ b/src/serialization/resources/crm/types/RemoteKey.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteKey: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/crm/types/RemoteResponse.ts b/src/serialization/resources/crm/types/RemoteResponse.ts index 71ac069e0..b11a63fbf 100644 --- a/src/serialization/resources/crm/types/RemoteResponse.ts +++ b/src/serialization/resources/crm/types/RemoteResponse.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ResponseTypeEnum } from "./ResponseTypeEnum"; export const RemoteResponse: core.serialization.ObjectSchema< serializers.crm.RemoteResponse.Raw, @@ -18,10 +19,7 @@ export const RemoteResponse: core.serialization.ObjectSchema< "response_headers", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - responseType: core.serialization.property( - "response_type", - core.serialization.lazy(async () => (await import("../../..")).crm.ResponseTypeEnum).optional() - ), + responseType: core.serialization.property("response_type", ResponseTypeEnum.optional()), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), }); @@ -32,7 +30,7 @@ export declare namespace RemoteResponse { status: number; response?: unknown; response_headers?: Record | null; - response_type?: serializers.crm.ResponseTypeEnum.Raw | null; + response_type?: ResponseTypeEnum.Raw | null; headers?: Record | null; } } diff --git a/src/serialization/resources/crm/types/RequestFormatEnum.ts b/src/serialization/resources/crm/types/RequestFormatEnum.ts index 9a1ef819b..b9970a032 100644 --- a/src/serialization/resources/crm/types/RequestFormatEnum.ts +++ b/src/serialization/resources/crm/types/RequestFormatEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RequestFormatEnum: core.serialization.Schema< diff --git a/src/serialization/resources/crm/types/ResponseTypeEnum.ts b/src/serialization/resources/crm/types/ResponseTypeEnum.ts index ba7c2d161..0f0439401 100644 --- a/src/serialization/resources/crm/types/ResponseTypeEnum.ts +++ b/src/serialization/resources/crm/types/ResponseTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ResponseTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/crm/types/RoleEnum.ts b/src/serialization/resources/crm/types/RoleEnum.ts index b43dc43f0..b0ddf9e4a 100644 --- a/src/serialization/resources/crm/types/RoleEnum.ts +++ b/src/serialization/resources/crm/types/RoleEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RoleEnum: core.serialization.Schema = diff --git a/src/serialization/resources/crm/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/serialization/resources/crm/types/SelectiveSyncConfigurationsUsageEnum.ts index 81d59830b..a4ec5a807 100644 --- a/src/serialization/resources/crm/types/SelectiveSyncConfigurationsUsageEnum.ts +++ b/src/serialization/resources/crm/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const SelectiveSyncConfigurationsUsageEnum: core.serialization.Schema< diff --git a/src/serialization/resources/crm/types/Stage.ts b/src/serialization/resources/crm/types/Stage.ts index be20c7feb..5d8544fce 100644 --- a/src/serialization/resources/crm/types/Stage.ts +++ b/src/serialization/resources/crm/types/Stage.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const Stage: core.serialization.ObjectSchema = core.serialization.object({ @@ -18,18 +20,8 @@ export const Stage: core.serialization.ObjectSchema (await import("../../..")).crm.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace Stage { @@ -41,7 +33,7 @@ export declare namespace Stage { name?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.crm.RemoteData.Raw[] | null; - remote_fields?: serializers.crm.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/SyncStatus.ts b/src/serialization/resources/crm/types/SyncStatus.ts index 870edaafe..40f698723 100644 --- a/src/serialization/resources/crm/types/SyncStatus.ts +++ b/src/serialization/resources/crm/types/SyncStatus.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { SyncStatusStatusEnum } from "./SyncStatusStatusEnum"; +import { SelectiveSyncConfigurationsUsageEnum } from "./SelectiveSyncConfigurationsUsageEnum"; export const SyncStatus: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,13 +14,11 @@ export const SyncStatus: core.serialization.ObjectSchema (await import("../../..")).crm.SyncStatusStatusEnum), + status: SyncStatusStatusEnum, isInitialSync: core.serialization.property("is_initial_sync", core.serialization.boolean()), selectiveSyncConfigurationsUsage: core.serialization.property( "selective_sync_configurations_usage", - core.serialization - .lazy(async () => (await import("../../..")).crm.SelectiveSyncConfigurationsUsageEnum) - .optional() + SelectiveSyncConfigurationsUsageEnum.optional() ), }); @@ -28,8 +28,8 @@ export declare namespace SyncStatus { model_id: string; last_sync_start?: string | null; next_sync_start?: string | null; - status: serializers.crm.SyncStatusStatusEnum.Raw; + status: SyncStatusStatusEnum.Raw; is_initial_sync: boolean; - selective_sync_configurations_usage?: serializers.crm.SelectiveSyncConfigurationsUsageEnum.Raw | null; + selective_sync_configurations_usage?: SelectiveSyncConfigurationsUsageEnum.Raw | null; } } diff --git a/src/serialization/resources/crm/types/SyncStatusStatusEnum.ts b/src/serialization/resources/crm/types/SyncStatusStatusEnum.ts index 774b9916a..58eaadf3d 100644 --- a/src/serialization/resources/crm/types/SyncStatusStatusEnum.ts +++ b/src/serialization/resources/crm/types/SyncStatusStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const SyncStatusStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/crm/types/Task.ts b/src/serialization/resources/crm/types/Task.ts index aefd0db91..b929af605 100644 --- a/src/serialization/resources/crm/types/Task.ts +++ b/src/serialization/resources/crm/types/Task.ts @@ -2,9 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TaskOwner } from "./TaskOwner"; +import { TaskAccount } from "./TaskAccount"; +import { TaskOpportunity } from "./TaskOpportunity"; +import { TaskStatus } from "./TaskStatus"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const Task: core.serialization.ObjectSchema = core.serialization.object({ @@ -14,29 +20,19 @@ export const Task: core.serialization.ObjectSchema (await import("../../..")).crm.TaskOwner).optional(), - account: core.serialization.lazy(async () => (await import("../../..")).crm.TaskAccount).optional(), - opportunity: core.serialization.lazy(async () => (await import("../../..")).crm.TaskOpportunity).optional(), + owner: TaskOwner.optional(), + account: TaskAccount.optional(), + opportunity: TaskOpportunity.optional(), completedDate: core.serialization.property("completed_date", core.serialization.date().optional()), dueDate: core.serialization.property("due_date", core.serialization.date().optional()), - status: core.serialization.lazy(async () => (await import("../../..")).crm.TaskStatus).optional(), + status: TaskStatus.optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace Task { @@ -47,15 +43,15 @@ export declare namespace Task { modified_at?: string | null; subject?: string | null; content?: string | null; - owner?: serializers.crm.TaskOwner.Raw | null; - account?: serializers.crm.TaskAccount.Raw | null; - opportunity?: serializers.crm.TaskOpportunity.Raw | null; + owner?: TaskOwner.Raw | null; + account?: TaskAccount.Raw | null; + opportunity?: TaskOpportunity.Raw | null; completed_date?: string | null; due_date?: string | null; - status?: serializers.crm.TaskStatus.Raw | null; + status?: TaskStatus.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.crm.RemoteData.Raw[] | null; - remote_fields?: serializers.crm.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/TaskAccount.ts b/src/serialization/resources/crm/types/TaskAccount.ts index cf5290117..7fd9eb89e 100644 --- a/src/serialization/resources/crm/types/TaskAccount.ts +++ b/src/serialization/resources/crm/types/TaskAccount.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const TaskAccount: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Account), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace TaskAccount { - type Raw = string | serializers.crm.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/TaskOpportunity.ts b/src/serialization/resources/crm/types/TaskOpportunity.ts index 149acf317..7e1375aae 100644 --- a/src/serialization/resources/crm/types/TaskOpportunity.ts +++ b/src/serialization/resources/crm/types/TaskOpportunity.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Opportunity } from "./Opportunity"; export const TaskOpportunity: core.serialization.Schema< serializers.crm.TaskOpportunity.Raw, Merge.crm.TaskOpportunity -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Opportunity), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Opportunity]); export declare namespace TaskOpportunity { - type Raw = string | serializers.crm.Opportunity.Raw; + type Raw = string | Opportunity.Raw; } diff --git a/src/serialization/resources/crm/types/TaskOwner.ts b/src/serialization/resources/crm/types/TaskOwner.ts index 9a63f2ae8..e16741088 100644 --- a/src/serialization/resources/crm/types/TaskOwner.ts +++ b/src/serialization/resources/crm/types/TaskOwner.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const TaskOwner: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace TaskOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/TaskRequest.ts b/src/serialization/resources/crm/types/TaskRequest.ts index aac21bf07..f36454679 100644 --- a/src/serialization/resources/crm/types/TaskRequest.ts +++ b/src/serialization/resources/crm/types/TaskRequest.ts @@ -2,22 +2,25 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TaskRequestOwner } from "./TaskRequestOwner"; +import { TaskRequestAccount } from "./TaskRequestAccount"; +import { TaskRequestOpportunity } from "./TaskRequestOpportunity"; +import { TaskRequestStatus } from "./TaskRequestStatus"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const TaskRequest: core.serialization.ObjectSchema = core.serialization.object({ subject: core.serialization.string().optional(), content: core.serialization.string().optional(), - owner: core.serialization.lazy(async () => (await import("../../..")).crm.TaskRequestOwner).optional(), - account: core.serialization.lazy(async () => (await import("../../..")).crm.TaskRequestAccount).optional(), - opportunity: core.serialization - .lazy(async () => (await import("../../..")).crm.TaskRequestOpportunity) - .optional(), + owner: TaskRequestOwner.optional(), + account: TaskRequestAccount.optional(), + opportunity: TaskRequestOpportunity.optional(), completedDate: core.serialization.property("completed_date", core.serialization.date().optional()), dueDate: core.serialization.property("due_date", core.serialization.date().optional()), - status: core.serialization.lazy(async () => (await import("../../..")).crm.TaskRequestStatus).optional(), + status: TaskRequestStatus.optional(), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -28,9 +31,7 @@ export const TaskRequest: core.serialization.ObjectSchema (await import("../../..")).crm.RemoteFieldRequest)) - .optional() + core.serialization.list(RemoteFieldRequest).optional() ), }); @@ -38,14 +39,14 @@ export declare namespace TaskRequest { interface Raw { subject?: string | null; content?: string | null; - owner?: serializers.crm.TaskRequestOwner.Raw | null; - account?: serializers.crm.TaskRequestAccount.Raw | null; - opportunity?: serializers.crm.TaskRequestOpportunity.Raw | null; + owner?: TaskRequestOwner.Raw | null; + account?: TaskRequestAccount.Raw | null; + opportunity?: TaskRequestOpportunity.Raw | null; completed_date?: string | null; due_date?: string | null; - status?: serializers.crm.TaskRequestStatus.Raw | null; + status?: TaskRequestStatus.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.crm.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/TaskRequestAccount.ts b/src/serialization/resources/crm/types/TaskRequestAccount.ts index 0786d2987..884cd75be 100644 --- a/src/serialization/resources/crm/types/TaskRequestAccount.ts +++ b/src/serialization/resources/crm/types/TaskRequestAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const TaskRequestAccount: core.serialization.Schema< serializers.crm.TaskRequestAccount.Raw, Merge.crm.TaskRequestAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace TaskRequestAccount { - type Raw = string | serializers.crm.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/TaskRequestOpportunity.ts b/src/serialization/resources/crm/types/TaskRequestOpportunity.ts index a17079fbf..4d35aaf1b 100644 --- a/src/serialization/resources/crm/types/TaskRequestOpportunity.ts +++ b/src/serialization/resources/crm/types/TaskRequestOpportunity.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Opportunity } from "./Opportunity"; export const TaskRequestOpportunity: core.serialization.Schema< serializers.crm.TaskRequestOpportunity.Raw, Merge.crm.TaskRequestOpportunity -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.Opportunity), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Opportunity]); export declare namespace TaskRequestOpportunity { - type Raw = string | serializers.crm.Opportunity.Raw; + type Raw = string | Opportunity.Raw; } diff --git a/src/serialization/resources/crm/types/TaskRequestOwner.ts b/src/serialization/resources/crm/types/TaskRequestOwner.ts index 8a2ff9f6d..dfbb960a6 100644 --- a/src/serialization/resources/crm/types/TaskRequestOwner.ts +++ b/src/serialization/resources/crm/types/TaskRequestOwner.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const TaskRequestOwner: core.serialization.Schema< serializers.crm.TaskRequestOwner.Raw, Merge.crm.TaskRequestOwner -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).crm.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace TaskRequestOwner { - type Raw = string | serializers.crm.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/TaskRequestStatus.ts b/src/serialization/resources/crm/types/TaskRequestStatus.ts index b21e1c9de..25b99b61a 100644 --- a/src/serialization/resources/crm/types/TaskRequestStatus.ts +++ b/src/serialization/resources/crm/types/TaskRequestStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TaskStatusEnum } from "./TaskStatusEnum"; export const TaskRequestStatus: core.serialization.Schema< serializers.crm.TaskRequestStatus.Raw, Merge.crm.TaskRequestStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.TaskStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([TaskStatusEnum, core.serialization.string()]); export declare namespace TaskRequestStatus { - type Raw = serializers.crm.TaskStatusEnum.Raw | string; + type Raw = TaskStatusEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/TaskResponse.ts b/src/serialization/resources/crm/types/TaskResponse.ts index d02fcc5ad..96097eaf8 100644 --- a/src/serialization/resources/crm/types/TaskResponse.ts +++ b/src/serialization/resources/crm/types/TaskResponse.ts @@ -2,29 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Task } from "./Task"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const TaskResponse: core.serialization.ObjectSchema = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).crm.Task), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).crm.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.DebugModeLog)) - .optional(), + model: Task, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace TaskResponse { interface Raw { - model: serializers.crm.Task.Raw; - warnings: serializers.crm.WarningValidationProblem.Raw[]; - errors: serializers.crm.ErrorValidationProblem.Raw[]; - logs?: serializers.crm.DebugModeLog.Raw[] | null; + model: Task.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/TaskStatus.ts b/src/serialization/resources/crm/types/TaskStatus.ts index 8d40e588c..3a1092fa4 100644 --- a/src/serialization/resources/crm/types/TaskStatus.ts +++ b/src/serialization/resources/crm/types/TaskStatus.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TaskStatusEnum } from "./TaskStatusEnum"; export const TaskStatus: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).crm.TaskStatusEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([TaskStatusEnum, core.serialization.string()]); export declare namespace TaskStatus { - type Raw = serializers.crm.TaskStatusEnum.Raw | string; + type Raw = TaskStatusEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/TaskStatusEnum.ts b/src/serialization/resources/crm/types/TaskStatusEnum.ts index 7b3ec8498..080c3d03e 100644 --- a/src/serialization/resources/crm/types/TaskStatusEnum.ts +++ b/src/serialization/resources/crm/types/TaskStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TaskStatusEnum: core.serialization.Schema = diff --git a/src/serialization/resources/crm/types/User.ts b/src/serialization/resources/crm/types/User.ts index 405cba858..8e13ed2fa 100644 --- a/src/serialization/resources/crm/types/User.ts +++ b/src/serialization/resources/crm/types/User.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const User: core.serialization.ObjectSchema = core.serialization.object({ @@ -20,18 +22,8 @@ export const User: core.serialization.ObjectSchema (await import("../../..")).crm.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).crm.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace User { @@ -45,7 +37,7 @@ export declare namespace User { is_active?: boolean | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.crm.RemoteData.Raw[] | null; - remote_fields?: serializers.crm.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/crm/types/ValidationProblemSource.ts b/src/serialization/resources/crm/types/ValidationProblemSource.ts index 795a3217d..645e66feb 100644 --- a/src/serialization/resources/crm/types/ValidationProblemSource.ts +++ b/src/serialization/resources/crm/types/ValidationProblemSource.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ValidationProblemSource: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/crm/types/WarningValidationProblem.ts b/src/serialization/resources/crm/types/WarningValidationProblem.ts index e2e79764c..1b2dd36d9 100644 --- a/src/serialization/resources/crm/types/WarningValidationProblem.ts +++ b/src/serialization/resources/crm/types/WarningValidationProblem.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ValidationProblemSource } from "./ValidationProblemSource"; export const WarningValidationProblem: core.serialization.ObjectSchema< serializers.crm.WarningValidationProblem.Raw, Merge.crm.WarningValidationProblem > = core.serialization.object({ - source: core.serialization - .lazyObject(async () => (await import("../../..")).crm.ValidationProblemSource) - .optional(), + source: ValidationProblemSource.optional(), title: core.serialization.string(), detail: core.serialization.string(), problemType: core.serialization.property("problem_type", core.serialization.string()), @@ -20,7 +19,7 @@ export const WarningValidationProblem: core.serialization.ObjectSchema< export declare namespace WarningValidationProblem { interface Raw { - source?: serializers.crm.ValidationProblemSource.Raw | null; + source?: ValidationProblemSource.Raw | null; title: string; detail: string; problem_type: string; diff --git a/src/serialization/resources/crm/types/WebhookReceiver.ts b/src/serialization/resources/crm/types/WebhookReceiver.ts index 50a95baea..67d13f1ba 100644 --- a/src/serialization/resources/crm/types/WebhookReceiver.ts +++ b/src/serialization/resources/crm/types/WebhookReceiver.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const WebhookReceiver: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/serialization/resources/filestorage/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts index 24455ac7c..2b49ef98d 100644 --- a/src/serialization/resources/filestorage/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts +++ b/src/serialization/resources/filestorage/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { RemoteResponse } from "../../../types/RemoteResponse"; export const AsyncPassthroughRetrieveResponse: core.serialization.Schema< serializers.filestorage.AsyncPassthroughRetrieveResponse.Raw, Merge.filestorage.AsyncPassthroughRetrieveResponse -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazyObject(async () => (await import("../../../../..")).filestorage.RemoteResponse), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RemoteResponse, core.serialization.string()]); export declare namespace AsyncPassthroughRetrieveResponse { - type Raw = serializers.filestorage.RemoteResponse.Raw | string; + type Raw = RemoteResponse.Raw | string; } diff --git a/src/serialization/resources/filestorage/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts b/src/serialization/resources/filestorage/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts index f044851ec..6a92be50c 100644 --- a/src/serialization/resources/filestorage/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/serialization/resources/filestorage/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const CreateFieldMappingRequest: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts b/src/serialization/resources/filestorage/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts index 02a88baf4..e772c9da2 100644 --- a/src/serialization/resources/filestorage/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts +++ b/src/serialization/resources/filestorage/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const PatchedEditFieldMappingRequest: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/resources/files/client/requests/FileStorageFileEndpointRequest.ts b/src/serialization/resources/filestorage/resources/files/client/requests/FileStorageFileEndpointRequest.ts index 3f5eb056b..35ed5e1e3 100644 --- a/src/serialization/resources/filestorage/resources/files/client/requests/FileStorageFileEndpointRequest.ts +++ b/src/serialization/resources/filestorage/resources/files/client/requests/FileStorageFileEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { FileRequest } from "../../../../types/FileRequest"; export const FileStorageFileEndpointRequest: core.serialization.Schema< serializers.filestorage.FileStorageFileEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).filestorage.FileRequest), + model: FileRequest, }); export declare namespace FileStorageFileEndpointRequest { interface Raw { - model: serializers.filestorage.FileRequest.Raw; + model: FileRequest.Raw; } } diff --git a/src/serialization/resources/filestorage/resources/files/types/FilesListRequestExpand.ts b/src/serialization/resources/filestorage/resources/files/types/FilesListRequestExpand.ts index 8864bfe4d..4b46e811d 100644 --- a/src/serialization/resources/filestorage/resources/files/types/FilesListRequestExpand.ts +++ b/src/serialization/resources/filestorage/resources/files/types/FilesListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const FilesListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/resources/files/types/FilesRetrieveRequestExpand.ts b/src/serialization/resources/filestorage/resources/files/types/FilesRetrieveRequestExpand.ts index 4b07127f6..d45ef41c2 100644 --- a/src/serialization/resources/filestorage/resources/files/types/FilesRetrieveRequestExpand.ts +++ b/src/serialization/resources/filestorage/resources/files/types/FilesRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const FilesRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/resources/folders/client/requests/FileStorageFolderEndpointRequest.ts b/src/serialization/resources/filestorage/resources/folders/client/requests/FileStorageFolderEndpointRequest.ts index b36897b3e..2764ec04c 100644 --- a/src/serialization/resources/filestorage/resources/folders/client/requests/FileStorageFolderEndpointRequest.ts +++ b/src/serialization/resources/filestorage/resources/folders/client/requests/FileStorageFolderEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { FolderRequest } from "../../../../types/FolderRequest"; export const FileStorageFolderEndpointRequest: core.serialization.Schema< serializers.filestorage.FileStorageFolderEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).filestorage.FolderRequest), + model: FolderRequest, }); export declare namespace FileStorageFolderEndpointRequest { interface Raw { - model: serializers.filestorage.FolderRequest.Raw; + model: FolderRequest.Raw; } } diff --git a/src/serialization/resources/filestorage/resources/folders/types/FoldersListRequestExpand.ts b/src/serialization/resources/filestorage/resources/folders/types/FoldersListRequestExpand.ts index 0f221e95a..86b8276cc 100644 --- a/src/serialization/resources/filestorage/resources/folders/types/FoldersListRequestExpand.ts +++ b/src/serialization/resources/filestorage/resources/folders/types/FoldersListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const FoldersListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/resources/folders/types/FoldersRetrieveRequestExpand.ts b/src/serialization/resources/filestorage/resources/folders/types/FoldersRetrieveRequestExpand.ts index deb3e5f84..96ac310a2 100644 --- a/src/serialization/resources/filestorage/resources/folders/types/FoldersRetrieveRequestExpand.ts +++ b/src/serialization/resources/filestorage/resources/folders/types/FoldersRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const FoldersRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/resources/forceResync/client/syncStatusResyncCreate.ts b/src/serialization/resources/filestorage/resources/forceResync/client/syncStatusResyncCreate.ts index fe561e8f7..e3717d345 100644 --- a/src/serialization/resources/filestorage/resources/forceResync/client/syncStatusResyncCreate.ts +++ b/src/serialization/resources/filestorage/resources/forceResync/client/syncStatusResyncCreate.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { SyncStatus } from "../../../types/SyncStatus"; export const Response: core.serialization.Schema< serializers.filestorage.forceResync.syncStatusResyncCreate.Response.Raw, Merge.filestorage.SyncStatus[] -> = core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).filestorage.SyncStatus) -); +> = core.serialization.list(SyncStatus); export declare namespace Response { - type Raw = serializers.filestorage.SyncStatus.Raw[]; + type Raw = SyncStatus.Raw[]; } diff --git a/src/serialization/resources/filestorage/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts b/src/serialization/resources/filestorage/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts index 1a6efe73e..5f06f2802 100644 --- a/src/serialization/resources/filestorage/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts +++ b/src/serialization/resources/filestorage/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const GenerateRemoteKeyRequest: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/resources/issues/types/IssuesListRequestStatus.ts b/src/serialization/resources/filestorage/resources/issues/types/IssuesListRequestStatus.ts index fc121d1f2..27ce68f67 100644 --- a/src/serialization/resources/filestorage/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/serialization/resources/filestorage/resources/issues/types/IssuesListRequestStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const IssuesListRequestStatus: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/resources/linkToken/client/requests/EndUserDetailsRequest.ts b/src/serialization/resources/filestorage/resources/linkToken/client/requests/EndUserDetailsRequest.ts index 17da878f3..404cbce62 100644 --- a/src/serialization/resources/filestorage/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/serialization/resources/filestorage/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { CategoriesEnum } from "../../../../types/CategoriesEnum"; +import { CommonModelScopesBodyRequest } from "../../../../types/CommonModelScopesBodyRequest"; +import { IndividualCommonModelScopeDeserializerRequest } from "../../../../types/IndividualCommonModelScopeDeserializerRequest"; +import { LanguageEnum } from "../../../../types/LanguageEnum"; export const EndUserDetailsRequest: core.serialization.Schema< serializers.filestorage.EndUserDetailsRequest.Raw, @@ -13,9 +17,7 @@ export const EndUserDetailsRequest: core.serialization.Schema< endUserEmailAddress: core.serialization.property("end_user_email_address", core.serialization.string()), endUserOrganizationName: core.serialization.property("end_user_organization_name", core.serialization.string()), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string()), - categories: core.serialization.list( - core.serialization.lazy(async () => (await import("../../../../../..")).filestorage.CategoriesEnum) - ), + categories: core.serialization.list(CategoriesEnum), integration: core.serialization.string().optional(), linkExpiryMins: core.serialization.property("link_expiry_mins", core.serialization.number().optional()), shouldCreateMagicLinkUrl: core.serialization.property( @@ -25,34 +27,18 @@ export const EndUserDetailsRequest: core.serialization.Schema< hideAdminMagicLink: core.serialization.property("hide_admin_magic_link", core.serialization.boolean().optional()), commonModels: core.serialization.property( "common_models", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../../../../..")).filestorage.CommonModelScopesBodyRequest - ) - ) - .optional() + core.serialization.list(CommonModelScopesBodyRequest).optional() ), categoryCommonModelScopes: core.serialization.property( "category_common_model_scopes", core.serialization .record( core.serialization.string(), - core.serialization - .list( - core.serialization.lazyObject( - async () => - (await import("../../../../../..")).filestorage - .IndividualCommonModelScopeDeserializerRequest - ) - ) - .optional() + core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional() ) .optional() ), - language: core.serialization - .lazy(async () => (await import("../../../../../..")).filestorage.LanguageEnum) - .optional(), + language: LanguageEnum.optional(), integrationSpecificConfig: core.serialization.property( "integration_specific_config", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -64,17 +50,17 @@ export declare namespace EndUserDetailsRequest { end_user_email_address: string; end_user_organization_name: string; end_user_origin_id: string; - categories: serializers.filestorage.CategoriesEnum.Raw[]; + categories: CategoriesEnum.Raw[]; integration?: string | null; link_expiry_mins?: number | null; should_create_magic_link_url?: boolean | null; hide_admin_magic_link?: boolean | null; - common_models?: serializers.filestorage.CommonModelScopesBodyRequest.Raw[] | null; + common_models?: CommonModelScopesBodyRequest.Raw[] | null; category_common_model_scopes?: Record< string, - serializers.filestorage.IndividualCommonModelScopeDeserializerRequest.Raw[] | null | undefined + IndividualCommonModelScopeDeserializerRequest.Raw[] | null | undefined > | null; - language?: serializers.filestorage.LanguageEnum.Raw | null; + language?: LanguageEnum.Raw | null; integration_specific_config?: Record | null; } } diff --git a/src/serialization/resources/filestorage/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/serialization/resources/filestorage/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index f41d55155..ad4ace040 100644 --- a/src/serialization/resources/filestorage/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/serialization/resources/filestorage/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const LinkedAccountsListRequestCategory: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts b/src/serialization/resources/filestorage/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts index c7e4bd794..4b13f06a4 100644 --- a/src/serialization/resources/filestorage/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts +++ b/src/serialization/resources/filestorage/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const RemoteKeyForRegenerationRequest: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts b/src/serialization/resources/filestorage/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts index d2c69c92b..4c48e873b 100644 --- a/src/serialization/resources/filestorage/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/filestorage/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { IndividualCommonModelScopeDeserializerRequest } from "../../../../types/IndividualCommonModelScopeDeserializerRequest"; export const LinkedAccountCommonModelScopeDeserializerRequest: core.serialization.Schema< serializers.filestorage.LinkedAccountCommonModelScopeDeserializerRequest.Raw, @@ -12,17 +13,12 @@ export const LinkedAccountCommonModelScopeDeserializerRequest: core.serializatio > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list( - core.serialization.lazyObject( - async () => - (await import("../../../../../..")).filestorage.IndividualCommonModelScopeDeserializerRequest - ) - ) + core.serialization.list(IndividualCommonModelScopeDeserializerRequest) ), }); export declare namespace LinkedAccountCommonModelScopeDeserializerRequest { interface Raw { - common_models: serializers.filestorage.IndividualCommonModelScopeDeserializerRequest.Raw[]; + common_models: IndividualCommonModelScopeDeserializerRequest.Raw[]; } } diff --git a/src/serialization/resources/filestorage/resources/webhookReceivers/client/list.ts b/src/serialization/resources/filestorage/resources/webhookReceivers/client/list.ts index 3628e343a..328a64782 100644 --- a/src/serialization/resources/filestorage/resources/webhookReceivers/client/list.ts +++ b/src/serialization/resources/filestorage/resources/webhookReceivers/client/list.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { WebhookReceiver } from "../../../types/WebhookReceiver"; export const Response: core.serialization.Schema< serializers.filestorage.webhookReceivers.list.Response.Raw, Merge.filestorage.WebhookReceiver[] -> = core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).filestorage.WebhookReceiver) -); +> = core.serialization.list(WebhookReceiver); export declare namespace Response { - type Raw = serializers.filestorage.WebhookReceiver.Raw[]; + type Raw = WebhookReceiver.Raw[]; } diff --git a/src/serialization/resources/filestorage/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts b/src/serialization/resources/filestorage/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts index dd14db30a..882f99bc5 100644 --- a/src/serialization/resources/filestorage/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts +++ b/src/serialization/resources/filestorage/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const WebhookReceiverRequest: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/AccountDetails.ts b/src/serialization/resources/filestorage/types/AccountDetails.ts index 29011c664..82cc123a1 100644 --- a/src/serialization/resources/filestorage/types/AccountDetails.ts +++ b/src/serialization/resources/filestorage/types/AccountDetails.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoryEnum } from "./CategoryEnum"; export const AccountDetails: core.serialization.ObjectSchema< serializers.filestorage.AccountDetails.Raw, @@ -13,7 +14,7 @@ export const AccountDetails: core.serialization.ObjectSchema< id: core.serialization.string().optional(), integration: core.serialization.string().optional(), integrationSlug: core.serialization.property("integration_slug", core.serialization.string().optional()), - category: core.serialization.lazy(async () => (await import("../../..")).filestorage.CategoryEnum).optional(), + category: CategoryEnum.optional(), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property( "end_user_organization_name", @@ -32,7 +33,7 @@ export declare namespace AccountDetails { id?: string | null; integration?: string | null; integration_slug?: string | null; - category?: serializers.filestorage.CategoryEnum.Raw | null; + category?: CategoryEnum.Raw | null; end_user_origin_id?: string | null; end_user_organization_name?: string | null; end_user_email_address?: string | null; diff --git a/src/serialization/resources/filestorage/types/AccountDetailsAndActions.ts b/src/serialization/resources/filestorage/types/AccountDetailsAndActions.ts index 957acb413..be3342c59 100644 --- a/src/serialization/resources/filestorage/types/AccountDetailsAndActions.ts +++ b/src/serialization/resources/filestorage/types/AccountDetailsAndActions.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoryEnum } from "./CategoryEnum"; +import { AccountDetailsAndActionsStatusEnum } from "./AccountDetailsAndActionsStatusEnum"; +import { AccountDetailsAndActionsIntegration } from "./AccountDetailsAndActionsIntegration"; export const AccountDetailsAndActions: core.serialization.ObjectSchema< serializers.filestorage.AccountDetailsAndActions.Raw, Merge.filestorage.AccountDetailsAndActions > = core.serialization.object({ id: core.serialization.string(), - category: core.serialization.lazy(async () => (await import("../../..")).filestorage.CategoryEnum).optional(), - status: core.serialization.lazy( - async () => (await import("../../..")).filestorage.AccountDetailsAndActionsStatusEnum - ), + category: CategoryEnum.optional(), + status: AccountDetailsAndActionsStatusEnum, statusDetail: core.serialization.property("status_detail", core.serialization.string().optional()), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property("end_user_organization_name", core.serialization.string()), @@ -22,9 +23,7 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< subdomain: core.serialization.string().optional(), webhookListenerUrl: core.serialization.property("webhook_listener_url", core.serialization.string()), isDuplicate: core.serialization.property("is_duplicate", core.serialization.boolean().optional()), - integration: core.serialization - .lazyObject(async () => (await import("../../..")).filestorage.AccountDetailsAndActionsIntegration) - .optional(), + integration: AccountDetailsAndActionsIntegration.optional(), accountType: core.serialization.property("account_type", core.serialization.string()), completedAt: core.serialization.property("completed_at", core.serialization.date()), }); @@ -32,8 +31,8 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< export declare namespace AccountDetailsAndActions { interface Raw { id: string; - category?: serializers.filestorage.CategoryEnum.Raw | null; - status: serializers.filestorage.AccountDetailsAndActionsStatusEnum.Raw; + category?: CategoryEnum.Raw | null; + status: AccountDetailsAndActionsStatusEnum.Raw; status_detail?: string | null; end_user_origin_id?: string | null; end_user_organization_name: string; @@ -41,7 +40,7 @@ export declare namespace AccountDetailsAndActions { subdomain?: string | null; webhook_listener_url: string; is_duplicate?: boolean | null; - integration?: serializers.filestorage.AccountDetailsAndActionsIntegration.Raw | null; + integration?: AccountDetailsAndActionsIntegration.Raw | null; account_type: string; completed_at: string; } diff --git a/src/serialization/resources/filestorage/types/AccountDetailsAndActionsIntegration.ts b/src/serialization/resources/filestorage/types/AccountDetailsAndActionsIntegration.ts index 03792c3bb..7d5994aa9 100644 --- a/src/serialization/resources/filestorage/types/AccountDetailsAndActionsIntegration.ts +++ b/src/serialization/resources/filestorage/types/AccountDetailsAndActionsIntegration.ts @@ -2,18 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoriesEnum } from "./CategoriesEnum"; +import { ModelOperation } from "./ModelOperation"; export const AccountDetailsAndActionsIntegration: core.serialization.ObjectSchema< serializers.filestorage.AccountDetailsAndActionsIntegration.Raw, Merge.filestorage.AccountDetailsAndActionsIntegration > = core.serialization.object({ name: core.serialization.string(), - categories: core.serialization.list( - core.serialization.lazy(async () => (await import("../../..")).filestorage.CategoriesEnum) - ), + categories: core.serialization.list(CategoriesEnum), image: core.serialization.string().optional(), squareImage: core.serialization.property("square_image", core.serialization.string().optional()), color: core.serialization.string(), @@ -21,21 +21,19 @@ export const AccountDetailsAndActionsIntegration: core.serialization.ObjectSchem passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.ModelOperation)) - .optional() + core.serialization.list(ModelOperation).optional() ), }); export declare namespace AccountDetailsAndActionsIntegration { interface Raw { name: string; - categories: serializers.filestorage.CategoriesEnum.Raw[]; + categories: CategoriesEnum.Raw[]; image?: string | null; square_image?: string | null; color: string; slug: string; passthrough_available: boolean; - available_model_operations?: serializers.filestorage.ModelOperation.Raw[] | null; + available_model_operations?: ModelOperation.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/AccountDetailsAndActionsStatusEnum.ts b/src/serialization/resources/filestorage/types/AccountDetailsAndActionsStatusEnum.ts index 8dfc37115..5e5e5cb35 100644 --- a/src/serialization/resources/filestorage/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/serialization/resources/filestorage/types/AccountDetailsAndActionsStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AccountDetailsAndActionsStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/AccountIntegration.ts b/src/serialization/resources/filestorage/types/AccountIntegration.ts index c90325bbe..d23166d0f 100644 --- a/src/serialization/resources/filestorage/types/AccountIntegration.ts +++ b/src/serialization/resources/filestorage/types/AccountIntegration.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoriesEnum } from "./CategoriesEnum"; export const AccountIntegration: core.serialization.ObjectSchema< serializers.filestorage.AccountIntegration.Raw, @@ -12,9 +13,7 @@ export const AccountIntegration: core.serialization.ObjectSchema< > = core.serialization.object({ name: core.serialization.string(), abbreviatedName: core.serialization.property("abbreviated_name", core.serialization.string().optional()), - categories: core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).filestorage.CategoriesEnum)) - .optional(), + categories: core.serialization.list(CategoriesEnum).optional(), image: core.serialization.string().optional(), squareImage: core.serialization.property("square_image", core.serialization.string().optional()), color: core.serialization.string().optional(), @@ -37,7 +36,7 @@ export declare namespace AccountIntegration { interface Raw { name: string; abbreviated_name?: string | null; - categories?: serializers.filestorage.CategoriesEnum.Raw[] | null; + categories?: CategoriesEnum.Raw[] | null; image?: string | null; square_image?: string | null; color?: string | null; diff --git a/src/serialization/resources/filestorage/types/AccountToken.ts b/src/serialization/resources/filestorage/types/AccountToken.ts index aadb7d044..b2ff8536b 100644 --- a/src/serialization/resources/filestorage/types/AccountToken.ts +++ b/src/serialization/resources/filestorage/types/AccountToken.ts @@ -2,21 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountIntegration } from "./AccountIntegration"; export const AccountToken: core.serialization.ObjectSchema< serializers.filestorage.AccountToken.Raw, Merge.filestorage.AccountToken > = core.serialization.object({ accountToken: core.serialization.property("account_token", core.serialization.string()), - integration: core.serialization.lazyObject(async () => (await import("../../..")).filestorage.AccountIntegration), + integration: AccountIntegration, }); export declare namespace AccountToken { interface Raw { account_token: string; - integration: serializers.filestorage.AccountIntegration.Raw; + integration: AccountIntegration.Raw; } } diff --git a/src/serialization/resources/filestorage/types/AdvancedMetadata.ts b/src/serialization/resources/filestorage/types/AdvancedMetadata.ts index dc4a16b62..6e0b444bc 100644 --- a/src/serialization/resources/filestorage/types/AdvancedMetadata.ts +++ b/src/serialization/resources/filestorage/types/AdvancedMetadata.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AdvancedMetadata: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/AsyncPassthroughReciept.ts b/src/serialization/resources/filestorage/types/AsyncPassthroughReciept.ts index 492e5ffb6..5fa364cdb 100644 --- a/src/serialization/resources/filestorage/types/AsyncPassthroughReciept.ts +++ b/src/serialization/resources/filestorage/types/AsyncPassthroughReciept.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AsyncPassthroughReciept: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/AuditLogEvent.ts b/src/serialization/resources/filestorage/types/AuditLogEvent.ts index 7d3c2a74b..31bcc754f 100644 --- a/src/serialization/resources/filestorage/types/AuditLogEvent.ts +++ b/src/serialization/resources/filestorage/types/AuditLogEvent.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AuditLogEventRole } from "./AuditLogEventRole"; +import { AuditLogEventEventType } from "./AuditLogEventEventType"; export const AuditLogEvent: core.serialization.ObjectSchema< serializers.filestorage.AuditLogEvent.Raw, @@ -13,12 +15,9 @@ export const AuditLogEvent: core.serialization.ObjectSchema< id: core.serialization.string().optional(), userName: core.serialization.property("user_name", core.serialization.string().optional()), userEmail: core.serialization.property("user_email", core.serialization.string().optional()), - role: core.serialization.lazy(async () => (await import("../../..")).filestorage.AuditLogEventRole), + role: AuditLogEventRole, ipAddress: core.serialization.property("ip_address", core.serialization.string()), - eventType: core.serialization.property( - "event_type", - core.serialization.lazy(async () => (await import("../../..")).filestorage.AuditLogEventEventType) - ), + eventType: core.serialization.property("event_type", AuditLogEventEventType), eventDescription: core.serialization.property("event_description", core.serialization.string()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), }); @@ -28,9 +27,9 @@ export declare namespace AuditLogEvent { id?: string | null; user_name?: string | null; user_email?: string | null; - role: serializers.filestorage.AuditLogEventRole.Raw; + role: AuditLogEventRole.Raw; ip_address: string; - event_type: serializers.filestorage.AuditLogEventEventType.Raw; + event_type: AuditLogEventEventType.Raw; event_description: string; created_at?: string | null; } diff --git a/src/serialization/resources/filestorage/types/AuditLogEventEventType.ts b/src/serialization/resources/filestorage/types/AuditLogEventEventType.ts index c3bbe3aab..86b8953bc 100644 --- a/src/serialization/resources/filestorage/types/AuditLogEventEventType.ts +++ b/src/serialization/resources/filestorage/types/AuditLogEventEventType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EventTypeEnum } from "./EventTypeEnum"; export const AuditLogEventEventType: core.serialization.Schema< serializers.filestorage.AuditLogEventEventType.Raw, Merge.filestorage.AuditLogEventEventType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).filestorage.EventTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EventTypeEnum, core.serialization.string()]); export declare namespace AuditLogEventEventType { - type Raw = serializers.filestorage.EventTypeEnum.Raw | string; + type Raw = EventTypeEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/AuditLogEventRole.ts b/src/serialization/resources/filestorage/types/AuditLogEventRole.ts index a849482d0..e71fc8a6f 100644 --- a/src/serialization/resources/filestorage/types/AuditLogEventRole.ts +++ b/src/serialization/resources/filestorage/types/AuditLogEventRole.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RoleEnum } from "./RoleEnum"; export const AuditLogEventRole: core.serialization.Schema< serializers.filestorage.AuditLogEventRole.Raw, Merge.filestorage.AuditLogEventRole -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).filestorage.RoleEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RoleEnum, core.serialization.string()]); export declare namespace AuditLogEventRole { - type Raw = serializers.filestorage.RoleEnum.Raw | string; + type Raw = RoleEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/AvailableActions.ts b/src/serialization/resources/filestorage/types/AvailableActions.ts index 34d414a62..ec4f45611 100644 --- a/src/serialization/resources/filestorage/types/AvailableActions.ts +++ b/src/serialization/resources/filestorage/types/AvailableActions.ts @@ -2,28 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountIntegration } from "./AccountIntegration"; +import { ModelOperation } from "./ModelOperation"; export const AvailableActions: core.serialization.ObjectSchema< serializers.filestorage.AvailableActions.Raw, Merge.filestorage.AvailableActions > = core.serialization.object({ - integration: core.serialization.lazyObject(async () => (await import("../../..")).filestorage.AccountIntegration), + integration: AccountIntegration, passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.ModelOperation)) - .optional() + core.serialization.list(ModelOperation).optional() ), }); export declare namespace AvailableActions { interface Raw { - integration: serializers.filestorage.AccountIntegration.Raw; + integration: AccountIntegration.Raw; passthrough_available: boolean; - available_model_operations?: serializers.filestorage.ModelOperation.Raw[] | null; + available_model_operations?: ModelOperation.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/CategoriesEnum.ts b/src/serialization/resources/filestorage/types/CategoriesEnum.ts index 2203d46ba..60bbbee04 100644 --- a/src/serialization/resources/filestorage/types/CategoriesEnum.ts +++ b/src/serialization/resources/filestorage/types/CategoriesEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CategoriesEnum: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/CategoryEnum.ts b/src/serialization/resources/filestorage/types/CategoryEnum.ts index fef68ac06..99227afe1 100644 --- a/src/serialization/resources/filestorage/types/CategoryEnum.ts +++ b/src/serialization/resources/filestorage/types/CategoryEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CategoryEnum: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/CommonModelScopeApi.ts b/src/serialization/resources/filestorage/types/CommonModelScopeApi.ts index 99e65cdf3..83ff6b923 100644 --- a/src/serialization/resources/filestorage/types/CommonModelScopeApi.ts +++ b/src/serialization/resources/filestorage/types/CommonModelScopeApi.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IndividualCommonModelScopeDeserializer } from "./IndividualCommonModelScopeDeserializer"; export const CommonModelScopeApi: core.serialization.ObjectSchema< serializers.filestorage.CommonModelScopeApi.Raw, @@ -12,16 +13,12 @@ export const CommonModelScopeApi: core.serialization.ObjectSchema< > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list( - core.serialization.lazyObject( - async () => (await import("../../..")).filestorage.IndividualCommonModelScopeDeserializer - ) - ) + core.serialization.list(IndividualCommonModelScopeDeserializer) ), }); export declare namespace CommonModelScopeApi { interface Raw { - common_models: serializers.filestorage.IndividualCommonModelScopeDeserializer.Raw[]; + common_models: IndividualCommonModelScopeDeserializer.Raw[]; } } diff --git a/src/serialization/resources/filestorage/types/CommonModelScopesBodyRequest.ts b/src/serialization/resources/filestorage/types/CommonModelScopesBodyRequest.ts index 38f17c2e7..85fb96d59 100644 --- a/src/serialization/resources/filestorage/types/CommonModelScopesBodyRequest.ts +++ b/src/serialization/resources/filestorage/types/CommonModelScopesBodyRequest.ts @@ -2,21 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EnabledActionsEnum } from "./EnabledActionsEnum"; export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< serializers.filestorage.CommonModelScopesBodyRequest.Raw, Merge.filestorage.CommonModelScopesBodyRequest > = core.serialization.object({ modelId: core.serialization.property("model_id", core.serialization.string()), - enabledActions: core.serialization.property( - "enabled_actions", - core.serialization.list( - core.serialization.lazy(async () => (await import("../../..")).filestorage.EnabledActionsEnum) - ) - ), + enabledActions: core.serialization.property("enabled_actions", core.serialization.list(EnabledActionsEnum)), disabledFields: core.serialization.property( "disabled_fields", core.serialization.list(core.serialization.string()) @@ -26,7 +22,7 @@ export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< export declare namespace CommonModelScopesBodyRequest { interface Raw { model_id: string; - enabled_actions: serializers.filestorage.EnabledActionsEnum.Raw[]; + enabled_actions: EnabledActionsEnum.Raw[]; disabled_fields: string[]; } } diff --git a/src/serialization/resources/filestorage/types/DataPassthroughRequest.ts b/src/serialization/resources/filestorage/types/DataPassthroughRequest.ts index adccfaa3a..8f13493ef 100644 --- a/src/serialization/resources/filestorage/types/DataPassthroughRequest.ts +++ b/src/serialization/resources/filestorage/types/DataPassthroughRequest.ts @@ -2,45 +2,39 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { MethodEnum } from "./MethodEnum"; +import { MultipartFormFieldRequest } from "./MultipartFormFieldRequest"; +import { RequestFormatEnum } from "./RequestFormatEnum"; export const DataPassthroughRequest: core.serialization.ObjectSchema< serializers.filestorage.DataPassthroughRequest.Raw, Merge.filestorage.DataPassthroughRequest > = core.serialization.object({ - method: core.serialization.lazy(async () => (await import("../../..")).filestorage.MethodEnum), + method: MethodEnum, path: core.serialization.string(), baseUrlOverride: core.serialization.property("base_url_override", core.serialization.string().optional()), data: core.serialization.string().optional(), multipartFormData: core.serialization.property( "multipart_form_data", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).filestorage.MultipartFormFieldRequest - ) - ) - .optional() + core.serialization.list(MultipartFormFieldRequest).optional() ), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), - requestFormat: core.serialization.property( - "request_format", - core.serialization.lazy(async () => (await import("../../..")).filestorage.RequestFormatEnum).optional() - ), + requestFormat: core.serialization.property("request_format", RequestFormatEnum.optional()), normalizeResponse: core.serialization.property("normalize_response", core.serialization.boolean().optional()), }); export declare namespace DataPassthroughRequest { interface Raw { - method: serializers.filestorage.MethodEnum.Raw; + method: MethodEnum.Raw; path: string; base_url_override?: string | null; data?: string | null; - multipart_form_data?: serializers.filestorage.MultipartFormFieldRequest.Raw[] | null; + multipart_form_data?: MultipartFormFieldRequest.Raw[] | null; headers?: Record | null; - request_format?: serializers.filestorage.RequestFormatEnum.Raw | null; + request_format?: RequestFormatEnum.Raw | null; normalize_response?: boolean | null; } } diff --git a/src/serialization/resources/filestorage/types/DebugModeLog.ts b/src/serialization/resources/filestorage/types/DebugModeLog.ts index 2bba0db67..56a15acdf 100644 --- a/src/serialization/resources/filestorage/types/DebugModeLog.ts +++ b/src/serialization/resources/filestorage/types/DebugModeLog.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { DebugModelLogSummary } from "./DebugModelLogSummary"; export const DebugModeLog: core.serialization.ObjectSchema< serializers.filestorage.DebugModeLog.Raw, @@ -12,16 +13,13 @@ export const DebugModeLog: core.serialization.ObjectSchema< > = core.serialization.object({ logId: core.serialization.property("log_id", core.serialization.string()), dashboardView: core.serialization.property("dashboard_view", core.serialization.string()), - logSummary: core.serialization.property( - "log_summary", - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.DebugModelLogSummary) - ), + logSummary: core.serialization.property("log_summary", DebugModelLogSummary), }); export declare namespace DebugModeLog { interface Raw { log_id: string; dashboard_view: string; - log_summary: serializers.filestorage.DebugModelLogSummary.Raw; + log_summary: DebugModelLogSummary.Raw; } } diff --git a/src/serialization/resources/filestorage/types/DebugModelLogSummary.ts b/src/serialization/resources/filestorage/types/DebugModelLogSummary.ts index 6b3a95284..c3be09275 100644 --- a/src/serialization/resources/filestorage/types/DebugModelLogSummary.ts +++ b/src/serialization/resources/filestorage/types/DebugModelLogSummary.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const DebugModelLogSummary: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/Drive.ts b/src/serialization/resources/filestorage/types/Drive.ts index a846c1425..e2fd6f132 100644 --- a/src/serialization/resources/filestorage/types/Drive.ts +++ b/src/serialization/resources/filestorage/types/Drive.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const Drive: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/filestorage/types/EnabledActionsEnum.ts b/src/serialization/resources/filestorage/types/EnabledActionsEnum.ts index dfef79475..b5ca8af40 100644 --- a/src/serialization/resources/filestorage/types/EnabledActionsEnum.ts +++ b/src/serialization/resources/filestorage/types/EnabledActionsEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EnabledActionsEnum: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/EncodingEnum.ts b/src/serialization/resources/filestorage/types/EncodingEnum.ts index 0e8932c18..b401f4139 100644 --- a/src/serialization/resources/filestorage/types/EncodingEnum.ts +++ b/src/serialization/resources/filestorage/types/EncodingEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EncodingEnum: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/ErrorValidationProblem.ts b/src/serialization/resources/filestorage/types/ErrorValidationProblem.ts index 4df4ee1a1..d6dc435cc 100644 --- a/src/serialization/resources/filestorage/types/ErrorValidationProblem.ts +++ b/src/serialization/resources/filestorage/types/ErrorValidationProblem.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ValidationProblemSource } from "./ValidationProblemSource"; export const ErrorValidationProblem: core.serialization.ObjectSchema< serializers.filestorage.ErrorValidationProblem.Raw, Merge.filestorage.ErrorValidationProblem > = core.serialization.object({ - source: core.serialization - .lazyObject(async () => (await import("../../..")).filestorage.ValidationProblemSource) - .optional(), + source: ValidationProblemSource.optional(), title: core.serialization.string(), detail: core.serialization.string(), problemType: core.serialization.property("problem_type", core.serialization.string()), @@ -20,7 +19,7 @@ export const ErrorValidationProblem: core.serialization.ObjectSchema< export declare namespace ErrorValidationProblem { interface Raw { - source?: serializers.filestorage.ValidationProblemSource.Raw | null; + source?: ValidationProblemSource.Raw | null; title: string; detail: string; problem_type: string; diff --git a/src/serialization/resources/filestorage/types/EventTypeEnum.ts b/src/serialization/resources/filestorage/types/EventTypeEnum.ts index ed69ccba3..d1697708b 100644 --- a/src/serialization/resources/filestorage/types/EventTypeEnum.ts +++ b/src/serialization/resources/filestorage/types/EventTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EventTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/ExternalTargetFieldApi.ts b/src/serialization/resources/filestorage/types/ExternalTargetFieldApi.ts index 3ee651fe9..f301c61e8 100644 --- a/src/serialization/resources/filestorage/types/ExternalTargetFieldApi.ts +++ b/src/serialization/resources/filestorage/types/ExternalTargetFieldApi.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ExternalTargetFieldApi: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/ExternalTargetFieldApiResponse.ts b/src/serialization/resources/filestorage/types/ExternalTargetFieldApiResponse.ts index 5904c253b..84791b52f 100644 --- a/src/serialization/resources/filestorage/types/ExternalTargetFieldApiResponse.ts +++ b/src/serialization/resources/filestorage/types/ExternalTargetFieldApiResponse.ts @@ -2,62 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ExternalTargetFieldApi } from "./ExternalTargetFieldApi"; export const ExternalTargetFieldApiResponse: core.serialization.ObjectSchema< serializers.filestorage.ExternalTargetFieldApiResponse.Raw, Merge.filestorage.ExternalTargetFieldApiResponse > = core.serialization.object({ - file: core.serialization.property( - "File", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.ExternalTargetFieldApi) - ) - .optional() - ), - folder: core.serialization.property( - "Folder", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.ExternalTargetFieldApi) - ) - .optional() - ), - drive: core.serialization.property( - "Drive", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.ExternalTargetFieldApi) - ) - .optional() - ), - group: core.serialization.property( - "Group", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.ExternalTargetFieldApi) - ) - .optional() - ), - user: core.serialization.property( - "User", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.ExternalTargetFieldApi) - ) - .optional() - ), + file: core.serialization.property("File", core.serialization.list(ExternalTargetFieldApi).optional()), + folder: core.serialization.property("Folder", core.serialization.list(ExternalTargetFieldApi).optional()), + drive: core.serialization.property("Drive", core.serialization.list(ExternalTargetFieldApi).optional()), + group: core.serialization.property("Group", core.serialization.list(ExternalTargetFieldApi).optional()), + user: core.serialization.property("User", core.serialization.list(ExternalTargetFieldApi).optional()), }); export declare namespace ExternalTargetFieldApiResponse { interface Raw { - File?: serializers.filestorage.ExternalTargetFieldApi.Raw[] | null; - Folder?: serializers.filestorage.ExternalTargetFieldApi.Raw[] | null; - Drive?: serializers.filestorage.ExternalTargetFieldApi.Raw[] | null; - Group?: serializers.filestorage.ExternalTargetFieldApi.Raw[] | null; - User?: serializers.filestorage.ExternalTargetFieldApi.Raw[] | null; + File?: ExternalTargetFieldApi.Raw[] | null; + Folder?: ExternalTargetFieldApi.Raw[] | null; + Drive?: ExternalTargetFieldApi.Raw[] | null; + Group?: ExternalTargetFieldApi.Raw[] | null; + User?: ExternalTargetFieldApi.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/FieldMappingApiInstance.ts b/src/serialization/resources/filestorage/types/FieldMappingApiInstance.ts index d25d44677..3d07e5c9b 100644 --- a/src/serialization/resources/filestorage/types/FieldMappingApiInstance.ts +++ b/src/serialization/resources/filestorage/types/FieldMappingApiInstance.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstanceTargetField } from "./FieldMappingApiInstanceTargetField"; +import { FieldMappingApiInstanceRemoteField } from "./FieldMappingApiInstanceRemoteField"; export const FieldMappingApiInstance: core.serialization.ObjectSchema< serializers.filestorage.FieldMappingApiInstance.Raw, @@ -12,25 +14,15 @@ export const FieldMappingApiInstance: core.serialization.ObjectSchema< > = core.serialization.object({ id: core.serialization.string().optional(), isIntegrationWide: core.serialization.property("is_integration_wide", core.serialization.boolean().optional()), - targetField: core.serialization.property( - "target_field", - core.serialization - .lazyObject(async () => (await import("../../..")).filestorage.FieldMappingApiInstanceTargetField) - .optional() - ), - remoteField: core.serialization.property( - "remote_field", - core.serialization - .lazyObject(async () => (await import("../../..")).filestorage.FieldMappingApiInstanceRemoteField) - .optional() - ), + targetField: core.serialization.property("target_field", FieldMappingApiInstanceTargetField.optional()), + remoteField: core.serialization.property("remote_field", FieldMappingApiInstanceRemoteField.optional()), }); export declare namespace FieldMappingApiInstance { interface Raw { id?: string | null; is_integration_wide?: boolean | null; - target_field?: serializers.filestorage.FieldMappingApiInstanceTargetField.Raw | null; - remote_field?: serializers.filestorage.FieldMappingApiInstanceRemoteField.Raw | null; + target_field?: FieldMappingApiInstanceTargetField.Raw | null; + remote_field?: FieldMappingApiInstanceRemoteField.Raw | null; } } diff --git a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteField.ts b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteField.ts index 73abafb83..4c272a31e 100644 --- a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteField.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo } from "./FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo"; export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema< serializers.filestorage.FieldMappingApiInstanceRemoteField.Raw, @@ -14,9 +15,7 @@ export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()), remoteEndpointInfo: core.serialization.property( "remote_endpoint_info", - core.serialization.lazyObject( - async () => (await import("../../..")).filestorage.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - ) + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo ), }); @@ -24,6 +23,6 @@ export declare namespace FieldMappingApiInstanceRemoteField { interface Raw { remote_key_name: string; schema: Record; - remote_endpoint_info: serializers.filestorage.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; } } diff --git a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts index 27344bf78..d0635d08f 100644 --- a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts +++ b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceResponse.ts b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceResponse.ts index 247db04b5..eb4299146 100644 --- a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceResponse.ts +++ b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceResponse.ts @@ -2,72 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstance } from "./FieldMappingApiInstance"; export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< serializers.filestorage.FieldMappingApiInstanceResponse.Raw, Merge.filestorage.FieldMappingApiInstanceResponse > = core.serialization.object({ - file: core.serialization.property( - "File", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).filestorage.FieldMappingApiInstance - ) - ) - .optional() - ), - folder: core.serialization.property( - "Folder", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).filestorage.FieldMappingApiInstance - ) - ) - .optional() - ), - drive: core.serialization.property( - "Drive", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).filestorage.FieldMappingApiInstance - ) - ) - .optional() - ), - group: core.serialization.property( - "Group", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).filestorage.FieldMappingApiInstance - ) - ) - .optional() - ), - user: core.serialization.property( - "User", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).filestorage.FieldMappingApiInstance - ) - ) - .optional() - ), + file: core.serialization.property("File", core.serialization.list(FieldMappingApiInstance).optional()), + folder: core.serialization.property("Folder", core.serialization.list(FieldMappingApiInstance).optional()), + drive: core.serialization.property("Drive", core.serialization.list(FieldMappingApiInstance).optional()), + group: core.serialization.property("Group", core.serialization.list(FieldMappingApiInstance).optional()), + user: core.serialization.property("User", core.serialization.list(FieldMappingApiInstance).optional()), }); export declare namespace FieldMappingApiInstanceResponse { interface Raw { - File?: serializers.filestorage.FieldMappingApiInstance.Raw[] | null; - Folder?: serializers.filestorage.FieldMappingApiInstance.Raw[] | null; - Drive?: serializers.filestorage.FieldMappingApiInstance.Raw[] | null; - Group?: serializers.filestorage.FieldMappingApiInstance.Raw[] | null; - User?: serializers.filestorage.FieldMappingApiInstance.Raw[] | null; + File?: FieldMappingApiInstance.Raw[] | null; + Folder?: FieldMappingApiInstance.Raw[] | null; + Drive?: FieldMappingApiInstance.Raw[] | null; + Group?: FieldMappingApiInstance.Raw[] | null; + User?: FieldMappingApiInstance.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceTargetField.ts b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceTargetField.ts index 7d1dbbefb..648d533b1 100644 --- a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceTargetField.ts +++ b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceTargetField.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldMappingApiInstanceTargetField: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/FieldMappingInstanceResponse.ts b/src/serialization/resources/filestorage/types/FieldMappingInstanceResponse.ts index 3a27fe3e5..fcba5e6c8 100644 --- a/src/serialization/resources/filestorage/types/FieldMappingInstanceResponse.ts +++ b/src/serialization/resources/filestorage/types/FieldMappingInstanceResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstance } from "./FieldMappingApiInstance"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const FieldMappingInstanceResponse: core.serialization.ObjectSchema< serializers.filestorage.FieldMappingInstanceResponse.Raw, Merge.filestorage.FieldMappingInstanceResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).filestorage.FieldMappingApiInstance), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.DebugModeLog)) - .optional(), + model: FieldMappingApiInstance, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace FieldMappingInstanceResponse { interface Raw { - model: serializers.filestorage.FieldMappingApiInstance.Raw; - warnings: serializers.filestorage.WarningValidationProblem.Raw[]; - errors: serializers.filestorage.ErrorValidationProblem.Raw[]; - logs?: serializers.filestorage.DebugModeLog.Raw[] | null; + model: FieldMappingApiInstance.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/FieldPermissionDeserializer.ts b/src/serialization/resources/filestorage/types/FieldPermissionDeserializer.ts index b67179afb..303fed206 100644 --- a/src/serialization/resources/filestorage/types/FieldPermissionDeserializer.ts +++ b/src/serialization/resources/filestorage/types/FieldPermissionDeserializer.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldPermissionDeserializer: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/FieldPermissionDeserializerRequest.ts b/src/serialization/resources/filestorage/types/FieldPermissionDeserializerRequest.ts index 683de6521..3e4fcbcbc 100644 --- a/src/serialization/resources/filestorage/types/FieldPermissionDeserializerRequest.ts +++ b/src/serialization/resources/filestorage/types/FieldPermissionDeserializerRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldPermissionDeserializerRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/FileDrive.ts b/src/serialization/resources/filestorage/types/FileDrive.ts index d76c60ca4..e902f610d 100644 --- a/src/serialization/resources/filestorage/types/FileDrive.ts +++ b/src/serialization/resources/filestorage/types/FileDrive.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Drive } from "./Drive"; export const FileDrive: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Drive), - ]); + core.serialization.undiscriminatedUnion([core.serialization.string(), Drive]); export declare namespace FileDrive { - type Raw = string | serializers.filestorage.Drive.Raw; + type Raw = string | Drive.Raw; } diff --git a/src/serialization/resources/filestorage/types/FileFolder.ts b/src/serialization/resources/filestorage/types/FileFolder.ts index 9db1cd7c9..c27ca569e 100644 --- a/src/serialization/resources/filestorage/types/FileFolder.ts +++ b/src/serialization/resources/filestorage/types/FileFolder.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FileFolder: core.serialization.Schema< @@ -11,7 +11,7 @@ export const FileFolder: core.serialization.Schema< Merge.filestorage.FileFolder > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Folder), + core.serialization.lazyObject(() => serializers.filestorage.Folder), ]); export declare namespace FileFolder { diff --git a/src/serialization/resources/filestorage/types/FilePermissions.ts b/src/serialization/resources/filestorage/types/FilePermissions.ts index 1a4cfdef1..462d1769e 100644 --- a/src/serialization/resources/filestorage/types/FilePermissions.ts +++ b/src/serialization/resources/filestorage/types/FilePermissions.ts @@ -2,24 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PermissionRequest } from "./PermissionRequest"; +import { FilePermissionsItem } from "./FilePermissionsItem"; export const FilePermissions: core.serialization.Schema< serializers.filestorage.FilePermissions.Raw, Merge.filestorage.FilePermissions > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.PermissionRequest), - core.serialization.list( - core.serialization.lazy(async () => (await import("../../..")).filestorage.FilePermissionsItem) - ), + PermissionRequest, + core.serialization.list(FilePermissionsItem), ]); export declare namespace FilePermissions { - type Raw = - | string - | serializers.filestorage.PermissionRequest.Raw - | serializers.filestorage.FilePermissionsItem.Raw[]; + type Raw = string | PermissionRequest.Raw | FilePermissionsItem.Raw[]; } diff --git a/src/serialization/resources/filestorage/types/FilePermissionsItem.ts b/src/serialization/resources/filestorage/types/FilePermissionsItem.ts index 3e2ee2330..f32322f8d 100644 --- a/src/serialization/resources/filestorage/types/FilePermissionsItem.ts +++ b/src/serialization/resources/filestorage/types/FilePermissionsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PermissionRequest } from "./PermissionRequest"; export const FilePermissionsItem: core.serialization.Schema< serializers.filestorage.FilePermissionsItem.Raw, Merge.filestorage.FilePermissionsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.PermissionRequest), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PermissionRequest]); export declare namespace FilePermissionsItem { - type Raw = string | serializers.filestorage.PermissionRequest.Raw; + type Raw = string | PermissionRequest.Raw; } diff --git a/src/serialization/resources/filestorage/types/FileRequest.ts b/src/serialization/resources/filestorage/types/FileRequest.ts index 8671ca3b3..89c80d1df 100644 --- a/src/serialization/resources/filestorage/types/FileRequest.ts +++ b/src/serialization/resources/filestorage/types/FileRequest.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FileRequestFolder } from "./FileRequestFolder"; +import { FileRequestPermissions } from "./FileRequestPermissions"; +import { FileRequestDrive } from "./FileRequestDrive"; export const FileRequest: core.serialization.ObjectSchema< serializers.filestorage.FileRequest.Raw, @@ -16,11 +19,9 @@ export const FileRequest: core.serialization.ObjectSchema< size: core.serialization.number().optional(), mimeType: core.serialization.property("mime_type", core.serialization.string().optional()), description: core.serialization.string().optional(), - folder: core.serialization.lazy(async () => (await import("../../..")).filestorage.FileRequestFolder).optional(), - permissions: core.serialization - .lazy(async () => (await import("../../..")).filestorage.FileRequestPermissions) - .optional(), - drive: core.serialization.lazy(async () => (await import("../../..")).filestorage.FileRequestDrive).optional(), + folder: FileRequestFolder.optional(), + permissions: FileRequestPermissions.optional(), + drive: FileRequestDrive.optional(), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -39,9 +40,9 @@ export declare namespace FileRequest { size?: number | null; mime_type?: string | null; description?: string | null; - folder?: serializers.filestorage.FileRequestFolder.Raw | null; - permissions?: serializers.filestorage.FileRequestPermissions.Raw | null; - drive?: serializers.filestorage.FileRequestDrive.Raw | null; + folder?: FileRequestFolder.Raw | null; + permissions?: FileRequestPermissions.Raw | null; + drive?: FileRequestDrive.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; } diff --git a/src/serialization/resources/filestorage/types/FileRequestDrive.ts b/src/serialization/resources/filestorage/types/FileRequestDrive.ts index 3e5529cfe..6117c7a2c 100644 --- a/src/serialization/resources/filestorage/types/FileRequestDrive.ts +++ b/src/serialization/resources/filestorage/types/FileRequestDrive.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Drive } from "./Drive"; export const FileRequestDrive: core.serialization.Schema< serializers.filestorage.FileRequestDrive.Raw, Merge.filestorage.FileRequestDrive -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Drive), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Drive]); export declare namespace FileRequestDrive { - type Raw = string | serializers.filestorage.Drive.Raw; + type Raw = string | Drive.Raw; } diff --git a/src/serialization/resources/filestorage/types/FileRequestFolder.ts b/src/serialization/resources/filestorage/types/FileRequestFolder.ts index 9f4be662e..c39084214 100644 --- a/src/serialization/resources/filestorage/types/FileRequestFolder.ts +++ b/src/serialization/resources/filestorage/types/FileRequestFolder.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FileRequestFolder: core.serialization.Schema< @@ -11,7 +11,7 @@ export const FileRequestFolder: core.serialization.Schema< Merge.filestorage.FileRequestFolder > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Folder), + core.serialization.lazyObject(() => serializers.filestorage.Folder), ]); export declare namespace FileRequestFolder { diff --git a/src/serialization/resources/filestorage/types/FileRequestPermissions.ts b/src/serialization/resources/filestorage/types/FileRequestPermissions.ts index d5377ad46..0d0b9cfd6 100644 --- a/src/serialization/resources/filestorage/types/FileRequestPermissions.ts +++ b/src/serialization/resources/filestorage/types/FileRequestPermissions.ts @@ -2,24 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PermissionRequest } from "./PermissionRequest"; +import { FileRequestPermissionsItem } from "./FileRequestPermissionsItem"; export const FileRequestPermissions: core.serialization.Schema< serializers.filestorage.FileRequestPermissions.Raw, Merge.filestorage.FileRequestPermissions > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.PermissionRequest), - core.serialization.list( - core.serialization.lazy(async () => (await import("../../..")).filestorage.FileRequestPermissionsItem) - ), + PermissionRequest, + core.serialization.list(FileRequestPermissionsItem), ]); export declare namespace FileRequestPermissions { - type Raw = - | string - | serializers.filestorage.PermissionRequest.Raw - | serializers.filestorage.FileRequestPermissionsItem.Raw[]; + type Raw = string | PermissionRequest.Raw | FileRequestPermissionsItem.Raw[]; } diff --git a/src/serialization/resources/filestorage/types/FileRequestPermissionsItem.ts b/src/serialization/resources/filestorage/types/FileRequestPermissionsItem.ts index 8cd98412b..f935ef6ca 100644 --- a/src/serialization/resources/filestorage/types/FileRequestPermissionsItem.ts +++ b/src/serialization/resources/filestorage/types/FileRequestPermissionsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PermissionRequest } from "./PermissionRequest"; export const FileRequestPermissionsItem: core.serialization.Schema< serializers.filestorage.FileRequestPermissionsItem.Raw, Merge.filestorage.FileRequestPermissionsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.PermissionRequest), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PermissionRequest]); export declare namespace FileRequestPermissionsItem { - type Raw = string | serializers.filestorage.PermissionRequest.Raw; + type Raw = string | PermissionRequest.Raw; } diff --git a/src/serialization/resources/filestorage/types/FileStorageFileResponse.ts b/src/serialization/resources/filestorage/types/FileStorageFileResponse.ts index d842d8588..383076f71 100644 --- a/src/serialization/resources/filestorage/types/FileStorageFileResponse.ts +++ b/src/serialization/resources/filestorage/types/FileStorageFileResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { File_ } from "./File_"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const FileStorageFileResponse: core.serialization.ObjectSchema< serializers.filestorage.FileStorageFileResponse.Raw, Merge.filestorage.FileStorageFileResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).filestorage.File_), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.DebugModeLog)) - .optional(), + model: File_, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace FileStorageFileResponse { interface Raw { - model: serializers.filestorage.File_.Raw; - warnings: serializers.filestorage.WarningValidationProblem.Raw[]; - errors: serializers.filestorage.ErrorValidationProblem.Raw[]; - logs?: serializers.filestorage.DebugModeLog.Raw[] | null; + model: File_.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/FileStorageFolderResponse.ts b/src/serialization/resources/filestorage/types/FileStorageFolderResponse.ts index 720ceb87b..6e8ec8ebf 100644 --- a/src/serialization/resources/filestorage/types/FileStorageFolderResponse.ts +++ b/src/serialization/resources/filestorage/types/FileStorageFolderResponse.ts @@ -2,31 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const FileStorageFolderResponse: core.serialization.ObjectSchema< serializers.filestorage.FileStorageFolderResponse.Raw, Merge.filestorage.FileStorageFolderResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Folder), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.DebugModeLog)) - .optional(), + model: core.serialization.lazyObject(() => serializers.filestorage.Folder), + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace FileStorageFolderResponse { interface Raw { model: serializers.filestorage.Folder.Raw; - warnings: serializers.filestorage.WarningValidationProblem.Raw[]; - errors: serializers.filestorage.ErrorValidationProblem.Raw[]; - logs?: serializers.filestorage.DebugModeLog.Raw[] | null; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/File_.ts b/src/serialization/resources/filestorage/types/File_.ts index 548d031bd..25043c0f0 100644 --- a/src/serialization/resources/filestorage/types/File_.ts +++ b/src/serialization/resources/filestorage/types/File_.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FileFolder } from "./FileFolder"; +import { FilePermissions } from "./FilePermissions"; +import { FileDrive } from "./FileDrive"; export const File_: core.serialization.ObjectSchema = core.serialization.object({ @@ -18,11 +21,9 @@ export const File_: core.serialization.ObjectSchema (await import("../../..")).filestorage.FileFolder).optional(), - permissions: core.serialization - .lazy(async () => (await import("../../..")).filestorage.FilePermissions) - .optional(), - drive: core.serialization.lazy(async () => (await import("../../..")).filestorage.FileDrive).optional(), + folder: FileFolder.optional(), + permissions: FilePermissions.optional(), + drive: FileDrive.optional(), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), @@ -50,9 +51,9 @@ export declare namespace File_ { size?: number | null; mime_type?: string | null; description?: string | null; - folder?: serializers.filestorage.FileFolder.Raw | null; - permissions?: serializers.filestorage.FilePermissions.Raw | null; - drive?: serializers.filestorage.FileDrive.Raw | null; + folder?: FileFolder.Raw | null; + permissions?: FilePermissions.Raw | null; + drive?: FileDrive.Raw | null; remote_created_at?: string | null; remote_updated_at?: string | null; remote_was_deleted?: boolean | null; diff --git a/src/serialization/resources/filestorage/types/Folder.ts b/src/serialization/resources/filestorage/types/Folder.ts index 7e8cb5d7e..f680855d4 100644 --- a/src/serialization/resources/filestorage/types/Folder.ts +++ b/src/serialization/resources/filestorage/types/Folder.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FolderDrive } from "./FolderDrive"; +import { FolderPermissions } from "./FolderPermissions"; export const Folder: core.serialization.ObjectSchema = core.serialization.object({ @@ -18,12 +20,10 @@ export const Folder: core.serialization.ObjectSchema (await import("../../..")).filestorage.FolderParentFolder).optional() + core.serialization.lazy(() => serializers.filestorage.FolderParentFolder).optional() ), - drive: core.serialization.lazy(async () => (await import("../../..")).filestorage.FolderDrive).optional(), - permissions: core.serialization - .lazy(async () => (await import("../../..")).filestorage.FolderPermissions) - .optional(), + drive: FolderDrive.optional(), + permissions: FolderPermissions.optional(), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), @@ -50,8 +50,8 @@ export declare namespace Folder { size?: number | null; description?: string | null; parent_folder?: serializers.filestorage.FolderParentFolder.Raw | null; - drive?: serializers.filestorage.FolderDrive.Raw | null; - permissions?: serializers.filestorage.FolderPermissions.Raw | null; + drive?: FolderDrive.Raw | null; + permissions?: FolderPermissions.Raw | null; remote_created_at?: string | null; remote_updated_at?: string | null; remote_was_deleted?: boolean | null; diff --git a/src/serialization/resources/filestorage/types/FolderDrive.ts b/src/serialization/resources/filestorage/types/FolderDrive.ts index 0fea53ec7..347654874 100644 --- a/src/serialization/resources/filestorage/types/FolderDrive.ts +++ b/src/serialization/resources/filestorage/types/FolderDrive.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Drive } from "./Drive"; export const FolderDrive: core.serialization.Schema< serializers.filestorage.FolderDrive.Raw, Merge.filestorage.FolderDrive -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Drive), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Drive]); export declare namespace FolderDrive { - type Raw = string | serializers.filestorage.Drive.Raw; + type Raw = string | Drive.Raw; } diff --git a/src/serialization/resources/filestorage/types/FolderParentFolder.ts b/src/serialization/resources/filestorage/types/FolderParentFolder.ts index 2a2b8ef34..8a6f557c4 100644 --- a/src/serialization/resources/filestorage/types/FolderParentFolder.ts +++ b/src/serialization/resources/filestorage/types/FolderParentFolder.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FolderParentFolder: core.serialization.Schema< @@ -11,7 +11,7 @@ export const FolderParentFolder: core.serialization.Schema< Merge.filestorage.FolderParentFolder > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Folder), + core.serialization.lazyObject(() => serializers.filestorage.Folder), ]); export declare namespace FolderParentFolder { diff --git a/src/serialization/resources/filestorage/types/FolderPermissions.ts b/src/serialization/resources/filestorage/types/FolderPermissions.ts index 0820e697a..c26aedf3b 100644 --- a/src/serialization/resources/filestorage/types/FolderPermissions.ts +++ b/src/serialization/resources/filestorage/types/FolderPermissions.ts @@ -2,24 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PermissionRequest } from "./PermissionRequest"; +import { FolderPermissionsItem } from "./FolderPermissionsItem"; export const FolderPermissions: core.serialization.Schema< serializers.filestorage.FolderPermissions.Raw, Merge.filestorage.FolderPermissions > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.PermissionRequest), - core.serialization.list( - core.serialization.lazy(async () => (await import("../../..")).filestorage.FolderPermissionsItem) - ), + PermissionRequest, + core.serialization.list(FolderPermissionsItem), ]); export declare namespace FolderPermissions { - type Raw = - | string - | serializers.filestorage.PermissionRequest.Raw - | serializers.filestorage.FolderPermissionsItem.Raw[]; + type Raw = string | PermissionRequest.Raw | FolderPermissionsItem.Raw[]; } diff --git a/src/serialization/resources/filestorage/types/FolderPermissionsItem.ts b/src/serialization/resources/filestorage/types/FolderPermissionsItem.ts index 7dda07d73..342879dfe 100644 --- a/src/serialization/resources/filestorage/types/FolderPermissionsItem.ts +++ b/src/serialization/resources/filestorage/types/FolderPermissionsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PermissionRequest } from "./PermissionRequest"; export const FolderPermissionsItem: core.serialization.Schema< serializers.filestorage.FolderPermissionsItem.Raw, Merge.filestorage.FolderPermissionsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.PermissionRequest), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PermissionRequest]); export declare namespace FolderPermissionsItem { - type Raw = string | serializers.filestorage.PermissionRequest.Raw; + type Raw = string | PermissionRequest.Raw; } diff --git a/src/serialization/resources/filestorage/types/FolderRequest.ts b/src/serialization/resources/filestorage/types/FolderRequest.ts index 8226a5cf3..da2a41e00 100644 --- a/src/serialization/resources/filestorage/types/FolderRequest.ts +++ b/src/serialization/resources/filestorage/types/FolderRequest.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FolderRequestParentFolder } from "./FolderRequestParentFolder"; +import { FolderRequestDrive } from "./FolderRequestDrive"; +import { FolderRequestPermissions } from "./FolderRequestPermissions"; export const FolderRequest: core.serialization.ObjectSchema< serializers.filestorage.FolderRequest.Raw, @@ -14,14 +17,9 @@ export const FolderRequest: core.serialization.ObjectSchema< folderUrl: core.serialization.property("folder_url", core.serialization.string().optional()), size: core.serialization.number().optional(), description: core.serialization.string().optional(), - parentFolder: core.serialization.property( - "parent_folder", - core.serialization.lazy(async () => (await import("../../..")).filestorage.FolderRequestParentFolder).optional() - ), - drive: core.serialization.lazy(async () => (await import("../../..")).filestorage.FolderRequestDrive).optional(), - permissions: core.serialization - .lazy(async () => (await import("../../..")).filestorage.FolderRequestPermissions) - .optional(), + parentFolder: core.serialization.property("parent_folder", FolderRequestParentFolder.optional()), + drive: FolderRequestDrive.optional(), + permissions: FolderRequestPermissions.optional(), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -38,9 +36,9 @@ export declare namespace FolderRequest { folder_url?: string | null; size?: number | null; description?: string | null; - parent_folder?: serializers.filestorage.FolderRequestParentFolder.Raw | null; - drive?: serializers.filestorage.FolderRequestDrive.Raw | null; - permissions?: serializers.filestorage.FolderRequestPermissions.Raw | null; + parent_folder?: FolderRequestParentFolder.Raw | null; + drive?: FolderRequestDrive.Raw | null; + permissions?: FolderRequestPermissions.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; } diff --git a/src/serialization/resources/filestorage/types/FolderRequestDrive.ts b/src/serialization/resources/filestorage/types/FolderRequestDrive.ts index 9c04b1ba9..513d354dd 100644 --- a/src/serialization/resources/filestorage/types/FolderRequestDrive.ts +++ b/src/serialization/resources/filestorage/types/FolderRequestDrive.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Drive } from "./Drive"; export const FolderRequestDrive: core.serialization.Schema< serializers.filestorage.FolderRequestDrive.Raw, Merge.filestorage.FolderRequestDrive -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Drive), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Drive]); export declare namespace FolderRequestDrive { - type Raw = string | serializers.filestorage.Drive.Raw; + type Raw = string | Drive.Raw; } diff --git a/src/serialization/resources/filestorage/types/FolderRequestParentFolder.ts b/src/serialization/resources/filestorage/types/FolderRequestParentFolder.ts index af712b34e..142ff7546 100644 --- a/src/serialization/resources/filestorage/types/FolderRequestParentFolder.ts +++ b/src/serialization/resources/filestorage/types/FolderRequestParentFolder.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FolderRequestParentFolder: core.serialization.Schema< @@ -11,7 +11,7 @@ export const FolderRequestParentFolder: core.serialization.Schema< Merge.filestorage.FolderRequestParentFolder > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Folder), + core.serialization.lazyObject(() => serializers.filestorage.Folder), ]); export declare namespace FolderRequestParentFolder { diff --git a/src/serialization/resources/filestorage/types/FolderRequestPermissions.ts b/src/serialization/resources/filestorage/types/FolderRequestPermissions.ts index 8da22bdfd..24d1415fb 100644 --- a/src/serialization/resources/filestorage/types/FolderRequestPermissions.ts +++ b/src/serialization/resources/filestorage/types/FolderRequestPermissions.ts @@ -2,24 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PermissionRequest } from "./PermissionRequest"; +import { FolderRequestPermissionsItem } from "./FolderRequestPermissionsItem"; export const FolderRequestPermissions: core.serialization.Schema< serializers.filestorage.FolderRequestPermissions.Raw, Merge.filestorage.FolderRequestPermissions > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.PermissionRequest), - core.serialization.list( - core.serialization.lazy(async () => (await import("../../..")).filestorage.FolderRequestPermissionsItem) - ), + PermissionRequest, + core.serialization.list(FolderRequestPermissionsItem), ]); export declare namespace FolderRequestPermissions { - type Raw = - | string - | serializers.filestorage.PermissionRequest.Raw - | serializers.filestorage.FolderRequestPermissionsItem.Raw[]; + type Raw = string | PermissionRequest.Raw | FolderRequestPermissionsItem.Raw[]; } diff --git a/src/serialization/resources/filestorage/types/FolderRequestPermissionsItem.ts b/src/serialization/resources/filestorage/types/FolderRequestPermissionsItem.ts index 444682c26..661b043db 100644 --- a/src/serialization/resources/filestorage/types/FolderRequestPermissionsItem.ts +++ b/src/serialization/resources/filestorage/types/FolderRequestPermissionsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PermissionRequest } from "./PermissionRequest"; export const FolderRequestPermissionsItem: core.serialization.Schema< serializers.filestorage.FolderRequestPermissionsItem.Raw, Merge.filestorage.FolderRequestPermissionsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.PermissionRequest), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PermissionRequest]); export declare namespace FolderRequestPermissionsItem { - type Raw = string | serializers.filestorage.PermissionRequest.Raw; + type Raw = string | PermissionRequest.Raw; } diff --git a/src/serialization/resources/filestorage/types/Group.ts b/src/serialization/resources/filestorage/types/Group.ts index 36875b12b..f7132176b 100644 --- a/src/serialization/resources/filestorage/types/Group.ts +++ b/src/serialization/resources/filestorage/types/Group.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const Group: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/filestorage/types/IndividualCommonModelScopeDeserializer.ts b/src/serialization/resources/filestorage/types/IndividualCommonModelScopeDeserializer.ts index 249f04b1c..701dc15c6 100644 --- a/src/serialization/resources/filestorage/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/serialization/resources/filestorage/types/IndividualCommonModelScopeDeserializer.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ModelPermissionDeserializer } from "./ModelPermissionDeserializer"; +import { FieldPermissionDeserializer } from "./FieldPermissionDeserializer"; export const IndividualCommonModelScopeDeserializer: core.serialization.ObjectSchema< serializers.filestorage.IndividualCommonModelScopeDeserializer.Raw, @@ -13,27 +15,15 @@ export const IndividualCommonModelScopeDeserializer: core.serialization.ObjectSc modelName: core.serialization.property("model_name", core.serialization.string()), modelPermissions: core.serialization.property( "model_permissions", - core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject( - async () => (await import("../../..")).filestorage.ModelPermissionDeserializer - ) - ) - .optional() - ), - fieldPermissions: core.serialization.property( - "field_permissions", - core.serialization - .lazyObject(async () => (await import("../../..")).filestorage.FieldPermissionDeserializer) - .optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializer).optional() ), + fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializer.optional()), }); export declare namespace IndividualCommonModelScopeDeserializer { interface Raw { model_name: string; - model_permissions?: Record | null; - field_permissions?: serializers.filestorage.FieldPermissionDeserializer.Raw | null; + model_permissions?: Record | null; + field_permissions?: FieldPermissionDeserializer.Raw | null; } } diff --git a/src/serialization/resources/filestorage/types/IndividualCommonModelScopeDeserializerRequest.ts b/src/serialization/resources/filestorage/types/IndividualCommonModelScopeDeserializerRequest.ts index 4bf22a77a..aa9c1ca2c 100644 --- a/src/serialization/resources/filestorage/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/filestorage/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ModelPermissionDeserializerRequest } from "./ModelPermissionDeserializerRequest"; +import { FieldPermissionDeserializerRequest } from "./FieldPermissionDeserializerRequest"; export const IndividualCommonModelScopeDeserializerRequest: core.serialization.ObjectSchema< serializers.filestorage.IndividualCommonModelScopeDeserializerRequest.Raw, @@ -13,27 +15,15 @@ export const IndividualCommonModelScopeDeserializerRequest: core.serialization.O modelName: core.serialization.property("model_name", core.serialization.string()), modelPermissions: core.serialization.property( "model_permissions", - core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject( - async () => (await import("../../..")).filestorage.ModelPermissionDeserializerRequest - ) - ) - .optional() - ), - fieldPermissions: core.serialization.property( - "field_permissions", - core.serialization - .lazyObject(async () => (await import("../../..")).filestorage.FieldPermissionDeserializerRequest) - .optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializerRequest).optional() ), + fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializerRequest.optional()), }); export declare namespace IndividualCommonModelScopeDeserializerRequest { interface Raw { model_name: string; - model_permissions?: Record | null; - field_permissions?: serializers.filestorage.FieldPermissionDeserializerRequest.Raw | null; + model_permissions?: Record | null; + field_permissions?: FieldPermissionDeserializerRequest.Raw | null; } } diff --git a/src/serialization/resources/filestorage/types/Issue.ts b/src/serialization/resources/filestorage/types/Issue.ts index 7cfb74061..e49653407 100644 --- a/src/serialization/resources/filestorage/types/Issue.ts +++ b/src/serialization/resources/filestorage/types/Issue.ts @@ -2,14 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IssueStatus } from "./IssueStatus"; export const Issue: core.serialization.ObjectSchema = core.serialization.object({ id: core.serialization.string().optional(), - status: core.serialization.lazy(async () => (await import("../../..")).filestorage.IssueStatus).optional(), + status: IssueStatus.optional(), errorDescription: core.serialization.property("error_description", core.serialization.string()), endUser: core.serialization.property( "end_user", @@ -27,7 +28,7 @@ export const Issue: core.serialization.ObjectSchema | null; first_incident_time?: string | null; diff --git a/src/serialization/resources/filestorage/types/IssueStatus.ts b/src/serialization/resources/filestorage/types/IssueStatus.ts index 9759ae67e..8f4b171b6 100644 --- a/src/serialization/resources/filestorage/types/IssueStatus.ts +++ b/src/serialization/resources/filestorage/types/IssueStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IssueStatusEnum } from "./IssueStatusEnum"; export const IssueStatus: core.serialization.Schema< serializers.filestorage.IssueStatus.Raw, Merge.filestorage.IssueStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).filestorage.IssueStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([IssueStatusEnum, core.serialization.string()]); export declare namespace IssueStatus { - type Raw = serializers.filestorage.IssueStatusEnum.Raw | string; + type Raw = IssueStatusEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/IssueStatusEnum.ts b/src/serialization/resources/filestorage/types/IssueStatusEnum.ts index 992ef3405..c326663c4 100644 --- a/src/serialization/resources/filestorage/types/IssueStatusEnum.ts +++ b/src/serialization/resources/filestorage/types/IssueStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const IssueStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/LanguageEnum.ts b/src/serialization/resources/filestorage/types/LanguageEnum.ts index 52769c3a6..936480a16 100644 --- a/src/serialization/resources/filestorage/types/LanguageEnum.ts +++ b/src/serialization/resources/filestorage/types/LanguageEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LanguageEnum: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/LinkToken.ts b/src/serialization/resources/filestorage/types/LinkToken.ts index d3b71ffc7..c0bb55865 100644 --- a/src/serialization/resources/filestorage/types/LinkToken.ts +++ b/src/serialization/resources/filestorage/types/LinkToken.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LinkToken: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/LinkedAccountStatus.ts b/src/serialization/resources/filestorage/types/LinkedAccountStatus.ts index 309656844..b2031c033 100644 --- a/src/serialization/resources/filestorage/types/LinkedAccountStatus.ts +++ b/src/serialization/resources/filestorage/types/LinkedAccountStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LinkedAccountStatus: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/MetaResponse.ts b/src/serialization/resources/filestorage/types/MetaResponse.ts index 2ffd0d9f1..8d0ad9583 100644 --- a/src/serialization/resources/filestorage/types/MetaResponse.ts +++ b/src/serialization/resources/filestorage/types/MetaResponse.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { LinkedAccountStatus } from "./LinkedAccountStatus"; export const MetaResponse: core.serialization.ObjectSchema< serializers.filestorage.MetaResponse.Raw, @@ -18,9 +19,7 @@ export const MetaResponse: core.serialization.ObjectSchema< "remote_field_classes", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - status: core.serialization - .lazyObject(async () => (await import("../../..")).filestorage.LinkedAccountStatus) - .optional(), + status: LinkedAccountStatus.optional(), hasConditionalParams: core.serialization.property("has_conditional_params", core.serialization.boolean()), hasRequiredLinkedAccountParams: core.serialization.property( "has_required_linked_account_params", @@ -32,7 +31,7 @@ export declare namespace MetaResponse { interface Raw { request_schema: Record; remote_field_classes?: Record | null; - status?: serializers.filestorage.LinkedAccountStatus.Raw | null; + status?: LinkedAccountStatus.Raw | null; has_conditional_params: boolean; has_required_linked_account_params: boolean; } diff --git a/src/serialization/resources/filestorage/types/MethodEnum.ts b/src/serialization/resources/filestorage/types/MethodEnum.ts index 4740fec93..3515d6c42 100644 --- a/src/serialization/resources/filestorage/types/MethodEnum.ts +++ b/src/serialization/resources/filestorage/types/MethodEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const MethodEnum: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/ModelOperation.ts b/src/serialization/resources/filestorage/types/ModelOperation.ts index 398d9511c..6ecc7e399 100644 --- a/src/serialization/resources/filestorage/types/ModelOperation.ts +++ b/src/serialization/resources/filestorage/types/ModelOperation.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelOperation: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/ModelPermissionDeserializer.ts b/src/serialization/resources/filestorage/types/ModelPermissionDeserializer.ts index f9823ecc1..5909b7ffd 100644 --- a/src/serialization/resources/filestorage/types/ModelPermissionDeserializer.ts +++ b/src/serialization/resources/filestorage/types/ModelPermissionDeserializer.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelPermissionDeserializer: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/ModelPermissionDeserializerRequest.ts b/src/serialization/resources/filestorage/types/ModelPermissionDeserializerRequest.ts index 59f4a01ae..e7152c2b0 100644 --- a/src/serialization/resources/filestorage/types/ModelPermissionDeserializerRequest.ts +++ b/src/serialization/resources/filestorage/types/ModelPermissionDeserializerRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelPermissionDeserializerRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/MultipartFormFieldRequest.ts b/src/serialization/resources/filestorage/types/MultipartFormFieldRequest.ts index 11586966f..0b250c58e 100644 --- a/src/serialization/resources/filestorage/types/MultipartFormFieldRequest.ts +++ b/src/serialization/resources/filestorage/types/MultipartFormFieldRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { MultipartFormFieldRequestEncoding } from "./MultipartFormFieldRequestEncoding"; export const MultipartFormFieldRequest: core.serialization.ObjectSchema< serializers.filestorage.MultipartFormFieldRequest.Raw, @@ -12,9 +13,7 @@ export const MultipartFormFieldRequest: core.serialization.ObjectSchema< > = core.serialization.object({ name: core.serialization.string(), data: core.serialization.string(), - encoding: core.serialization - .lazy(async () => (await import("../../..")).filestorage.MultipartFormFieldRequestEncoding) - .optional(), + encoding: MultipartFormFieldRequestEncoding.optional(), fileName: core.serialization.property("file_name", core.serialization.string().optional()), contentType: core.serialization.property("content_type", core.serialization.string().optional()), }); @@ -23,7 +22,7 @@ export declare namespace MultipartFormFieldRequest { interface Raw { name: string; data: string; - encoding?: serializers.filestorage.MultipartFormFieldRequestEncoding.Raw | null; + encoding?: MultipartFormFieldRequestEncoding.Raw | null; file_name?: string | null; content_type?: string | null; } diff --git a/src/serialization/resources/filestorage/types/MultipartFormFieldRequestEncoding.ts b/src/serialization/resources/filestorage/types/MultipartFormFieldRequestEncoding.ts index 487a2a45b..f7153b3f5 100644 --- a/src/serialization/resources/filestorage/types/MultipartFormFieldRequestEncoding.ts +++ b/src/serialization/resources/filestorage/types/MultipartFormFieldRequestEncoding.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EncodingEnum } from "./EncodingEnum"; export const MultipartFormFieldRequestEncoding: core.serialization.Schema< serializers.filestorage.MultipartFormFieldRequestEncoding.Raw, Merge.filestorage.MultipartFormFieldRequestEncoding -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).filestorage.EncodingEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EncodingEnum, core.serialization.string()]); export declare namespace MultipartFormFieldRequestEncoding { - type Raw = serializers.filestorage.EncodingEnum.Raw | string; + type Raw = EncodingEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.ts b/src/serialization/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.ts index fc4fedd27..96f117378 100644 --- a/src/serialization/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountDetailsAndActions } from "./AccountDetailsAndActions"; export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSchema< serializers.filestorage.PaginatedAccountDetailsAndActionsList.Raw, @@ -12,17 +13,13 @@ export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSch > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.AccountDetailsAndActions) - ) - .optional(), + results: core.serialization.list(AccountDetailsAndActions).optional(), }); export declare namespace PaginatedAccountDetailsAndActionsList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.filestorage.AccountDetailsAndActions.Raw[] | null; + results?: AccountDetailsAndActions.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/PaginatedAuditLogEventList.ts b/src/serialization/resources/filestorage/types/PaginatedAuditLogEventList.ts index e1ae58cc6..5d49ecdac 100644 --- a/src/serialization/resources/filestorage/types/PaginatedAuditLogEventList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedAuditLogEventList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AuditLogEvent } from "./AuditLogEvent"; export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< serializers.filestorage.PaginatedAuditLogEventList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.AuditLogEvent)) - .optional(), + results: core.serialization.list(AuditLogEvent).optional(), }); export declare namespace PaginatedAuditLogEventList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.filestorage.AuditLogEvent.Raw[] | null; + results?: AuditLogEvent.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/PaginatedDriveList.ts b/src/serialization/resources/filestorage/types/PaginatedDriveList.ts index df212d303..6387dc50b 100644 --- a/src/serialization/resources/filestorage/types/PaginatedDriveList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedDriveList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Drive } from "./Drive"; export const PaginatedDriveList: core.serialization.ObjectSchema< serializers.filestorage.PaginatedDriveList.Raw, @@ -12,15 +13,13 @@ export const PaginatedDriveList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Drive)) - .optional(), + results: core.serialization.list(Drive).optional(), }); export declare namespace PaginatedDriveList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.filestorage.Drive.Raw[] | null; + results?: Drive.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/PaginatedFileList.ts b/src/serialization/resources/filestorage/types/PaginatedFileList.ts index 4d348a182..3709c612b 100644 --- a/src/serialization/resources/filestorage/types/PaginatedFileList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedFileList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { File_ } from "./File_"; export const PaginatedFileList: core.serialization.ObjectSchema< serializers.filestorage.PaginatedFileList.Raw, @@ -12,15 +13,13 @@ export const PaginatedFileList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.File_)) - .optional(), + results: core.serialization.list(File_).optional(), }); export declare namespace PaginatedFileList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.filestorage.File_.Raw[] | null; + results?: File_.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/PaginatedFolderList.ts b/src/serialization/resources/filestorage/types/PaginatedFolderList.ts index 916bc97bd..f185c90cb 100644 --- a/src/serialization/resources/filestorage/types/PaginatedFolderList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedFolderList.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PaginatedFolderList: core.serialization.ObjectSchema< @@ -12,9 +12,7 @@ export const PaginatedFolderList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Folder)) - .optional(), + results: core.serialization.list(core.serialization.lazyObject(() => serializers.filestorage.Folder)).optional(), }); export declare namespace PaginatedFolderList { diff --git a/src/serialization/resources/filestorage/types/PaginatedGroupList.ts b/src/serialization/resources/filestorage/types/PaginatedGroupList.ts index 3c3404373..2719a2e30 100644 --- a/src/serialization/resources/filestorage/types/PaginatedGroupList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedGroupList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Group } from "./Group"; export const PaginatedGroupList: core.serialization.ObjectSchema< serializers.filestorage.PaginatedGroupList.Raw, @@ -12,15 +13,13 @@ export const PaginatedGroupList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Group)) - .optional(), + results: core.serialization.list(Group).optional(), }); export declare namespace PaginatedGroupList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.filestorage.Group.Raw[] | null; + results?: Group.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/PaginatedIssueList.ts b/src/serialization/resources/filestorage/types/PaginatedIssueList.ts index 92c579303..4c49cc377 100644 --- a/src/serialization/resources/filestorage/types/PaginatedIssueList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedIssueList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Issue } from "./Issue"; export const PaginatedIssueList: core.serialization.ObjectSchema< serializers.filestorage.PaginatedIssueList.Raw, @@ -12,15 +13,13 @@ export const PaginatedIssueList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Issue)) - .optional(), + results: core.serialization.list(Issue).optional(), }); export declare namespace PaginatedIssueList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.filestorage.Issue.Raw[] | null; + results?: Issue.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/PaginatedSyncStatusList.ts b/src/serialization/resources/filestorage/types/PaginatedSyncStatusList.ts index fdc23e514..f6c6e6b3d 100644 --- a/src/serialization/resources/filestorage/types/PaginatedSyncStatusList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedSyncStatusList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { SyncStatus } from "./SyncStatus"; export const PaginatedSyncStatusList: core.serialization.ObjectSchema< serializers.filestorage.PaginatedSyncStatusList.Raw, @@ -12,15 +13,13 @@ export const PaginatedSyncStatusList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.SyncStatus)) - .optional(), + results: core.serialization.list(SyncStatus).optional(), }); export declare namespace PaginatedSyncStatusList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.filestorage.SyncStatus.Raw[] | null; + results?: SyncStatus.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/PaginatedUserList.ts b/src/serialization/resources/filestorage/types/PaginatedUserList.ts index 4c5d1880a..68f40d9ca 100644 --- a/src/serialization/resources/filestorage/types/PaginatedUserList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedUserList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const PaginatedUserList: core.serialization.ObjectSchema< serializers.filestorage.PaginatedUserList.Raw, @@ -12,15 +13,13 @@ export const PaginatedUserList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.User)) - .optional(), + results: core.serialization.list(User).optional(), }); export declare namespace PaginatedUserList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.filestorage.User.Raw[] | null; + results?: User.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/Permission.ts b/src/serialization/resources/filestorage/types/Permission.ts index 9ea967058..5ca6826bb 100644 --- a/src/serialization/resources/filestorage/types/Permission.ts +++ b/src/serialization/resources/filestorage/types/Permission.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PermissionUser } from "./PermissionUser"; +import { PermissionGroup } from "./PermissionGroup"; +import { PermissionType } from "./PermissionType"; +import { PermissionRolesItem } from "./PermissionRolesItem"; export const Permission: core.serialization.ObjectSchema< serializers.filestorage.Permission.Raw, @@ -14,14 +18,10 @@ export const Permission: core.serialization.ObjectSchema< remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), - user: core.serialization.lazy(async () => (await import("../../..")).filestorage.PermissionUser).optional(), - group: core.serialization.lazy(async () => (await import("../../..")).filestorage.PermissionGroup).optional(), - type: core.serialization.lazy(async () => (await import("../../..")).filestorage.PermissionType).optional(), - roles: core.serialization - .list( - core.serialization.lazy(async () => (await import("../../..")).filestorage.PermissionRolesItem).optional() - ) - .optional(), + user: PermissionUser.optional(), + group: PermissionGroup.optional(), + type: PermissionType.optional(), + roles: core.serialization.list(PermissionRolesItem.optional()).optional(), }); export declare namespace Permission { @@ -30,9 +30,9 @@ export declare namespace Permission { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - user?: serializers.filestorage.PermissionUser.Raw | null; - group?: serializers.filestorage.PermissionGroup.Raw | null; - type?: serializers.filestorage.PermissionType.Raw | null; - roles?: (serializers.filestorage.PermissionRolesItem.Raw | null | undefined)[] | null; + user?: PermissionUser.Raw | null; + group?: PermissionGroup.Raw | null; + type?: PermissionType.Raw | null; + roles?: (PermissionRolesItem.Raw | null | undefined)[] | null; } } diff --git a/src/serialization/resources/filestorage/types/PermissionGroup.ts b/src/serialization/resources/filestorage/types/PermissionGroup.ts index 5a173f96e..a74cb13b9 100644 --- a/src/serialization/resources/filestorage/types/PermissionGroup.ts +++ b/src/serialization/resources/filestorage/types/PermissionGroup.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Group } from "./Group"; export const PermissionGroup: core.serialization.Schema< serializers.filestorage.PermissionGroup.Raw, Merge.filestorage.PermissionGroup -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Group), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Group]); export declare namespace PermissionGroup { - type Raw = string | serializers.filestorage.Group.Raw; + type Raw = string | Group.Raw; } diff --git a/src/serialization/resources/filestorage/types/PermissionRequest.ts b/src/serialization/resources/filestorage/types/PermissionRequest.ts index f99dfc428..671339c6a 100644 --- a/src/serialization/resources/filestorage/types/PermissionRequest.ts +++ b/src/serialization/resources/filestorage/types/PermissionRequest.ts @@ -2,27 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PermissionRequestUser } from "./PermissionRequestUser"; +import { PermissionRequestGroup } from "./PermissionRequestGroup"; +import { PermissionRequestType } from "./PermissionRequestType"; +import { PermissionRequestRolesItem } from "./PermissionRequestRolesItem"; export const PermissionRequest: core.serialization.ObjectSchema< serializers.filestorage.PermissionRequest.Raw, Merge.filestorage.PermissionRequest > = core.serialization.object({ remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), - user: core.serialization.lazy(async () => (await import("../../..")).filestorage.PermissionRequestUser).optional(), - group: core.serialization - .lazy(async () => (await import("../../..")).filestorage.PermissionRequestGroup) - .optional(), - type: core.serialization.lazy(async () => (await import("../../..")).filestorage.PermissionRequestType).optional(), - roles: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).filestorage.PermissionRequestRolesItem) - .optional() - ) - .optional(), + user: PermissionRequestUser.optional(), + group: PermissionRequestGroup.optional(), + type: PermissionRequestType.optional(), + roles: core.serialization.list(PermissionRequestRolesItem.optional()).optional(), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -36,10 +32,10 @@ export const PermissionRequest: core.serialization.ObjectSchema< export declare namespace PermissionRequest { interface Raw { remote_id?: string | null; - user?: serializers.filestorage.PermissionRequestUser.Raw | null; - group?: serializers.filestorage.PermissionRequestGroup.Raw | null; - type?: serializers.filestorage.PermissionRequestType.Raw | null; - roles?: (serializers.filestorage.PermissionRequestRolesItem.Raw | null | undefined)[] | null; + user?: PermissionRequestUser.Raw | null; + group?: PermissionRequestGroup.Raw | null; + type?: PermissionRequestType.Raw | null; + roles?: (PermissionRequestRolesItem.Raw | null | undefined)[] | null; integration_params?: Record | null; linked_account_params?: Record | null; } diff --git a/src/serialization/resources/filestorage/types/PermissionRequestGroup.ts b/src/serialization/resources/filestorage/types/PermissionRequestGroup.ts index 533b077e6..efc45062f 100644 --- a/src/serialization/resources/filestorage/types/PermissionRequestGroup.ts +++ b/src/serialization/resources/filestorage/types/PermissionRequestGroup.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Group } from "./Group"; export const PermissionRequestGroup: core.serialization.Schema< serializers.filestorage.PermissionRequestGroup.Raw, Merge.filestorage.PermissionRequestGroup -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.Group), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Group]); export declare namespace PermissionRequestGroup { - type Raw = string | serializers.filestorage.Group.Raw; + type Raw = string | Group.Raw; } diff --git a/src/serialization/resources/filestorage/types/PermissionRequestRolesItem.ts b/src/serialization/resources/filestorage/types/PermissionRequestRolesItem.ts index 9042a8565..642d13801 100644 --- a/src/serialization/resources/filestorage/types/PermissionRequestRolesItem.ts +++ b/src/serialization/resources/filestorage/types/PermissionRequestRolesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RolesEnum } from "./RolesEnum"; export const PermissionRequestRolesItem: core.serialization.Schema< serializers.filestorage.PermissionRequestRolesItem.Raw, Merge.filestorage.PermissionRequestRolesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).filestorage.RolesEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RolesEnum, core.serialization.string()]); export declare namespace PermissionRequestRolesItem { - type Raw = serializers.filestorage.RolesEnum.Raw | string; + type Raw = RolesEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/PermissionRequestType.ts b/src/serialization/resources/filestorage/types/PermissionRequestType.ts index b15d5db81..04be60d32 100644 --- a/src/serialization/resources/filestorage/types/PermissionRequestType.ts +++ b/src/serialization/resources/filestorage/types/PermissionRequestType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TypeEnum } from "./TypeEnum"; export const PermissionRequestType: core.serialization.Schema< serializers.filestorage.PermissionRequestType.Raw, Merge.filestorage.PermissionRequestType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).filestorage.TypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([TypeEnum, core.serialization.string()]); export declare namespace PermissionRequestType { - type Raw = serializers.filestorage.TypeEnum.Raw | string; + type Raw = TypeEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/PermissionRequestUser.ts b/src/serialization/resources/filestorage/types/PermissionRequestUser.ts index b7120585c..4e3743d8c 100644 --- a/src/serialization/resources/filestorage/types/PermissionRequestUser.ts +++ b/src/serialization/resources/filestorage/types/PermissionRequestUser.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const PermissionRequestUser: core.serialization.Schema< serializers.filestorage.PermissionRequestUser.Raw, Merge.filestorage.PermissionRequestUser -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace PermissionRequestUser { - type Raw = string | serializers.filestorage.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/filestorage/types/PermissionRolesItem.ts b/src/serialization/resources/filestorage/types/PermissionRolesItem.ts index f684e65ed..59b092b82 100644 --- a/src/serialization/resources/filestorage/types/PermissionRolesItem.ts +++ b/src/serialization/resources/filestorage/types/PermissionRolesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RolesEnum } from "./RolesEnum"; export const PermissionRolesItem: core.serialization.Schema< serializers.filestorage.PermissionRolesItem.Raw, Merge.filestorage.PermissionRolesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).filestorage.RolesEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RolesEnum, core.serialization.string()]); export declare namespace PermissionRolesItem { - type Raw = serializers.filestorage.RolesEnum.Raw | string; + type Raw = RolesEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/PermissionType.ts b/src/serialization/resources/filestorage/types/PermissionType.ts index a3741f58e..7fb7c9e88 100644 --- a/src/serialization/resources/filestorage/types/PermissionType.ts +++ b/src/serialization/resources/filestorage/types/PermissionType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TypeEnum } from "./TypeEnum"; export const PermissionType: core.serialization.Schema< serializers.filestorage.PermissionType.Raw, Merge.filestorage.PermissionType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).filestorage.TypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([TypeEnum, core.serialization.string()]); export declare namespace PermissionType { - type Raw = serializers.filestorage.TypeEnum.Raw | string; + type Raw = TypeEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/PermissionUser.ts b/src/serialization/resources/filestorage/types/PermissionUser.ts index 24e397b30..f25d7d45f 100644 --- a/src/serialization/resources/filestorage/types/PermissionUser.ts +++ b/src/serialization/resources/filestorage/types/PermissionUser.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const PermissionUser: core.serialization.Schema< serializers.filestorage.PermissionUser.Raw, Merge.filestorage.PermissionUser -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace PermissionUser { - type Raw = string | serializers.filestorage.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/filestorage/types/RemoteEndpointInfo.ts b/src/serialization/resources/filestorage/types/RemoteEndpointInfo.ts index 22d278805..1685892bd 100644 --- a/src/serialization/resources/filestorage/types/RemoteEndpointInfo.ts +++ b/src/serialization/resources/filestorage/types/RemoteEndpointInfo.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteEndpointInfo: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/RemoteFieldApi.ts b/src/serialization/resources/filestorage/types/RemoteFieldApi.ts index 1a8882cf2..89a38dcb7 100644 --- a/src/serialization/resources/filestorage/types/RemoteFieldApi.ts +++ b/src/serialization/resources/filestorage/types/RemoteFieldApi.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteEndpointInfo } from "./RemoteEndpointInfo"; +import { AdvancedMetadata } from "./AdvancedMetadata"; +import { RemoteFieldApiCoverage } from "./RemoteFieldApiCoverage"; export const RemoteFieldApi: core.serialization.ObjectSchema< serializers.filestorage.RemoteFieldApi.Raw, @@ -12,30 +15,22 @@ export const RemoteFieldApi: core.serialization.ObjectSchema< > = core.serialization.object({ schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()), remoteKeyName: core.serialization.property("remote_key_name", core.serialization.string()), - remoteEndpointInfo: core.serialization.property( - "remote_endpoint_info", - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.RemoteEndpointInfo) - ), + remoteEndpointInfo: core.serialization.property("remote_endpoint_info", RemoteEndpointInfo), exampleValues: core.serialization.property( "example_values", core.serialization.list(core.serialization.unknown()).optional() ), - advancedMetadata: core.serialization.property( - "advanced_metadata", - core.serialization.lazyObject(async () => (await import("../../..")).filestorage.AdvancedMetadata).optional() - ), - coverage: core.serialization - .lazy(async () => (await import("../../..")).filestorage.RemoteFieldApiCoverage) - .optional(), + advancedMetadata: core.serialization.property("advanced_metadata", AdvancedMetadata.optional()), + coverage: RemoteFieldApiCoverage.optional(), }); export declare namespace RemoteFieldApi { interface Raw { schema: Record; remote_key_name: string; - remote_endpoint_info: serializers.filestorage.RemoteEndpointInfo.Raw; + remote_endpoint_info: RemoteEndpointInfo.Raw; example_values?: unknown[] | null; - advanced_metadata?: serializers.filestorage.AdvancedMetadata.Raw | null; - coverage?: serializers.filestorage.RemoteFieldApiCoverage.Raw | null; + advanced_metadata?: AdvancedMetadata.Raw | null; + coverage?: RemoteFieldApiCoverage.Raw | null; } } diff --git a/src/serialization/resources/filestorage/types/RemoteFieldApiCoverage.ts b/src/serialization/resources/filestorage/types/RemoteFieldApiCoverage.ts index bb5e10663..d84f147c7 100644 --- a/src/serialization/resources/filestorage/types/RemoteFieldApiCoverage.ts +++ b/src/serialization/resources/filestorage/types/RemoteFieldApiCoverage.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteFieldApiCoverage: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/RemoteFieldApiResponse.ts b/src/serialization/resources/filestorage/types/RemoteFieldApiResponse.ts index f07e40cb2..6c135ead3 100644 --- a/src/serialization/resources/filestorage/types/RemoteFieldApiResponse.ts +++ b/src/serialization/resources/filestorage/types/RemoteFieldApiResponse.ts @@ -2,52 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldApi } from "./RemoteFieldApi"; export const RemoteFieldApiResponse: core.serialization.ObjectSchema< serializers.filestorage.RemoteFieldApiResponse.Raw, Merge.filestorage.RemoteFieldApiResponse > = core.serialization.object({ - file: core.serialization.property( - "File", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.RemoteFieldApi)) - .optional() - ), - folder: core.serialization.property( - "Folder", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.RemoteFieldApi)) - .optional() - ), - drive: core.serialization.property( - "Drive", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.RemoteFieldApi)) - .optional() - ), - group: core.serialization.property( - "Group", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.RemoteFieldApi)) - .optional() - ), - user: core.serialization.property( - "User", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).filestorage.RemoteFieldApi)) - .optional() - ), + file: core.serialization.property("File", core.serialization.list(RemoteFieldApi).optional()), + folder: core.serialization.property("Folder", core.serialization.list(RemoteFieldApi).optional()), + drive: core.serialization.property("Drive", core.serialization.list(RemoteFieldApi).optional()), + group: core.serialization.property("Group", core.serialization.list(RemoteFieldApi).optional()), + user: core.serialization.property("User", core.serialization.list(RemoteFieldApi).optional()), }); export declare namespace RemoteFieldApiResponse { interface Raw { - File?: serializers.filestorage.RemoteFieldApi.Raw[] | null; - Folder?: serializers.filestorage.RemoteFieldApi.Raw[] | null; - Drive?: serializers.filestorage.RemoteFieldApi.Raw[] | null; - Group?: serializers.filestorage.RemoteFieldApi.Raw[] | null; - User?: serializers.filestorage.RemoteFieldApi.Raw[] | null; + File?: RemoteFieldApi.Raw[] | null; + Folder?: RemoteFieldApi.Raw[] | null; + Drive?: RemoteFieldApi.Raw[] | null; + Group?: RemoteFieldApi.Raw[] | null; + User?: RemoteFieldApi.Raw[] | null; } } diff --git a/src/serialization/resources/filestorage/types/RemoteKey.ts b/src/serialization/resources/filestorage/types/RemoteKey.ts index dab12cd82..680b0a248 100644 --- a/src/serialization/resources/filestorage/types/RemoteKey.ts +++ b/src/serialization/resources/filestorage/types/RemoteKey.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteKey: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/RemoteResponse.ts b/src/serialization/resources/filestorage/types/RemoteResponse.ts index 7d0828cbe..25a13f535 100644 --- a/src/serialization/resources/filestorage/types/RemoteResponse.ts +++ b/src/serialization/resources/filestorage/types/RemoteResponse.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ResponseTypeEnum } from "./ResponseTypeEnum"; export const RemoteResponse: core.serialization.ObjectSchema< serializers.filestorage.RemoteResponse.Raw, @@ -18,10 +19,7 @@ export const RemoteResponse: core.serialization.ObjectSchema< "response_headers", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - responseType: core.serialization.property( - "response_type", - core.serialization.lazy(async () => (await import("../../..")).filestorage.ResponseTypeEnum).optional() - ), + responseType: core.serialization.property("response_type", ResponseTypeEnum.optional()), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), }); @@ -32,7 +30,7 @@ export declare namespace RemoteResponse { status: number; response?: unknown; response_headers?: Record | null; - response_type?: serializers.filestorage.ResponseTypeEnum.Raw | null; + response_type?: ResponseTypeEnum.Raw | null; headers?: Record | null; } } diff --git a/src/serialization/resources/filestorage/types/RequestFormatEnum.ts b/src/serialization/resources/filestorage/types/RequestFormatEnum.ts index 5a1db85d0..296dfbc8c 100644 --- a/src/serialization/resources/filestorage/types/RequestFormatEnum.ts +++ b/src/serialization/resources/filestorage/types/RequestFormatEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RequestFormatEnum: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/ResponseTypeEnum.ts b/src/serialization/resources/filestorage/types/ResponseTypeEnum.ts index 6b483d962..e44fee1dd 100644 --- a/src/serialization/resources/filestorage/types/ResponseTypeEnum.ts +++ b/src/serialization/resources/filestorage/types/ResponseTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ResponseTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/RoleEnum.ts b/src/serialization/resources/filestorage/types/RoleEnum.ts index e7c1cc0ff..b97cab9e9 100644 --- a/src/serialization/resources/filestorage/types/RoleEnum.ts +++ b/src/serialization/resources/filestorage/types/RoleEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RoleEnum: core.serialization.Schema = diff --git a/src/serialization/resources/filestorage/types/RolesEnum.ts b/src/serialization/resources/filestorage/types/RolesEnum.ts index f1c11c8a5..c706a2202 100644 --- a/src/serialization/resources/filestorage/types/RolesEnum.ts +++ b/src/serialization/resources/filestorage/types/RolesEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RolesEnum: core.serialization.Schema = diff --git a/src/serialization/resources/filestorage/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/serialization/resources/filestorage/types/SelectiveSyncConfigurationsUsageEnum.ts index 3537ee3de..3ce99ff9c 100644 --- a/src/serialization/resources/filestorage/types/SelectiveSyncConfigurationsUsageEnum.ts +++ b/src/serialization/resources/filestorage/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const SelectiveSyncConfigurationsUsageEnum: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/SyncStatus.ts b/src/serialization/resources/filestorage/types/SyncStatus.ts index 2e9122ea1..07a5df881 100644 --- a/src/serialization/resources/filestorage/types/SyncStatus.ts +++ b/src/serialization/resources/filestorage/types/SyncStatus.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { SyncStatusStatusEnum } from "./SyncStatusStatusEnum"; +import { SelectiveSyncConfigurationsUsageEnum } from "./SelectiveSyncConfigurationsUsageEnum"; export const SyncStatus: core.serialization.ObjectSchema< serializers.filestorage.SyncStatus.Raw, @@ -14,13 +16,11 @@ export const SyncStatus: core.serialization.ObjectSchema< modelId: core.serialization.property("model_id", core.serialization.string()), lastSyncStart: core.serialization.property("last_sync_start", core.serialization.date().optional()), nextSyncStart: core.serialization.property("next_sync_start", core.serialization.date().optional()), - status: core.serialization.lazy(async () => (await import("../../..")).filestorage.SyncStatusStatusEnum), + status: SyncStatusStatusEnum, isInitialSync: core.serialization.property("is_initial_sync", core.serialization.boolean()), selectiveSyncConfigurationsUsage: core.serialization.property( "selective_sync_configurations_usage", - core.serialization - .lazy(async () => (await import("../../..")).filestorage.SelectiveSyncConfigurationsUsageEnum) - .optional() + SelectiveSyncConfigurationsUsageEnum.optional() ), }); @@ -30,8 +30,8 @@ export declare namespace SyncStatus { model_id: string; last_sync_start?: string | null; next_sync_start?: string | null; - status: serializers.filestorage.SyncStatusStatusEnum.Raw; + status: SyncStatusStatusEnum.Raw; is_initial_sync: boolean; - selective_sync_configurations_usage?: serializers.filestorage.SelectiveSyncConfigurationsUsageEnum.Raw | null; + selective_sync_configurations_usage?: SelectiveSyncConfigurationsUsageEnum.Raw | null; } } diff --git a/src/serialization/resources/filestorage/types/SyncStatusStatusEnum.ts b/src/serialization/resources/filestorage/types/SyncStatusStatusEnum.ts index ce7b6060f..2eb5aa01d 100644 --- a/src/serialization/resources/filestorage/types/SyncStatusStatusEnum.ts +++ b/src/serialization/resources/filestorage/types/SyncStatusStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const SyncStatusStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/filestorage/types/TypeEnum.ts b/src/serialization/resources/filestorage/types/TypeEnum.ts index e5b2a50da..ca936b596 100644 --- a/src/serialization/resources/filestorage/types/TypeEnum.ts +++ b/src/serialization/resources/filestorage/types/TypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TypeEnum: core.serialization.Schema = diff --git a/src/serialization/resources/filestorage/types/User.ts b/src/serialization/resources/filestorage/types/User.ts index f3523ad59..bf658b180 100644 --- a/src/serialization/resources/filestorage/types/User.ts +++ b/src/serialization/resources/filestorage/types/User.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const User: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/filestorage/types/ValidationProblemSource.ts b/src/serialization/resources/filestorage/types/ValidationProblemSource.ts index 9486895e6..e2fc05bbd 100644 --- a/src/serialization/resources/filestorage/types/ValidationProblemSource.ts +++ b/src/serialization/resources/filestorage/types/ValidationProblemSource.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ValidationProblemSource: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/filestorage/types/WarningValidationProblem.ts b/src/serialization/resources/filestorage/types/WarningValidationProblem.ts index 09b6256c5..2aa84116e 100644 --- a/src/serialization/resources/filestorage/types/WarningValidationProblem.ts +++ b/src/serialization/resources/filestorage/types/WarningValidationProblem.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ValidationProblemSource } from "./ValidationProblemSource"; export const WarningValidationProblem: core.serialization.ObjectSchema< serializers.filestorage.WarningValidationProblem.Raw, Merge.filestorage.WarningValidationProblem > = core.serialization.object({ - source: core.serialization - .lazyObject(async () => (await import("../../..")).filestorage.ValidationProblemSource) - .optional(), + source: ValidationProblemSource.optional(), title: core.serialization.string(), detail: core.serialization.string(), problemType: core.serialization.property("problem_type", core.serialization.string()), @@ -20,7 +19,7 @@ export const WarningValidationProblem: core.serialization.ObjectSchema< export declare namespace WarningValidationProblem { interface Raw { - source?: serializers.filestorage.ValidationProblemSource.Raw | null; + source?: ValidationProblemSource.Raw | null; title: string; detail: string; problem_type: string; diff --git a/src/serialization/resources/filestorage/types/WebhookReceiver.ts b/src/serialization/resources/filestorage/types/WebhookReceiver.ts index 4e824d2c2..d5a44b438 100644 --- a/src/serialization/resources/filestorage/types/WebhookReceiver.ts +++ b/src/serialization/resources/filestorage/types/WebhookReceiver.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const WebhookReceiver: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/serialization/resources/hris/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts index 1de4fb646..f42846711 100644 --- a/src/serialization/resources/hris/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts +++ b/src/serialization/resources/hris/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { RemoteResponse } from "../../../types/RemoteResponse"; export const AsyncPassthroughRetrieveResponse: core.serialization.Schema< serializers.hris.AsyncPassthroughRetrieveResponse.Raw, Merge.hris.AsyncPassthroughRetrieveResponse -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazyObject(async () => (await import("../../../../..")).hris.RemoteResponse), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RemoteResponse, core.serialization.string()]); export declare namespace AsyncPassthroughRetrieveResponse { - type Raw = serializers.hris.RemoteResponse.Raw | string; + type Raw = RemoteResponse.Raw | string; } diff --git a/src/serialization/resources/hris/resources/bankInfo/types/BankInfoListRequestAccountType.ts b/src/serialization/resources/hris/resources/bankInfo/types/BankInfoListRequestAccountType.ts index ddd76d13c..1707b04f4 100644 --- a/src/serialization/resources/hris/resources/bankInfo/types/BankInfoListRequestAccountType.ts +++ b/src/serialization/resources/hris/resources/bankInfo/types/BankInfoListRequestAccountType.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const BankInfoListRequestAccountType: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/bankInfo/types/BankInfoListRequestOrderBy.ts b/src/serialization/resources/hris/resources/bankInfo/types/BankInfoListRequestOrderBy.ts index 689270b71..74fd69d12 100644 --- a/src/serialization/resources/hris/resources/bankInfo/types/BankInfoListRequestOrderBy.ts +++ b/src/serialization/resources/hris/resources/bankInfo/types/BankInfoListRequestOrderBy.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const BankInfoListRequestOrderBy: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsListRequestExpand.ts b/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsListRequestExpand.ts index a23f805a6..16df78ff4 100644 --- a/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsListRequestExpand.ts +++ b/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmployeePayrollRunsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsRetrieveRequestExpand.ts b/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsRetrieveRequestExpand.ts index 4bc4f5d35..c8b0b1522 100644 --- a/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsRetrieveRequestExpand.ts +++ b/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmployeePayrollRunsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employees/client/requests/EmployeeEndpointRequest.ts b/src/serialization/resources/hris/resources/employees/client/requests/EmployeeEndpointRequest.ts index f944d3225..56462ba56 100644 --- a/src/serialization/resources/hris/resources/employees/client/requests/EmployeeEndpointRequest.ts +++ b/src/serialization/resources/hris/resources/employees/client/requests/EmployeeEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { EmployeeRequest } from "../../../../types/EmployeeRequest"; export const EmployeeEndpointRequest: core.serialization.Schema< serializers.hris.EmployeeEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).hris.EmployeeRequest), + model: EmployeeRequest, }); export declare namespace EmployeeEndpointRequest { interface Raw { - model: serializers.hris.EmployeeRequest.Raw; + model: EmployeeRequest.Raw; } } diff --git a/src/serialization/resources/hris/resources/employees/client/requests/IgnoreCommonModelRequest.ts b/src/serialization/resources/hris/resources/employees/client/requests/IgnoreCommonModelRequest.ts index 012c9886d..1f8391388 100644 --- a/src/serialization/resources/hris/resources/employees/client/requests/IgnoreCommonModelRequest.ts +++ b/src/serialization/resources/hris/resources/employees/client/requests/IgnoreCommonModelRequest.ts @@ -2,23 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { IgnoreCommonModelRequestReason } from "../../types/IgnoreCommonModelRequestReason"; export const IgnoreCommonModelRequest: core.serialization.Schema< serializers.hris.IgnoreCommonModelRequest.Raw, Merge.hris.IgnoreCommonModelRequest > = core.serialization.object({ - reason: core.serialization.lazy( - async () => (await import("../../../../../..")).hris.IgnoreCommonModelRequestReason - ), + reason: IgnoreCommonModelRequestReason, message: core.serialization.string().optional(), }); export declare namespace IgnoreCommonModelRequest { interface Raw { - reason: serializers.hris.IgnoreCommonModelRequestReason.Raw; + reason: IgnoreCommonModelRequestReason.Raw; message?: string | null; } } diff --git a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestEmploymentStatus.ts b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestEmploymentStatus.ts index 7c5fbed11..4bb620dda 100644 --- a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestEmploymentStatus.ts +++ b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestEmploymentStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmployeesListRequestEmploymentStatus: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestExpand.ts b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestExpand.ts index 3d9cd260e..31e0c1bff 100644 --- a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestExpand.ts +++ b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmployeesListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestRemoteFields.ts b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestRemoteFields.ts index f13df5aa8..7b2d4eecc 100644 --- a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmployeesListRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestShowEnumOrigins.ts index 13b33534e..3affd644a 100644 --- a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmployeesListRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestExpand.ts b/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestExpand.ts index 8f17c1dc0..ea58ce049 100644 --- a/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestExpand.ts +++ b/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmployeesRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestRemoteFields.ts b/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestRemoteFields.ts index aa17319ff..d35a644ae 100644 --- a/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmployeesRetrieveRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestShowEnumOrigins.ts index 4708c083c..de3925fc3 100644 --- a/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmployeesRetrieveRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employees/types/IgnoreCommonModelRequestReason.ts b/src/serialization/resources/hris/resources/employees/types/IgnoreCommonModelRequestReason.ts index b02856a7b..bcbed0744 100644 --- a/src/serialization/resources/hris/resources/employees/types/IgnoreCommonModelRequestReason.ts +++ b/src/serialization/resources/hris/resources/employees/types/IgnoreCommonModelRequestReason.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { ReasonEnum } from "../../../types/ReasonEnum"; export const IgnoreCommonModelRequestReason: core.serialization.Schema< serializers.hris.IgnoreCommonModelRequestReason.Raw, Merge.hris.IgnoreCommonModelRequestReason -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../../../..")).hris.ReasonEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([ReasonEnum, core.serialization.string()]); export declare namespace IgnoreCommonModelRequestReason { - type Raw = serializers.hris.ReasonEnum.Raw | string; + type Raw = ReasonEnum.Raw | string; } diff --git a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestExpand.ts b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestExpand.ts index 51cd9d56e..6280fc0eb 100644 --- a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestExpand.ts +++ b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmploymentsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestOrderBy.ts b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestOrderBy.ts index c49ccee85..d7a98c989 100644 --- a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestOrderBy.ts +++ b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestOrderBy.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmploymentsListRequestOrderBy: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestRemoteFields.ts b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestRemoteFields.ts index 1825993cd..28ee7fdb8 100644 --- a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmploymentsListRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestShowEnumOrigins.ts index 840a57b21..0e1013384 100644 --- a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmploymentsListRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestExpand.ts b/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestExpand.ts index 697f76d2f..ac8218724 100644 --- a/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestExpand.ts +++ b/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmploymentsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestRemoteFields.ts b/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestRemoteFields.ts index 5aa66921e..3e5893c30 100644 --- a/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmploymentsRetrieveRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestShowEnumOrigins.ts index 45f9ccd90..7cc6a39f2 100644 --- a/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const EmploymentsRetrieveRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts b/src/serialization/resources/hris/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts index 216ba0c21..ba09e8117 100644 --- a/src/serialization/resources/hris/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/serialization/resources/hris/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const CreateFieldMappingRequest: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts b/src/serialization/resources/hris/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts index fbfacc0a8..77d0fb921 100644 --- a/src/serialization/resources/hris/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts +++ b/src/serialization/resources/hris/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const PatchedEditFieldMappingRequest: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/forceResync/client/syncStatusResyncCreate.ts b/src/serialization/resources/hris/resources/forceResync/client/syncStatusResyncCreate.ts index 7e1c64b40..45adb18cd 100644 --- a/src/serialization/resources/hris/resources/forceResync/client/syncStatusResyncCreate.ts +++ b/src/serialization/resources/hris/resources/forceResync/client/syncStatusResyncCreate.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { SyncStatus } from "../../../types/SyncStatus"; export const Response: core.serialization.Schema< serializers.hris.forceResync.syncStatusResyncCreate.Response.Raw, Merge.hris.SyncStatus[] -> = core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).hris.SyncStatus) -); +> = core.serialization.list(SyncStatus); export declare namespace Response { - type Raw = serializers.hris.SyncStatus.Raw[]; + type Raw = SyncStatus.Raw[]; } diff --git a/src/serialization/resources/hris/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts b/src/serialization/resources/hris/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts index 3c8d3d6dd..b9852c546 100644 --- a/src/serialization/resources/hris/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts +++ b/src/serialization/resources/hris/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const GenerateRemoteKeyRequest: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/issues/types/IssuesListRequestStatus.ts b/src/serialization/resources/hris/resources/issues/types/IssuesListRequestStatus.ts index f02b70a40..8973a0911 100644 --- a/src/serialization/resources/hris/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/serialization/resources/hris/resources/issues/types/IssuesListRequestStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const IssuesListRequestStatus: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/linkToken/client/requests/EndUserDetailsRequest.ts b/src/serialization/resources/hris/resources/linkToken/client/requests/EndUserDetailsRequest.ts index 50ed5c651..2e9d2467c 100644 --- a/src/serialization/resources/hris/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/serialization/resources/hris/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { CategoriesEnum } from "../../../../types/CategoriesEnum"; +import { CommonModelScopesBodyRequest } from "../../../../types/CommonModelScopesBodyRequest"; +import { IndividualCommonModelScopeDeserializerRequest } from "../../../../types/IndividualCommonModelScopeDeserializerRequest"; +import { LanguageEnum } from "../../../../types/LanguageEnum"; export const EndUserDetailsRequest: core.serialization.Schema< serializers.hris.EndUserDetailsRequest.Raw, @@ -13,9 +17,7 @@ export const EndUserDetailsRequest: core.serialization.Schema< endUserEmailAddress: core.serialization.property("end_user_email_address", core.serialization.string()), endUserOrganizationName: core.serialization.property("end_user_organization_name", core.serialization.string()), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string()), - categories: core.serialization.list( - core.serialization.lazy(async () => (await import("../../../../../..")).hris.CategoriesEnum) - ), + categories: core.serialization.list(CategoriesEnum), integration: core.serialization.string().optional(), linkExpiryMins: core.serialization.property("link_expiry_mins", core.serialization.number().optional()), shouldCreateMagicLinkUrl: core.serialization.property( @@ -25,31 +27,18 @@ export const EndUserDetailsRequest: core.serialization.Schema< hideAdminMagicLink: core.serialization.property("hide_admin_magic_link", core.serialization.boolean().optional()), commonModels: core.serialization.property( "common_models", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../../../../..")).hris.CommonModelScopesBodyRequest - ) - ) - .optional() + core.serialization.list(CommonModelScopesBodyRequest).optional() ), categoryCommonModelScopes: core.serialization.property( "category_common_model_scopes", core.serialization .record( core.serialization.string(), - core.serialization - .list( - core.serialization.lazyObject( - async () => - (await import("../../../../../..")).hris.IndividualCommonModelScopeDeserializerRequest - ) - ) - .optional() + core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional() ) .optional() ), - language: core.serialization.lazy(async () => (await import("../../../../../..")).hris.LanguageEnum).optional(), + language: LanguageEnum.optional(), integrationSpecificConfig: core.serialization.property( "integration_specific_config", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -61,17 +50,17 @@ export declare namespace EndUserDetailsRequest { end_user_email_address: string; end_user_organization_name: string; end_user_origin_id: string; - categories: serializers.hris.CategoriesEnum.Raw[]; + categories: CategoriesEnum.Raw[]; integration?: string | null; link_expiry_mins?: number | null; should_create_magic_link_url?: boolean | null; hide_admin_magic_link?: boolean | null; - common_models?: serializers.hris.CommonModelScopesBodyRequest.Raw[] | null; + common_models?: CommonModelScopesBodyRequest.Raw[] | null; category_common_model_scopes?: Record< string, - serializers.hris.IndividualCommonModelScopeDeserializerRequest.Raw[] | null | undefined + IndividualCommonModelScopeDeserializerRequest.Raw[] | null | undefined > | null; - language?: serializers.hris.LanguageEnum.Raw | null; + language?: LanguageEnum.Raw | null; integration_specific_config?: Record | null; } } diff --git a/src/serialization/resources/hris/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/serialization/resources/hris/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index 5e23537f0..788e1b6c4 100644 --- a/src/serialization/resources/hris/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/serialization/resources/hris/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const LinkedAccountsListRequestCategory: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/locations/types/LocationsListRequestLocationType.ts b/src/serialization/resources/hris/resources/locations/types/LocationsListRequestLocationType.ts index 01980fda0..d12f27350 100644 --- a/src/serialization/resources/hris/resources/locations/types/LocationsListRequestLocationType.ts +++ b/src/serialization/resources/hris/resources/locations/types/LocationsListRequestLocationType.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const LocationsListRequestLocationType: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRemoteFields.ts b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRemoteFields.ts index 04f3317ba..7369e9acc 100644 --- a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const PayrollRunsListRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRunType.ts b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRunType.ts index e36f0f81d..75f1a4eb2 100644 --- a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRunType.ts +++ b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRunType.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const PayrollRunsListRequestRunType: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestShowEnumOrigins.ts index 438aeaab3..8cecae585 100644 --- a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const PayrollRunsListRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestRemoteFields.ts b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestRemoteFields.ts index 55378e1ed..b1da74c89 100644 --- a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const PayrollRunsRetrieveRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestShowEnumOrigins.ts index 8629cb5b3..a4d61ef28 100644 --- a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const PayrollRunsRetrieveRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts b/src/serialization/resources/hris/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts index a6861dada..7ac7583cb 100644 --- a/src/serialization/resources/hris/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts +++ b/src/serialization/resources/hris/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const RemoteKeyForRegenerationRequest: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts b/src/serialization/resources/hris/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts index 85ffff4f2..b139a9939 100644 --- a/src/serialization/resources/hris/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/hris/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { IndividualCommonModelScopeDeserializerRequest } from "../../../../types/IndividualCommonModelScopeDeserializerRequest"; export const LinkedAccountCommonModelScopeDeserializerRequest: core.serialization.Schema< serializers.hris.LinkedAccountCommonModelScopeDeserializerRequest.Raw, @@ -12,16 +13,12 @@ export const LinkedAccountCommonModelScopeDeserializerRequest: core.serializatio > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list( - core.serialization.lazyObject( - async () => (await import("../../../../../..")).hris.IndividualCommonModelScopeDeserializerRequest - ) - ) + core.serialization.list(IndividualCommonModelScopeDeserializerRequest) ), }); export declare namespace LinkedAccountCommonModelScopeDeserializerRequest { interface Raw { - common_models: serializers.hris.IndividualCommonModelScopeDeserializerRequest.Raw[]; + common_models: IndividualCommonModelScopeDeserializerRequest.Raw[]; } } diff --git a/src/serialization/resources/hris/resources/timeOff/client/requests/TimeOffEndpointRequest.ts b/src/serialization/resources/hris/resources/timeOff/client/requests/TimeOffEndpointRequest.ts index 9997037e9..0be489c0c 100644 --- a/src/serialization/resources/hris/resources/timeOff/client/requests/TimeOffEndpointRequest.ts +++ b/src/serialization/resources/hris/resources/timeOff/client/requests/TimeOffEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { TimeOffRequest } from "../../../../types/TimeOffRequest"; export const TimeOffEndpointRequest: core.serialization.Schema< serializers.hris.TimeOffEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).hris.TimeOffRequest), + model: TimeOffRequest, }); export declare namespace TimeOffEndpointRequest { interface Raw { - model: serializers.hris.TimeOffRequest.Raw; + model: TimeOffRequest.Raw; } } diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestExpand.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestExpand.ts index 3129a563b..2e35f6e5f 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestExpand.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TimeOffListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRemoteFields.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRemoteFields.ts index 15ed7e228..a2cbc87a8 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TimeOffListRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRequestType.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRequestType.ts index a893b6137..ae161b333 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRequestType.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRequestType.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TimeOffListRequestRequestType: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestShowEnumOrigins.ts index 7741ad3af..9e0c87fa8 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TimeOffListRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestStatus.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestStatus.ts index 457070cf7..c4b115938 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestStatus.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TimeOffListRequestStatus: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestExpand.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestExpand.ts index 6fe36ed0f..5f9b5c705 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestExpand.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TimeOffRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestRemoteFields.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestRemoteFields.ts index 813e8efce..d92323b8c 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TimeOffRetrieveRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestShowEnumOrigins.ts index 501038f8a..f8fa59ad4 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TimeOffRetrieveRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/timeOffBalances/types/TimeOffBalancesListRequestPolicyType.ts b/src/serialization/resources/hris/resources/timeOffBalances/types/TimeOffBalancesListRequestPolicyType.ts index 434db0eac..6258dbe59 100644 --- a/src/serialization/resources/hris/resources/timeOffBalances/types/TimeOffBalancesListRequestPolicyType.ts +++ b/src/serialization/resources/hris/resources/timeOffBalances/types/TimeOffBalancesListRequestPolicyType.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TimeOffBalancesListRequestPolicyType: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntryEndpointRequest.ts b/src/serialization/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntryEndpointRequest.ts index f2fba262f..6d7a80878 100644 --- a/src/serialization/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntryEndpointRequest.ts +++ b/src/serialization/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntryEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { TimesheetEntryRequest } from "../../../../types/TimesheetEntryRequest"; export const TimesheetEntryEndpointRequest: core.serialization.Schema< serializers.hris.TimesheetEntryEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).hris.TimesheetEntryRequest), + model: TimesheetEntryRequest, }); export declare namespace TimesheetEntryEndpointRequest { interface Raw { - model: serializers.hris.TimesheetEntryRequest.Raw; + model: TimesheetEntryRequest.Raw; } } diff --git a/src/serialization/resources/hris/resources/timesheetEntries/types/TimesheetEntriesListRequestOrderBy.ts b/src/serialization/resources/hris/resources/timesheetEntries/types/TimesheetEntriesListRequestOrderBy.ts index 85b6ed48b..7bbc4d4b0 100644 --- a/src/serialization/resources/hris/resources/timesheetEntries/types/TimesheetEntriesListRequestOrderBy.ts +++ b/src/serialization/resources/hris/resources/timesheetEntries/types/TimesheetEntriesListRequestOrderBy.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TimesheetEntriesListRequestOrderBy: core.serialization.Schema< diff --git a/src/serialization/resources/hris/resources/webhookReceivers/client/list.ts b/src/serialization/resources/hris/resources/webhookReceivers/client/list.ts index 40dacef56..35bc596ca 100644 --- a/src/serialization/resources/hris/resources/webhookReceivers/client/list.ts +++ b/src/serialization/resources/hris/resources/webhookReceivers/client/list.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { WebhookReceiver } from "../../../types/WebhookReceiver"; export const Response: core.serialization.Schema< serializers.hris.webhookReceivers.list.Response.Raw, Merge.hris.WebhookReceiver[] -> = core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).hris.WebhookReceiver) -); +> = core.serialization.list(WebhookReceiver); export declare namespace Response { - type Raw = serializers.hris.WebhookReceiver.Raw[]; + type Raw = WebhookReceiver.Raw[]; } diff --git a/src/serialization/resources/hris/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts b/src/serialization/resources/hris/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts index fa5182fd9..634033051 100644 --- a/src/serialization/resources/hris/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts +++ b/src/serialization/resources/hris/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const WebhookReceiverRequest: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/AccountDetails.ts b/src/serialization/resources/hris/types/AccountDetails.ts index d56cdc6e7..d58b9bedd 100644 --- a/src/serialization/resources/hris/types/AccountDetails.ts +++ b/src/serialization/resources/hris/types/AccountDetails.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoryEnum } from "./CategoryEnum"; export const AccountDetails: core.serialization.ObjectSchema< serializers.hris.AccountDetails.Raw, @@ -13,7 +14,7 @@ export const AccountDetails: core.serialization.ObjectSchema< id: core.serialization.string().optional(), integration: core.serialization.string().optional(), integrationSlug: core.serialization.property("integration_slug", core.serialization.string().optional()), - category: core.serialization.lazy(async () => (await import("../../..")).hris.CategoryEnum).optional(), + category: CategoryEnum.optional(), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property( "end_user_organization_name", @@ -32,7 +33,7 @@ export declare namespace AccountDetails { id?: string | null; integration?: string | null; integration_slug?: string | null; - category?: serializers.hris.CategoryEnum.Raw | null; + category?: CategoryEnum.Raw | null; end_user_origin_id?: string | null; end_user_organization_name?: string | null; end_user_email_address?: string | null; diff --git a/src/serialization/resources/hris/types/AccountDetailsAndActions.ts b/src/serialization/resources/hris/types/AccountDetailsAndActions.ts index 831ac8779..8b3e46a60 100644 --- a/src/serialization/resources/hris/types/AccountDetailsAndActions.ts +++ b/src/serialization/resources/hris/types/AccountDetailsAndActions.ts @@ -2,17 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoryEnum } from "./CategoryEnum"; +import { AccountDetailsAndActionsStatusEnum } from "./AccountDetailsAndActionsStatusEnum"; +import { AccountDetailsAndActionsIntegration } from "./AccountDetailsAndActionsIntegration"; export const AccountDetailsAndActions: core.serialization.ObjectSchema< serializers.hris.AccountDetailsAndActions.Raw, Merge.hris.AccountDetailsAndActions > = core.serialization.object({ id: core.serialization.string(), - category: core.serialization.lazy(async () => (await import("../../..")).hris.CategoryEnum).optional(), - status: core.serialization.lazy(async () => (await import("../../..")).hris.AccountDetailsAndActionsStatusEnum), + category: CategoryEnum.optional(), + status: AccountDetailsAndActionsStatusEnum, statusDetail: core.serialization.property("status_detail", core.serialization.string().optional()), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property("end_user_organization_name", core.serialization.string()), @@ -20,9 +23,7 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< subdomain: core.serialization.string().optional(), webhookListenerUrl: core.serialization.property("webhook_listener_url", core.serialization.string()), isDuplicate: core.serialization.property("is_duplicate", core.serialization.boolean().optional()), - integration: core.serialization - .lazyObject(async () => (await import("../../..")).hris.AccountDetailsAndActionsIntegration) - .optional(), + integration: AccountDetailsAndActionsIntegration.optional(), accountType: core.serialization.property("account_type", core.serialization.string()), completedAt: core.serialization.property("completed_at", core.serialization.date()), }); @@ -30,8 +31,8 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< export declare namespace AccountDetailsAndActions { interface Raw { id: string; - category?: serializers.hris.CategoryEnum.Raw | null; - status: serializers.hris.AccountDetailsAndActionsStatusEnum.Raw; + category?: CategoryEnum.Raw | null; + status: AccountDetailsAndActionsStatusEnum.Raw; status_detail?: string | null; end_user_origin_id?: string | null; end_user_organization_name: string; @@ -39,7 +40,7 @@ export declare namespace AccountDetailsAndActions { subdomain?: string | null; webhook_listener_url: string; is_duplicate?: boolean | null; - integration?: serializers.hris.AccountDetailsAndActionsIntegration.Raw | null; + integration?: AccountDetailsAndActionsIntegration.Raw | null; account_type: string; completed_at: string; } diff --git a/src/serialization/resources/hris/types/AccountDetailsAndActionsIntegration.ts b/src/serialization/resources/hris/types/AccountDetailsAndActionsIntegration.ts index 124349aae..a2b8ca8f1 100644 --- a/src/serialization/resources/hris/types/AccountDetailsAndActionsIntegration.ts +++ b/src/serialization/resources/hris/types/AccountDetailsAndActionsIntegration.ts @@ -2,18 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoriesEnum } from "./CategoriesEnum"; +import { ModelOperation } from "./ModelOperation"; export const AccountDetailsAndActionsIntegration: core.serialization.ObjectSchema< serializers.hris.AccountDetailsAndActionsIntegration.Raw, Merge.hris.AccountDetailsAndActionsIntegration > = core.serialization.object({ name: core.serialization.string(), - categories: core.serialization.list( - core.serialization.lazy(async () => (await import("../../..")).hris.CategoriesEnum) - ), + categories: core.serialization.list(CategoriesEnum), image: core.serialization.string().optional(), squareImage: core.serialization.property("square_image", core.serialization.string().optional()), color: core.serialization.string(), @@ -21,21 +21,19 @@ export const AccountDetailsAndActionsIntegration: core.serialization.ObjectSchem passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ModelOperation)) - .optional() + core.serialization.list(ModelOperation).optional() ), }); export declare namespace AccountDetailsAndActionsIntegration { interface Raw { name: string; - categories: serializers.hris.CategoriesEnum.Raw[]; + categories: CategoriesEnum.Raw[]; image?: string | null; square_image?: string | null; color: string; slug: string; passthrough_available: boolean; - available_model_operations?: serializers.hris.ModelOperation.Raw[] | null; + available_model_operations?: ModelOperation.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/AccountDetailsAndActionsStatusEnum.ts b/src/serialization/resources/hris/types/AccountDetailsAndActionsStatusEnum.ts index 3f145a82c..db59508bb 100644 --- a/src/serialization/resources/hris/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/serialization/resources/hris/types/AccountDetailsAndActionsStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AccountDetailsAndActionsStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/AccountIntegration.ts b/src/serialization/resources/hris/types/AccountIntegration.ts index 06991cd1a..fe4dc5d1f 100644 --- a/src/serialization/resources/hris/types/AccountIntegration.ts +++ b/src/serialization/resources/hris/types/AccountIntegration.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoriesEnum } from "./CategoriesEnum"; export const AccountIntegration: core.serialization.ObjectSchema< serializers.hris.AccountIntegration.Raw, @@ -12,9 +13,7 @@ export const AccountIntegration: core.serialization.ObjectSchema< > = core.serialization.object({ name: core.serialization.string(), abbreviatedName: core.serialization.property("abbreviated_name", core.serialization.string().optional()), - categories: core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).hris.CategoriesEnum)) - .optional(), + categories: core.serialization.list(CategoriesEnum).optional(), image: core.serialization.string().optional(), squareImage: core.serialization.property("square_image", core.serialization.string().optional()), color: core.serialization.string().optional(), @@ -37,7 +36,7 @@ export declare namespace AccountIntegration { interface Raw { name: string; abbreviated_name?: string | null; - categories?: serializers.hris.CategoriesEnum.Raw[] | null; + categories?: CategoriesEnum.Raw[] | null; image?: string | null; square_image?: string | null; color?: string | null; diff --git a/src/serialization/resources/hris/types/AccountToken.ts b/src/serialization/resources/hris/types/AccountToken.ts index 4b115851b..2ec2eca0c 100644 --- a/src/serialization/resources/hris/types/AccountToken.ts +++ b/src/serialization/resources/hris/types/AccountToken.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountIntegration } from "./AccountIntegration"; export const AccountToken: core.serialization.ObjectSchema = core.serialization.object({ accountToken: core.serialization.property("account_token", core.serialization.string()), - integration: core.serialization.lazyObject(async () => (await import("../../..")).hris.AccountIntegration), + integration: AccountIntegration, }); export declare namespace AccountToken { interface Raw { account_token: string; - integration: serializers.hris.AccountIntegration.Raw; + integration: AccountIntegration.Raw; } } diff --git a/src/serialization/resources/hris/types/AccountTypeEnum.ts b/src/serialization/resources/hris/types/AccountTypeEnum.ts index e65fb3a0a..4e8440111 100644 --- a/src/serialization/resources/hris/types/AccountTypeEnum.ts +++ b/src/serialization/resources/hris/types/AccountTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AccountTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/AdvancedMetadata.ts b/src/serialization/resources/hris/types/AdvancedMetadata.ts index e93abdf21..19f10604a 100644 --- a/src/serialization/resources/hris/types/AdvancedMetadata.ts +++ b/src/serialization/resources/hris/types/AdvancedMetadata.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AdvancedMetadata: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/AsyncPassthroughReciept.ts b/src/serialization/resources/hris/types/AsyncPassthroughReciept.ts index 10347cec1..4a11f7ebf 100644 --- a/src/serialization/resources/hris/types/AsyncPassthroughReciept.ts +++ b/src/serialization/resources/hris/types/AsyncPassthroughReciept.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AsyncPassthroughReciept: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/AuditLogEvent.ts b/src/serialization/resources/hris/types/AuditLogEvent.ts index dfe2ebf2f..435cebee4 100644 --- a/src/serialization/resources/hris/types/AuditLogEvent.ts +++ b/src/serialization/resources/hris/types/AuditLogEvent.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AuditLogEventRole } from "./AuditLogEventRole"; +import { AuditLogEventEventType } from "./AuditLogEventEventType"; export const AuditLogEvent: core.serialization.ObjectSchema< serializers.hris.AuditLogEvent.Raw, @@ -13,12 +15,9 @@ export const AuditLogEvent: core.serialization.ObjectSchema< id: core.serialization.string().optional(), userName: core.serialization.property("user_name", core.serialization.string().optional()), userEmail: core.serialization.property("user_email", core.serialization.string().optional()), - role: core.serialization.lazy(async () => (await import("../../..")).hris.AuditLogEventRole), + role: AuditLogEventRole, ipAddress: core.serialization.property("ip_address", core.serialization.string()), - eventType: core.serialization.property( - "event_type", - core.serialization.lazy(async () => (await import("../../..")).hris.AuditLogEventEventType) - ), + eventType: core.serialization.property("event_type", AuditLogEventEventType), eventDescription: core.serialization.property("event_description", core.serialization.string()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), }); @@ -28,9 +27,9 @@ export declare namespace AuditLogEvent { id?: string | null; user_name?: string | null; user_email?: string | null; - role: serializers.hris.AuditLogEventRole.Raw; + role: AuditLogEventRole.Raw; ip_address: string; - event_type: serializers.hris.AuditLogEventEventType.Raw; + event_type: AuditLogEventEventType.Raw; event_description: string; created_at?: string | null; } diff --git a/src/serialization/resources/hris/types/AuditLogEventEventType.ts b/src/serialization/resources/hris/types/AuditLogEventEventType.ts index 9f22c8008..b4a52006d 100644 --- a/src/serialization/resources/hris/types/AuditLogEventEventType.ts +++ b/src/serialization/resources/hris/types/AuditLogEventEventType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EventTypeEnum } from "./EventTypeEnum"; export const AuditLogEventEventType: core.serialization.Schema< serializers.hris.AuditLogEventEventType.Raw, Merge.hris.AuditLogEventEventType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.EventTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EventTypeEnum, core.serialization.string()]); export declare namespace AuditLogEventEventType { - type Raw = serializers.hris.EventTypeEnum.Raw | string; + type Raw = EventTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/AuditLogEventRole.ts b/src/serialization/resources/hris/types/AuditLogEventRole.ts index 77ef32085..bf89358e1 100644 --- a/src/serialization/resources/hris/types/AuditLogEventRole.ts +++ b/src/serialization/resources/hris/types/AuditLogEventRole.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RoleEnum } from "./RoleEnum"; export const AuditLogEventRole: core.serialization.Schema< serializers.hris.AuditLogEventRole.Raw, Merge.hris.AuditLogEventRole -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.RoleEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RoleEnum, core.serialization.string()]); export declare namespace AuditLogEventRole { - type Raw = serializers.hris.RoleEnum.Raw | string; + type Raw = RoleEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/AvailableActions.ts b/src/serialization/resources/hris/types/AvailableActions.ts index bc50da219..5e715a180 100644 --- a/src/serialization/resources/hris/types/AvailableActions.ts +++ b/src/serialization/resources/hris/types/AvailableActions.ts @@ -2,28 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountIntegration } from "./AccountIntegration"; +import { ModelOperation } from "./ModelOperation"; export const AvailableActions: core.serialization.ObjectSchema< serializers.hris.AvailableActions.Raw, Merge.hris.AvailableActions > = core.serialization.object({ - integration: core.serialization.lazyObject(async () => (await import("../../..")).hris.AccountIntegration), + integration: AccountIntegration, passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ModelOperation)) - .optional() + core.serialization.list(ModelOperation).optional() ), }); export declare namespace AvailableActions { interface Raw { - integration: serializers.hris.AccountIntegration.Raw; + integration: AccountIntegration.Raw; passthrough_available: boolean; - available_model_operations?: serializers.hris.ModelOperation.Raw[] | null; + available_model_operations?: ModelOperation.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/BankInfo.ts b/src/serialization/resources/hris/types/BankInfo.ts index d393467e6..f5392ff6e 100644 --- a/src/serialization/resources/hris/types/BankInfo.ts +++ b/src/serialization/resources/hris/types/BankInfo.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { BankInfoEmployee } from "./BankInfoEmployee"; +import { BankInfoAccountType } from "./BankInfoAccountType"; +import { RemoteData } from "./RemoteData"; export const BankInfo: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,26 +15,18 @@ export const BankInfo: core.serialization.ObjectSchema (await import("../../..")).hris.BankInfoEmployee).optional(), + employee: BankInfoEmployee.optional(), accountNumber: core.serialization.property("account_number", core.serialization.string().optional()), routingNumber: core.serialization.property("routing_number", core.serialization.string().optional()), bankName: core.serialization.property("bank_name", core.serialization.string().optional()), - accountType: core.serialization.property( - "account_type", - core.serialization.lazy(async () => (await import("../../..")).hris.BankInfoAccountType).optional() - ), + accountType: core.serialization.property("account_type", BankInfoAccountType.optional()), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace BankInfo { @@ -40,14 +35,14 @@ export declare namespace BankInfo { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - employee?: serializers.hris.BankInfoEmployee.Raw | null; + employee?: BankInfoEmployee.Raw | null; account_number?: string | null; routing_number?: string | null; bank_name?: string | null; - account_type?: serializers.hris.BankInfoAccountType.Raw | null; + account_type?: BankInfoAccountType.Raw | null; remote_created_at?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/BankInfoAccountType.ts b/src/serialization/resources/hris/types/BankInfoAccountType.ts index fc272b142..97bb22601 100644 --- a/src/serialization/resources/hris/types/BankInfoAccountType.ts +++ b/src/serialization/resources/hris/types/BankInfoAccountType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountTypeEnum } from "./AccountTypeEnum"; export const BankInfoAccountType: core.serialization.Schema< serializers.hris.BankInfoAccountType.Raw, Merge.hris.BankInfoAccountType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.AccountTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([AccountTypeEnum, core.serialization.string()]); export declare namespace BankInfoAccountType { - type Raw = serializers.hris.AccountTypeEnum.Raw | string; + type Raw = AccountTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/BankInfoEmployee.ts b/src/serialization/resources/hris/types/BankInfoEmployee.ts index 111404ce8..5d3b35a7b 100644 --- a/src/serialization/resources/hris/types/BankInfoEmployee.ts +++ b/src/serialization/resources/hris/types/BankInfoEmployee.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const BankInfoEmployee: core.serialization.Schema< @@ -11,7 +11,7 @@ export const BankInfoEmployee: core.serialization.Schema< Merge.hris.BankInfoEmployee > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Employee), + core.serialization.lazyObject(() => serializers.hris.Employee), ]); export declare namespace BankInfoEmployee { diff --git a/src/serialization/resources/hris/types/Benefit.ts b/src/serialization/resources/hris/types/Benefit.ts index 9dd6e2eff..c7865b96f 100644 --- a/src/serialization/resources/hris/types/Benefit.ts +++ b/src/serialization/resources/hris/types/Benefit.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { BenefitEmployee } from "./BenefitEmployee"; +import { RemoteData } from "./RemoteData"; export const Benefit: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,7 +14,7 @@ export const Benefit: core.serialization.ObjectSchema (await import("../../..")).hris.BenefitEmployee).optional(), + employee: BenefitEmployee.optional(), providerName: core.serialization.property("provider_name", core.serialization.string().optional()), benefitPlanType: core.serialization.property("benefit_plan_type", core.serialization.string().optional()), employeeContribution: core.serialization.property( @@ -31,12 +33,7 @@ export const Benefit: core.serialization.ObjectSchema (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Benefit { @@ -45,7 +42,7 @@ export declare namespace Benefit { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - employee?: serializers.hris.BenefitEmployee.Raw | null; + employee?: BenefitEmployee.Raw | null; provider_name?: string | null; benefit_plan_type?: string | null; employee_contribution?: number | null; @@ -55,6 +52,6 @@ export declare namespace Benefit { remote_was_deleted?: boolean | null; employer_benefit?: string | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/BenefitEmployee.ts b/src/serialization/resources/hris/types/BenefitEmployee.ts index 9425cae2c..93656ff60 100644 --- a/src/serialization/resources/hris/types/BenefitEmployee.ts +++ b/src/serialization/resources/hris/types/BenefitEmployee.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const BenefitEmployee: core.serialization.Schema< @@ -11,7 +11,7 @@ export const BenefitEmployee: core.serialization.Schema< Merge.hris.BenefitEmployee > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Employee), + core.serialization.lazyObject(() => serializers.hris.Employee), ]); export declare namespace BenefitEmployee { diff --git a/src/serialization/resources/hris/types/BenefitPlanTypeEnum.ts b/src/serialization/resources/hris/types/BenefitPlanTypeEnum.ts index 0306db120..93a65bd5f 100644 --- a/src/serialization/resources/hris/types/BenefitPlanTypeEnum.ts +++ b/src/serialization/resources/hris/types/BenefitPlanTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const BenefitPlanTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/CategoriesEnum.ts b/src/serialization/resources/hris/types/CategoriesEnum.ts index 9f0704ca2..a48865ec9 100644 --- a/src/serialization/resources/hris/types/CategoriesEnum.ts +++ b/src/serialization/resources/hris/types/CategoriesEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CategoriesEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/CategoryEnum.ts b/src/serialization/resources/hris/types/CategoryEnum.ts index 3dd44694e..ce482ff73 100644 --- a/src/serialization/resources/hris/types/CategoryEnum.ts +++ b/src/serialization/resources/hris/types/CategoryEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CategoryEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/CommonModelScopeApi.ts b/src/serialization/resources/hris/types/CommonModelScopeApi.ts index edfd7da59..c7770c840 100644 --- a/src/serialization/resources/hris/types/CommonModelScopeApi.ts +++ b/src/serialization/resources/hris/types/CommonModelScopeApi.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IndividualCommonModelScopeDeserializer } from "./IndividualCommonModelScopeDeserializer"; export const CommonModelScopeApi: core.serialization.ObjectSchema< serializers.hris.CommonModelScopeApi.Raw, @@ -12,16 +13,12 @@ export const CommonModelScopeApi: core.serialization.ObjectSchema< > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list( - core.serialization.lazyObject( - async () => (await import("../../..")).hris.IndividualCommonModelScopeDeserializer - ) - ) + core.serialization.list(IndividualCommonModelScopeDeserializer) ), }); export declare namespace CommonModelScopeApi { interface Raw { - common_models: serializers.hris.IndividualCommonModelScopeDeserializer.Raw[]; + common_models: IndividualCommonModelScopeDeserializer.Raw[]; } } diff --git a/src/serialization/resources/hris/types/CommonModelScopesBodyRequest.ts b/src/serialization/resources/hris/types/CommonModelScopesBodyRequest.ts index fa24c50bb..37e5984b6 100644 --- a/src/serialization/resources/hris/types/CommonModelScopesBodyRequest.ts +++ b/src/serialization/resources/hris/types/CommonModelScopesBodyRequest.ts @@ -2,19 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EnabledActionsEnum } from "./EnabledActionsEnum"; export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< serializers.hris.CommonModelScopesBodyRequest.Raw, Merge.hris.CommonModelScopesBodyRequest > = core.serialization.object({ modelId: core.serialization.property("model_id", core.serialization.string()), - enabledActions: core.serialization.property( - "enabled_actions", - core.serialization.list(core.serialization.lazy(async () => (await import("../../..")).hris.EnabledActionsEnum)) - ), + enabledActions: core.serialization.property("enabled_actions", core.serialization.list(EnabledActionsEnum)), disabledFields: core.serialization.property( "disabled_fields", core.serialization.list(core.serialization.string()) @@ -24,7 +22,7 @@ export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< export declare namespace CommonModelScopesBodyRequest { interface Raw { model_id: string; - enabled_actions: serializers.hris.EnabledActionsEnum.Raw[]; + enabled_actions: EnabledActionsEnum.Raw[]; disabled_fields: string[]; } } diff --git a/src/serialization/resources/hris/types/Company.ts b/src/serialization/resources/hris/types/Company.ts index c52d99b7c..cf4da3f8b 100644 --- a/src/serialization/resources/hris/types/Company.ts +++ b/src/serialization/resources/hris/types/Company.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; export const Company: core.serialization.ObjectSchema = core.serialization.object({ @@ -20,12 +21,7 @@ export const Company: core.serialization.ObjectSchema (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Company { @@ -39,6 +35,6 @@ export declare namespace Company { eins?: (string | null | undefined)[] | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/CountryEnum.ts b/src/serialization/resources/hris/types/CountryEnum.ts index b0a960a34..7431577a6 100644 --- a/src/serialization/resources/hris/types/CountryEnum.ts +++ b/src/serialization/resources/hris/types/CountryEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CountryEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/DataPassthroughRequest.ts b/src/serialization/resources/hris/types/DataPassthroughRequest.ts index 06e5a7c21..b9be03074 100644 --- a/src/serialization/resources/hris/types/DataPassthroughRequest.ts +++ b/src/serialization/resources/hris/types/DataPassthroughRequest.ts @@ -2,41 +2,39 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { MethodEnum } from "./MethodEnum"; +import { MultipartFormFieldRequest } from "./MultipartFormFieldRequest"; +import { RequestFormatEnum } from "./RequestFormatEnum"; export const DataPassthroughRequest: core.serialization.ObjectSchema< serializers.hris.DataPassthroughRequest.Raw, Merge.hris.DataPassthroughRequest > = core.serialization.object({ - method: core.serialization.lazy(async () => (await import("../../..")).hris.MethodEnum), + method: MethodEnum, path: core.serialization.string(), baseUrlOverride: core.serialization.property("base_url_override", core.serialization.string().optional()), data: core.serialization.string().optional(), multipartFormData: core.serialization.property( "multipart_form_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.MultipartFormFieldRequest)) - .optional() + core.serialization.list(MultipartFormFieldRequest).optional() ), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), - requestFormat: core.serialization.property( - "request_format", - core.serialization.lazy(async () => (await import("../../..")).hris.RequestFormatEnum).optional() - ), + requestFormat: core.serialization.property("request_format", RequestFormatEnum.optional()), normalizeResponse: core.serialization.property("normalize_response", core.serialization.boolean().optional()), }); export declare namespace DataPassthroughRequest { interface Raw { - method: serializers.hris.MethodEnum.Raw; + method: MethodEnum.Raw; path: string; base_url_override?: string | null; data?: string | null; - multipart_form_data?: serializers.hris.MultipartFormFieldRequest.Raw[] | null; + multipart_form_data?: MultipartFormFieldRequest.Raw[] | null; headers?: Record | null; - request_format?: serializers.hris.RequestFormatEnum.Raw | null; + request_format?: RequestFormatEnum.Raw | null; normalize_response?: boolean | null; } } diff --git a/src/serialization/resources/hris/types/DebugModeLog.ts b/src/serialization/resources/hris/types/DebugModeLog.ts index c993d6396..2dce8506b 100644 --- a/src/serialization/resources/hris/types/DebugModeLog.ts +++ b/src/serialization/resources/hris/types/DebugModeLog.ts @@ -2,24 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { DebugModelLogSummary } from "./DebugModelLogSummary"; export const DebugModeLog: core.serialization.ObjectSchema = core.serialization.object({ logId: core.serialization.property("log_id", core.serialization.string()), dashboardView: core.serialization.property("dashboard_view", core.serialization.string()), - logSummary: core.serialization.property( - "log_summary", - core.serialization.lazyObject(async () => (await import("../../..")).hris.DebugModelLogSummary) - ), + logSummary: core.serialization.property("log_summary", DebugModelLogSummary), }); export declare namespace DebugModeLog { interface Raw { log_id: string; dashboard_view: string; - log_summary: serializers.hris.DebugModelLogSummary.Raw; + log_summary: DebugModelLogSummary.Raw; } } diff --git a/src/serialization/resources/hris/types/DebugModelLogSummary.ts b/src/serialization/resources/hris/types/DebugModelLogSummary.ts index 69d12a779..1a9b171b6 100644 --- a/src/serialization/resources/hris/types/DebugModelLogSummary.ts +++ b/src/serialization/resources/hris/types/DebugModelLogSummary.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const DebugModelLogSummary: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/Deduction.ts b/src/serialization/resources/hris/types/Deduction.ts index d4ca20df1..3a66a72b1 100644 --- a/src/serialization/resources/hris/types/Deduction.ts +++ b/src/serialization/resources/hris/types/Deduction.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; export const Deduction: core.serialization.ObjectSchema = core.serialization.object({ @@ -21,12 +22,7 @@ export const Deduction: core.serialization.ObjectSchema (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Deduction { @@ -41,6 +37,6 @@ export declare namespace Deduction { company_deduction?: number | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/Dependent.ts b/src/serialization/resources/hris/types/Dependent.ts index 1bf709e14..8b6c67ae5 100644 --- a/src/serialization/resources/hris/types/Dependent.ts +++ b/src/serialization/resources/hris/types/Dependent.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { DependentRelationship } from "./DependentRelationship"; +import { DependentGender } from "./DependentGender"; +import { RemoteData } from "./RemoteData"; export const Dependent: core.serialization.ObjectSchema = core.serialization.object({ @@ -15,12 +18,10 @@ export const Dependent: core.serialization.ObjectSchema (await import("../../..")).hris.DependentRelationship) - .optional(), + relationship: DependentRelationship.optional(), employee: core.serialization.string().optional(), dateOfBirth: core.serialization.property("date_of_birth", core.serialization.date().optional()), - gender: core.serialization.lazy(async () => (await import("../../..")).hris.DependentGender).optional(), + gender: DependentGender.optional(), phoneNumber: core.serialization.property("phone_number", core.serialization.string().optional()), homeLocation: core.serialization.property("home_location", core.serialization.string().optional()), isStudent: core.serialization.property("is_student", core.serialization.boolean().optional()), @@ -30,12 +31,7 @@ export const Dependent: core.serialization.ObjectSchema (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Dependent { @@ -47,16 +43,16 @@ export declare namespace Dependent { first_name?: string | null; middle_name?: string | null; last_name?: string | null; - relationship?: serializers.hris.DependentRelationship.Raw | null; + relationship?: DependentRelationship.Raw | null; employee?: string | null; date_of_birth?: string | null; - gender?: serializers.hris.DependentGender.Raw | null; + gender?: DependentGender.Raw | null; phone_number?: string | null; home_location?: string | null; is_student?: boolean | null; ssn?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/DependentGender.ts b/src/serialization/resources/hris/types/DependentGender.ts index 3da97439a..ef14b70f0 100644 --- a/src/serialization/resources/hris/types/DependentGender.ts +++ b/src/serialization/resources/hris/types/DependentGender.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { GenderEnum } from "./GenderEnum"; export const DependentGender: core.serialization.Schema< serializers.hris.DependentGender.Raw, Merge.hris.DependentGender -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.GenderEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([GenderEnum, core.serialization.string()]); export declare namespace DependentGender { - type Raw = serializers.hris.GenderEnum.Raw | string; + type Raw = GenderEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/DependentRelationship.ts b/src/serialization/resources/hris/types/DependentRelationship.ts index 17edba8d9..0f02bb560 100644 --- a/src/serialization/resources/hris/types/DependentRelationship.ts +++ b/src/serialization/resources/hris/types/DependentRelationship.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RelationshipEnum } from "./RelationshipEnum"; export const DependentRelationship: core.serialization.Schema< serializers.hris.DependentRelationship.Raw, Merge.hris.DependentRelationship -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.RelationshipEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RelationshipEnum, core.serialization.string()]); export declare namespace DependentRelationship { - type Raw = serializers.hris.RelationshipEnum.Raw | string; + type Raw = RelationshipEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/Earning.ts b/src/serialization/resources/hris/types/Earning.ts index bac0b42ab..9c5c3889a 100644 --- a/src/serialization/resources/hris/types/Earning.ts +++ b/src/serialization/resources/hris/types/Earning.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EarningType } from "./EarningType"; +import { RemoteData } from "./RemoteData"; export const Earning: core.serialization.ObjectSchema = core.serialization.object({ @@ -14,18 +16,13 @@ export const Earning: core.serialization.ObjectSchema (await import("../../..")).hris.EarningType).optional(), + type: EarningType.optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Earning { @@ -36,9 +33,9 @@ export declare namespace Earning { modified_at?: string | null; employee_payroll_run?: string | null; amount?: number | null; - type?: serializers.hris.EarningType.Raw | null; + type?: EarningType.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/EarningType.ts b/src/serialization/resources/hris/types/EarningType.ts index d48bb4f4c..70a43e7d2 100644 --- a/src/serialization/resources/hris/types/EarningType.ts +++ b/src/serialization/resources/hris/types/EarningType.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EarningTypeEnum } from "./EarningTypeEnum"; export const EarningType: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.EarningTypeEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([EarningTypeEnum, core.serialization.string()]); export declare namespace EarningType { - type Raw = serializers.hris.EarningTypeEnum.Raw | string; + type Raw = EarningTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EarningTypeEnum.ts b/src/serialization/resources/hris/types/EarningTypeEnum.ts index b873f2ea8..7e82e367d 100644 --- a/src/serialization/resources/hris/types/EarningTypeEnum.ts +++ b/src/serialization/resources/hris/types/EarningTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EarningTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/Employee.ts b/src/serialization/resources/hris/types/Employee.ts index f4cd4f4e0..9add73565 100644 --- a/src/serialization/resources/hris/types/Employee.ts +++ b/src/serialization/resources/hris/types/Employee.ts @@ -2,9 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EmployeeCompany } from "./EmployeeCompany"; +import { EmployeeGroupsItem } from "./EmployeeGroupsItem"; +import { EmployeeHomeLocation } from "./EmployeeHomeLocation"; +import { EmployeeWorkLocation } from "./EmployeeWorkLocation"; +import { EmployeeTeam } from "./EmployeeTeam"; +import { EmployeePayGroup } from "./EmployeePayGroup"; +import { EmployeeGender } from "./EmployeeGender"; +import { EmployeeEthnicity } from "./EmployeeEthnicity"; +import { EmployeeMaritalStatus } from "./EmployeeMaritalStatus"; +import { EmployeeEmploymentStatus } from "./EmployeeEmploymentStatus"; +import { RemoteData } from "./RemoteData"; export const Employee: core.serialization.ObjectSchema = core.serialization.object({ @@ -13,52 +24,33 @@ export const Employee: core.serialization.ObjectSchema (await import("../../..")).hris.EmployeeCompany).optional(), + company: EmployeeCompany.optional(), firstName: core.serialization.property("first_name", core.serialization.string().optional()), lastName: core.serialization.property("last_name", core.serialization.string().optional()), preferredName: core.serialization.property("preferred_name", core.serialization.string().optional()), displayFullName: core.serialization.property("display_full_name", core.serialization.string().optional()), username: core.serialization.string().optional(), - groups: core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeGroupsItem).optional()) - .optional(), + groups: core.serialization.list(EmployeeGroupsItem.optional()).optional(), workEmail: core.serialization.property("work_email", core.serialization.string().optional()), personalEmail: core.serialization.property("personal_email", core.serialization.string().optional()), mobilePhoneNumber: core.serialization.property("mobile_phone_number", core.serialization.string().optional()), employments: core.serialization - .list( - core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeEmploymentsItem).optional() - ) + .list(core.serialization.lazy(() => serializers.hris.EmployeeEmploymentsItem).optional()) .optional(), - homeLocation: core.serialization.property( - "home_location", - core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeHomeLocation).optional() - ), - workLocation: core.serialization.property( - "work_location", - core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeWorkLocation).optional() - ), - manager: core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeManager).optional(), - team: core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeTeam).optional(), - payGroup: core.serialization.property( - "pay_group", - core.serialization.lazy(async () => (await import("../../..")).hris.EmployeePayGroup).optional() - ), + homeLocation: core.serialization.property("home_location", EmployeeHomeLocation.optional()), + workLocation: core.serialization.property("work_location", EmployeeWorkLocation.optional()), + manager: core.serialization.lazy(() => serializers.hris.EmployeeManager).optional(), + team: EmployeeTeam.optional(), + payGroup: core.serialization.property("pay_group", EmployeePayGroup.optional()), ssn: core.serialization.string().optional(), - gender: core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeGender).optional(), - ethnicity: core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeEthnicity).optional(), - maritalStatus: core.serialization.property( - "marital_status", - core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeMaritalStatus).optional() - ), + gender: EmployeeGender.optional(), + ethnicity: EmployeeEthnicity.optional(), + maritalStatus: core.serialization.property("marital_status", EmployeeMaritalStatus.optional()), dateOfBirth: core.serialization.property("date_of_birth", core.serialization.date().optional()), hireDate: core.serialization.property("hire_date", core.serialization.date().optional()), startDate: core.serialization.property("start_date", core.serialization.date().optional()), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), - employmentStatus: core.serialization.property( - "employment_status", - core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeEmploymentStatus).optional() - ), + employmentStatus: core.serialization.property("employment_status", EmployeeEmploymentStatus.optional()), terminationDate: core.serialization.property("termination_date", core.serialization.date().optional()), avatar: core.serialization.string().optional(), customFields: core.serialization.property( @@ -70,12 +62,7 @@ export const Employee: core.serialization.ObjectSchema (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Employee { @@ -85,36 +72,36 @@ export declare namespace Employee { created_at?: string | null; modified_at?: string | null; employee_number?: string | null; - company?: serializers.hris.EmployeeCompany.Raw | null; + company?: EmployeeCompany.Raw | null; first_name?: string | null; last_name?: string | null; preferred_name?: string | null; display_full_name?: string | null; username?: string | null; - groups?: (serializers.hris.EmployeeGroupsItem.Raw | null | undefined)[] | null; + groups?: (EmployeeGroupsItem.Raw | null | undefined)[] | null; work_email?: string | null; personal_email?: string | null; mobile_phone_number?: string | null; employments?: (serializers.hris.EmployeeEmploymentsItem.Raw | null | undefined)[] | null; - home_location?: serializers.hris.EmployeeHomeLocation.Raw | null; - work_location?: serializers.hris.EmployeeWorkLocation.Raw | null; + home_location?: EmployeeHomeLocation.Raw | null; + work_location?: EmployeeWorkLocation.Raw | null; manager?: serializers.hris.EmployeeManager.Raw | null; - team?: serializers.hris.EmployeeTeam.Raw | null; - pay_group?: serializers.hris.EmployeePayGroup.Raw | null; + team?: EmployeeTeam.Raw | null; + pay_group?: EmployeePayGroup.Raw | null; ssn?: string | null; - gender?: serializers.hris.EmployeeGender.Raw | null; - ethnicity?: serializers.hris.EmployeeEthnicity.Raw | null; - marital_status?: serializers.hris.EmployeeMaritalStatus.Raw | null; + gender?: EmployeeGender.Raw | null; + ethnicity?: EmployeeEthnicity.Raw | null; + marital_status?: EmployeeMaritalStatus.Raw | null; date_of_birth?: string | null; hire_date?: string | null; start_date?: string | null; remote_created_at?: string | null; - employment_status?: serializers.hris.EmployeeEmploymentStatus.Raw | null; + employment_status?: EmployeeEmploymentStatus.Raw | null; termination_date?: string | null; avatar?: string | null; custom_fields?: Record | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/EmployeeCompany.ts b/src/serialization/resources/hris/types/EmployeeCompany.ts index 97e5d2447..8e4ae68c3 100644 --- a/src/serialization/resources/hris/types/EmployeeCompany.ts +++ b/src/serialization/resources/hris/types/EmployeeCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Company } from "./Company"; export const EmployeeCompany: core.serialization.Schema< serializers.hris.EmployeeCompany.Raw, Merge.hris.EmployeeCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Company), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Company]); export declare namespace EmployeeCompany { - type Raw = string | serializers.hris.Company.Raw; + type Raw = string | Company.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeEmploymentStatus.ts b/src/serialization/resources/hris/types/EmployeeEmploymentStatus.ts index 05148087b..3cbbcfc9a 100644 --- a/src/serialization/resources/hris/types/EmployeeEmploymentStatus.ts +++ b/src/serialization/resources/hris/types/EmployeeEmploymentStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EmploymentStatusEnum } from "./EmploymentStatusEnum"; export const EmployeeEmploymentStatus: core.serialization.Schema< serializers.hris.EmployeeEmploymentStatus.Raw, Merge.hris.EmployeeEmploymentStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.EmploymentStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EmploymentStatusEnum, core.serialization.string()]); export declare namespace EmployeeEmploymentStatus { - type Raw = serializers.hris.EmploymentStatusEnum.Raw | string; + type Raw = EmploymentStatusEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeeEmploymentsItem.ts b/src/serialization/resources/hris/types/EmployeeEmploymentsItem.ts index dfbaf783a..169de3404 100644 --- a/src/serialization/resources/hris/types/EmployeeEmploymentsItem.ts +++ b/src/serialization/resources/hris/types/EmployeeEmploymentsItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EmployeeEmploymentsItem: core.serialization.Schema< @@ -11,7 +11,7 @@ export const EmployeeEmploymentsItem: core.serialization.Schema< Merge.hris.EmployeeEmploymentsItem > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Employment), + core.serialization.lazyObject(() => serializers.hris.Employment), ]); export declare namespace EmployeeEmploymentsItem { diff --git a/src/serialization/resources/hris/types/EmployeeEthnicity.ts b/src/serialization/resources/hris/types/EmployeeEthnicity.ts index 94d15c164..72cfb4c6f 100644 --- a/src/serialization/resources/hris/types/EmployeeEthnicity.ts +++ b/src/serialization/resources/hris/types/EmployeeEthnicity.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EthnicityEnum } from "./EthnicityEnum"; export const EmployeeEthnicity: core.serialization.Schema< serializers.hris.EmployeeEthnicity.Raw, Merge.hris.EmployeeEthnicity -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.EthnicityEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EthnicityEnum, core.serialization.string()]); export declare namespace EmployeeEthnicity { - type Raw = serializers.hris.EthnicityEnum.Raw | string; + type Raw = EthnicityEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeeGender.ts b/src/serialization/resources/hris/types/EmployeeGender.ts index 9df23f3c4..35a2ea18e 100644 --- a/src/serialization/resources/hris/types/EmployeeGender.ts +++ b/src/serialization/resources/hris/types/EmployeeGender.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { GenderEnum } from "./GenderEnum"; export const EmployeeGender: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.GenderEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([GenderEnum, core.serialization.string()]); export declare namespace EmployeeGender { - type Raw = serializers.hris.GenderEnum.Raw | string; + type Raw = GenderEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeeGroupsItem.ts b/src/serialization/resources/hris/types/EmployeeGroupsItem.ts index d3c030ca8..fc7273a03 100644 --- a/src/serialization/resources/hris/types/EmployeeGroupsItem.ts +++ b/src/serialization/resources/hris/types/EmployeeGroupsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Group } from "./Group"; export const EmployeeGroupsItem: core.serialization.Schema< serializers.hris.EmployeeGroupsItem.Raw, Merge.hris.EmployeeGroupsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Group), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Group]); export declare namespace EmployeeGroupsItem { - type Raw = string | serializers.hris.Group.Raw; + type Raw = string | Group.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeHomeLocation.ts b/src/serialization/resources/hris/types/EmployeeHomeLocation.ts index bafff6f63..899080347 100644 --- a/src/serialization/resources/hris/types/EmployeeHomeLocation.ts +++ b/src/serialization/resources/hris/types/EmployeeHomeLocation.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Location } from "./Location"; export const EmployeeHomeLocation: core.serialization.Schema< serializers.hris.EmployeeHomeLocation.Raw, Merge.hris.EmployeeHomeLocation -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Location), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Location]); export declare namespace EmployeeHomeLocation { - type Raw = string | serializers.hris.Location.Raw; + type Raw = string | Location.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeManager.ts b/src/serialization/resources/hris/types/EmployeeManager.ts index d384596c0..d72f3eb2a 100644 --- a/src/serialization/resources/hris/types/EmployeeManager.ts +++ b/src/serialization/resources/hris/types/EmployeeManager.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EmployeeManager: core.serialization.Schema< @@ -11,7 +11,7 @@ export const EmployeeManager: core.serialization.Schema< Merge.hris.EmployeeManager > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Employee), + core.serialization.lazyObject(() => serializers.hris.Employee), ]); export declare namespace EmployeeManager { diff --git a/src/serialization/resources/hris/types/EmployeeMaritalStatus.ts b/src/serialization/resources/hris/types/EmployeeMaritalStatus.ts index cd275d8e3..e9cf9d88c 100644 --- a/src/serialization/resources/hris/types/EmployeeMaritalStatus.ts +++ b/src/serialization/resources/hris/types/EmployeeMaritalStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { MaritalStatusEnum } from "./MaritalStatusEnum"; export const EmployeeMaritalStatus: core.serialization.Schema< serializers.hris.EmployeeMaritalStatus.Raw, Merge.hris.EmployeeMaritalStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.MaritalStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([MaritalStatusEnum, core.serialization.string()]); export declare namespace EmployeeMaritalStatus { - type Raw = serializers.hris.MaritalStatusEnum.Raw | string; + type Raw = MaritalStatusEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeePayGroup.ts b/src/serialization/resources/hris/types/EmployeePayGroup.ts index 96bcf9bc9..514c53f26 100644 --- a/src/serialization/resources/hris/types/EmployeePayGroup.ts +++ b/src/serialization/resources/hris/types/EmployeePayGroup.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PayGroup } from "./PayGroup"; export const EmployeePayGroup: core.serialization.Schema< serializers.hris.EmployeePayGroup.Raw, Merge.hris.EmployeePayGroup -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.PayGroup), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PayGroup]); export declare namespace EmployeePayGroup { - type Raw = string | serializers.hris.PayGroup.Raw; + type Raw = string | PayGroup.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeePayrollRun.ts b/src/serialization/resources/hris/types/EmployeePayrollRun.ts index add84aa53..1d813e7a7 100644 --- a/src/serialization/resources/hris/types/EmployeePayrollRun.ts +++ b/src/serialization/resources/hris/types/EmployeePayrollRun.ts @@ -2,9 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EmployeePayrollRunEmployee } from "./EmployeePayrollRunEmployee"; +import { EmployeePayrollRunPayrollRun } from "./EmployeePayrollRunPayrollRun"; +import { Earning } from "./Earning"; +import { Deduction } from "./Deduction"; +import { Tax } from "./Tax"; +import { RemoteData } from "./RemoteData"; export const EmployeePayrollRun: core.serialization.ObjectSchema< serializers.hris.EmployeePayrollRun.Raw, @@ -14,38 +20,22 @@ export const EmployeePayrollRun: core.serialization.ObjectSchema< remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), - employee: core.serialization - .lazy(async () => (await import("../../..")).hris.EmployeePayrollRunEmployee) - .optional(), - payrollRun: core.serialization.property( - "payroll_run", - core.serialization.lazy(async () => (await import("../../..")).hris.EmployeePayrollRunPayrollRun).optional() - ), + employee: EmployeePayrollRunEmployee.optional(), + payrollRun: core.serialization.property("payroll_run", EmployeePayrollRunPayrollRun.optional()), grossPay: core.serialization.property("gross_pay", core.serialization.number().optional()), netPay: core.serialization.property("net_pay", core.serialization.number().optional()), startDate: core.serialization.property("start_date", core.serialization.date().optional()), endDate: core.serialization.property("end_date", core.serialization.date().optional()), checkDate: core.serialization.property("check_date", core.serialization.date().optional()), - earnings: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.Earning)) - .optional(), - deductions: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.Deduction)) - .optional(), - taxes: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.Tax)) - .optional(), + earnings: core.serialization.list(Earning).optional(), + deductions: core.serialization.list(Deduction).optional(), + taxes: core.serialization.list(Tax).optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace EmployeePayrollRun { @@ -54,18 +44,18 @@ export declare namespace EmployeePayrollRun { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - employee?: serializers.hris.EmployeePayrollRunEmployee.Raw | null; - payroll_run?: serializers.hris.EmployeePayrollRunPayrollRun.Raw | null; + employee?: EmployeePayrollRunEmployee.Raw | null; + payroll_run?: EmployeePayrollRunPayrollRun.Raw | null; gross_pay?: number | null; net_pay?: number | null; start_date?: string | null; end_date?: string | null; check_date?: string | null; - earnings?: serializers.hris.Earning.Raw[] | null; - deductions?: serializers.hris.Deduction.Raw[] | null; - taxes?: serializers.hris.Tax.Raw[] | null; + earnings?: Earning.Raw[] | null; + deductions?: Deduction.Raw[] | null; + taxes?: Tax.Raw[] | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/EmployeePayrollRunEmployee.ts b/src/serialization/resources/hris/types/EmployeePayrollRunEmployee.ts index d4b638e6c..b640eab90 100644 --- a/src/serialization/resources/hris/types/EmployeePayrollRunEmployee.ts +++ b/src/serialization/resources/hris/types/EmployeePayrollRunEmployee.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EmployeePayrollRunEmployee: core.serialization.Schema< @@ -11,7 +11,7 @@ export const EmployeePayrollRunEmployee: core.serialization.Schema< Merge.hris.EmployeePayrollRunEmployee > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Employee), + core.serialization.lazyObject(() => serializers.hris.Employee), ]); export declare namespace EmployeePayrollRunEmployee { diff --git a/src/serialization/resources/hris/types/EmployeePayrollRunPayrollRun.ts b/src/serialization/resources/hris/types/EmployeePayrollRunPayrollRun.ts index e24f9eaca..26e23dee3 100644 --- a/src/serialization/resources/hris/types/EmployeePayrollRunPayrollRun.ts +++ b/src/serialization/resources/hris/types/EmployeePayrollRunPayrollRun.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PayrollRun } from "./PayrollRun"; export const EmployeePayrollRunPayrollRun: core.serialization.Schema< serializers.hris.EmployeePayrollRunPayrollRun.Raw, Merge.hris.EmployeePayrollRunPayrollRun -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.PayrollRun), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PayrollRun]); export declare namespace EmployeePayrollRunPayrollRun { - type Raw = string | serializers.hris.PayrollRun.Raw; + type Raw = string | PayrollRun.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeRequest.ts b/src/serialization/resources/hris/types/EmployeeRequest.ts index e7c6776fa..a50e5e16e 100644 --- a/src/serialization/resources/hris/types/EmployeeRequest.ts +++ b/src/serialization/resources/hris/types/EmployeeRequest.ts @@ -2,62 +2,51 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EmployeeRequestCompany } from "./EmployeeRequestCompany"; +import { EmployeeRequestGroupsItem } from "./EmployeeRequestGroupsItem"; +import { EmployeeRequestEmploymentsItem } from "./EmployeeRequestEmploymentsItem"; +import { EmployeeRequestHomeLocation } from "./EmployeeRequestHomeLocation"; +import { EmployeeRequestWorkLocation } from "./EmployeeRequestWorkLocation"; +import { EmployeeRequestManager } from "./EmployeeRequestManager"; +import { EmployeeRequestTeam } from "./EmployeeRequestTeam"; +import { EmployeeRequestPayGroup } from "./EmployeeRequestPayGroup"; +import { EmployeeRequestGender } from "./EmployeeRequestGender"; +import { EmployeeRequestEthnicity } from "./EmployeeRequestEthnicity"; +import { EmployeeRequestMaritalStatus } from "./EmployeeRequestMaritalStatus"; +import { EmployeeRequestEmploymentStatus } from "./EmployeeRequestEmploymentStatus"; export const EmployeeRequest: core.serialization.ObjectSchema< serializers.hris.EmployeeRequest.Raw, Merge.hris.EmployeeRequest > = core.serialization.object({ employeeNumber: core.serialization.property("employee_number", core.serialization.string().optional()), - company: core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeRequestCompany).optional(), + company: EmployeeRequestCompany.optional(), firstName: core.serialization.property("first_name", core.serialization.string().optional()), lastName: core.serialization.property("last_name", core.serialization.string().optional()), preferredName: core.serialization.property("preferred_name", core.serialization.string().optional()), displayFullName: core.serialization.property("display_full_name", core.serialization.string().optional()), username: core.serialization.string().optional(), - groups: core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeRequestGroupsItem).optional()) - .optional(), + groups: core.serialization.list(EmployeeRequestGroupsItem.optional()).optional(), workEmail: core.serialization.property("work_email", core.serialization.string().optional()), personalEmail: core.serialization.property("personal_email", core.serialization.string().optional()), mobilePhoneNumber: core.serialization.property("mobile_phone_number", core.serialization.string().optional()), - employments: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).hris.EmployeeRequestEmploymentsItem) - .optional() - ) - .optional(), - homeLocation: core.serialization.property( - "home_location", - core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeRequestHomeLocation).optional() - ), - workLocation: core.serialization.property( - "work_location", - core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeRequestWorkLocation).optional() - ), - manager: core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeRequestManager).optional(), - team: core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeRequestTeam).optional(), - payGroup: core.serialization.property( - "pay_group", - core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeRequestPayGroup).optional() - ), + employments: core.serialization.list(EmployeeRequestEmploymentsItem.optional()).optional(), + homeLocation: core.serialization.property("home_location", EmployeeRequestHomeLocation.optional()), + workLocation: core.serialization.property("work_location", EmployeeRequestWorkLocation.optional()), + manager: EmployeeRequestManager.optional(), + team: EmployeeRequestTeam.optional(), + payGroup: core.serialization.property("pay_group", EmployeeRequestPayGroup.optional()), ssn: core.serialization.string().optional(), - gender: core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeRequestGender).optional(), - ethnicity: core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeRequestEthnicity).optional(), - maritalStatus: core.serialization.property( - "marital_status", - core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeRequestMaritalStatus).optional() - ), + gender: EmployeeRequestGender.optional(), + ethnicity: EmployeeRequestEthnicity.optional(), + maritalStatus: core.serialization.property("marital_status", EmployeeRequestMaritalStatus.optional()), dateOfBirth: core.serialization.property("date_of_birth", core.serialization.date().optional()), hireDate: core.serialization.property("hire_date", core.serialization.date().optional()), startDate: core.serialization.property("start_date", core.serialization.date().optional()), - employmentStatus: core.serialization.property( - "employment_status", - core.serialization.lazy(async () => (await import("../../..")).hris.EmployeeRequestEmploymentStatus).optional() - ), + employmentStatus: core.serialization.property("employment_status", EmployeeRequestEmploymentStatus.optional()), terminationDate: core.serialization.property("termination_date", core.serialization.date().optional()), avatar: core.serialization.string().optional(), integrationParams: core.serialization.property( @@ -73,30 +62,30 @@ export const EmployeeRequest: core.serialization.ObjectSchema< export declare namespace EmployeeRequest { interface Raw { employee_number?: string | null; - company?: serializers.hris.EmployeeRequestCompany.Raw | null; + company?: EmployeeRequestCompany.Raw | null; first_name?: string | null; last_name?: string | null; preferred_name?: string | null; display_full_name?: string | null; username?: string | null; - groups?: (serializers.hris.EmployeeRequestGroupsItem.Raw | null | undefined)[] | null; + groups?: (EmployeeRequestGroupsItem.Raw | null | undefined)[] | null; work_email?: string | null; personal_email?: string | null; mobile_phone_number?: string | null; - employments?: (serializers.hris.EmployeeRequestEmploymentsItem.Raw | null | undefined)[] | null; - home_location?: serializers.hris.EmployeeRequestHomeLocation.Raw | null; - work_location?: serializers.hris.EmployeeRequestWorkLocation.Raw | null; - manager?: serializers.hris.EmployeeRequestManager.Raw | null; - team?: serializers.hris.EmployeeRequestTeam.Raw | null; - pay_group?: serializers.hris.EmployeeRequestPayGroup.Raw | null; + employments?: (EmployeeRequestEmploymentsItem.Raw | null | undefined)[] | null; + home_location?: EmployeeRequestHomeLocation.Raw | null; + work_location?: EmployeeRequestWorkLocation.Raw | null; + manager?: EmployeeRequestManager.Raw | null; + team?: EmployeeRequestTeam.Raw | null; + pay_group?: EmployeeRequestPayGroup.Raw | null; ssn?: string | null; - gender?: serializers.hris.EmployeeRequestGender.Raw | null; - ethnicity?: serializers.hris.EmployeeRequestEthnicity.Raw | null; - marital_status?: serializers.hris.EmployeeRequestMaritalStatus.Raw | null; + gender?: EmployeeRequestGender.Raw | null; + ethnicity?: EmployeeRequestEthnicity.Raw | null; + marital_status?: EmployeeRequestMaritalStatus.Raw | null; date_of_birth?: string | null; hire_date?: string | null; start_date?: string | null; - employment_status?: serializers.hris.EmployeeRequestEmploymentStatus.Raw | null; + employment_status?: EmployeeRequestEmploymentStatus.Raw | null; termination_date?: string | null; avatar?: string | null; integration_params?: Record | null; diff --git a/src/serialization/resources/hris/types/EmployeeRequestCompany.ts b/src/serialization/resources/hris/types/EmployeeRequestCompany.ts index f14aea368..bb622e5a8 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestCompany.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestCompany.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Company } from "./Company"; export const EmployeeRequestCompany: core.serialization.Schema< serializers.hris.EmployeeRequestCompany.Raw, Merge.hris.EmployeeRequestCompany -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Company), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Company]); export declare namespace EmployeeRequestCompany { - type Raw = string | serializers.hris.Company.Raw; + type Raw = string | Company.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestEmploymentStatus.ts b/src/serialization/resources/hris/types/EmployeeRequestEmploymentStatus.ts index 4c4aceaf2..230a92050 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestEmploymentStatus.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestEmploymentStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EmploymentStatusEnum } from "./EmploymentStatusEnum"; export const EmployeeRequestEmploymentStatus: core.serialization.Schema< serializers.hris.EmployeeRequestEmploymentStatus.Raw, Merge.hris.EmployeeRequestEmploymentStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.EmploymentStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EmploymentStatusEnum, core.serialization.string()]); export declare namespace EmployeeRequestEmploymentStatus { - type Raw = serializers.hris.EmploymentStatusEnum.Raw | string; + type Raw = EmploymentStatusEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestEmploymentsItem.ts b/src/serialization/resources/hris/types/EmployeeRequestEmploymentsItem.ts index ada003b05..9389112ff 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestEmploymentsItem.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestEmploymentsItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EmployeeRequestEmploymentsItem: core.serialization.Schema< @@ -11,7 +11,7 @@ export const EmployeeRequestEmploymentsItem: core.serialization.Schema< Merge.hris.EmployeeRequestEmploymentsItem > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Employment), + core.serialization.lazyObject(() => serializers.hris.Employment), ]); export declare namespace EmployeeRequestEmploymentsItem { diff --git a/src/serialization/resources/hris/types/EmployeeRequestEthnicity.ts b/src/serialization/resources/hris/types/EmployeeRequestEthnicity.ts index 11f773776..d44e0f1b6 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestEthnicity.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestEthnicity.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EthnicityEnum } from "./EthnicityEnum"; export const EmployeeRequestEthnicity: core.serialization.Schema< serializers.hris.EmployeeRequestEthnicity.Raw, Merge.hris.EmployeeRequestEthnicity -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.EthnicityEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EthnicityEnum, core.serialization.string()]); export declare namespace EmployeeRequestEthnicity { - type Raw = serializers.hris.EthnicityEnum.Raw | string; + type Raw = EthnicityEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestGender.ts b/src/serialization/resources/hris/types/EmployeeRequestGender.ts index 5df3ebe15..220dda098 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestGender.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestGender.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { GenderEnum } from "./GenderEnum"; export const EmployeeRequestGender: core.serialization.Schema< serializers.hris.EmployeeRequestGender.Raw, Merge.hris.EmployeeRequestGender -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.GenderEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([GenderEnum, core.serialization.string()]); export declare namespace EmployeeRequestGender { - type Raw = serializers.hris.GenderEnum.Raw | string; + type Raw = GenderEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestGroupsItem.ts b/src/serialization/resources/hris/types/EmployeeRequestGroupsItem.ts index 64fa217e6..dc4101b23 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestGroupsItem.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestGroupsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Group } from "./Group"; export const EmployeeRequestGroupsItem: core.serialization.Schema< serializers.hris.EmployeeRequestGroupsItem.Raw, Merge.hris.EmployeeRequestGroupsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Group), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Group]); export declare namespace EmployeeRequestGroupsItem { - type Raw = string | serializers.hris.Group.Raw; + type Raw = string | Group.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestHomeLocation.ts b/src/serialization/resources/hris/types/EmployeeRequestHomeLocation.ts index b2309aea8..2d218d581 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestHomeLocation.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestHomeLocation.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Location } from "./Location"; export const EmployeeRequestHomeLocation: core.serialization.Schema< serializers.hris.EmployeeRequestHomeLocation.Raw, Merge.hris.EmployeeRequestHomeLocation -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Location), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Location]); export declare namespace EmployeeRequestHomeLocation { - type Raw = string | serializers.hris.Location.Raw; + type Raw = string | Location.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestManager.ts b/src/serialization/resources/hris/types/EmployeeRequestManager.ts index 2411ebbf2..f8d6368e3 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestManager.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestManager.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EmployeeRequestManager: core.serialization.Schema< @@ -11,7 +11,7 @@ export const EmployeeRequestManager: core.serialization.Schema< Merge.hris.EmployeeRequestManager > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Employee), + core.serialization.lazyObject(() => serializers.hris.Employee), ]); export declare namespace EmployeeRequestManager { diff --git a/src/serialization/resources/hris/types/EmployeeRequestMaritalStatus.ts b/src/serialization/resources/hris/types/EmployeeRequestMaritalStatus.ts index 2836006d6..16b8b6b35 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestMaritalStatus.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestMaritalStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { MaritalStatusEnum } from "./MaritalStatusEnum"; export const EmployeeRequestMaritalStatus: core.serialization.Schema< serializers.hris.EmployeeRequestMaritalStatus.Raw, Merge.hris.EmployeeRequestMaritalStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.MaritalStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([MaritalStatusEnum, core.serialization.string()]); export declare namespace EmployeeRequestMaritalStatus { - type Raw = serializers.hris.MaritalStatusEnum.Raw | string; + type Raw = MaritalStatusEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestPayGroup.ts b/src/serialization/resources/hris/types/EmployeeRequestPayGroup.ts index 8fedd8403..93feb45b2 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestPayGroup.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestPayGroup.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PayGroup } from "./PayGroup"; export const EmployeeRequestPayGroup: core.serialization.Schema< serializers.hris.EmployeeRequestPayGroup.Raw, Merge.hris.EmployeeRequestPayGroup -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.PayGroup), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PayGroup]); export declare namespace EmployeeRequestPayGroup { - type Raw = string | serializers.hris.PayGroup.Raw; + type Raw = string | PayGroup.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestTeam.ts b/src/serialization/resources/hris/types/EmployeeRequestTeam.ts index 7725fe044..c2f5520ce 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestTeam.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestTeam.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EmployeeRequestTeam: core.serialization.Schema< @@ -11,7 +11,7 @@ export const EmployeeRequestTeam: core.serialization.Schema< Merge.hris.EmployeeRequestTeam > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Team), + core.serialization.lazyObject(() => serializers.hris.Team), ]); export declare namespace EmployeeRequestTeam { diff --git a/src/serialization/resources/hris/types/EmployeeRequestWorkLocation.ts b/src/serialization/resources/hris/types/EmployeeRequestWorkLocation.ts index 3e5f9779a..4ffbffd50 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestWorkLocation.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestWorkLocation.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Location } from "./Location"; export const EmployeeRequestWorkLocation: core.serialization.Schema< serializers.hris.EmployeeRequestWorkLocation.Raw, Merge.hris.EmployeeRequestWorkLocation -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Location), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Location]); export declare namespace EmployeeRequestWorkLocation { - type Raw = string | serializers.hris.Location.Raw; + type Raw = string | Location.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeResponse.ts b/src/serialization/resources/hris/types/EmployeeResponse.ts index 69cd94ca8..9a6378e74 100644 --- a/src/serialization/resources/hris/types/EmployeeResponse.ts +++ b/src/serialization/resources/hris/types/EmployeeResponse.ts @@ -2,31 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const EmployeeResponse: core.serialization.ObjectSchema< serializers.hris.EmployeeResponse.Raw, Merge.hris.EmployeeResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).hris.Employee), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).hris.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).hris.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.DebugModeLog)) - .optional(), + model: core.serialization.lazyObject(() => serializers.hris.Employee), + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace EmployeeResponse { interface Raw { model: serializers.hris.Employee.Raw; - warnings: serializers.hris.WarningValidationProblem.Raw[]; - errors: serializers.hris.ErrorValidationProblem.Raw[]; - logs?: serializers.hris.DebugModeLog.Raw[] | null; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/EmployeeTeam.ts b/src/serialization/resources/hris/types/EmployeeTeam.ts index 2b1734e60..b4577ee49 100644 --- a/src/serialization/resources/hris/types/EmployeeTeam.ts +++ b/src/serialization/resources/hris/types/EmployeeTeam.ts @@ -2,14 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EmployeeTeam: core.serialization.Schema = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Team), + core.serialization.lazyObject(() => serializers.hris.Team), ]); export declare namespace EmployeeTeam { diff --git a/src/serialization/resources/hris/types/EmployeeWorkLocation.ts b/src/serialization/resources/hris/types/EmployeeWorkLocation.ts index ab42d4a7d..801c1c754 100644 --- a/src/serialization/resources/hris/types/EmployeeWorkLocation.ts +++ b/src/serialization/resources/hris/types/EmployeeWorkLocation.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Location } from "./Location"; export const EmployeeWorkLocation: core.serialization.Schema< serializers.hris.EmployeeWorkLocation.Raw, Merge.hris.EmployeeWorkLocation -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Location), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Location]); export declare namespace EmployeeWorkLocation { - type Raw = string | serializers.hris.Location.Raw; + type Raw = string | Location.Raw; } diff --git a/src/serialization/resources/hris/types/EmployerBenefit.ts b/src/serialization/resources/hris/types/EmployerBenefit.ts index ae4842759..cbc56bafe 100644 --- a/src/serialization/resources/hris/types/EmployerBenefit.ts +++ b/src/serialization/resources/hris/types/EmployerBenefit.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EmployerBenefitBenefitPlanType } from "./EmployerBenefitBenefitPlanType"; export const EmployerBenefit: core.serialization.ObjectSchema< serializers.hris.EmployerBenefit.Raw, @@ -14,10 +15,7 @@ export const EmployerBenefit: core.serialization.ObjectSchema< remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), - benefitPlanType: core.serialization.property( - "benefit_plan_type", - core.serialization.lazy(async () => (await import("../../..")).hris.EmployerBenefitBenefitPlanType).optional() - ), + benefitPlanType: core.serialization.property("benefit_plan_type", EmployerBenefitBenefitPlanType.optional()), name: core.serialization.string().optional(), description: core.serialization.string().optional(), deductionCode: core.serialization.property("deduction_code", core.serialization.string().optional()), @@ -40,7 +38,7 @@ export declare namespace EmployerBenefit { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - benefit_plan_type?: serializers.hris.EmployerBenefitBenefitPlanType.Raw | null; + benefit_plan_type?: EmployerBenefitBenefitPlanType.Raw | null; name?: string | null; description?: string | null; deduction_code?: string | null; diff --git a/src/serialization/resources/hris/types/EmployerBenefitBenefitPlanType.ts b/src/serialization/resources/hris/types/EmployerBenefitBenefitPlanType.ts index 3f6cece3e..244f09398 100644 --- a/src/serialization/resources/hris/types/EmployerBenefitBenefitPlanType.ts +++ b/src/serialization/resources/hris/types/EmployerBenefitBenefitPlanType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { BenefitPlanTypeEnum } from "./BenefitPlanTypeEnum"; export const EmployerBenefitBenefitPlanType: core.serialization.Schema< serializers.hris.EmployerBenefitBenefitPlanType.Raw, Merge.hris.EmployerBenefitBenefitPlanType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.BenefitPlanTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([BenefitPlanTypeEnum, core.serialization.string()]); export declare namespace EmployerBenefitBenefitPlanType { - type Raw = serializers.hris.BenefitPlanTypeEnum.Raw | string; + type Raw = BenefitPlanTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/Employment.ts b/src/serialization/resources/hris/types/Employment.ts index 826e2796e..11b01da9f 100644 --- a/src/serialization/resources/hris/types/Employment.ts +++ b/src/serialization/resources/hris/types/Employment.ts @@ -2,9 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EmploymentPayPeriod } from "./EmploymentPayPeriod"; +import { EmploymentPayFrequency } from "./EmploymentPayFrequency"; +import { EmploymentPayCurrency } from "./EmploymentPayCurrency"; +import { EmploymentPayGroup } from "./EmploymentPayGroup"; +import { EmploymentFlsaStatus } from "./EmploymentFlsaStatus"; +import { EmploymentEmploymentType } from "./EmploymentEmploymentType"; +import { RemoteData } from "./RemoteData"; export const Employment: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,45 +19,22 @@ export const Employment: core.serialization.ObjectSchema (await import("../../..")).hris.EmploymentEmployee).optional(), + employee: core.serialization.lazy(() => serializers.hris.EmploymentEmployee).optional(), jobTitle: core.serialization.property("job_title", core.serialization.string().optional()), payRate: core.serialization.property("pay_rate", core.serialization.number().optional()), - payPeriod: core.serialization.property( - "pay_period", - core.serialization.lazy(async () => (await import("../../..")).hris.EmploymentPayPeriod).optional() - ), - payFrequency: core.serialization.property( - "pay_frequency", - core.serialization.lazy(async () => (await import("../../..")).hris.EmploymentPayFrequency).optional() - ), - payCurrency: core.serialization.property( - "pay_currency", - core.serialization.lazy(async () => (await import("../../..")).hris.EmploymentPayCurrency).optional() - ), - payGroup: core.serialization.property( - "pay_group", - core.serialization.lazy(async () => (await import("../../..")).hris.EmploymentPayGroup).optional() - ), - flsaStatus: core.serialization.property( - "flsa_status", - core.serialization.lazy(async () => (await import("../../..")).hris.EmploymentFlsaStatus).optional() - ), + payPeriod: core.serialization.property("pay_period", EmploymentPayPeriod.optional()), + payFrequency: core.serialization.property("pay_frequency", EmploymentPayFrequency.optional()), + payCurrency: core.serialization.property("pay_currency", EmploymentPayCurrency.optional()), + payGroup: core.serialization.property("pay_group", EmploymentPayGroup.optional()), + flsaStatus: core.serialization.property("flsa_status", EmploymentFlsaStatus.optional()), effectiveDate: core.serialization.property("effective_date", core.serialization.date().optional()), - employmentType: core.serialization.property( - "employment_type", - core.serialization.lazy(async () => (await import("../../..")).hris.EmploymentEmploymentType).optional() - ), + employmentType: core.serialization.property("employment_type", EmploymentEmploymentType.optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Employment { @@ -62,15 +46,15 @@ export declare namespace Employment { employee?: serializers.hris.EmploymentEmployee.Raw | null; job_title?: string | null; pay_rate?: number | null; - pay_period?: serializers.hris.EmploymentPayPeriod.Raw | null; - pay_frequency?: serializers.hris.EmploymentPayFrequency.Raw | null; - pay_currency?: serializers.hris.EmploymentPayCurrency.Raw | null; - pay_group?: serializers.hris.EmploymentPayGroup.Raw | null; - flsa_status?: serializers.hris.EmploymentFlsaStatus.Raw | null; + pay_period?: EmploymentPayPeriod.Raw | null; + pay_frequency?: EmploymentPayFrequency.Raw | null; + pay_currency?: EmploymentPayCurrency.Raw | null; + pay_group?: EmploymentPayGroup.Raw | null; + flsa_status?: EmploymentFlsaStatus.Raw | null; effective_date?: string | null; - employment_type?: serializers.hris.EmploymentEmploymentType.Raw | null; + employment_type?: EmploymentEmploymentType.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/EmploymentEmployee.ts b/src/serialization/resources/hris/types/EmploymentEmployee.ts index 60d02073b..3d9f7ff97 100644 --- a/src/serialization/resources/hris/types/EmploymentEmployee.ts +++ b/src/serialization/resources/hris/types/EmploymentEmployee.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EmploymentEmployee: core.serialization.Schema< @@ -11,7 +11,7 @@ export const EmploymentEmployee: core.serialization.Schema< Merge.hris.EmploymentEmployee > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Employee), + core.serialization.lazyObject(() => serializers.hris.Employee), ]); export declare namespace EmploymentEmployee { diff --git a/src/serialization/resources/hris/types/EmploymentEmploymentType.ts b/src/serialization/resources/hris/types/EmploymentEmploymentType.ts index dd8355e86..34669811c 100644 --- a/src/serialization/resources/hris/types/EmploymentEmploymentType.ts +++ b/src/serialization/resources/hris/types/EmploymentEmploymentType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EmploymentTypeEnum } from "./EmploymentTypeEnum"; export const EmploymentEmploymentType: core.serialization.Schema< serializers.hris.EmploymentEmploymentType.Raw, Merge.hris.EmploymentEmploymentType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.EmploymentTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EmploymentTypeEnum, core.serialization.string()]); export declare namespace EmploymentEmploymentType { - type Raw = serializers.hris.EmploymentTypeEnum.Raw | string; + type Raw = EmploymentTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmploymentFlsaStatus.ts b/src/serialization/resources/hris/types/EmploymentFlsaStatus.ts index ce37d60db..8db1e9f5b 100644 --- a/src/serialization/resources/hris/types/EmploymentFlsaStatus.ts +++ b/src/serialization/resources/hris/types/EmploymentFlsaStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FlsaStatusEnum } from "./FlsaStatusEnum"; export const EmploymentFlsaStatus: core.serialization.Schema< serializers.hris.EmploymentFlsaStatus.Raw, Merge.hris.EmploymentFlsaStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.FlsaStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([FlsaStatusEnum, core.serialization.string()]); export declare namespace EmploymentFlsaStatus { - type Raw = serializers.hris.FlsaStatusEnum.Raw | string; + type Raw = FlsaStatusEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmploymentPayCurrency.ts b/src/serialization/resources/hris/types/EmploymentPayCurrency.ts index 0768d0d10..bdc9069ba 100644 --- a/src/serialization/resources/hris/types/EmploymentPayCurrency.ts +++ b/src/serialization/resources/hris/types/EmploymentPayCurrency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PayCurrencyEnum } from "./PayCurrencyEnum"; export const EmploymentPayCurrency: core.serialization.Schema< serializers.hris.EmploymentPayCurrency.Raw, Merge.hris.EmploymentPayCurrency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.PayCurrencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PayCurrencyEnum, core.serialization.string()]); export declare namespace EmploymentPayCurrency { - type Raw = serializers.hris.PayCurrencyEnum.Raw | string; + type Raw = PayCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmploymentPayFrequency.ts b/src/serialization/resources/hris/types/EmploymentPayFrequency.ts index 646e67a4d..9da005c7a 100644 --- a/src/serialization/resources/hris/types/EmploymentPayFrequency.ts +++ b/src/serialization/resources/hris/types/EmploymentPayFrequency.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PayFrequencyEnum } from "./PayFrequencyEnum"; export const EmploymentPayFrequency: core.serialization.Schema< serializers.hris.EmploymentPayFrequency.Raw, Merge.hris.EmploymentPayFrequency -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.PayFrequencyEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PayFrequencyEnum, core.serialization.string()]); export declare namespace EmploymentPayFrequency { - type Raw = serializers.hris.PayFrequencyEnum.Raw | string; + type Raw = PayFrequencyEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmploymentPayGroup.ts b/src/serialization/resources/hris/types/EmploymentPayGroup.ts index 8da4e1440..5b0fbe04d 100644 --- a/src/serialization/resources/hris/types/EmploymentPayGroup.ts +++ b/src/serialization/resources/hris/types/EmploymentPayGroup.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PayGroup } from "./PayGroup"; export const EmploymentPayGroup: core.serialization.Schema< serializers.hris.EmploymentPayGroup.Raw, Merge.hris.EmploymentPayGroup -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.PayGroup), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), PayGroup]); export declare namespace EmploymentPayGroup { - type Raw = string | serializers.hris.PayGroup.Raw; + type Raw = string | PayGroup.Raw; } diff --git a/src/serialization/resources/hris/types/EmploymentPayPeriod.ts b/src/serialization/resources/hris/types/EmploymentPayPeriod.ts index a5916c035..358caebd9 100644 --- a/src/serialization/resources/hris/types/EmploymentPayPeriod.ts +++ b/src/serialization/resources/hris/types/EmploymentPayPeriod.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PayPeriodEnum } from "./PayPeriodEnum"; export const EmploymentPayPeriod: core.serialization.Schema< serializers.hris.EmploymentPayPeriod.Raw, Merge.hris.EmploymentPayPeriod -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.PayPeriodEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PayPeriodEnum, core.serialization.string()]); export declare namespace EmploymentPayPeriod { - type Raw = serializers.hris.PayPeriodEnum.Raw | string; + type Raw = PayPeriodEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmploymentStatusEnum.ts b/src/serialization/resources/hris/types/EmploymentStatusEnum.ts index dc2c973fe..146a70f18 100644 --- a/src/serialization/resources/hris/types/EmploymentStatusEnum.ts +++ b/src/serialization/resources/hris/types/EmploymentStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EmploymentStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/EmploymentTypeEnum.ts b/src/serialization/resources/hris/types/EmploymentTypeEnum.ts index a1ba1fb91..ffcc25f32 100644 --- a/src/serialization/resources/hris/types/EmploymentTypeEnum.ts +++ b/src/serialization/resources/hris/types/EmploymentTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EmploymentTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/EnabledActionsEnum.ts b/src/serialization/resources/hris/types/EnabledActionsEnum.ts index 2b07b681e..c242662a5 100644 --- a/src/serialization/resources/hris/types/EnabledActionsEnum.ts +++ b/src/serialization/resources/hris/types/EnabledActionsEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EnabledActionsEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/EncodingEnum.ts b/src/serialization/resources/hris/types/EncodingEnum.ts index a0d36caa7..d50b717c7 100644 --- a/src/serialization/resources/hris/types/EncodingEnum.ts +++ b/src/serialization/resources/hris/types/EncodingEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EncodingEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/ErrorValidationProblem.ts b/src/serialization/resources/hris/types/ErrorValidationProblem.ts index 47e52ba66..70b1725f5 100644 --- a/src/serialization/resources/hris/types/ErrorValidationProblem.ts +++ b/src/serialization/resources/hris/types/ErrorValidationProblem.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ValidationProblemSource } from "./ValidationProblemSource"; export const ErrorValidationProblem: core.serialization.ObjectSchema< serializers.hris.ErrorValidationProblem.Raw, Merge.hris.ErrorValidationProblem > = core.serialization.object({ - source: core.serialization - .lazyObject(async () => (await import("../../..")).hris.ValidationProblemSource) - .optional(), + source: ValidationProblemSource.optional(), title: core.serialization.string(), detail: core.serialization.string(), problemType: core.serialization.property("problem_type", core.serialization.string()), @@ -20,7 +19,7 @@ export const ErrorValidationProblem: core.serialization.ObjectSchema< export declare namespace ErrorValidationProblem { interface Raw { - source?: serializers.hris.ValidationProblemSource.Raw | null; + source?: ValidationProblemSource.Raw | null; title: string; detail: string; problem_type: string; diff --git a/src/serialization/resources/hris/types/EthnicityEnum.ts b/src/serialization/resources/hris/types/EthnicityEnum.ts index df95351c0..a1ad3687c 100644 --- a/src/serialization/resources/hris/types/EthnicityEnum.ts +++ b/src/serialization/resources/hris/types/EthnicityEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EthnicityEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/EventTypeEnum.ts b/src/serialization/resources/hris/types/EventTypeEnum.ts index 3702d015c..fc1b98302 100644 --- a/src/serialization/resources/hris/types/EventTypeEnum.ts +++ b/src/serialization/resources/hris/types/EventTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EventTypeEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/ExternalTargetFieldApi.ts b/src/serialization/resources/hris/types/ExternalTargetFieldApi.ts index 070da77c4..d15c8fd94 100644 --- a/src/serialization/resources/hris/types/ExternalTargetFieldApi.ts +++ b/src/serialization/resources/hris/types/ExternalTargetFieldApi.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ExternalTargetFieldApi: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/ExternalTargetFieldApiResponse.ts b/src/serialization/resources/hris/types/ExternalTargetFieldApiResponse.ts index e65dce547..bbe829732 100644 --- a/src/serialization/resources/hris/types/ExternalTargetFieldApiResponse.ts +++ b/src/serialization/resources/hris/types/ExternalTargetFieldApiResponse.ts @@ -2,129 +2,62 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ExternalTargetFieldApi } from "./ExternalTargetFieldApi"; export const ExternalTargetFieldApiResponse: core.serialization.ObjectSchema< serializers.hris.ExternalTargetFieldApiResponse.Raw, Merge.hris.ExternalTargetFieldApiResponse > = core.serialization.object({ - benefit: core.serialization.property( - "Benefit", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() - ), + benefit: core.serialization.property("Benefit", core.serialization.list(ExternalTargetFieldApi).optional()), employerBenefit: core.serialization.property( "EmployerBenefit", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() - ), - company: core.serialization.property( - "Company", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), + company: core.serialization.property("Company", core.serialization.list(ExternalTargetFieldApi).optional()), employeePayrollRun: core.serialization.property( "EmployeePayrollRun", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() - ), - employee: core.serialization.property( - "Employee", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() - ), - employment: core.serialization.property( - "Employment", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() - ), - location: core.serialization.property( - "Location", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() - ), - payrollRun: core.serialization.property( - "PayrollRun", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() - ), - team: core.serialization.property( - "Team", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() - ), - timeOff: core.serialization.property( - "TimeOff", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() - ), + core.serialization.list(ExternalTargetFieldApi).optional() + ), + employee: core.serialization.property("Employee", core.serialization.list(ExternalTargetFieldApi).optional()), + employment: core.serialization.property("Employment", core.serialization.list(ExternalTargetFieldApi).optional()), + location: core.serialization.property("Location", core.serialization.list(ExternalTargetFieldApi).optional()), + payrollRun: core.serialization.property("PayrollRun", core.serialization.list(ExternalTargetFieldApi).optional()), + team: core.serialization.property("Team", core.serialization.list(ExternalTargetFieldApi).optional()), + timeOff: core.serialization.property("TimeOff", core.serialization.list(ExternalTargetFieldApi).optional()), timeOffBalance: core.serialization.property( "TimeOffBalance", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() - ), - bankInfo: core.serialization.property( - "BankInfo", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() - ), - payGroup: core.serialization.property( - "PayGroup", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() - ), - group: core.serialization.property( - "Group", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() - ), - dependent: core.serialization.property( - "Dependent", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), + bankInfo: core.serialization.property("BankInfo", core.serialization.list(ExternalTargetFieldApi).optional()), + payGroup: core.serialization.property("PayGroup", core.serialization.list(ExternalTargetFieldApi).optional()), + group: core.serialization.property("Group", core.serialization.list(ExternalTargetFieldApi).optional()), + dependent: core.serialization.property("Dependent", core.serialization.list(ExternalTargetFieldApi).optional()), timesheetEntry: core.serialization.property( "TimesheetEntry", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.ExternalTargetFieldApi)) - .optional() + core.serialization.list(ExternalTargetFieldApi).optional() ), }); export declare namespace ExternalTargetFieldApiResponse { interface Raw { - Benefit?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - EmployerBenefit?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - Company?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - EmployeePayrollRun?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - Employee?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - Employment?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - Location?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - PayrollRun?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - Team?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - TimeOff?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - TimeOffBalance?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - BankInfo?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - PayGroup?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - Group?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - Dependent?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; - TimesheetEntry?: serializers.hris.ExternalTargetFieldApi.Raw[] | null; + Benefit?: ExternalTargetFieldApi.Raw[] | null; + EmployerBenefit?: ExternalTargetFieldApi.Raw[] | null; + Company?: ExternalTargetFieldApi.Raw[] | null; + EmployeePayrollRun?: ExternalTargetFieldApi.Raw[] | null; + Employee?: ExternalTargetFieldApi.Raw[] | null; + Employment?: ExternalTargetFieldApi.Raw[] | null; + Location?: ExternalTargetFieldApi.Raw[] | null; + PayrollRun?: ExternalTargetFieldApi.Raw[] | null; + Team?: ExternalTargetFieldApi.Raw[] | null; + TimeOff?: ExternalTargetFieldApi.Raw[] | null; + TimeOffBalance?: ExternalTargetFieldApi.Raw[] | null; + BankInfo?: ExternalTargetFieldApi.Raw[] | null; + PayGroup?: ExternalTargetFieldApi.Raw[] | null; + Group?: ExternalTargetFieldApi.Raw[] | null; + Dependent?: ExternalTargetFieldApi.Raw[] | null; + TimesheetEntry?: ExternalTargetFieldApi.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/FieldMappingApiInstance.ts b/src/serialization/resources/hris/types/FieldMappingApiInstance.ts index 1c87fa94c..5156b0809 100644 --- a/src/serialization/resources/hris/types/FieldMappingApiInstance.ts +++ b/src/serialization/resources/hris/types/FieldMappingApiInstance.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstanceTargetField } from "./FieldMappingApiInstanceTargetField"; +import { FieldMappingApiInstanceRemoteField } from "./FieldMappingApiInstanceRemoteField"; export const FieldMappingApiInstance: core.serialization.ObjectSchema< serializers.hris.FieldMappingApiInstance.Raw, @@ -12,25 +14,15 @@ export const FieldMappingApiInstance: core.serialization.ObjectSchema< > = core.serialization.object({ id: core.serialization.string().optional(), isIntegrationWide: core.serialization.property("is_integration_wide", core.serialization.boolean().optional()), - targetField: core.serialization.property( - "target_field", - core.serialization - .lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstanceTargetField) - .optional() - ), - remoteField: core.serialization.property( - "remote_field", - core.serialization - .lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstanceRemoteField) - .optional() - ), + targetField: core.serialization.property("target_field", FieldMappingApiInstanceTargetField.optional()), + remoteField: core.serialization.property("remote_field", FieldMappingApiInstanceRemoteField.optional()), }); export declare namespace FieldMappingApiInstance { interface Raw { id?: string | null; is_integration_wide?: boolean | null; - target_field?: serializers.hris.FieldMappingApiInstanceTargetField.Raw | null; - remote_field?: serializers.hris.FieldMappingApiInstanceRemoteField.Raw | null; + target_field?: FieldMappingApiInstanceTargetField.Raw | null; + remote_field?: FieldMappingApiInstanceRemoteField.Raw | null; } } diff --git a/src/serialization/resources/hris/types/FieldMappingApiInstanceRemoteField.ts b/src/serialization/resources/hris/types/FieldMappingApiInstanceRemoteField.ts index f91a469e8..9499cbdba 100644 --- a/src/serialization/resources/hris/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/serialization/resources/hris/types/FieldMappingApiInstanceRemoteField.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo } from "./FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo"; export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema< serializers.hris.FieldMappingApiInstanceRemoteField.Raw, @@ -14,9 +15,7 @@ export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()), remoteEndpointInfo: core.serialization.property( "remote_endpoint_info", - core.serialization.lazyObject( - async () => (await import("../../..")).hris.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - ) + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo ), }); @@ -24,6 +23,6 @@ export declare namespace FieldMappingApiInstanceRemoteField { interface Raw { remote_key_name: string; schema: Record; - remote_endpoint_info: serializers.hris.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; } } diff --git a/src/serialization/resources/hris/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts b/src/serialization/resources/hris/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts index fc6e46035..a9d46f7f2 100644 --- a/src/serialization/resources/hris/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts +++ b/src/serialization/resources/hris/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/FieldMappingApiInstanceResponse.ts b/src/serialization/resources/hris/types/FieldMappingApiInstanceResponse.ts index f44984453..df17de1d1 100644 --- a/src/serialization/resources/hris/types/FieldMappingApiInstanceResponse.ts +++ b/src/serialization/resources/hris/types/FieldMappingApiInstanceResponse.ts @@ -2,129 +2,62 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstance } from "./FieldMappingApiInstance"; export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< serializers.hris.FieldMappingApiInstanceResponse.Raw, Merge.hris.FieldMappingApiInstanceResponse > = core.serialization.object({ - benefit: core.serialization.property( - "Benefit", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() - ), + benefit: core.serialization.property("Benefit", core.serialization.list(FieldMappingApiInstance).optional()), employerBenefit: core.serialization.property( "EmployerBenefit", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() - ), - company: core.serialization.property( - "Company", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), + company: core.serialization.property("Company", core.serialization.list(FieldMappingApiInstance).optional()), employeePayrollRun: core.serialization.property( "EmployeePayrollRun", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() - ), - employee: core.serialization.property( - "Employee", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() - ), - employment: core.serialization.property( - "Employment", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() - ), - location: core.serialization.property( - "Location", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() - ), - payrollRun: core.serialization.property( - "PayrollRun", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() - ), - team: core.serialization.property( - "Team", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() - ), - timeOff: core.serialization.property( - "TimeOff", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() - ), + core.serialization.list(FieldMappingApiInstance).optional() + ), + employee: core.serialization.property("Employee", core.serialization.list(FieldMappingApiInstance).optional()), + employment: core.serialization.property("Employment", core.serialization.list(FieldMappingApiInstance).optional()), + location: core.serialization.property("Location", core.serialization.list(FieldMappingApiInstance).optional()), + payrollRun: core.serialization.property("PayrollRun", core.serialization.list(FieldMappingApiInstance).optional()), + team: core.serialization.property("Team", core.serialization.list(FieldMappingApiInstance).optional()), + timeOff: core.serialization.property("TimeOff", core.serialization.list(FieldMappingApiInstance).optional()), timeOffBalance: core.serialization.property( "TimeOffBalance", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() - ), - bankInfo: core.serialization.property( - "BankInfo", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() - ), - payGroup: core.serialization.property( - "PayGroup", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() - ), - group: core.serialization.property( - "Group", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() - ), - dependent: core.serialization.property( - "Dependent", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), + bankInfo: core.serialization.property("BankInfo", core.serialization.list(FieldMappingApiInstance).optional()), + payGroup: core.serialization.property("PayGroup", core.serialization.list(FieldMappingApiInstance).optional()), + group: core.serialization.property("Group", core.serialization.list(FieldMappingApiInstance).optional()), + dependent: core.serialization.property("Dependent", core.serialization.list(FieldMappingApiInstance).optional()), timesheetEntry: core.serialization.property( "TimesheetEntry", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance)) - .optional() + core.serialization.list(FieldMappingApiInstance).optional() ), }); export declare namespace FieldMappingApiInstanceResponse { interface Raw { - Benefit?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - EmployerBenefit?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - Company?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - EmployeePayrollRun?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - Employee?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - Employment?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - Location?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - PayrollRun?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - Team?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - TimeOff?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - TimeOffBalance?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - BankInfo?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - PayGroup?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - Group?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - Dependent?: serializers.hris.FieldMappingApiInstance.Raw[] | null; - TimesheetEntry?: serializers.hris.FieldMappingApiInstance.Raw[] | null; + Benefit?: FieldMappingApiInstance.Raw[] | null; + EmployerBenefit?: FieldMappingApiInstance.Raw[] | null; + Company?: FieldMappingApiInstance.Raw[] | null; + EmployeePayrollRun?: FieldMappingApiInstance.Raw[] | null; + Employee?: FieldMappingApiInstance.Raw[] | null; + Employment?: FieldMappingApiInstance.Raw[] | null; + Location?: FieldMappingApiInstance.Raw[] | null; + PayrollRun?: FieldMappingApiInstance.Raw[] | null; + Team?: FieldMappingApiInstance.Raw[] | null; + TimeOff?: FieldMappingApiInstance.Raw[] | null; + TimeOffBalance?: FieldMappingApiInstance.Raw[] | null; + BankInfo?: FieldMappingApiInstance.Raw[] | null; + PayGroup?: FieldMappingApiInstance.Raw[] | null; + Group?: FieldMappingApiInstance.Raw[] | null; + Dependent?: FieldMappingApiInstance.Raw[] | null; + TimesheetEntry?: FieldMappingApiInstance.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/FieldMappingApiInstanceTargetField.ts b/src/serialization/resources/hris/types/FieldMappingApiInstanceTargetField.ts index 428aaefdc..8fe4c54d0 100644 --- a/src/serialization/resources/hris/types/FieldMappingApiInstanceTargetField.ts +++ b/src/serialization/resources/hris/types/FieldMappingApiInstanceTargetField.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldMappingApiInstanceTargetField: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/FieldMappingInstanceResponse.ts b/src/serialization/resources/hris/types/FieldMappingInstanceResponse.ts index 6a17a9645..cd7b62f52 100644 --- a/src/serialization/resources/hris/types/FieldMappingInstanceResponse.ts +++ b/src/serialization/resources/hris/types/FieldMappingInstanceResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstance } from "./FieldMappingApiInstance"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const FieldMappingInstanceResponse: core.serialization.ObjectSchema< serializers.hris.FieldMappingInstanceResponse.Raw, Merge.hris.FieldMappingInstanceResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).hris.FieldMappingApiInstance), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).hris.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).hris.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.DebugModeLog)) - .optional(), + model: FieldMappingApiInstance, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace FieldMappingInstanceResponse { interface Raw { - model: serializers.hris.FieldMappingApiInstance.Raw; - warnings: serializers.hris.WarningValidationProblem.Raw[]; - errors: serializers.hris.ErrorValidationProblem.Raw[]; - logs?: serializers.hris.DebugModeLog.Raw[] | null; + model: FieldMappingApiInstance.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/FieldPermissionDeserializer.ts b/src/serialization/resources/hris/types/FieldPermissionDeserializer.ts index 9bb38c79e..a8c0d0bdf 100644 --- a/src/serialization/resources/hris/types/FieldPermissionDeserializer.ts +++ b/src/serialization/resources/hris/types/FieldPermissionDeserializer.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldPermissionDeserializer: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/FieldPermissionDeserializerRequest.ts b/src/serialization/resources/hris/types/FieldPermissionDeserializerRequest.ts index 6157649fb..bdf4516b1 100644 --- a/src/serialization/resources/hris/types/FieldPermissionDeserializerRequest.ts +++ b/src/serialization/resources/hris/types/FieldPermissionDeserializerRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldPermissionDeserializerRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/FlsaStatusEnum.ts b/src/serialization/resources/hris/types/FlsaStatusEnum.ts index 9dad5a805..174e943ff 100644 --- a/src/serialization/resources/hris/types/FlsaStatusEnum.ts +++ b/src/serialization/resources/hris/types/FlsaStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FlsaStatusEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/GenderEnum.ts b/src/serialization/resources/hris/types/GenderEnum.ts index 7f40bd64e..daaf38a54 100644 --- a/src/serialization/resources/hris/types/GenderEnum.ts +++ b/src/serialization/resources/hris/types/GenderEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const GenderEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/Group.ts b/src/serialization/resources/hris/types/Group.ts index 5da0d4ade..04e5f180b 100644 --- a/src/serialization/resources/hris/types/Group.ts +++ b/src/serialization/resources/hris/types/Group.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { GroupType } from "./GroupType"; +import { RemoteData } from "./RemoteData"; export const Group: core.serialization.ObjectSchema = core.serialization.object({ @@ -14,7 +16,7 @@ export const Group: core.serialization.ObjectSchema (await import("../../..")).hris.GroupType).optional(), + type: GroupType.optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), isCommonlyUsedAsTeam: core.serialization.property( "is_commonly_used_as_team", @@ -24,12 +26,7 @@ export const Group: core.serialization.ObjectSchema (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Group { @@ -40,10 +37,10 @@ export declare namespace Group { modified_at?: string | null; parent_group?: string | null; name?: string | null; - type?: serializers.hris.GroupType.Raw | null; + type?: GroupType.Raw | null; remote_was_deleted?: boolean | null; is_commonly_used_as_team?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/GroupType.ts b/src/serialization/resources/hris/types/GroupType.ts index c23e55186..65d6b7bda 100644 --- a/src/serialization/resources/hris/types/GroupType.ts +++ b/src/serialization/resources/hris/types/GroupType.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { GroupTypeEnum } from "./GroupTypeEnum"; export const GroupType: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.GroupTypeEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([GroupTypeEnum, core.serialization.string()]); export declare namespace GroupType { - type Raw = serializers.hris.GroupTypeEnum.Raw | string; + type Raw = GroupTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/GroupTypeEnum.ts b/src/serialization/resources/hris/types/GroupTypeEnum.ts index b08fb7eeb..16876e750 100644 --- a/src/serialization/resources/hris/types/GroupTypeEnum.ts +++ b/src/serialization/resources/hris/types/GroupTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const GroupTypeEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/IndividualCommonModelScopeDeserializer.ts b/src/serialization/resources/hris/types/IndividualCommonModelScopeDeserializer.ts index 32420346b..163d1fd89 100644 --- a/src/serialization/resources/hris/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/serialization/resources/hris/types/IndividualCommonModelScopeDeserializer.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ModelPermissionDeserializer } from "./ModelPermissionDeserializer"; +import { FieldPermissionDeserializer } from "./FieldPermissionDeserializer"; export const IndividualCommonModelScopeDeserializer: core.serialization.ObjectSchema< serializers.hris.IndividualCommonModelScopeDeserializer.Raw, @@ -13,25 +15,15 @@ export const IndividualCommonModelScopeDeserializer: core.serialization.ObjectSc modelName: core.serialization.property("model_name", core.serialization.string()), modelPermissions: core.serialization.property( "model_permissions", - core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.ModelPermissionDeserializer) - ) - .optional() - ), - fieldPermissions: core.serialization.property( - "field_permissions", - core.serialization - .lazyObject(async () => (await import("../../..")).hris.FieldPermissionDeserializer) - .optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializer).optional() ), + fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializer.optional()), }); export declare namespace IndividualCommonModelScopeDeserializer { interface Raw { model_name: string; - model_permissions?: Record | null; - field_permissions?: serializers.hris.FieldPermissionDeserializer.Raw | null; + model_permissions?: Record | null; + field_permissions?: FieldPermissionDeserializer.Raw | null; } } diff --git a/src/serialization/resources/hris/types/IndividualCommonModelScopeDeserializerRequest.ts b/src/serialization/resources/hris/types/IndividualCommonModelScopeDeserializerRequest.ts index 811e6bf46..d36c6fccc 100644 --- a/src/serialization/resources/hris/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/hris/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ModelPermissionDeserializerRequest } from "./ModelPermissionDeserializerRequest"; +import { FieldPermissionDeserializerRequest } from "./FieldPermissionDeserializerRequest"; export const IndividualCommonModelScopeDeserializerRequest: core.serialization.ObjectSchema< serializers.hris.IndividualCommonModelScopeDeserializerRequest.Raw, @@ -13,27 +15,15 @@ export const IndividualCommonModelScopeDeserializerRequest: core.serialization.O modelName: core.serialization.property("model_name", core.serialization.string()), modelPermissions: core.serialization.property( "model_permissions", - core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject( - async () => (await import("../../..")).hris.ModelPermissionDeserializerRequest - ) - ) - .optional() - ), - fieldPermissions: core.serialization.property( - "field_permissions", - core.serialization - .lazyObject(async () => (await import("../../..")).hris.FieldPermissionDeserializerRequest) - .optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializerRequest).optional() ), + fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializerRequest.optional()), }); export declare namespace IndividualCommonModelScopeDeserializerRequest { interface Raw { model_name: string; - model_permissions?: Record | null; - field_permissions?: serializers.hris.FieldPermissionDeserializerRequest.Raw | null; + model_permissions?: Record | null; + field_permissions?: FieldPermissionDeserializerRequest.Raw | null; } } diff --git a/src/serialization/resources/hris/types/Issue.ts b/src/serialization/resources/hris/types/Issue.ts index 5ad24d3f5..c77e73160 100644 --- a/src/serialization/resources/hris/types/Issue.ts +++ b/src/serialization/resources/hris/types/Issue.ts @@ -2,14 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IssueStatus } from "./IssueStatus"; export const Issue: core.serialization.ObjectSchema = core.serialization.object({ id: core.serialization.string().optional(), - status: core.serialization.lazy(async () => (await import("../../..")).hris.IssueStatus).optional(), + status: IssueStatus.optional(), errorDescription: core.serialization.property("error_description", core.serialization.string()), endUser: core.serialization.property( "end_user", @@ -27,7 +28,7 @@ export const Issue: core.serialization.ObjectSchema | null; first_incident_time?: string | null; diff --git a/src/serialization/resources/hris/types/IssueStatus.ts b/src/serialization/resources/hris/types/IssueStatus.ts index fa81738a1..87413577c 100644 --- a/src/serialization/resources/hris/types/IssueStatus.ts +++ b/src/serialization/resources/hris/types/IssueStatus.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IssueStatusEnum } from "./IssueStatusEnum"; export const IssueStatus: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.IssueStatusEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([IssueStatusEnum, core.serialization.string()]); export declare namespace IssueStatus { - type Raw = serializers.hris.IssueStatusEnum.Raw | string; + type Raw = IssueStatusEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/IssueStatusEnum.ts b/src/serialization/resources/hris/types/IssueStatusEnum.ts index d8848cc7d..9e7cea4f3 100644 --- a/src/serialization/resources/hris/types/IssueStatusEnum.ts +++ b/src/serialization/resources/hris/types/IssueStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const IssueStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/LanguageEnum.ts b/src/serialization/resources/hris/types/LanguageEnum.ts index 915a9e8bc..57970fdb9 100644 --- a/src/serialization/resources/hris/types/LanguageEnum.ts +++ b/src/serialization/resources/hris/types/LanguageEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LanguageEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/LinkToken.ts b/src/serialization/resources/hris/types/LinkToken.ts index b168d5d02..9253ed0a9 100644 --- a/src/serialization/resources/hris/types/LinkToken.ts +++ b/src/serialization/resources/hris/types/LinkToken.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LinkToken: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/hris/types/LinkedAccountStatus.ts b/src/serialization/resources/hris/types/LinkedAccountStatus.ts index 9fe08c731..a6cbe589b 100644 --- a/src/serialization/resources/hris/types/LinkedAccountStatus.ts +++ b/src/serialization/resources/hris/types/LinkedAccountStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LinkedAccountStatus: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/Location.ts b/src/serialization/resources/hris/types/Location.ts index 6cf7bb294..c9be128c4 100644 --- a/src/serialization/resources/hris/types/Location.ts +++ b/src/serialization/resources/hris/types/Location.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { LocationCountry } from "./LocationCountry"; +import { LocationLocationType } from "./LocationLocationType"; +import { RemoteData } from "./RemoteData"; export const Location: core.serialization.ObjectSchema = core.serialization.object({ @@ -19,22 +22,14 @@ export const Location: core.serialization.ObjectSchema (await import("../../..")).hris.LocationCountry).optional(), - locationType: core.serialization.property( - "location_type", - core.serialization.lazy(async () => (await import("../../..")).hris.LocationLocationType).optional() - ), + country: LocationCountry.optional(), + locationType: core.serialization.property("location_type", LocationLocationType.optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Location { @@ -50,10 +45,10 @@ export declare namespace Location { city?: string | null; state?: string | null; zip_code?: string | null; - country?: serializers.hris.LocationCountry.Raw | null; - location_type?: serializers.hris.LocationLocationType.Raw | null; + country?: LocationCountry.Raw | null; + location_type?: LocationLocationType.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/LocationCountry.ts b/src/serialization/resources/hris/types/LocationCountry.ts index 8802dd2d0..2170baf6e 100644 --- a/src/serialization/resources/hris/types/LocationCountry.ts +++ b/src/serialization/resources/hris/types/LocationCountry.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CountryEnum } from "./CountryEnum"; export const LocationCountry: core.serialization.Schema< serializers.hris.LocationCountry.Raw, Merge.hris.LocationCountry -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.CountryEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CountryEnum, core.serialization.string()]); export declare namespace LocationCountry { - type Raw = serializers.hris.CountryEnum.Raw | string; + type Raw = CountryEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/LocationLocationType.ts b/src/serialization/resources/hris/types/LocationLocationType.ts index 28e5d8187..8da000946 100644 --- a/src/serialization/resources/hris/types/LocationLocationType.ts +++ b/src/serialization/resources/hris/types/LocationLocationType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { LocationTypeEnum } from "./LocationTypeEnum"; export const LocationLocationType: core.serialization.Schema< serializers.hris.LocationLocationType.Raw, Merge.hris.LocationLocationType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.LocationTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([LocationTypeEnum, core.serialization.string()]); export declare namespace LocationLocationType { - type Raw = serializers.hris.LocationTypeEnum.Raw | string; + type Raw = LocationTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/LocationTypeEnum.ts b/src/serialization/resources/hris/types/LocationTypeEnum.ts index e57d6d07a..2102d89d2 100644 --- a/src/serialization/resources/hris/types/LocationTypeEnum.ts +++ b/src/serialization/resources/hris/types/LocationTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LocationTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/MaritalStatusEnum.ts b/src/serialization/resources/hris/types/MaritalStatusEnum.ts index c2be2d492..9f12a5d1f 100644 --- a/src/serialization/resources/hris/types/MaritalStatusEnum.ts +++ b/src/serialization/resources/hris/types/MaritalStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const MaritalStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/MetaResponse.ts b/src/serialization/resources/hris/types/MetaResponse.ts index 41029dd13..375048b4c 100644 --- a/src/serialization/resources/hris/types/MetaResponse.ts +++ b/src/serialization/resources/hris/types/MetaResponse.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { LinkedAccountStatus } from "./LinkedAccountStatus"; export const MetaResponse: core.serialization.ObjectSchema = core.serialization.object({ @@ -16,9 +17,7 @@ export const MetaResponse: core.serialization.ObjectSchema (await import("../../..")).hris.LinkedAccountStatus) - .optional(), + status: LinkedAccountStatus.optional(), hasConditionalParams: core.serialization.property("has_conditional_params", core.serialization.boolean()), hasRequiredLinkedAccountParams: core.serialization.property( "has_required_linked_account_params", @@ -30,7 +29,7 @@ export declare namespace MetaResponse { interface Raw { request_schema: Record; remote_field_classes?: Record | null; - status?: serializers.hris.LinkedAccountStatus.Raw | null; + status?: LinkedAccountStatus.Raw | null; has_conditional_params: boolean; has_required_linked_account_params: boolean; } diff --git a/src/serialization/resources/hris/types/MethodEnum.ts b/src/serialization/resources/hris/types/MethodEnum.ts index 0cc55adbb..48f30486b 100644 --- a/src/serialization/resources/hris/types/MethodEnum.ts +++ b/src/serialization/resources/hris/types/MethodEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const MethodEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/ModelOperation.ts b/src/serialization/resources/hris/types/ModelOperation.ts index cdcbc03b2..519e00b24 100644 --- a/src/serialization/resources/hris/types/ModelOperation.ts +++ b/src/serialization/resources/hris/types/ModelOperation.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelOperation: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/ModelPermissionDeserializer.ts b/src/serialization/resources/hris/types/ModelPermissionDeserializer.ts index ee19b3c3e..f460a16af 100644 --- a/src/serialization/resources/hris/types/ModelPermissionDeserializer.ts +++ b/src/serialization/resources/hris/types/ModelPermissionDeserializer.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelPermissionDeserializer: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/ModelPermissionDeserializerRequest.ts b/src/serialization/resources/hris/types/ModelPermissionDeserializerRequest.ts index e3e648b34..33f51efe0 100644 --- a/src/serialization/resources/hris/types/ModelPermissionDeserializerRequest.ts +++ b/src/serialization/resources/hris/types/ModelPermissionDeserializerRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelPermissionDeserializerRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/MultipartFormFieldRequest.ts b/src/serialization/resources/hris/types/MultipartFormFieldRequest.ts index fde2da0b4..8c77d2fe0 100644 --- a/src/serialization/resources/hris/types/MultipartFormFieldRequest.ts +++ b/src/serialization/resources/hris/types/MultipartFormFieldRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { MultipartFormFieldRequestEncoding } from "./MultipartFormFieldRequestEncoding"; export const MultipartFormFieldRequest: core.serialization.ObjectSchema< serializers.hris.MultipartFormFieldRequest.Raw, @@ -12,9 +13,7 @@ export const MultipartFormFieldRequest: core.serialization.ObjectSchema< > = core.serialization.object({ name: core.serialization.string(), data: core.serialization.string(), - encoding: core.serialization - .lazy(async () => (await import("../../..")).hris.MultipartFormFieldRequestEncoding) - .optional(), + encoding: MultipartFormFieldRequestEncoding.optional(), fileName: core.serialization.property("file_name", core.serialization.string().optional()), contentType: core.serialization.property("content_type", core.serialization.string().optional()), }); @@ -23,7 +22,7 @@ export declare namespace MultipartFormFieldRequest { interface Raw { name: string; data: string; - encoding?: serializers.hris.MultipartFormFieldRequestEncoding.Raw | null; + encoding?: MultipartFormFieldRequestEncoding.Raw | null; file_name?: string | null; content_type?: string | null; } diff --git a/src/serialization/resources/hris/types/MultipartFormFieldRequestEncoding.ts b/src/serialization/resources/hris/types/MultipartFormFieldRequestEncoding.ts index b90ba260e..094e5748f 100644 --- a/src/serialization/resources/hris/types/MultipartFormFieldRequestEncoding.ts +++ b/src/serialization/resources/hris/types/MultipartFormFieldRequestEncoding.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EncodingEnum } from "./EncodingEnum"; export const MultipartFormFieldRequestEncoding: core.serialization.Schema< serializers.hris.MultipartFormFieldRequestEncoding.Raw, Merge.hris.MultipartFormFieldRequestEncoding -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.EncodingEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EncodingEnum, core.serialization.string()]); export declare namespace MultipartFormFieldRequestEncoding { - type Raw = serializers.hris.EncodingEnum.Raw | string; + type Raw = EncodingEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/PaginatedAccountDetailsAndActionsList.ts b/src/serialization/resources/hris/types/PaginatedAccountDetailsAndActionsList.ts index 61220ee92..e06c240a9 100644 --- a/src/serialization/resources/hris/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/serialization/resources/hris/types/PaginatedAccountDetailsAndActionsList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountDetailsAndActions } from "./AccountDetailsAndActions"; export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSchema< serializers.hris.PaginatedAccountDetailsAndActionsList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSch > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.AccountDetailsAndActions)) - .optional(), + results: core.serialization.list(AccountDetailsAndActions).optional(), }); export declare namespace PaginatedAccountDetailsAndActionsList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.AccountDetailsAndActions.Raw[] | null; + results?: AccountDetailsAndActions.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedAuditLogEventList.ts b/src/serialization/resources/hris/types/PaginatedAuditLogEventList.ts index b9f531feb..a33a1a457 100644 --- a/src/serialization/resources/hris/types/PaginatedAuditLogEventList.ts +++ b/src/serialization/resources/hris/types/PaginatedAuditLogEventList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AuditLogEvent } from "./AuditLogEvent"; export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< serializers.hris.PaginatedAuditLogEventList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.AuditLogEvent)) - .optional(), + results: core.serialization.list(AuditLogEvent).optional(), }); export declare namespace PaginatedAuditLogEventList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.AuditLogEvent.Raw[] | null; + results?: AuditLogEvent.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedBankInfoList.ts b/src/serialization/resources/hris/types/PaginatedBankInfoList.ts index bacf2bed0..5ecc7d3b1 100644 --- a/src/serialization/resources/hris/types/PaginatedBankInfoList.ts +++ b/src/serialization/resources/hris/types/PaginatedBankInfoList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { BankInfo } from "./BankInfo"; export const PaginatedBankInfoList: core.serialization.ObjectSchema< serializers.hris.PaginatedBankInfoList.Raw, @@ -12,15 +13,13 @@ export const PaginatedBankInfoList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.BankInfo)) - .optional(), + results: core.serialization.list(BankInfo).optional(), }); export declare namespace PaginatedBankInfoList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.BankInfo.Raw[] | null; + results?: BankInfo.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedBenefitList.ts b/src/serialization/resources/hris/types/PaginatedBenefitList.ts index 59b52f2b2..0000f3536 100644 --- a/src/serialization/resources/hris/types/PaginatedBenefitList.ts +++ b/src/serialization/resources/hris/types/PaginatedBenefitList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Benefit } from "./Benefit"; export const PaginatedBenefitList: core.serialization.ObjectSchema< serializers.hris.PaginatedBenefitList.Raw, @@ -12,15 +13,13 @@ export const PaginatedBenefitList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.Benefit)) - .optional(), + results: core.serialization.list(Benefit).optional(), }); export declare namespace PaginatedBenefitList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.Benefit.Raw[] | null; + results?: Benefit.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedCompanyList.ts b/src/serialization/resources/hris/types/PaginatedCompanyList.ts index 80ef83688..c1d86c587 100644 --- a/src/serialization/resources/hris/types/PaginatedCompanyList.ts +++ b/src/serialization/resources/hris/types/PaginatedCompanyList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Company } from "./Company"; export const PaginatedCompanyList: core.serialization.ObjectSchema< serializers.hris.PaginatedCompanyList.Raw, @@ -12,15 +13,13 @@ export const PaginatedCompanyList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.Company)) - .optional(), + results: core.serialization.list(Company).optional(), }); export declare namespace PaginatedCompanyList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.Company.Raw[] | null; + results?: Company.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedDependentList.ts b/src/serialization/resources/hris/types/PaginatedDependentList.ts index 8890bfcbd..07f233bb3 100644 --- a/src/serialization/resources/hris/types/PaginatedDependentList.ts +++ b/src/serialization/resources/hris/types/PaginatedDependentList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Dependent } from "./Dependent"; export const PaginatedDependentList: core.serialization.ObjectSchema< serializers.hris.PaginatedDependentList.Raw, @@ -12,15 +13,13 @@ export const PaginatedDependentList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.Dependent)) - .optional(), + results: core.serialization.list(Dependent).optional(), }); export declare namespace PaginatedDependentList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.Dependent.Raw[] | null; + results?: Dependent.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedEmployeeList.ts b/src/serialization/resources/hris/types/PaginatedEmployeeList.ts index 77524159e..2cb387a5e 100644 --- a/src/serialization/resources/hris/types/PaginatedEmployeeList.ts +++ b/src/serialization/resources/hris/types/PaginatedEmployeeList.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PaginatedEmployeeList: core.serialization.ObjectSchema< @@ -12,9 +12,7 @@ export const PaginatedEmployeeList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.Employee)) - .optional(), + results: core.serialization.list(core.serialization.lazyObject(() => serializers.hris.Employee)).optional(), }); export declare namespace PaginatedEmployeeList { diff --git a/src/serialization/resources/hris/types/PaginatedEmployeePayrollRunList.ts b/src/serialization/resources/hris/types/PaginatedEmployeePayrollRunList.ts index cbaf53fa5..a5e78a4ec 100644 --- a/src/serialization/resources/hris/types/PaginatedEmployeePayrollRunList.ts +++ b/src/serialization/resources/hris/types/PaginatedEmployeePayrollRunList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EmployeePayrollRun } from "./EmployeePayrollRun"; export const PaginatedEmployeePayrollRunList: core.serialization.ObjectSchema< serializers.hris.PaginatedEmployeePayrollRunList.Raw, @@ -12,15 +13,13 @@ export const PaginatedEmployeePayrollRunList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.EmployeePayrollRun)) - .optional(), + results: core.serialization.list(EmployeePayrollRun).optional(), }); export declare namespace PaginatedEmployeePayrollRunList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.EmployeePayrollRun.Raw[] | null; + results?: EmployeePayrollRun.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedEmployerBenefitList.ts b/src/serialization/resources/hris/types/PaginatedEmployerBenefitList.ts index 826f27058..6708c72b7 100644 --- a/src/serialization/resources/hris/types/PaginatedEmployerBenefitList.ts +++ b/src/serialization/resources/hris/types/PaginatedEmployerBenefitList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EmployerBenefit } from "./EmployerBenefit"; export const PaginatedEmployerBenefitList: core.serialization.ObjectSchema< serializers.hris.PaginatedEmployerBenefitList.Raw, @@ -12,15 +13,13 @@ export const PaginatedEmployerBenefitList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.EmployerBenefit)) - .optional(), + results: core.serialization.list(EmployerBenefit).optional(), }); export declare namespace PaginatedEmployerBenefitList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.EmployerBenefit.Raw[] | null; + results?: EmployerBenefit.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedEmploymentList.ts b/src/serialization/resources/hris/types/PaginatedEmploymentList.ts index 44519e758..8d7e423f1 100644 --- a/src/serialization/resources/hris/types/PaginatedEmploymentList.ts +++ b/src/serialization/resources/hris/types/PaginatedEmploymentList.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PaginatedEmploymentList: core.serialization.ObjectSchema< @@ -12,9 +12,7 @@ export const PaginatedEmploymentList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.Employment)) - .optional(), + results: core.serialization.list(core.serialization.lazyObject(() => serializers.hris.Employment)).optional(), }); export declare namespace PaginatedEmploymentList { diff --git a/src/serialization/resources/hris/types/PaginatedGroupList.ts b/src/serialization/resources/hris/types/PaginatedGroupList.ts index 1df40fc2a..70729dac8 100644 --- a/src/serialization/resources/hris/types/PaginatedGroupList.ts +++ b/src/serialization/resources/hris/types/PaginatedGroupList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Group } from "./Group"; export const PaginatedGroupList: core.serialization.ObjectSchema< serializers.hris.PaginatedGroupList.Raw, @@ -12,15 +13,13 @@ export const PaginatedGroupList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.Group)) - .optional(), + results: core.serialization.list(Group).optional(), }); export declare namespace PaginatedGroupList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.Group.Raw[] | null; + results?: Group.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedIssueList.ts b/src/serialization/resources/hris/types/PaginatedIssueList.ts index d8dc975c7..27d3de805 100644 --- a/src/serialization/resources/hris/types/PaginatedIssueList.ts +++ b/src/serialization/resources/hris/types/PaginatedIssueList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Issue } from "./Issue"; export const PaginatedIssueList: core.serialization.ObjectSchema< serializers.hris.PaginatedIssueList.Raw, @@ -12,15 +13,13 @@ export const PaginatedIssueList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.Issue)) - .optional(), + results: core.serialization.list(Issue).optional(), }); export declare namespace PaginatedIssueList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.Issue.Raw[] | null; + results?: Issue.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedLocationList.ts b/src/serialization/resources/hris/types/PaginatedLocationList.ts index 893a6dbec..ddee53f8c 100644 --- a/src/serialization/resources/hris/types/PaginatedLocationList.ts +++ b/src/serialization/resources/hris/types/PaginatedLocationList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Location } from "./Location"; export const PaginatedLocationList: core.serialization.ObjectSchema< serializers.hris.PaginatedLocationList.Raw, @@ -12,15 +13,13 @@ export const PaginatedLocationList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.Location)) - .optional(), + results: core.serialization.list(Location).optional(), }); export declare namespace PaginatedLocationList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.Location.Raw[] | null; + results?: Location.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedPayGroupList.ts b/src/serialization/resources/hris/types/PaginatedPayGroupList.ts index 1c0110108..f02b09563 100644 --- a/src/serialization/resources/hris/types/PaginatedPayGroupList.ts +++ b/src/serialization/resources/hris/types/PaginatedPayGroupList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PayGroup } from "./PayGroup"; export const PaginatedPayGroupList: core.serialization.ObjectSchema< serializers.hris.PaginatedPayGroupList.Raw, @@ -12,15 +13,13 @@ export const PaginatedPayGroupList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.PayGroup)) - .optional(), + results: core.serialization.list(PayGroup).optional(), }); export declare namespace PaginatedPayGroupList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.PayGroup.Raw[] | null; + results?: PayGroup.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedPayrollRunList.ts b/src/serialization/resources/hris/types/PaginatedPayrollRunList.ts index aec65fd4a..a066b4cf8 100644 --- a/src/serialization/resources/hris/types/PaginatedPayrollRunList.ts +++ b/src/serialization/resources/hris/types/PaginatedPayrollRunList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PayrollRun } from "./PayrollRun"; export const PaginatedPayrollRunList: core.serialization.ObjectSchema< serializers.hris.PaginatedPayrollRunList.Raw, @@ -12,15 +13,13 @@ export const PaginatedPayrollRunList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.PayrollRun)) - .optional(), + results: core.serialization.list(PayrollRun).optional(), }); export declare namespace PaginatedPayrollRunList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.PayrollRun.Raw[] | null; + results?: PayrollRun.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedSyncStatusList.ts b/src/serialization/resources/hris/types/PaginatedSyncStatusList.ts index d07c4ed07..9a9c078e8 100644 --- a/src/serialization/resources/hris/types/PaginatedSyncStatusList.ts +++ b/src/serialization/resources/hris/types/PaginatedSyncStatusList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { SyncStatus } from "./SyncStatus"; export const PaginatedSyncStatusList: core.serialization.ObjectSchema< serializers.hris.PaginatedSyncStatusList.Raw, @@ -12,15 +13,13 @@ export const PaginatedSyncStatusList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.SyncStatus)) - .optional(), + results: core.serialization.list(SyncStatus).optional(), }); export declare namespace PaginatedSyncStatusList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.SyncStatus.Raw[] | null; + results?: SyncStatus.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedTeamList.ts b/src/serialization/resources/hris/types/PaginatedTeamList.ts index c9dca13b9..c36ac1d90 100644 --- a/src/serialization/resources/hris/types/PaginatedTeamList.ts +++ b/src/serialization/resources/hris/types/PaginatedTeamList.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PaginatedTeamList: core.serialization.ObjectSchema< @@ -12,9 +12,7 @@ export const PaginatedTeamList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.Team)) - .optional(), + results: core.serialization.list(core.serialization.lazyObject(() => serializers.hris.Team)).optional(), }); export declare namespace PaginatedTeamList { diff --git a/src/serialization/resources/hris/types/PaginatedTimeOffBalanceList.ts b/src/serialization/resources/hris/types/PaginatedTimeOffBalanceList.ts index 4d066685f..7cdd6378e 100644 --- a/src/serialization/resources/hris/types/PaginatedTimeOffBalanceList.ts +++ b/src/serialization/resources/hris/types/PaginatedTimeOffBalanceList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TimeOffBalance } from "./TimeOffBalance"; export const PaginatedTimeOffBalanceList: core.serialization.ObjectSchema< serializers.hris.PaginatedTimeOffBalanceList.Raw, @@ -12,15 +13,13 @@ export const PaginatedTimeOffBalanceList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.TimeOffBalance)) - .optional(), + results: core.serialization.list(TimeOffBalance).optional(), }); export declare namespace PaginatedTimeOffBalanceList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.TimeOffBalance.Raw[] | null; + results?: TimeOffBalance.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedTimeOffList.ts b/src/serialization/resources/hris/types/PaginatedTimeOffList.ts index 013d988fd..7be737a63 100644 --- a/src/serialization/resources/hris/types/PaginatedTimeOffList.ts +++ b/src/serialization/resources/hris/types/PaginatedTimeOffList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TimeOff } from "./TimeOff"; export const PaginatedTimeOffList: core.serialization.ObjectSchema< serializers.hris.PaginatedTimeOffList.Raw, @@ -12,15 +13,13 @@ export const PaginatedTimeOffList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.TimeOff)) - .optional(), + results: core.serialization.list(TimeOff).optional(), }); export declare namespace PaginatedTimeOffList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.TimeOff.Raw[] | null; + results?: TimeOff.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PaginatedTimesheetEntryList.ts b/src/serialization/resources/hris/types/PaginatedTimesheetEntryList.ts index e194c93a6..1c46a1c70 100644 --- a/src/serialization/resources/hris/types/PaginatedTimesheetEntryList.ts +++ b/src/serialization/resources/hris/types/PaginatedTimesheetEntryList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TimesheetEntry } from "./TimesheetEntry"; export const PaginatedTimesheetEntryList: core.serialization.ObjectSchema< serializers.hris.PaginatedTimesheetEntryList.Raw, @@ -12,15 +13,13 @@ export const PaginatedTimesheetEntryList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.TimesheetEntry)) - .optional(), + results: core.serialization.list(TimesheetEntry).optional(), }); export declare namespace PaginatedTimesheetEntryList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.hris.TimesheetEntry.Raw[] | null; + results?: TimesheetEntry.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PayCurrencyEnum.ts b/src/serialization/resources/hris/types/PayCurrencyEnum.ts index db7fa732a..5e1a8eb9c 100644 --- a/src/serialization/resources/hris/types/PayCurrencyEnum.ts +++ b/src/serialization/resources/hris/types/PayCurrencyEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PayCurrencyEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/PayFrequencyEnum.ts b/src/serialization/resources/hris/types/PayFrequencyEnum.ts index 293de4cb2..33d7d1923 100644 --- a/src/serialization/resources/hris/types/PayFrequencyEnum.ts +++ b/src/serialization/resources/hris/types/PayFrequencyEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PayFrequencyEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/PayGroup.ts b/src/serialization/resources/hris/types/PayGroup.ts index d7c15bda4..f0e42e7b5 100644 --- a/src/serialization/resources/hris/types/PayGroup.ts +++ b/src/serialization/resources/hris/types/PayGroup.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; export const PayGroup: core.serialization.ObjectSchema = core.serialization.object({ @@ -18,12 +19,7 @@ export const PayGroup: core.serialization.ObjectSchema (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace PayGroup { @@ -35,6 +31,6 @@ export declare namespace PayGroup { pay_group_name?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PayPeriodEnum.ts b/src/serialization/resources/hris/types/PayPeriodEnum.ts index 1d1069044..57af2ea6a 100644 --- a/src/serialization/resources/hris/types/PayPeriodEnum.ts +++ b/src/serialization/resources/hris/types/PayPeriodEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PayPeriodEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/PayrollRun.ts b/src/serialization/resources/hris/types/PayrollRun.ts index 764f64d77..e6b90053e 100644 --- a/src/serialization/resources/hris/types/PayrollRun.ts +++ b/src/serialization/resources/hris/types/PayrollRun.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PayrollRunRunState } from "./PayrollRunRunState"; +import { PayrollRunRunType } from "./PayrollRunRunType"; +import { RemoteData } from "./RemoteData"; export const PayrollRun: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,14 +15,8 @@ export const PayrollRun: core.serialization.ObjectSchema (await import("../../..")).hris.PayrollRunRunState).optional() - ), - runType: core.serialization.property( - "run_type", - core.serialization.lazy(async () => (await import("../../..")).hris.PayrollRunRunType).optional() - ), + runState: core.serialization.property("run_state", PayrollRunRunState.optional()), + runType: core.serialization.property("run_type", PayrollRunRunType.optional()), startDate: core.serialization.property("start_date", core.serialization.date().optional()), endDate: core.serialization.property("end_date", core.serialization.date().optional()), checkDate: core.serialization.property("check_date", core.serialization.date().optional()), @@ -28,12 +25,7 @@ export const PayrollRun: core.serialization.ObjectSchema (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace PayrollRun { @@ -42,13 +34,13 @@ export declare namespace PayrollRun { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - run_state?: serializers.hris.PayrollRunRunState.Raw | null; - run_type?: serializers.hris.PayrollRunRunType.Raw | null; + run_state?: PayrollRunRunState.Raw | null; + run_type?: PayrollRunRunType.Raw | null; start_date?: string | null; end_date?: string | null; check_date?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/PayrollRunRunState.ts b/src/serialization/resources/hris/types/PayrollRunRunState.ts index f99197d7b..8c2ec2d6f 100644 --- a/src/serialization/resources/hris/types/PayrollRunRunState.ts +++ b/src/serialization/resources/hris/types/PayrollRunRunState.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RunStateEnum } from "./RunStateEnum"; export const PayrollRunRunState: core.serialization.Schema< serializers.hris.PayrollRunRunState.Raw, Merge.hris.PayrollRunRunState -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.RunStateEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RunStateEnum, core.serialization.string()]); export declare namespace PayrollRunRunState { - type Raw = serializers.hris.RunStateEnum.Raw | string; + type Raw = RunStateEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/PayrollRunRunType.ts b/src/serialization/resources/hris/types/PayrollRunRunType.ts index 3bc7ec5a3..24899ddf0 100644 --- a/src/serialization/resources/hris/types/PayrollRunRunType.ts +++ b/src/serialization/resources/hris/types/PayrollRunRunType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RunTypeEnum } from "./RunTypeEnum"; export const PayrollRunRunType: core.serialization.Schema< serializers.hris.PayrollRunRunType.Raw, Merge.hris.PayrollRunRunType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.RunTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RunTypeEnum, core.serialization.string()]); export declare namespace PayrollRunRunType { - type Raw = serializers.hris.RunTypeEnum.Raw | string; + type Raw = RunTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/PolicyTypeEnum.ts b/src/serialization/resources/hris/types/PolicyTypeEnum.ts index 435ab4c51..96940f791 100644 --- a/src/serialization/resources/hris/types/PolicyTypeEnum.ts +++ b/src/serialization/resources/hris/types/PolicyTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PolicyTypeEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/ReasonEnum.ts b/src/serialization/resources/hris/types/ReasonEnum.ts index 734e1938e..637dbee52 100644 --- a/src/serialization/resources/hris/types/ReasonEnum.ts +++ b/src/serialization/resources/hris/types/ReasonEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ReasonEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/RelationshipEnum.ts b/src/serialization/resources/hris/types/RelationshipEnum.ts index 9d34a1cf5..3d1282496 100644 --- a/src/serialization/resources/hris/types/RelationshipEnum.ts +++ b/src/serialization/resources/hris/types/RelationshipEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RelationshipEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/RemoteData.ts b/src/serialization/resources/hris/types/RemoteData.ts index c33c8d6a8..7670a3f9b 100644 --- a/src/serialization/resources/hris/types/RemoteData.ts +++ b/src/serialization/resources/hris/types/RemoteData.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteData: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/hris/types/RemoteEndpointInfo.ts b/src/serialization/resources/hris/types/RemoteEndpointInfo.ts index 71e0e5521..be0bbe8f7 100644 --- a/src/serialization/resources/hris/types/RemoteEndpointInfo.ts +++ b/src/serialization/resources/hris/types/RemoteEndpointInfo.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteEndpointInfo: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/RemoteFieldApi.ts b/src/serialization/resources/hris/types/RemoteFieldApi.ts index 6dfe679b0..b9b840ad2 100644 --- a/src/serialization/resources/hris/types/RemoteFieldApi.ts +++ b/src/serialization/resources/hris/types/RemoteFieldApi.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteEndpointInfo } from "./RemoteEndpointInfo"; +import { AdvancedMetadata } from "./AdvancedMetadata"; +import { RemoteFieldApiCoverage } from "./RemoteFieldApiCoverage"; export const RemoteFieldApi: core.serialization.ObjectSchema< serializers.hris.RemoteFieldApi.Raw, @@ -12,28 +15,22 @@ export const RemoteFieldApi: core.serialization.ObjectSchema< > = core.serialization.object({ schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()), remoteKeyName: core.serialization.property("remote_key_name", core.serialization.string()), - remoteEndpointInfo: core.serialization.property( - "remote_endpoint_info", - core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteEndpointInfo) - ), + remoteEndpointInfo: core.serialization.property("remote_endpoint_info", RemoteEndpointInfo), exampleValues: core.serialization.property( "example_values", core.serialization.list(core.serialization.unknown()).optional() ), - advancedMetadata: core.serialization.property( - "advanced_metadata", - core.serialization.lazyObject(async () => (await import("../../..")).hris.AdvancedMetadata).optional() - ), - coverage: core.serialization.lazy(async () => (await import("../../..")).hris.RemoteFieldApiCoverage).optional(), + advancedMetadata: core.serialization.property("advanced_metadata", AdvancedMetadata.optional()), + coverage: RemoteFieldApiCoverage.optional(), }); export declare namespace RemoteFieldApi { interface Raw { schema: Record; remote_key_name: string; - remote_endpoint_info: serializers.hris.RemoteEndpointInfo.Raw; + remote_endpoint_info: RemoteEndpointInfo.Raw; example_values?: unknown[] | null; - advanced_metadata?: serializers.hris.AdvancedMetadata.Raw | null; - coverage?: serializers.hris.RemoteFieldApiCoverage.Raw | null; + advanced_metadata?: AdvancedMetadata.Raw | null; + coverage?: RemoteFieldApiCoverage.Raw | null; } } diff --git a/src/serialization/resources/hris/types/RemoteFieldApiCoverage.ts b/src/serialization/resources/hris/types/RemoteFieldApiCoverage.ts index bcaf74ab8..a61248f99 100644 --- a/src/serialization/resources/hris/types/RemoteFieldApiCoverage.ts +++ b/src/serialization/resources/hris/types/RemoteFieldApiCoverage.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteFieldApiCoverage: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/RemoteFieldApiResponse.ts b/src/serialization/resources/hris/types/RemoteFieldApiResponse.ts index e268e83e7..05dffe162 100644 --- a/src/serialization/resources/hris/types/RemoteFieldApiResponse.ts +++ b/src/serialization/resources/hris/types/RemoteFieldApiResponse.ts @@ -2,129 +2,53 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldApi } from "./RemoteFieldApi"; export const RemoteFieldApiResponse: core.serialization.ObjectSchema< serializers.hris.RemoteFieldApiResponse.Raw, Merge.hris.RemoteFieldApiResponse > = core.serialization.object({ - benefit: core.serialization.property( - "Benefit", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), - employerBenefit: core.serialization.property( - "EmployerBenefit", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), - company: core.serialization.property( - "Company", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), + benefit: core.serialization.property("Benefit", core.serialization.list(RemoteFieldApi).optional()), + employerBenefit: core.serialization.property("EmployerBenefit", core.serialization.list(RemoteFieldApi).optional()), + company: core.serialization.property("Company", core.serialization.list(RemoteFieldApi).optional()), employeePayrollRun: core.serialization.property( "EmployeePayrollRun", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), - employee: core.serialization.property( - "Employee", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), - employment: core.serialization.property( - "Employment", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), - location: core.serialization.property( - "Location", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), - payrollRun: core.serialization.property( - "PayrollRun", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), - team: core.serialization.property( - "Team", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), - timeOff: core.serialization.property( - "TimeOff", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), - timeOffBalance: core.serialization.property( - "TimeOffBalance", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), - bankInfo: core.serialization.property( - "BankInfo", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), - payGroup: core.serialization.property( - "PayGroup", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), - group: core.serialization.property( - "Group", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), - dependent: core.serialization.property( - "Dependent", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), - timesheetEntry: core.serialization.property( - "TimesheetEntry", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteFieldApi)) - .optional() - ), + core.serialization.list(RemoteFieldApi).optional() + ), + employee: core.serialization.property("Employee", core.serialization.list(RemoteFieldApi).optional()), + employment: core.serialization.property("Employment", core.serialization.list(RemoteFieldApi).optional()), + location: core.serialization.property("Location", core.serialization.list(RemoteFieldApi).optional()), + payrollRun: core.serialization.property("PayrollRun", core.serialization.list(RemoteFieldApi).optional()), + team: core.serialization.property("Team", core.serialization.list(RemoteFieldApi).optional()), + timeOff: core.serialization.property("TimeOff", core.serialization.list(RemoteFieldApi).optional()), + timeOffBalance: core.serialization.property("TimeOffBalance", core.serialization.list(RemoteFieldApi).optional()), + bankInfo: core.serialization.property("BankInfo", core.serialization.list(RemoteFieldApi).optional()), + payGroup: core.serialization.property("PayGroup", core.serialization.list(RemoteFieldApi).optional()), + group: core.serialization.property("Group", core.serialization.list(RemoteFieldApi).optional()), + dependent: core.serialization.property("Dependent", core.serialization.list(RemoteFieldApi).optional()), + timesheetEntry: core.serialization.property("TimesheetEntry", core.serialization.list(RemoteFieldApi).optional()), }); export declare namespace RemoteFieldApiResponse { interface Raw { - Benefit?: serializers.hris.RemoteFieldApi.Raw[] | null; - EmployerBenefit?: serializers.hris.RemoteFieldApi.Raw[] | null; - Company?: serializers.hris.RemoteFieldApi.Raw[] | null; - EmployeePayrollRun?: serializers.hris.RemoteFieldApi.Raw[] | null; - Employee?: serializers.hris.RemoteFieldApi.Raw[] | null; - Employment?: serializers.hris.RemoteFieldApi.Raw[] | null; - Location?: serializers.hris.RemoteFieldApi.Raw[] | null; - PayrollRun?: serializers.hris.RemoteFieldApi.Raw[] | null; - Team?: serializers.hris.RemoteFieldApi.Raw[] | null; - TimeOff?: serializers.hris.RemoteFieldApi.Raw[] | null; - TimeOffBalance?: serializers.hris.RemoteFieldApi.Raw[] | null; - BankInfo?: serializers.hris.RemoteFieldApi.Raw[] | null; - PayGroup?: serializers.hris.RemoteFieldApi.Raw[] | null; - Group?: serializers.hris.RemoteFieldApi.Raw[] | null; - Dependent?: serializers.hris.RemoteFieldApi.Raw[] | null; - TimesheetEntry?: serializers.hris.RemoteFieldApi.Raw[] | null; + Benefit?: RemoteFieldApi.Raw[] | null; + EmployerBenefit?: RemoteFieldApi.Raw[] | null; + Company?: RemoteFieldApi.Raw[] | null; + EmployeePayrollRun?: RemoteFieldApi.Raw[] | null; + Employee?: RemoteFieldApi.Raw[] | null; + Employment?: RemoteFieldApi.Raw[] | null; + Location?: RemoteFieldApi.Raw[] | null; + PayrollRun?: RemoteFieldApi.Raw[] | null; + Team?: RemoteFieldApi.Raw[] | null; + TimeOff?: RemoteFieldApi.Raw[] | null; + TimeOffBalance?: RemoteFieldApi.Raw[] | null; + BankInfo?: RemoteFieldApi.Raw[] | null; + PayGroup?: RemoteFieldApi.Raw[] | null; + Group?: RemoteFieldApi.Raw[] | null; + Dependent?: RemoteFieldApi.Raw[] | null; + TimesheetEntry?: RemoteFieldApi.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/RemoteKey.ts b/src/serialization/resources/hris/types/RemoteKey.ts index f46575865..642e749a8 100644 --- a/src/serialization/resources/hris/types/RemoteKey.ts +++ b/src/serialization/resources/hris/types/RemoteKey.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteKey: core.serialization.ObjectSchema = diff --git a/src/serialization/resources/hris/types/RemoteResponse.ts b/src/serialization/resources/hris/types/RemoteResponse.ts index 2dcef78e3..8db85fa46 100644 --- a/src/serialization/resources/hris/types/RemoteResponse.ts +++ b/src/serialization/resources/hris/types/RemoteResponse.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteResponseResponseType } from "./RemoteResponseResponseType"; export const RemoteResponse: core.serialization.ObjectSchema< serializers.hris.RemoteResponse.Raw, @@ -18,10 +19,7 @@ export const RemoteResponse: core.serialization.ObjectSchema< "response_headers", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - responseType: core.serialization.property( - "response_type", - core.serialization.lazy(async () => (await import("../../..")).hris.RemoteResponseResponseType).optional() - ), + responseType: core.serialization.property("response_type", RemoteResponseResponseType.optional()), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), }); @@ -32,7 +30,7 @@ export declare namespace RemoteResponse { status: number; response?: unknown; response_headers?: Record | null; - response_type?: serializers.hris.RemoteResponseResponseType.Raw | null; + response_type?: RemoteResponseResponseType.Raw | null; headers?: Record | null; } } diff --git a/src/serialization/resources/hris/types/RemoteResponseResponseType.ts b/src/serialization/resources/hris/types/RemoteResponseResponseType.ts index 523ffeaae..b816f544a 100644 --- a/src/serialization/resources/hris/types/RemoteResponseResponseType.ts +++ b/src/serialization/resources/hris/types/RemoteResponseResponseType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ResponseTypeEnum } from "./ResponseTypeEnum"; export const RemoteResponseResponseType: core.serialization.Schema< serializers.hris.RemoteResponseResponseType.Raw, Merge.hris.RemoteResponseResponseType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.ResponseTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([ResponseTypeEnum, core.serialization.string()]); export declare namespace RemoteResponseResponseType { - type Raw = serializers.hris.ResponseTypeEnum.Raw | string; + type Raw = ResponseTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/RequestFormatEnum.ts b/src/serialization/resources/hris/types/RequestFormatEnum.ts index 92e10c1c1..1bacbeb5a 100644 --- a/src/serialization/resources/hris/types/RequestFormatEnum.ts +++ b/src/serialization/resources/hris/types/RequestFormatEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RequestFormatEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/RequestTypeEnum.ts b/src/serialization/resources/hris/types/RequestTypeEnum.ts index 99414ac34..ccf8f6887 100644 --- a/src/serialization/resources/hris/types/RequestTypeEnum.ts +++ b/src/serialization/resources/hris/types/RequestTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RequestTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/ResponseTypeEnum.ts b/src/serialization/resources/hris/types/ResponseTypeEnum.ts index ada3dde51..c462a0751 100644 --- a/src/serialization/resources/hris/types/ResponseTypeEnum.ts +++ b/src/serialization/resources/hris/types/ResponseTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ResponseTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/RoleEnum.ts b/src/serialization/resources/hris/types/RoleEnum.ts index 20d5f42e3..a455c3bfc 100644 --- a/src/serialization/resources/hris/types/RoleEnum.ts +++ b/src/serialization/resources/hris/types/RoleEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RoleEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/RunStateEnum.ts b/src/serialization/resources/hris/types/RunStateEnum.ts index 089bb0f98..1387643c2 100644 --- a/src/serialization/resources/hris/types/RunStateEnum.ts +++ b/src/serialization/resources/hris/types/RunStateEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RunStateEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/RunTypeEnum.ts b/src/serialization/resources/hris/types/RunTypeEnum.ts index 799ca5bb4..0c3da775b 100644 --- a/src/serialization/resources/hris/types/RunTypeEnum.ts +++ b/src/serialization/resources/hris/types/RunTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RunTypeEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/serialization/resources/hris/types/SelectiveSyncConfigurationsUsageEnum.ts index 5dd015ed7..51eacfcf1 100644 --- a/src/serialization/resources/hris/types/SelectiveSyncConfigurationsUsageEnum.ts +++ b/src/serialization/resources/hris/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const SelectiveSyncConfigurationsUsageEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/SyncStatus.ts b/src/serialization/resources/hris/types/SyncStatus.ts index 686c5c5df..a1b3a812a 100644 --- a/src/serialization/resources/hris/types/SyncStatus.ts +++ b/src/serialization/resources/hris/types/SyncStatus.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { SyncStatusStatusEnum } from "./SyncStatusStatusEnum"; +import { SelectiveSyncConfigurationsUsageEnum } from "./SelectiveSyncConfigurationsUsageEnum"; export const SyncStatus: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,13 +14,11 @@ export const SyncStatus: core.serialization.ObjectSchema (await import("../../..")).hris.SyncStatusStatusEnum), + status: SyncStatusStatusEnum, isInitialSync: core.serialization.property("is_initial_sync", core.serialization.boolean()), selectiveSyncConfigurationsUsage: core.serialization.property( "selective_sync_configurations_usage", - core.serialization - .lazy(async () => (await import("../../..")).hris.SelectiveSyncConfigurationsUsageEnum) - .optional() + SelectiveSyncConfigurationsUsageEnum.optional() ), }); @@ -28,8 +28,8 @@ export declare namespace SyncStatus { model_id: string; last_sync_start?: string | null; next_sync_start?: string | null; - status: serializers.hris.SyncStatusStatusEnum.Raw; + status: SyncStatusStatusEnum.Raw; is_initial_sync: boolean; - selective_sync_configurations_usage?: serializers.hris.SelectiveSyncConfigurationsUsageEnum.Raw | null; + selective_sync_configurations_usage?: SelectiveSyncConfigurationsUsageEnum.Raw | null; } } diff --git a/src/serialization/resources/hris/types/SyncStatusStatusEnum.ts b/src/serialization/resources/hris/types/SyncStatusStatusEnum.ts index 5fa2f9843..f2739d412 100644 --- a/src/serialization/resources/hris/types/SyncStatusStatusEnum.ts +++ b/src/serialization/resources/hris/types/SyncStatusStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const SyncStatusStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/Tax.ts b/src/serialization/resources/hris/types/Tax.ts index bc5a1c9e8..0091bfc27 100644 --- a/src/serialization/resources/hris/types/Tax.ts +++ b/src/serialization/resources/hris/types/Tax.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; export const Tax: core.serialization.ObjectSchema = core.serialization.object( { @@ -21,12 +22,7 @@ export const Tax: core.serialization.ObjectSchema (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), } ); @@ -42,6 +38,6 @@ export declare namespace Tax { employer_tax?: boolean | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/Team.ts b/src/serialization/resources/hris/types/Team.ts index 1fabd4d06..860cb01a4 100644 --- a/src/serialization/resources/hris/types/Team.ts +++ b/src/serialization/resources/hris/types/Team.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; export const Team: core.serialization.ObjectSchema = core.serialization.object({ @@ -15,19 +16,14 @@ export const Team: core.serialization.ObjectSchema (await import("../../..")).hris.TeamParentTeam).optional() + core.serialization.lazy(() => serializers.hris.TeamParentTeam).optional() ), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Team { @@ -40,6 +36,6 @@ export declare namespace Team { parent_team?: serializers.hris.TeamParentTeam.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/TeamParentTeam.ts b/src/serialization/resources/hris/types/TeamParentTeam.ts index 85377533b..4dc97ff6d 100644 --- a/src/serialization/resources/hris/types/TeamParentTeam.ts +++ b/src/serialization/resources/hris/types/TeamParentTeam.ts @@ -2,14 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TeamParentTeam: core.serialization.Schema = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Team), + core.serialization.lazyObject(() => serializers.hris.Team), ]); export declare namespace TeamParentTeam { diff --git a/src/serialization/resources/hris/types/TimeOff.ts b/src/serialization/resources/hris/types/TimeOff.ts index 4d9219230..2ccc9e5a1 100644 --- a/src/serialization/resources/hris/types/TimeOff.ts +++ b/src/serialization/resources/hris/types/TimeOff.ts @@ -2,9 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TimeOffEmployee } from "./TimeOffEmployee"; +import { TimeOffApprover } from "./TimeOffApprover"; +import { TimeOffStatus } from "./TimeOffStatus"; +import { TimeOffUnits } from "./TimeOffUnits"; +import { TimeOffRequestType } from "./TimeOffRequestType"; +import { RemoteData } from "./RemoteData"; export const TimeOff: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,16 +18,13 @@ export const TimeOff: core.serialization.ObjectSchema (await import("../../..")).hris.TimeOffEmployee).optional(), - approver: core.serialization.lazy(async () => (await import("../../..")).hris.TimeOffApprover).optional(), - status: core.serialization.lazy(async () => (await import("../../..")).hris.TimeOffStatus).optional(), + employee: TimeOffEmployee.optional(), + approver: TimeOffApprover.optional(), + status: TimeOffStatus.optional(), employeeNote: core.serialization.property("employee_note", core.serialization.string().optional()), - units: core.serialization.lazy(async () => (await import("../../..")).hris.TimeOffUnits).optional(), + units: TimeOffUnits.optional(), amount: core.serialization.number().optional(), - requestType: core.serialization.property( - "request_type", - core.serialization.lazy(async () => (await import("../../..")).hris.TimeOffRequestType).optional() - ), + requestType: core.serialization.property("request_type", TimeOffRequestType.optional()), startTime: core.serialization.property("start_time", core.serialization.date().optional()), endTime: core.serialization.property("end_time", core.serialization.date().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), @@ -29,12 +32,7 @@ export const TimeOff: core.serialization.ObjectSchema (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace TimeOff { @@ -43,17 +41,17 @@ export declare namespace TimeOff { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - employee?: serializers.hris.TimeOffEmployee.Raw | null; - approver?: serializers.hris.TimeOffApprover.Raw | null; - status?: serializers.hris.TimeOffStatus.Raw | null; + employee?: TimeOffEmployee.Raw | null; + approver?: TimeOffApprover.Raw | null; + status?: TimeOffStatus.Raw | null; employee_note?: string | null; - units?: serializers.hris.TimeOffUnits.Raw | null; + units?: TimeOffUnits.Raw | null; amount?: number | null; - request_type?: serializers.hris.TimeOffRequestType.Raw | null; + request_type?: TimeOffRequestType.Raw | null; start_time?: string | null; end_time?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/TimeOffApprover.ts b/src/serialization/resources/hris/types/TimeOffApprover.ts index 838621089..16c4a00be 100644 --- a/src/serialization/resources/hris/types/TimeOffApprover.ts +++ b/src/serialization/resources/hris/types/TimeOffApprover.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TimeOffApprover: core.serialization.Schema< @@ -11,7 +11,7 @@ export const TimeOffApprover: core.serialization.Schema< Merge.hris.TimeOffApprover > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Employee), + core.serialization.lazyObject(() => serializers.hris.Employee), ]); export declare namespace TimeOffApprover { diff --git a/src/serialization/resources/hris/types/TimeOffBalance.ts b/src/serialization/resources/hris/types/TimeOffBalance.ts index 57a3353e6..5eff2a87e 100644 --- a/src/serialization/resources/hris/types/TimeOffBalance.ts +++ b/src/serialization/resources/hris/types/TimeOffBalance.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TimeOffBalanceEmployee } from "./TimeOffBalanceEmployee"; +import { TimeOffBalancePolicyType } from "./TimeOffBalancePolicyType"; +import { RemoteData } from "./RemoteData"; export const TimeOffBalance: core.serialization.ObjectSchema< serializers.hris.TimeOffBalance.Raw, @@ -14,24 +17,16 @@ export const TimeOffBalance: core.serialization.ObjectSchema< remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), - employee: core.serialization.lazy(async () => (await import("../../..")).hris.TimeOffBalanceEmployee).optional(), + employee: TimeOffBalanceEmployee.optional(), balance: core.serialization.number().optional(), used: core.serialization.number().optional(), - policyType: core.serialization.property( - "policy_type", - core.serialization.lazy(async () => (await import("../../..")).hris.TimeOffBalancePolicyType).optional() - ), + policyType: core.serialization.property("policy_type", TimeOffBalancePolicyType.optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace TimeOffBalance { @@ -40,12 +35,12 @@ export declare namespace TimeOffBalance { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - employee?: serializers.hris.TimeOffBalanceEmployee.Raw | null; + employee?: TimeOffBalanceEmployee.Raw | null; balance?: number | null; used?: number | null; - policy_type?: serializers.hris.TimeOffBalancePolicyType.Raw | null; + policy_type?: TimeOffBalancePolicyType.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.hris.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/TimeOffBalanceEmployee.ts b/src/serialization/resources/hris/types/TimeOffBalanceEmployee.ts index 12dac615a..dc3d0f322 100644 --- a/src/serialization/resources/hris/types/TimeOffBalanceEmployee.ts +++ b/src/serialization/resources/hris/types/TimeOffBalanceEmployee.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TimeOffBalanceEmployee: core.serialization.Schema< @@ -11,7 +11,7 @@ export const TimeOffBalanceEmployee: core.serialization.Schema< Merge.hris.TimeOffBalanceEmployee > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Employee), + core.serialization.lazyObject(() => serializers.hris.Employee), ]); export declare namespace TimeOffBalanceEmployee { diff --git a/src/serialization/resources/hris/types/TimeOffBalancePolicyType.ts b/src/serialization/resources/hris/types/TimeOffBalancePolicyType.ts index 7943bd0e1..35c1d7376 100644 --- a/src/serialization/resources/hris/types/TimeOffBalancePolicyType.ts +++ b/src/serialization/resources/hris/types/TimeOffBalancePolicyType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PolicyTypeEnum } from "./PolicyTypeEnum"; export const TimeOffBalancePolicyType: core.serialization.Schema< serializers.hris.TimeOffBalancePolicyType.Raw, Merge.hris.TimeOffBalancePolicyType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.PolicyTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PolicyTypeEnum, core.serialization.string()]); export declare namespace TimeOffBalancePolicyType { - type Raw = serializers.hris.PolicyTypeEnum.Raw | string; + type Raw = PolicyTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/TimeOffEmployee.ts b/src/serialization/resources/hris/types/TimeOffEmployee.ts index 747cbd9ae..944ae5541 100644 --- a/src/serialization/resources/hris/types/TimeOffEmployee.ts +++ b/src/serialization/resources/hris/types/TimeOffEmployee.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TimeOffEmployee: core.serialization.Schema< @@ -11,7 +11,7 @@ export const TimeOffEmployee: core.serialization.Schema< Merge.hris.TimeOffEmployee > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Employee), + core.serialization.lazyObject(() => serializers.hris.Employee), ]); export declare namespace TimeOffEmployee { diff --git a/src/serialization/resources/hris/types/TimeOffRequest.ts b/src/serialization/resources/hris/types/TimeOffRequest.ts index 48c610eb6..f1fce62ea 100644 --- a/src/serialization/resources/hris/types/TimeOffRequest.ts +++ b/src/serialization/resources/hris/types/TimeOffRequest.ts @@ -2,24 +2,26 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TimeOffRequestEmployee } from "./TimeOffRequestEmployee"; +import { TimeOffRequestApprover } from "./TimeOffRequestApprover"; +import { TimeOffRequestStatus } from "./TimeOffRequestStatus"; +import { TimeOffRequestUnits } from "./TimeOffRequestUnits"; +import { TimeOffRequestRequestType } from "./TimeOffRequestRequestType"; export const TimeOffRequest: core.serialization.ObjectSchema< serializers.hris.TimeOffRequest.Raw, Merge.hris.TimeOffRequest > = core.serialization.object({ - employee: core.serialization.lazy(async () => (await import("../../..")).hris.TimeOffRequestEmployee).optional(), - approver: core.serialization.lazy(async () => (await import("../../..")).hris.TimeOffRequestApprover).optional(), - status: core.serialization.lazy(async () => (await import("../../..")).hris.TimeOffRequestStatus).optional(), + employee: TimeOffRequestEmployee.optional(), + approver: TimeOffRequestApprover.optional(), + status: TimeOffRequestStatus.optional(), employeeNote: core.serialization.property("employee_note", core.serialization.string().optional()), - units: core.serialization.lazy(async () => (await import("../../..")).hris.TimeOffRequestUnits).optional(), + units: TimeOffRequestUnits.optional(), amount: core.serialization.number().optional(), - requestType: core.serialization.property( - "request_type", - core.serialization.lazy(async () => (await import("../../..")).hris.TimeOffRequestRequestType).optional() - ), + requestType: core.serialization.property("request_type", TimeOffRequestRequestType.optional()), startTime: core.serialization.property("start_time", core.serialization.date().optional()), endTime: core.serialization.property("end_time", core.serialization.date().optional()), integrationParams: core.serialization.property( @@ -34,13 +36,13 @@ export const TimeOffRequest: core.serialization.ObjectSchema< export declare namespace TimeOffRequest { interface Raw { - employee?: serializers.hris.TimeOffRequestEmployee.Raw | null; - approver?: serializers.hris.TimeOffRequestApprover.Raw | null; - status?: serializers.hris.TimeOffRequestStatus.Raw | null; + employee?: TimeOffRequestEmployee.Raw | null; + approver?: TimeOffRequestApprover.Raw | null; + status?: TimeOffRequestStatus.Raw | null; employee_note?: string | null; - units?: serializers.hris.TimeOffRequestUnits.Raw | null; + units?: TimeOffRequestUnits.Raw | null; amount?: number | null; - request_type?: serializers.hris.TimeOffRequestRequestType.Raw | null; + request_type?: TimeOffRequestRequestType.Raw | null; start_time?: string | null; end_time?: string | null; integration_params?: Record | null; diff --git a/src/serialization/resources/hris/types/TimeOffRequestApprover.ts b/src/serialization/resources/hris/types/TimeOffRequestApprover.ts index 36b466d25..66f98d3a2 100644 --- a/src/serialization/resources/hris/types/TimeOffRequestApprover.ts +++ b/src/serialization/resources/hris/types/TimeOffRequestApprover.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TimeOffRequestApprover: core.serialization.Schema< @@ -11,7 +11,7 @@ export const TimeOffRequestApprover: core.serialization.Schema< Merge.hris.TimeOffRequestApprover > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Employee), + core.serialization.lazyObject(() => serializers.hris.Employee), ]); export declare namespace TimeOffRequestApprover { diff --git a/src/serialization/resources/hris/types/TimeOffRequestEmployee.ts b/src/serialization/resources/hris/types/TimeOffRequestEmployee.ts index 7f8362081..2d5d7517a 100644 --- a/src/serialization/resources/hris/types/TimeOffRequestEmployee.ts +++ b/src/serialization/resources/hris/types/TimeOffRequestEmployee.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TimeOffRequestEmployee: core.serialization.Schema< @@ -11,7 +11,7 @@ export const TimeOffRequestEmployee: core.serialization.Schema< Merge.hris.TimeOffRequestEmployee > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).hris.Employee), + core.serialization.lazyObject(() => serializers.hris.Employee), ]); export declare namespace TimeOffRequestEmployee { diff --git a/src/serialization/resources/hris/types/TimeOffRequestRequestType.ts b/src/serialization/resources/hris/types/TimeOffRequestRequestType.ts index 5e0c0e071..03038695d 100644 --- a/src/serialization/resources/hris/types/TimeOffRequestRequestType.ts +++ b/src/serialization/resources/hris/types/TimeOffRequestRequestType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RequestTypeEnum } from "./RequestTypeEnum"; export const TimeOffRequestRequestType: core.serialization.Schema< serializers.hris.TimeOffRequestRequestType.Raw, Merge.hris.TimeOffRequestRequestType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.RequestTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RequestTypeEnum, core.serialization.string()]); export declare namespace TimeOffRequestRequestType { - type Raw = serializers.hris.RequestTypeEnum.Raw | string; + type Raw = RequestTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/TimeOffRequestStatus.ts b/src/serialization/resources/hris/types/TimeOffRequestStatus.ts index 07985f403..a95e652ea 100644 --- a/src/serialization/resources/hris/types/TimeOffRequestStatus.ts +++ b/src/serialization/resources/hris/types/TimeOffRequestStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TimeOffStatusEnum } from "./TimeOffStatusEnum"; export const TimeOffRequestStatus: core.serialization.Schema< serializers.hris.TimeOffRequestStatus.Raw, Merge.hris.TimeOffRequestStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.TimeOffStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([TimeOffStatusEnum, core.serialization.string()]); export declare namespace TimeOffRequestStatus { - type Raw = serializers.hris.TimeOffStatusEnum.Raw | string; + type Raw = TimeOffStatusEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/TimeOffRequestType.ts b/src/serialization/resources/hris/types/TimeOffRequestType.ts index 73fd2e902..075ccde86 100644 --- a/src/serialization/resources/hris/types/TimeOffRequestType.ts +++ b/src/serialization/resources/hris/types/TimeOffRequestType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RequestTypeEnum } from "./RequestTypeEnum"; export const TimeOffRequestType: core.serialization.Schema< serializers.hris.TimeOffRequestType.Raw, Merge.hris.TimeOffRequestType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.RequestTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RequestTypeEnum, core.serialization.string()]); export declare namespace TimeOffRequestType { - type Raw = serializers.hris.RequestTypeEnum.Raw | string; + type Raw = RequestTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/TimeOffRequestUnits.ts b/src/serialization/resources/hris/types/TimeOffRequestUnits.ts index 4bb347f16..25a0660f1 100644 --- a/src/serialization/resources/hris/types/TimeOffRequestUnits.ts +++ b/src/serialization/resources/hris/types/TimeOffRequestUnits.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { UnitsEnum } from "./UnitsEnum"; export const TimeOffRequestUnits: core.serialization.Schema< serializers.hris.TimeOffRequestUnits.Raw, Merge.hris.TimeOffRequestUnits -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.UnitsEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([UnitsEnum, core.serialization.string()]); export declare namespace TimeOffRequestUnits { - type Raw = serializers.hris.UnitsEnum.Raw | string; + type Raw = UnitsEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/TimeOffResponse.ts b/src/serialization/resources/hris/types/TimeOffResponse.ts index 01cee5dd6..c18dfabaa 100644 --- a/src/serialization/resources/hris/types/TimeOffResponse.ts +++ b/src/serialization/resources/hris/types/TimeOffResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TimeOff } from "./TimeOff"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const TimeOffResponse: core.serialization.ObjectSchema< serializers.hris.TimeOffResponse.Raw, Merge.hris.TimeOffResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).hris.TimeOff), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).hris.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).hris.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.DebugModeLog)) - .optional(), + model: TimeOff, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace TimeOffResponse { interface Raw { - model: serializers.hris.TimeOff.Raw; - warnings: serializers.hris.WarningValidationProblem.Raw[]; - errors: serializers.hris.ErrorValidationProblem.Raw[]; - logs?: serializers.hris.DebugModeLog.Raw[] | null; + model: TimeOff.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/TimeOffStatus.ts b/src/serialization/resources/hris/types/TimeOffStatus.ts index ba1649ad2..559f3f05a 100644 --- a/src/serialization/resources/hris/types/TimeOffStatus.ts +++ b/src/serialization/resources/hris/types/TimeOffStatus.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TimeOffStatusEnum } from "./TimeOffStatusEnum"; export const TimeOffStatus: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.TimeOffStatusEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([TimeOffStatusEnum, core.serialization.string()]); export declare namespace TimeOffStatus { - type Raw = serializers.hris.TimeOffStatusEnum.Raw | string; + type Raw = TimeOffStatusEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/TimeOffStatusEnum.ts b/src/serialization/resources/hris/types/TimeOffStatusEnum.ts index 3237fdf9a..ae4891b48 100644 --- a/src/serialization/resources/hris/types/TimeOffStatusEnum.ts +++ b/src/serialization/resources/hris/types/TimeOffStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TimeOffStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/hris/types/TimeOffUnits.ts b/src/serialization/resources/hris/types/TimeOffUnits.ts index 728976dee..4dfb6edbb 100644 --- a/src/serialization/resources/hris/types/TimeOffUnits.ts +++ b/src/serialization/resources/hris/types/TimeOffUnits.ts @@ -2,16 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { UnitsEnum } from "./UnitsEnum"; export const TimeOffUnits: core.serialization.Schema = - core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).hris.UnitsEnum), - core.serialization.string(), - ]); + core.serialization.undiscriminatedUnion([UnitsEnum, core.serialization.string()]); export declare namespace TimeOffUnits { - type Raw = serializers.hris.UnitsEnum.Raw | string; + type Raw = UnitsEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/TimesheetEntry.ts b/src/serialization/resources/hris/types/TimesheetEntry.ts index 205eb5158..b0bdd7c8c 100644 --- a/src/serialization/resources/hris/types/TimesheetEntry.ts +++ b/src/serialization/resources/hris/types/TimesheetEntry.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TimesheetEntry: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/TimesheetEntryRequest.ts b/src/serialization/resources/hris/types/TimesheetEntryRequest.ts index a89874cb6..995a6ad8f 100644 --- a/src/serialization/resources/hris/types/TimesheetEntryRequest.ts +++ b/src/serialization/resources/hris/types/TimesheetEntryRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TimesheetEntryRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/TimesheetEntryResponse.ts b/src/serialization/resources/hris/types/TimesheetEntryResponse.ts index 29c8c4d74..a35c40347 100644 --- a/src/serialization/resources/hris/types/TimesheetEntryResponse.ts +++ b/src/serialization/resources/hris/types/TimesheetEntryResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TimesheetEntry } from "./TimesheetEntry"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const TimesheetEntryResponse: core.serialization.ObjectSchema< serializers.hris.TimesheetEntryResponse.Raw, Merge.hris.TimesheetEntryResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).hris.TimesheetEntry), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).hris.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).hris.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).hris.DebugModeLog)) - .optional(), + model: TimesheetEntry, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace TimesheetEntryResponse { interface Raw { - model: serializers.hris.TimesheetEntry.Raw; - warnings: serializers.hris.WarningValidationProblem.Raw[]; - errors: serializers.hris.ErrorValidationProblem.Raw[]; - logs?: serializers.hris.DebugModeLog.Raw[] | null; + model: TimesheetEntry.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/hris/types/UnitsEnum.ts b/src/serialization/resources/hris/types/UnitsEnum.ts index ca9e0c7e8..5733e14a9 100644 --- a/src/serialization/resources/hris/types/UnitsEnum.ts +++ b/src/serialization/resources/hris/types/UnitsEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const UnitsEnum: core.serialization.Schema = diff --git a/src/serialization/resources/hris/types/ValidationProblemSource.ts b/src/serialization/resources/hris/types/ValidationProblemSource.ts index aab55bc40..cc8523a26 100644 --- a/src/serialization/resources/hris/types/ValidationProblemSource.ts +++ b/src/serialization/resources/hris/types/ValidationProblemSource.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ValidationProblemSource: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/hris/types/WarningValidationProblem.ts b/src/serialization/resources/hris/types/WarningValidationProblem.ts index 5cfd906d0..039b5970e 100644 --- a/src/serialization/resources/hris/types/WarningValidationProblem.ts +++ b/src/serialization/resources/hris/types/WarningValidationProblem.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ValidationProblemSource } from "./ValidationProblemSource"; export const WarningValidationProblem: core.serialization.ObjectSchema< serializers.hris.WarningValidationProblem.Raw, Merge.hris.WarningValidationProblem > = core.serialization.object({ - source: core.serialization - .lazyObject(async () => (await import("../../..")).hris.ValidationProblemSource) - .optional(), + source: ValidationProblemSource.optional(), title: core.serialization.string(), detail: core.serialization.string(), problemType: core.serialization.property("problem_type", core.serialization.string()), @@ -20,7 +19,7 @@ export const WarningValidationProblem: core.serialization.ObjectSchema< export declare namespace WarningValidationProblem { interface Raw { - source?: serializers.hris.ValidationProblemSource.Raw | null; + source?: ValidationProblemSource.Raw | null; title: string; detail: string; problem_type: string; diff --git a/src/serialization/resources/hris/types/WebhookReceiver.ts b/src/serialization/resources/hris/types/WebhookReceiver.ts index 42ddba022..a9addf96a 100644 --- a/src/serialization/resources/hris/types/WebhookReceiver.ts +++ b/src/serialization/resources/hris/types/WebhookReceiver.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const WebhookReceiver: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index 822a7f79d..2f8c56430 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -1,6 +1,6 @@ -export * as filestorage from "./filestorage"; export * as ats from "./ats"; +export * as filestorage from "./filestorage"; export * as crm from "./crm"; -export * as hris from "./hris"; export * as ticketing from "./ticketing"; +export * as hris from "./hris"; export * as accounting from "./accounting"; diff --git a/src/serialization/resources/ticketing/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/serialization/resources/ticketing/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts index 0cbb601b2..fe69f1866 100644 --- a/src/serialization/resources/ticketing/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts +++ b/src/serialization/resources/ticketing/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { RemoteResponse } from "../../../types/RemoteResponse"; export const AsyncPassthroughRetrieveResponse: core.serialization.Schema< serializers.ticketing.AsyncPassthroughRetrieveResponse.Raw, Merge.ticketing.AsyncPassthroughRetrieveResponse -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazyObject(async () => (await import("../../../../..")).ticketing.RemoteResponse), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RemoteResponse, core.serialization.string()]); export declare namespace AsyncPassthroughRetrieveResponse { - type Raw = serializers.ticketing.RemoteResponse.Raw | string; + type Raw = RemoteResponse.Raw | string; } diff --git a/src/serialization/resources/ticketing/resources/attachments/client/requests/TicketingAttachmentEndpointRequest.ts b/src/serialization/resources/ticketing/resources/attachments/client/requests/TicketingAttachmentEndpointRequest.ts index 298679478..df96695e6 100644 --- a/src/serialization/resources/ticketing/resources/attachments/client/requests/TicketingAttachmentEndpointRequest.ts +++ b/src/serialization/resources/ticketing/resources/attachments/client/requests/TicketingAttachmentEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { AttachmentRequest } from "../../../../types/AttachmentRequest"; export const TicketingAttachmentEndpointRequest: core.serialization.Schema< serializers.ticketing.TicketingAttachmentEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).ticketing.AttachmentRequest), + model: AttachmentRequest, }); export declare namespace TicketingAttachmentEndpointRequest { interface Raw { - model: serializers.ticketing.AttachmentRequest.Raw; + model: AttachmentRequest.Raw; } } diff --git a/src/serialization/resources/ticketing/resources/collections/types/CollectionsUsersListRequestExpand.ts b/src/serialization/resources/ticketing/resources/collections/types/CollectionsUsersListRequestExpand.ts index c520f4b74..a3ab77def 100644 --- a/src/serialization/resources/ticketing/resources/collections/types/CollectionsUsersListRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/collections/types/CollectionsUsersListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CollectionsUsersListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/comments/client/requests/CommentEndpointRequest.ts b/src/serialization/resources/ticketing/resources/comments/client/requests/CommentEndpointRequest.ts index 2e457d6dc..f17661dba 100644 --- a/src/serialization/resources/ticketing/resources/comments/client/requests/CommentEndpointRequest.ts +++ b/src/serialization/resources/ticketing/resources/comments/client/requests/CommentEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { CommentRequest } from "../../../../types/CommentRequest"; export const CommentEndpointRequest: core.serialization.Schema< serializers.ticketing.CommentEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).ticketing.CommentRequest), + model: CommentRequest, }); export declare namespace CommentEndpointRequest { interface Raw { - model: serializers.ticketing.CommentRequest.Raw; + model: CommentRequest.Raw; } } diff --git a/src/serialization/resources/ticketing/resources/comments/types/CommentsListRequestExpand.ts b/src/serialization/resources/ticketing/resources/comments/types/CommentsListRequestExpand.ts index cbe6cc4f6..2f29d8bdb 100644 --- a/src/serialization/resources/ticketing/resources/comments/types/CommentsListRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/comments/types/CommentsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CommentsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/comments/types/CommentsRetrieveRequestExpand.ts b/src/serialization/resources/ticketing/resources/comments/types/CommentsRetrieveRequestExpand.ts index a8dcdef89..eb2bae72c 100644 --- a/src/serialization/resources/ticketing/resources/comments/types/CommentsRetrieveRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/comments/types/CommentsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CommentsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/contacts/client/requests/TicketingContactEndpointRequest.ts b/src/serialization/resources/ticketing/resources/contacts/client/requests/TicketingContactEndpointRequest.ts index a48ce943b..69097327c 100644 --- a/src/serialization/resources/ticketing/resources/contacts/client/requests/TicketingContactEndpointRequest.ts +++ b/src/serialization/resources/ticketing/resources/contacts/client/requests/TicketingContactEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { ContactRequest } from "../../../../types/ContactRequest"; export const TicketingContactEndpointRequest: core.serialization.Schema< serializers.ticketing.TicketingContactEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).ticketing.ContactRequest), + model: ContactRequest, }); export declare namespace TicketingContactEndpointRequest { interface Raw { - model: serializers.ticketing.ContactRequest.Raw; + model: ContactRequest.Raw; } } diff --git a/src/serialization/resources/ticketing/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts b/src/serialization/resources/ticketing/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts index 607c0ab1c..4d805eeee 100644 --- a/src/serialization/resources/ticketing/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/serialization/resources/ticketing/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const CreateFieldMappingRequest: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts b/src/serialization/resources/ticketing/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts index 45ebffd77..2d0595264 100644 --- a/src/serialization/resources/ticketing/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts +++ b/src/serialization/resources/ticketing/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const PatchedEditFieldMappingRequest: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/forceResync/client/syncStatusResyncCreate.ts b/src/serialization/resources/ticketing/resources/forceResync/client/syncStatusResyncCreate.ts index cc5436c21..02f0e9045 100644 --- a/src/serialization/resources/ticketing/resources/forceResync/client/syncStatusResyncCreate.ts +++ b/src/serialization/resources/ticketing/resources/forceResync/client/syncStatusResyncCreate.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { SyncStatus } from "../../../types/SyncStatus"; export const Response: core.serialization.Schema< serializers.ticketing.forceResync.syncStatusResyncCreate.Response.Raw, Merge.ticketing.SyncStatus[] -> = core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).ticketing.SyncStatus) -); +> = core.serialization.list(SyncStatus); export declare namespace Response { - type Raw = serializers.ticketing.SyncStatus.Raw[]; + type Raw = SyncStatus.Raw[]; } diff --git a/src/serialization/resources/ticketing/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts b/src/serialization/resources/ticketing/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts index acafebc5e..926e7efa0 100644 --- a/src/serialization/resources/ticketing/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts +++ b/src/serialization/resources/ticketing/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const GenerateRemoteKeyRequest: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/issues/types/IssuesListRequestStatus.ts b/src/serialization/resources/ticketing/resources/issues/types/IssuesListRequestStatus.ts index 90629d5bd..5fe74aa38 100644 --- a/src/serialization/resources/ticketing/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/serialization/resources/ticketing/resources/issues/types/IssuesListRequestStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const IssuesListRequestStatus: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/linkToken/client/requests/EndUserDetailsRequest.ts b/src/serialization/resources/ticketing/resources/linkToken/client/requests/EndUserDetailsRequest.ts index 9c1c23c48..adb0a6293 100644 --- a/src/serialization/resources/ticketing/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/serialization/resources/ticketing/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { CategoriesEnum } from "../../../../types/CategoriesEnum"; +import { CommonModelScopesBodyRequest } from "../../../../types/CommonModelScopesBodyRequest"; +import { IndividualCommonModelScopeDeserializerRequest } from "../../../../types/IndividualCommonModelScopeDeserializerRequest"; +import { LanguageEnum } from "../../../../types/LanguageEnum"; export const EndUserDetailsRequest: core.serialization.Schema< serializers.ticketing.EndUserDetailsRequest.Raw, @@ -13,9 +17,7 @@ export const EndUserDetailsRequest: core.serialization.Schema< endUserEmailAddress: core.serialization.property("end_user_email_address", core.serialization.string()), endUserOrganizationName: core.serialization.property("end_user_organization_name", core.serialization.string()), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string()), - categories: core.serialization.list( - core.serialization.lazy(async () => (await import("../../../../../..")).ticketing.CategoriesEnum) - ), + categories: core.serialization.list(CategoriesEnum), integration: core.serialization.string().optional(), linkExpiryMins: core.serialization.property("link_expiry_mins", core.serialization.number().optional()), shouldCreateMagicLinkUrl: core.serialization.property( @@ -25,34 +27,18 @@ export const EndUserDetailsRequest: core.serialization.Schema< hideAdminMagicLink: core.serialization.property("hide_admin_magic_link", core.serialization.boolean().optional()), commonModels: core.serialization.property( "common_models", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../../../../..")).ticketing.CommonModelScopesBodyRequest - ) - ) - .optional() + core.serialization.list(CommonModelScopesBodyRequest).optional() ), categoryCommonModelScopes: core.serialization.property( "category_common_model_scopes", core.serialization .record( core.serialization.string(), - core.serialization - .list( - core.serialization.lazyObject( - async () => - (await import("../../../../../..")).ticketing - .IndividualCommonModelScopeDeserializerRequest - ) - ) - .optional() + core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional() ) .optional() ), - language: core.serialization - .lazy(async () => (await import("../../../../../..")).ticketing.LanguageEnum) - .optional(), + language: LanguageEnum.optional(), integrationSpecificConfig: core.serialization.property( "integration_specific_config", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -64,17 +50,17 @@ export declare namespace EndUserDetailsRequest { end_user_email_address: string; end_user_organization_name: string; end_user_origin_id: string; - categories: serializers.ticketing.CategoriesEnum.Raw[]; + categories: CategoriesEnum.Raw[]; integration?: string | null; link_expiry_mins?: number | null; should_create_magic_link_url?: boolean | null; hide_admin_magic_link?: boolean | null; - common_models?: serializers.ticketing.CommonModelScopesBodyRequest.Raw[] | null; + common_models?: CommonModelScopesBodyRequest.Raw[] | null; category_common_model_scopes?: Record< string, - serializers.ticketing.IndividualCommonModelScopeDeserializerRequest.Raw[] | null | undefined + IndividualCommonModelScopeDeserializerRequest.Raw[] | null | undefined > | null; - language?: serializers.ticketing.LanguageEnum.Raw | null; + language?: LanguageEnum.Raw | null; integration_specific_config?: Record | null; } } diff --git a/src/serialization/resources/ticketing/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/serialization/resources/ticketing/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index 28e34ca45..c49509a26 100644 --- a/src/serialization/resources/ticketing/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/serialization/resources/ticketing/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const LinkedAccountsListRequestCategory: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/projects/types/ProjectsUsersListRequestExpand.ts b/src/serialization/resources/ticketing/resources/projects/types/ProjectsUsersListRequestExpand.ts index 5648d881c..a6e9f4195 100644 --- a/src/serialization/resources/ticketing/resources/projects/types/ProjectsUsersListRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/projects/types/ProjectsUsersListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ProjectsUsersListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts b/src/serialization/resources/ticketing/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts index 809f0820d..4a439af3a 100644 --- a/src/serialization/resources/ticketing/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts +++ b/src/serialization/resources/ticketing/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const RemoteKeyForRegenerationRequest: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts b/src/serialization/resources/ticketing/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts index 2b6ae367f..bce51fde2 100644 --- a/src/serialization/resources/ticketing/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/ticketing/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { IndividualCommonModelScopeDeserializerRequest } from "../../../../types/IndividualCommonModelScopeDeserializerRequest"; export const LinkedAccountCommonModelScopeDeserializerRequest: core.serialization.Schema< serializers.ticketing.LinkedAccountCommonModelScopeDeserializerRequest.Raw, @@ -12,16 +13,12 @@ export const LinkedAccountCommonModelScopeDeserializerRequest: core.serializatio > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list( - core.serialization.lazyObject( - async () => (await import("../../../../../..")).ticketing.IndividualCommonModelScopeDeserializerRequest - ) - ) + core.serialization.list(IndividualCommonModelScopeDeserializerRequest) ), }); export declare namespace LinkedAccountCommonModelScopeDeserializerRequest { interface Raw { - common_models: serializers.ticketing.IndividualCommonModelScopeDeserializerRequest.Raw[]; + common_models: IndividualCommonModelScopeDeserializerRequest.Raw[]; } } diff --git a/src/serialization/resources/ticketing/resources/tickets/client/requests/PatchedTicketEndpointRequest.ts b/src/serialization/resources/ticketing/resources/tickets/client/requests/PatchedTicketEndpointRequest.ts index 7006ec074..a077cdaff 100644 --- a/src/serialization/resources/ticketing/resources/tickets/client/requests/PatchedTicketEndpointRequest.ts +++ b/src/serialization/resources/ticketing/resources/tickets/client/requests/PatchedTicketEndpointRequest.ts @@ -2,21 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { PatchedTicketRequest } from "../../../../types/PatchedTicketRequest"; export const PatchedTicketEndpointRequest: core.serialization.Schema< serializers.ticketing.PatchedTicketEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject( - async () => (await import("../../../../../..")).ticketing.PatchedTicketRequest - ), + model: PatchedTicketRequest, }); export declare namespace PatchedTicketEndpointRequest { interface Raw { - model: serializers.ticketing.PatchedTicketRequest.Raw; + model: PatchedTicketRequest.Raw; } } diff --git a/src/serialization/resources/ticketing/resources/tickets/client/requests/TicketEndpointRequest.ts b/src/serialization/resources/ticketing/resources/tickets/client/requests/TicketEndpointRequest.ts index f16c88953..1e202f7d2 100644 --- a/src/serialization/resources/ticketing/resources/tickets/client/requests/TicketEndpointRequest.ts +++ b/src/serialization/resources/ticketing/resources/tickets/client/requests/TicketEndpointRequest.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { TicketRequest } from "../../../../types/TicketRequest"; export const TicketEndpointRequest: core.serialization.Schema< serializers.ticketing.TicketEndpointRequest.Raw, Omit > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../../../../..")).ticketing.TicketRequest), + model: TicketRequest, }); export declare namespace TicketEndpointRequest { interface Raw { - model: serializers.ticketing.TicketRequest.Raw; + model: TicketRequest.Raw; } } diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsCollaboratorsListRequestExpand.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsCollaboratorsListRequestExpand.ts index bfef8f297..8c57c5b60 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsCollaboratorsListRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsCollaboratorsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TicketsCollaboratorsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestExpand.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestExpand.ts index e98bb3038..394b54d88 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TicketsListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestPriority.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestPriority.ts index 1a829a33f..688e6f2fe 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestPriority.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestPriority.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TicketsListRequestPriority: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestRemoteFields.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestRemoteFields.ts index afc02b492..00280e0a4 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestRemoteFields.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TicketsListRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestShowEnumOrigins.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestShowEnumOrigins.ts index 4db4e883d..3e9af403d 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TicketsListRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestStatus.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestStatus.ts index 214654aaf..7783d01c0 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestStatus.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TicketsListRequestStatus: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestExpand.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestExpand.ts index 3bce65c1e..4ea9b598d 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TicketsRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestRemoteFields.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestRemoteFields.ts index f25603828..b14cafc4e 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestRemoteFields.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TicketsRetrieveRequestRemoteFields: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestShowEnumOrigins.ts index a78c67b28..782aed839 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestShowEnumOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const TicketsRetrieveRequestShowEnumOrigins: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/users/types/UsersListRequestExpand.ts b/src/serialization/resources/ticketing/resources/users/types/UsersListRequestExpand.ts index cce3771e6..f1901b407 100644 --- a/src/serialization/resources/ticketing/resources/users/types/UsersListRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/users/types/UsersListRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const UsersListRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/users/types/UsersRetrieveRequestExpand.ts b/src/serialization/resources/ticketing/resources/users/types/UsersRetrieveRequestExpand.ts index c3f830f86..aca8c67ae 100644 --- a/src/serialization/resources/ticketing/resources/users/types/UsersRetrieveRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/users/types/UsersRetrieveRequestExpand.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const UsersRetrieveRequestExpand: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/resources/webhookReceivers/client/list.ts b/src/serialization/resources/ticketing/resources/webhookReceivers/client/list.ts index 2bf382d54..a0437330d 100644 --- a/src/serialization/resources/ticketing/resources/webhookReceivers/client/list.ts +++ b/src/serialization/resources/ticketing/resources/webhookReceivers/client/list.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Merge from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Merge from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { WebhookReceiver } from "../../../types/WebhookReceiver"; export const Response: core.serialization.Schema< serializers.ticketing.webhookReceivers.list.Response.Raw, Merge.ticketing.WebhookReceiver[] -> = core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).ticketing.WebhookReceiver) -); +> = core.serialization.list(WebhookReceiver); export declare namespace Response { - type Raw = serializers.ticketing.WebhookReceiver.Raw[]; + type Raw = WebhookReceiver.Raw[]; } diff --git a/src/serialization/resources/ticketing/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts b/src/serialization/resources/ticketing/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts index a4fd0e8b9..03ecaaf1c 100644 --- a/src/serialization/resources/ticketing/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts +++ b/src/serialization/resources/ticketing/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Merge from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Merge from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const WebhookReceiverRequest: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/AccessLevelEnum.ts b/src/serialization/resources/ticketing/types/AccessLevelEnum.ts index 225bf871f..2e64ab0ac 100644 --- a/src/serialization/resources/ticketing/types/AccessLevelEnum.ts +++ b/src/serialization/resources/ticketing/types/AccessLevelEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AccessLevelEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/Account.ts b/src/serialization/resources/ticketing/types/Account.ts index 8b5055e03..685df479d 100644 --- a/src/serialization/resources/ticketing/types/Account.ts +++ b/src/serialization/resources/ticketing/types/Account.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; export const Account: core.serialization.ObjectSchema = core.serialization.object({ @@ -19,12 +20,7 @@ export const Account: core.serialization.ObjectSchema (await import("../../..")).ticketing.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Account { @@ -37,6 +33,6 @@ export declare namespace Account { domains?: (string | null | undefined)[] | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ticketing.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/AccountDetails.ts b/src/serialization/resources/ticketing/types/AccountDetails.ts index 1482a7a5f..c6f8d4066 100644 --- a/src/serialization/resources/ticketing/types/AccountDetails.ts +++ b/src/serialization/resources/ticketing/types/AccountDetails.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoryEnum } from "./CategoryEnum"; export const AccountDetails: core.serialization.ObjectSchema< serializers.ticketing.AccountDetails.Raw, @@ -13,7 +14,7 @@ export const AccountDetails: core.serialization.ObjectSchema< id: core.serialization.string().optional(), integration: core.serialization.string().optional(), integrationSlug: core.serialization.property("integration_slug", core.serialization.string().optional()), - category: core.serialization.lazy(async () => (await import("../../..")).ticketing.CategoryEnum).optional(), + category: CategoryEnum.optional(), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property( "end_user_organization_name", @@ -32,7 +33,7 @@ export declare namespace AccountDetails { id?: string | null; integration?: string | null; integration_slug?: string | null; - category?: serializers.ticketing.CategoryEnum.Raw | null; + category?: CategoryEnum.Raw | null; end_user_origin_id?: string | null; end_user_organization_name?: string | null; end_user_email_address?: string | null; diff --git a/src/serialization/resources/ticketing/types/AccountDetailsAndActions.ts b/src/serialization/resources/ticketing/types/AccountDetailsAndActions.ts index 100cbde77..448953e35 100644 --- a/src/serialization/resources/ticketing/types/AccountDetailsAndActions.ts +++ b/src/serialization/resources/ticketing/types/AccountDetailsAndActions.ts @@ -2,19 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoryEnum } from "./CategoryEnum"; +import { AccountDetailsAndActionsStatusEnum } from "./AccountDetailsAndActionsStatusEnum"; +import { AccountDetailsAndActionsIntegration } from "./AccountDetailsAndActionsIntegration"; export const AccountDetailsAndActions: core.serialization.ObjectSchema< serializers.ticketing.AccountDetailsAndActions.Raw, Merge.ticketing.AccountDetailsAndActions > = core.serialization.object({ id: core.serialization.string(), - category: core.serialization.lazy(async () => (await import("../../..")).ticketing.CategoryEnum).optional(), - status: core.serialization.lazy( - async () => (await import("../../..")).ticketing.AccountDetailsAndActionsStatusEnum - ), + category: CategoryEnum.optional(), + status: AccountDetailsAndActionsStatusEnum, statusDetail: core.serialization.property("status_detail", core.serialization.string().optional()), endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property("end_user_organization_name", core.serialization.string()), @@ -22,9 +23,7 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< subdomain: core.serialization.string().optional(), webhookListenerUrl: core.serialization.property("webhook_listener_url", core.serialization.string()), isDuplicate: core.serialization.property("is_duplicate", core.serialization.boolean().optional()), - integration: core.serialization - .lazyObject(async () => (await import("../../..")).ticketing.AccountDetailsAndActionsIntegration) - .optional(), + integration: AccountDetailsAndActionsIntegration.optional(), accountType: core.serialization.property("account_type", core.serialization.string()), completedAt: core.serialization.property("completed_at", core.serialization.date()), }); @@ -32,8 +31,8 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< export declare namespace AccountDetailsAndActions { interface Raw { id: string; - category?: serializers.ticketing.CategoryEnum.Raw | null; - status: serializers.ticketing.AccountDetailsAndActionsStatusEnum.Raw; + category?: CategoryEnum.Raw | null; + status: AccountDetailsAndActionsStatusEnum.Raw; status_detail?: string | null; end_user_origin_id?: string | null; end_user_organization_name: string; @@ -41,7 +40,7 @@ export declare namespace AccountDetailsAndActions { subdomain?: string | null; webhook_listener_url: string; is_duplicate?: boolean | null; - integration?: serializers.ticketing.AccountDetailsAndActionsIntegration.Raw | null; + integration?: AccountDetailsAndActionsIntegration.Raw | null; account_type: string; completed_at: string; } diff --git a/src/serialization/resources/ticketing/types/AccountDetailsAndActionsIntegration.ts b/src/serialization/resources/ticketing/types/AccountDetailsAndActionsIntegration.ts index ebef96905..c4099576e 100644 --- a/src/serialization/resources/ticketing/types/AccountDetailsAndActionsIntegration.ts +++ b/src/serialization/resources/ticketing/types/AccountDetailsAndActionsIntegration.ts @@ -2,18 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoriesEnum } from "./CategoriesEnum"; +import { ModelOperation } from "./ModelOperation"; export const AccountDetailsAndActionsIntegration: core.serialization.ObjectSchema< serializers.ticketing.AccountDetailsAndActionsIntegration.Raw, Merge.ticketing.AccountDetailsAndActionsIntegration > = core.serialization.object({ name: core.serialization.string(), - categories: core.serialization.list( - core.serialization.lazy(async () => (await import("../../..")).ticketing.CategoriesEnum) - ), + categories: core.serialization.list(CategoriesEnum), image: core.serialization.string().optional(), squareImage: core.serialization.property("square_image", core.serialization.string().optional()), color: core.serialization.string(), @@ -21,21 +21,19 @@ export const AccountDetailsAndActionsIntegration: core.serialization.ObjectSchem passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ModelOperation)) - .optional() + core.serialization.list(ModelOperation).optional() ), }); export declare namespace AccountDetailsAndActionsIntegration { interface Raw { name: string; - categories: serializers.ticketing.CategoriesEnum.Raw[]; + categories: CategoriesEnum.Raw[]; image?: string | null; square_image?: string | null; color: string; slug: string; passthrough_available: boolean; - available_model_operations?: serializers.ticketing.ModelOperation.Raw[] | null; + available_model_operations?: ModelOperation.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/AccountDetailsAndActionsStatusEnum.ts b/src/serialization/resources/ticketing/types/AccountDetailsAndActionsStatusEnum.ts index 1f17c8e59..4f57c553f 100644 --- a/src/serialization/resources/ticketing/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/serialization/resources/ticketing/types/AccountDetailsAndActionsStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AccountDetailsAndActionsStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/AccountIntegration.ts b/src/serialization/resources/ticketing/types/AccountIntegration.ts index b17affe68..2d8bfdd3b 100644 --- a/src/serialization/resources/ticketing/types/AccountIntegration.ts +++ b/src/serialization/resources/ticketing/types/AccountIntegration.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CategoriesEnum } from "./CategoriesEnum"; export const AccountIntegration: core.serialization.ObjectSchema< serializers.ticketing.AccountIntegration.Raw, @@ -12,9 +13,7 @@ export const AccountIntegration: core.serialization.ObjectSchema< > = core.serialization.object({ name: core.serialization.string(), abbreviatedName: core.serialization.property("abbreviated_name", core.serialization.string().optional()), - categories: core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).ticketing.CategoriesEnum)) - .optional(), + categories: core.serialization.list(CategoriesEnum).optional(), image: core.serialization.string().optional(), squareImage: core.serialization.property("square_image", core.serialization.string().optional()), color: core.serialization.string().optional(), @@ -37,7 +36,7 @@ export declare namespace AccountIntegration { interface Raw { name: string; abbreviated_name?: string | null; - categories?: serializers.ticketing.CategoriesEnum.Raw[] | null; + categories?: CategoriesEnum.Raw[] | null; image?: string | null; square_image?: string | null; color?: string | null; diff --git a/src/serialization/resources/ticketing/types/AccountToken.ts b/src/serialization/resources/ticketing/types/AccountToken.ts index 57627bb25..288167e01 100644 --- a/src/serialization/resources/ticketing/types/AccountToken.ts +++ b/src/serialization/resources/ticketing/types/AccountToken.ts @@ -2,21 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountIntegration } from "./AccountIntegration"; export const AccountToken: core.serialization.ObjectSchema< serializers.ticketing.AccountToken.Raw, Merge.ticketing.AccountToken > = core.serialization.object({ accountToken: core.serialization.property("account_token", core.serialization.string()), - integration: core.serialization.lazyObject(async () => (await import("../../..")).ticketing.AccountIntegration), + integration: AccountIntegration, }); export declare namespace AccountToken { interface Raw { account_token: string; - integration: serializers.ticketing.AccountIntegration.Raw; + integration: AccountIntegration.Raw; } } diff --git a/src/serialization/resources/ticketing/types/AdvancedMetadata.ts b/src/serialization/resources/ticketing/types/AdvancedMetadata.ts index 4234fa6eb..3483c475a 100644 --- a/src/serialization/resources/ticketing/types/AdvancedMetadata.ts +++ b/src/serialization/resources/ticketing/types/AdvancedMetadata.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AdvancedMetadata: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/AsyncPassthroughReciept.ts b/src/serialization/resources/ticketing/types/AsyncPassthroughReciept.ts index b757cfc11..d2c7cb047 100644 --- a/src/serialization/resources/ticketing/types/AsyncPassthroughReciept.ts +++ b/src/serialization/resources/ticketing/types/AsyncPassthroughReciept.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AsyncPassthroughReciept: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/Attachment.ts b/src/serialization/resources/ticketing/types/Attachment.ts index 4ef6914da..2986fd38e 100644 --- a/src/serialization/resources/ticketing/types/Attachment.ts +++ b/src/serialization/resources/ticketing/types/Attachment.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; export const Attachment: core.serialization.ObjectSchema< serializers.ticketing.Attachment.Raw, @@ -15,7 +16,7 @@ export const Attachment: core.serialization.ObjectSchema< createdAt: core.serialization.property("created_at", core.serialization.date().optional()), modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), fileName: core.serialization.property("file_name", core.serialization.string().optional()), - ticket: core.serialization.lazy(async () => (await import("../../..")).ticketing.AttachmentTicket).optional(), + ticket: core.serialization.lazy(() => serializers.ticketing.AttachmentTicket).optional(), fileUrl: core.serialization.property("file_url", core.serialization.string().optional()), contentType: core.serialization.property("content_type", core.serialization.string().optional()), uploadedBy: core.serialization.property("uploaded_by", core.serialization.string().optional()), @@ -25,12 +26,7 @@ export const Attachment: core.serialization.ObjectSchema< "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Attachment { @@ -47,6 +43,6 @@ export declare namespace Attachment { remote_created_at?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ticketing.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/AttachmentRequest.ts b/src/serialization/resources/ticketing/types/AttachmentRequest.ts index faf12b734..6cd67d6cd 100644 --- a/src/serialization/resources/ticketing/types/AttachmentRequest.ts +++ b/src/serialization/resources/ticketing/types/AttachmentRequest.ts @@ -2,18 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AttachmentRequestTicket } from "./AttachmentRequestTicket"; export const AttachmentRequest: core.serialization.ObjectSchema< serializers.ticketing.AttachmentRequest.Raw, Merge.ticketing.AttachmentRequest > = core.serialization.object({ fileName: core.serialization.property("file_name", core.serialization.string().optional()), - ticket: core.serialization - .lazy(async () => (await import("../../..")).ticketing.AttachmentRequestTicket) - .optional(), + ticket: AttachmentRequestTicket.optional(), fileUrl: core.serialization.property("file_url", core.serialization.string().optional()), contentType: core.serialization.property("content_type", core.serialization.string().optional()), uploadedBy: core.serialization.property("uploaded_by", core.serialization.string().optional()), @@ -30,7 +29,7 @@ export const AttachmentRequest: core.serialization.ObjectSchema< export declare namespace AttachmentRequest { interface Raw { file_name?: string | null; - ticket?: serializers.ticketing.AttachmentRequestTicket.Raw | null; + ticket?: AttachmentRequestTicket.Raw | null; file_url?: string | null; content_type?: string | null; uploaded_by?: string | null; diff --git a/src/serialization/resources/ticketing/types/AttachmentRequestTicket.ts b/src/serialization/resources/ticketing/types/AttachmentRequestTicket.ts index 118b4e665..f85256b79 100644 --- a/src/serialization/resources/ticketing/types/AttachmentRequestTicket.ts +++ b/src/serialization/resources/ticketing/types/AttachmentRequestTicket.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AttachmentRequestTicket: core.serialization.Schema< @@ -11,7 +11,7 @@ export const AttachmentRequestTicket: core.serialization.Schema< Merge.ticketing.AttachmentRequestTicket > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Ticket), + core.serialization.lazyObject(() => serializers.ticketing.Ticket), ]); export declare namespace AttachmentRequestTicket { diff --git a/src/serialization/resources/ticketing/types/AttachmentTicket.ts b/src/serialization/resources/ticketing/types/AttachmentTicket.ts index bbfdc690e..f7cd27832 100644 --- a/src/serialization/resources/ticketing/types/AttachmentTicket.ts +++ b/src/serialization/resources/ticketing/types/AttachmentTicket.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const AttachmentTicket: core.serialization.Schema< @@ -11,7 +11,7 @@ export const AttachmentTicket: core.serialization.Schema< Merge.ticketing.AttachmentTicket > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Ticket), + core.serialization.lazyObject(() => serializers.ticketing.Ticket), ]); export declare namespace AttachmentTicket { diff --git a/src/serialization/resources/ticketing/types/AuditLogEvent.ts b/src/serialization/resources/ticketing/types/AuditLogEvent.ts index 33372cc0f..31f66b52c 100644 --- a/src/serialization/resources/ticketing/types/AuditLogEvent.ts +++ b/src/serialization/resources/ticketing/types/AuditLogEvent.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AuditLogEventRole } from "./AuditLogEventRole"; +import { AuditLogEventEventType } from "./AuditLogEventEventType"; export const AuditLogEvent: core.serialization.ObjectSchema< serializers.ticketing.AuditLogEvent.Raw, @@ -13,12 +15,9 @@ export const AuditLogEvent: core.serialization.ObjectSchema< id: core.serialization.string().optional(), userName: core.serialization.property("user_name", core.serialization.string().optional()), userEmail: core.serialization.property("user_email", core.serialization.string().optional()), - role: core.serialization.lazy(async () => (await import("../../..")).ticketing.AuditLogEventRole), + role: AuditLogEventRole, ipAddress: core.serialization.property("ip_address", core.serialization.string()), - eventType: core.serialization.property( - "event_type", - core.serialization.lazy(async () => (await import("../../..")).ticketing.AuditLogEventEventType) - ), + eventType: core.serialization.property("event_type", AuditLogEventEventType), eventDescription: core.serialization.property("event_description", core.serialization.string()), createdAt: core.serialization.property("created_at", core.serialization.date().optional()), }); @@ -28,9 +27,9 @@ export declare namespace AuditLogEvent { id?: string | null; user_name?: string | null; user_email?: string | null; - role: serializers.ticketing.AuditLogEventRole.Raw; + role: AuditLogEventRole.Raw; ip_address: string; - event_type: serializers.ticketing.AuditLogEventEventType.Raw; + event_type: AuditLogEventEventType.Raw; event_description: string; created_at?: string | null; } diff --git a/src/serialization/resources/ticketing/types/AuditLogEventEventType.ts b/src/serialization/resources/ticketing/types/AuditLogEventEventType.ts index f3b4767aa..cb117a0f4 100644 --- a/src/serialization/resources/ticketing/types/AuditLogEventEventType.ts +++ b/src/serialization/resources/ticketing/types/AuditLogEventEventType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EventTypeEnum } from "./EventTypeEnum"; export const AuditLogEventEventType: core.serialization.Schema< serializers.ticketing.AuditLogEventEventType.Raw, Merge.ticketing.AuditLogEventEventType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ticketing.EventTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EventTypeEnum, core.serialization.string()]); export declare namespace AuditLogEventEventType { - type Raw = serializers.ticketing.EventTypeEnum.Raw | string; + type Raw = EventTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/AuditLogEventRole.ts b/src/serialization/resources/ticketing/types/AuditLogEventRole.ts index 18a86f59f..8a9cc35ec 100644 --- a/src/serialization/resources/ticketing/types/AuditLogEventRole.ts +++ b/src/serialization/resources/ticketing/types/AuditLogEventRole.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RoleEnum } from "./RoleEnum"; export const AuditLogEventRole: core.serialization.Schema< serializers.ticketing.AuditLogEventRole.Raw, Merge.ticketing.AuditLogEventRole -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ticketing.RoleEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([RoleEnum, core.serialization.string()]); export declare namespace AuditLogEventRole { - type Raw = serializers.ticketing.RoleEnum.Raw | string; + type Raw = RoleEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/AvailableActions.ts b/src/serialization/resources/ticketing/types/AvailableActions.ts index e8051046e..29dd7e8f0 100644 --- a/src/serialization/resources/ticketing/types/AvailableActions.ts +++ b/src/serialization/resources/ticketing/types/AvailableActions.ts @@ -2,28 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountIntegration } from "./AccountIntegration"; +import { ModelOperation } from "./ModelOperation"; export const AvailableActions: core.serialization.ObjectSchema< serializers.ticketing.AvailableActions.Raw, Merge.ticketing.AvailableActions > = core.serialization.object({ - integration: core.serialization.lazyObject(async () => (await import("../../..")).ticketing.AccountIntegration), + integration: AccountIntegration, passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ModelOperation)) - .optional() + core.serialization.list(ModelOperation).optional() ), }); export declare namespace AvailableActions { interface Raw { - integration: serializers.ticketing.AccountIntegration.Raw; + integration: AccountIntegration.Raw; passthrough_available: boolean; - available_model_operations?: serializers.ticketing.ModelOperation.Raw[] | null; + available_model_operations?: ModelOperation.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/CategoriesEnum.ts b/src/serialization/resources/ticketing/types/CategoriesEnum.ts index a1a2e74ce..a65169f35 100644 --- a/src/serialization/resources/ticketing/types/CategoriesEnum.ts +++ b/src/serialization/resources/ticketing/types/CategoriesEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CategoriesEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/CategoryEnum.ts b/src/serialization/resources/ticketing/types/CategoryEnum.ts index d2b1a8925..2465d562b 100644 --- a/src/serialization/resources/ticketing/types/CategoryEnum.ts +++ b/src/serialization/resources/ticketing/types/CategoryEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CategoryEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/Collection.ts b/src/serialization/resources/ticketing/types/Collection.ts index d45c69d82..ab4d3dfc9 100644 --- a/src/serialization/resources/ticketing/types/Collection.ts +++ b/src/serialization/resources/ticketing/types/Collection.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CollectionCollectionType } from "./CollectionCollectionType"; +import { CollectionAccessLevel } from "./CollectionAccessLevel"; +import { RemoteData } from "./RemoteData"; export const Collection: core.serialization.ObjectSchema< serializers.ticketing.Collection.Raw, @@ -16,29 +19,18 @@ export const Collection: core.serialization.ObjectSchema< modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), name: core.serialization.string().optional(), description: core.serialization.string().optional(), - collectionType: core.serialization.property( - "collection_type", - core.serialization.lazy(async () => (await import("../../..")).ticketing.CollectionCollectionType).optional() - ), + collectionType: core.serialization.property("collection_type", CollectionCollectionType.optional()), parentCollection: core.serialization.property( "parent_collection", - core.serialization.lazy(async () => (await import("../../..")).ticketing.CollectionParentCollection).optional() + core.serialization.lazy(() => serializers.ticketing.CollectionParentCollection).optional() ), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), - accessLevel: core.serialization.property( - "access_level", - core.serialization.lazy(async () => (await import("../../..")).ticketing.CollectionAccessLevel).optional() - ), + accessLevel: core.serialization.property("access_level", CollectionAccessLevel.optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Collection { @@ -49,11 +41,11 @@ export declare namespace Collection { modified_at?: string | null; name?: string | null; description?: string | null; - collection_type?: serializers.ticketing.CollectionCollectionType.Raw | null; + collection_type?: CollectionCollectionType.Raw | null; parent_collection?: serializers.ticketing.CollectionParentCollection.Raw | null; remote_was_deleted?: boolean | null; - access_level?: serializers.ticketing.CollectionAccessLevel.Raw | null; + access_level?: CollectionAccessLevel.Raw | null; field_mappings?: Record | null; - remote_data?: serializers.ticketing.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/CollectionAccessLevel.ts b/src/serialization/resources/ticketing/types/CollectionAccessLevel.ts index 3b4834106..284d96924 100644 --- a/src/serialization/resources/ticketing/types/CollectionAccessLevel.ts +++ b/src/serialization/resources/ticketing/types/CollectionAccessLevel.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccessLevelEnum } from "./AccessLevelEnum"; export const CollectionAccessLevel: core.serialization.Schema< serializers.ticketing.CollectionAccessLevel.Raw, Merge.ticketing.CollectionAccessLevel -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ticketing.AccessLevelEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([AccessLevelEnum, core.serialization.string()]); export declare namespace CollectionAccessLevel { - type Raw = serializers.ticketing.AccessLevelEnum.Raw | string; + type Raw = AccessLevelEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/CollectionCollectionType.ts b/src/serialization/resources/ticketing/types/CollectionCollectionType.ts index ecea5cd4b..3b2d21d58 100644 --- a/src/serialization/resources/ticketing/types/CollectionCollectionType.ts +++ b/src/serialization/resources/ticketing/types/CollectionCollectionType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CollectionTypeEnum } from "./CollectionTypeEnum"; export const CollectionCollectionType: core.serialization.Schema< serializers.ticketing.CollectionCollectionType.Raw, Merge.ticketing.CollectionCollectionType -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ticketing.CollectionTypeEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([CollectionTypeEnum, core.serialization.string()]); export declare namespace CollectionCollectionType { - type Raw = serializers.ticketing.CollectionTypeEnum.Raw | string; + type Raw = CollectionTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/CollectionParentCollection.ts b/src/serialization/resources/ticketing/types/CollectionParentCollection.ts index 062537ef9..92e47ce9b 100644 --- a/src/serialization/resources/ticketing/types/CollectionParentCollection.ts +++ b/src/serialization/resources/ticketing/types/CollectionParentCollection.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CollectionParentCollection: core.serialization.Schema< @@ -11,7 +11,7 @@ export const CollectionParentCollection: core.serialization.Schema< Merge.ticketing.CollectionParentCollection > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Collection), + core.serialization.lazyObject(() => serializers.ticketing.Collection), ]); export declare namespace CollectionParentCollection { diff --git a/src/serialization/resources/ticketing/types/CollectionTypeEnum.ts b/src/serialization/resources/ticketing/types/CollectionTypeEnum.ts index b5b45d5f4..4184b2820 100644 --- a/src/serialization/resources/ticketing/types/CollectionTypeEnum.ts +++ b/src/serialization/resources/ticketing/types/CollectionTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CollectionTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/Comment.ts b/src/serialization/resources/ticketing/types/Comment.ts index d86323dd6..e53fe52f4 100644 --- a/src/serialization/resources/ticketing/types/Comment.ts +++ b/src/serialization/resources/ticketing/types/Comment.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CommentUser } from "./CommentUser"; +import { CommentContact } from "./CommentContact"; +import { CommentTicket } from "./CommentTicket"; +import { RemoteData } from "./RemoteData"; export const Comment: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,11 +16,11 @@ export const Comment: core.serialization.ObjectSchema (await import("../../..")).ticketing.CommentUser).optional(), - contact: core.serialization.lazy(async () => (await import("../../..")).ticketing.CommentContact).optional(), + user: CommentUser.optional(), + contact: CommentContact.optional(), body: core.serialization.string().optional(), htmlBody: core.serialization.property("html_body", core.serialization.string().optional()), - ticket: core.serialization.lazy(async () => (await import("../../..")).ticketing.CommentTicket).optional(), + ticket: CommentTicket.optional(), isPrivate: core.serialization.property("is_private", core.serialization.boolean().optional()), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), @@ -24,12 +28,7 @@ export const Comment: core.serialization.ObjectSchema (await import("../../..")).ticketing.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Comment { @@ -38,15 +37,15 @@ export declare namespace Comment { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; - user?: serializers.ticketing.CommentUser.Raw | null; - contact?: serializers.ticketing.CommentContact.Raw | null; + user?: CommentUser.Raw | null; + contact?: CommentContact.Raw | null; body?: string | null; html_body?: string | null; - ticket?: serializers.ticketing.CommentTicket.Raw | null; + ticket?: CommentTicket.Raw | null; is_private?: boolean | null; remote_created_at?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ticketing.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/CommentContact.ts b/src/serialization/resources/ticketing/types/CommentContact.ts index f9e120715..e4d14873d 100644 --- a/src/serialization/resources/ticketing/types/CommentContact.ts +++ b/src/serialization/resources/ticketing/types/CommentContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const CommentContact: core.serialization.Schema< serializers.ticketing.CommentContact.Raw, Merge.ticketing.CommentContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace CommentContact { - type Raw = string | serializers.ticketing.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/ticketing/types/CommentRequest.ts b/src/serialization/resources/ticketing/types/CommentRequest.ts index a8144b73e..eff499dd5 100644 --- a/src/serialization/resources/ticketing/types/CommentRequest.ts +++ b/src/serialization/resources/ticketing/types/CommentRequest.ts @@ -2,19 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { CommentRequestUser } from "./CommentRequestUser"; +import { CommentRequestContact } from "./CommentRequestContact"; +import { CommentRequestTicket } from "./CommentRequestTicket"; export const CommentRequest: core.serialization.ObjectSchema< serializers.ticketing.CommentRequest.Raw, Merge.ticketing.CommentRequest > = core.serialization.object({ - user: core.serialization.lazy(async () => (await import("../../..")).ticketing.CommentRequestUser).optional(), - contact: core.serialization.lazy(async () => (await import("../../..")).ticketing.CommentRequestContact).optional(), + user: CommentRequestUser.optional(), + contact: CommentRequestContact.optional(), body: core.serialization.string().optional(), htmlBody: core.serialization.property("html_body", core.serialization.string().optional()), - ticket: core.serialization.lazy(async () => (await import("../../..")).ticketing.CommentRequestTicket).optional(), + ticket: CommentRequestTicket.optional(), isPrivate: core.serialization.property("is_private", core.serialization.boolean().optional()), integrationParams: core.serialization.property( "integration_params", @@ -28,11 +31,11 @@ export const CommentRequest: core.serialization.ObjectSchema< export declare namespace CommentRequest { interface Raw { - user?: serializers.ticketing.CommentRequestUser.Raw | null; - contact?: serializers.ticketing.CommentRequestContact.Raw | null; + user?: CommentRequestUser.Raw | null; + contact?: CommentRequestContact.Raw | null; body?: string | null; html_body?: string | null; - ticket?: serializers.ticketing.CommentRequestTicket.Raw | null; + ticket?: CommentRequestTicket.Raw | null; is_private?: boolean | null; integration_params?: Record | null; linked_account_params?: Record | null; diff --git a/src/serialization/resources/ticketing/types/CommentRequestContact.ts b/src/serialization/resources/ticketing/types/CommentRequestContact.ts index b2619206f..1439974f4 100644 --- a/src/serialization/resources/ticketing/types/CommentRequestContact.ts +++ b/src/serialization/resources/ticketing/types/CommentRequestContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const CommentRequestContact: core.serialization.Schema< serializers.ticketing.CommentRequestContact.Raw, Merge.ticketing.CommentRequestContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace CommentRequestContact { - type Raw = string | serializers.ticketing.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/ticketing/types/CommentRequestTicket.ts b/src/serialization/resources/ticketing/types/CommentRequestTicket.ts index 8df2b6feb..90b5b1dc1 100644 --- a/src/serialization/resources/ticketing/types/CommentRequestTicket.ts +++ b/src/serialization/resources/ticketing/types/CommentRequestTicket.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CommentRequestTicket: core.serialization.Schema< @@ -11,7 +11,7 @@ export const CommentRequestTicket: core.serialization.Schema< Merge.ticketing.CommentRequestTicket > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Ticket), + core.serialization.lazyObject(() => serializers.ticketing.Ticket), ]); export declare namespace CommentRequestTicket { diff --git a/src/serialization/resources/ticketing/types/CommentRequestUser.ts b/src/serialization/resources/ticketing/types/CommentRequestUser.ts index 044746544..7fc9fedaa 100644 --- a/src/serialization/resources/ticketing/types/CommentRequestUser.ts +++ b/src/serialization/resources/ticketing/types/CommentRequestUser.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const CommentRequestUser: core.serialization.Schema< serializers.ticketing.CommentRequestUser.Raw, Merge.ticketing.CommentRequestUser -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace CommentRequestUser { - type Raw = string | serializers.ticketing.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/ticketing/types/CommentResponse.ts b/src/serialization/resources/ticketing/types/CommentResponse.ts index e49847492..7ac71b74a 100644 --- a/src/serialization/resources/ticketing/types/CommentResponse.ts +++ b/src/serialization/resources/ticketing/types/CommentResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Comment } from "./Comment"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const CommentResponse: core.serialization.ObjectSchema< serializers.ticketing.CommentResponse.Raw, Merge.ticketing.CommentResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Comment), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.DebugModeLog)) - .optional(), + model: Comment, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace CommentResponse { interface Raw { - model: serializers.ticketing.Comment.Raw; - warnings: serializers.ticketing.WarningValidationProblem.Raw[]; - errors: serializers.ticketing.ErrorValidationProblem.Raw[]; - logs?: serializers.ticketing.DebugModeLog.Raw[] | null; + model: Comment.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/CommentTicket.ts b/src/serialization/resources/ticketing/types/CommentTicket.ts index 7054d7e9e..1ac220246 100644 --- a/src/serialization/resources/ticketing/types/CommentTicket.ts +++ b/src/serialization/resources/ticketing/types/CommentTicket.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const CommentTicket: core.serialization.Schema< @@ -11,7 +11,7 @@ export const CommentTicket: core.serialization.Schema< Merge.ticketing.CommentTicket > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Ticket), + core.serialization.lazyObject(() => serializers.ticketing.Ticket), ]); export declare namespace CommentTicket { diff --git a/src/serialization/resources/ticketing/types/CommentUser.ts b/src/serialization/resources/ticketing/types/CommentUser.ts index a8d20cabc..74792599d 100644 --- a/src/serialization/resources/ticketing/types/CommentUser.ts +++ b/src/serialization/resources/ticketing/types/CommentUser.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const CommentUser: core.serialization.Schema< serializers.ticketing.CommentUser.Raw, Merge.ticketing.CommentUser -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace CommentUser { - type Raw = string | serializers.ticketing.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/ticketing/types/CommonModelScopeApi.ts b/src/serialization/resources/ticketing/types/CommonModelScopeApi.ts index 8d8628a5d..752267e02 100644 --- a/src/serialization/resources/ticketing/types/CommonModelScopeApi.ts +++ b/src/serialization/resources/ticketing/types/CommonModelScopeApi.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IndividualCommonModelScopeDeserializer } from "./IndividualCommonModelScopeDeserializer"; export const CommonModelScopeApi: core.serialization.ObjectSchema< serializers.ticketing.CommonModelScopeApi.Raw, @@ -12,16 +13,12 @@ export const CommonModelScopeApi: core.serialization.ObjectSchema< > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list( - core.serialization.lazyObject( - async () => (await import("../../..")).ticketing.IndividualCommonModelScopeDeserializer - ) - ) + core.serialization.list(IndividualCommonModelScopeDeserializer) ), }); export declare namespace CommonModelScopeApi { interface Raw { - common_models: serializers.ticketing.IndividualCommonModelScopeDeserializer.Raw[]; + common_models: IndividualCommonModelScopeDeserializer.Raw[]; } } diff --git a/src/serialization/resources/ticketing/types/CommonModelScopesBodyRequest.ts b/src/serialization/resources/ticketing/types/CommonModelScopesBodyRequest.ts index 8e638e5d1..9bfcc0fac 100644 --- a/src/serialization/resources/ticketing/types/CommonModelScopesBodyRequest.ts +++ b/src/serialization/resources/ticketing/types/CommonModelScopesBodyRequest.ts @@ -2,21 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EnabledActionsEnum } from "./EnabledActionsEnum"; export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< serializers.ticketing.CommonModelScopesBodyRequest.Raw, Merge.ticketing.CommonModelScopesBodyRequest > = core.serialization.object({ modelId: core.serialization.property("model_id", core.serialization.string()), - enabledActions: core.serialization.property( - "enabled_actions", - core.serialization.list( - core.serialization.lazy(async () => (await import("../../..")).ticketing.EnabledActionsEnum) - ) - ), + enabledActions: core.serialization.property("enabled_actions", core.serialization.list(EnabledActionsEnum)), disabledFields: core.serialization.property( "disabled_fields", core.serialization.list(core.serialization.string()) @@ -26,7 +22,7 @@ export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< export declare namespace CommonModelScopesBodyRequest { interface Raw { model_id: string; - enabled_actions: serializers.ticketing.EnabledActionsEnum.Raw[]; + enabled_actions: EnabledActionsEnum.Raw[]; disabled_fields: string[]; } } diff --git a/src/serialization/resources/ticketing/types/Contact.ts b/src/serialization/resources/ticketing/types/Contact.ts index 01d8c0e90..3646efc16 100644 --- a/src/serialization/resources/ticketing/types/Contact.ts +++ b/src/serialization/resources/ticketing/types/Contact.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ContactAccount } from "./ContactAccount"; +import { RemoteData } from "./RemoteData"; export const Contact: core.serialization.ObjectSchema = core.serialization.object({ @@ -16,18 +18,13 @@ export const Contact: core.serialization.ObjectSchema (await import("../../..")).ticketing.ContactAccount).optional(), + account: ContactAccount.optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Contact { @@ -40,9 +37,9 @@ export declare namespace Contact { email_address?: string | null; phone_number?: string | null; details?: string | null; - account?: serializers.ticketing.ContactAccount.Raw | null; + account?: ContactAccount.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ticketing.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/ContactAccount.ts b/src/serialization/resources/ticketing/types/ContactAccount.ts index 9f0fd6a35..1b39b1bb6 100644 --- a/src/serialization/resources/ticketing/types/ContactAccount.ts +++ b/src/serialization/resources/ticketing/types/ContactAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const ContactAccount: core.serialization.Schema< serializers.ticketing.ContactAccount.Raw, Merge.ticketing.ContactAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ContactAccount { - type Raw = string | serializers.ticketing.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/ticketing/types/ContactRequest.ts b/src/serialization/resources/ticketing/types/ContactRequest.ts index 0730413aa..431107fcf 100644 --- a/src/serialization/resources/ticketing/types/ContactRequest.ts +++ b/src/serialization/resources/ticketing/types/ContactRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ContactRequestAccount } from "./ContactRequestAccount"; export const ContactRequest: core.serialization.ObjectSchema< serializers.ticketing.ContactRequest.Raw, @@ -14,7 +15,7 @@ export const ContactRequest: core.serialization.ObjectSchema< emailAddress: core.serialization.property("email_address", core.serialization.string().optional()), phoneNumber: core.serialization.property("phone_number", core.serialization.string().optional()), details: core.serialization.string().optional(), - account: core.serialization.lazy(async () => (await import("../../..")).ticketing.ContactRequestAccount).optional(), + account: ContactRequestAccount.optional(), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -31,7 +32,7 @@ export declare namespace ContactRequest { email_address?: string | null; phone_number?: string | null; details?: string | null; - account?: serializers.ticketing.ContactRequestAccount.Raw | null; + account?: ContactRequestAccount.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; } diff --git a/src/serialization/resources/ticketing/types/ContactRequestAccount.ts b/src/serialization/resources/ticketing/types/ContactRequestAccount.ts index 2d5c3205e..a9e81f1ab 100644 --- a/src/serialization/resources/ticketing/types/ContactRequestAccount.ts +++ b/src/serialization/resources/ticketing/types/ContactRequestAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const ContactRequestAccount: core.serialization.Schema< serializers.ticketing.ContactRequestAccount.Raw, Merge.ticketing.ContactRequestAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ContactRequestAccount { - type Raw = string | serializers.ticketing.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/ticketing/types/DataPassthroughRequest.ts b/src/serialization/resources/ticketing/types/DataPassthroughRequest.ts index 40b488028..5016a1651 100644 --- a/src/serialization/resources/ticketing/types/DataPassthroughRequest.ts +++ b/src/serialization/resources/ticketing/types/DataPassthroughRequest.ts @@ -2,45 +2,39 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { MethodEnum } from "./MethodEnum"; +import { MultipartFormFieldRequest } from "./MultipartFormFieldRequest"; +import { RequestFormatEnum } from "./RequestFormatEnum"; export const DataPassthroughRequest: core.serialization.ObjectSchema< serializers.ticketing.DataPassthroughRequest.Raw, Merge.ticketing.DataPassthroughRequest > = core.serialization.object({ - method: core.serialization.lazy(async () => (await import("../../..")).ticketing.MethodEnum), + method: MethodEnum, path: core.serialization.string(), baseUrlOverride: core.serialization.property("base_url_override", core.serialization.string().optional()), data: core.serialization.string().optional(), multipartFormData: core.serialization.property( "multipart_form_data", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).ticketing.MultipartFormFieldRequest - ) - ) - .optional() + core.serialization.list(MultipartFormFieldRequest).optional() ), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), - requestFormat: core.serialization.property( - "request_format", - core.serialization.lazy(async () => (await import("../../..")).ticketing.RequestFormatEnum).optional() - ), + requestFormat: core.serialization.property("request_format", RequestFormatEnum.optional()), normalizeResponse: core.serialization.property("normalize_response", core.serialization.boolean().optional()), }); export declare namespace DataPassthroughRequest { interface Raw { - method: serializers.ticketing.MethodEnum.Raw; + method: MethodEnum.Raw; path: string; base_url_override?: string | null; data?: string | null; - multipart_form_data?: serializers.ticketing.MultipartFormFieldRequest.Raw[] | null; + multipart_form_data?: MultipartFormFieldRequest.Raw[] | null; headers?: Record | null; - request_format?: serializers.ticketing.RequestFormatEnum.Raw | null; + request_format?: RequestFormatEnum.Raw | null; normalize_response?: boolean | null; } } diff --git a/src/serialization/resources/ticketing/types/DebugModeLog.ts b/src/serialization/resources/ticketing/types/DebugModeLog.ts index 81f15c45f..ef2ae5973 100644 --- a/src/serialization/resources/ticketing/types/DebugModeLog.ts +++ b/src/serialization/resources/ticketing/types/DebugModeLog.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { DebugModelLogSummary } from "./DebugModelLogSummary"; export const DebugModeLog: core.serialization.ObjectSchema< serializers.ticketing.DebugModeLog.Raw, @@ -12,16 +13,13 @@ export const DebugModeLog: core.serialization.ObjectSchema< > = core.serialization.object({ logId: core.serialization.property("log_id", core.serialization.string()), dashboardView: core.serialization.property("dashboard_view", core.serialization.string()), - logSummary: core.serialization.property( - "log_summary", - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.DebugModelLogSummary) - ), + logSummary: core.serialization.property("log_summary", DebugModelLogSummary), }); export declare namespace DebugModeLog { interface Raw { log_id: string; dashboard_view: string; - log_summary: serializers.ticketing.DebugModelLogSummary.Raw; + log_summary: DebugModelLogSummary.Raw; } } diff --git a/src/serialization/resources/ticketing/types/DebugModelLogSummary.ts b/src/serialization/resources/ticketing/types/DebugModelLogSummary.ts index 7180d79a7..0f58e5ca5 100644 --- a/src/serialization/resources/ticketing/types/DebugModelLogSummary.ts +++ b/src/serialization/resources/ticketing/types/DebugModelLogSummary.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const DebugModelLogSummary: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/EnabledActionsEnum.ts b/src/serialization/resources/ticketing/types/EnabledActionsEnum.ts index 492e35293..35ad797a7 100644 --- a/src/serialization/resources/ticketing/types/EnabledActionsEnum.ts +++ b/src/serialization/resources/ticketing/types/EnabledActionsEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EnabledActionsEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/EncodingEnum.ts b/src/serialization/resources/ticketing/types/EncodingEnum.ts index 633dbe329..8cb47096b 100644 --- a/src/serialization/resources/ticketing/types/EncodingEnum.ts +++ b/src/serialization/resources/ticketing/types/EncodingEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EncodingEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/ErrorValidationProblem.ts b/src/serialization/resources/ticketing/types/ErrorValidationProblem.ts index eeeda4a2a..203ddbcb7 100644 --- a/src/serialization/resources/ticketing/types/ErrorValidationProblem.ts +++ b/src/serialization/resources/ticketing/types/ErrorValidationProblem.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ValidationProblemSource } from "./ValidationProblemSource"; export const ErrorValidationProblem: core.serialization.ObjectSchema< serializers.ticketing.ErrorValidationProblem.Raw, Merge.ticketing.ErrorValidationProblem > = core.serialization.object({ - source: core.serialization - .lazyObject(async () => (await import("../../..")).ticketing.ValidationProblemSource) - .optional(), + source: ValidationProblemSource.optional(), title: core.serialization.string(), detail: core.serialization.string(), problemType: core.serialization.property("problem_type", core.serialization.string()), @@ -20,7 +19,7 @@ export const ErrorValidationProblem: core.serialization.ObjectSchema< export declare namespace ErrorValidationProblem { interface Raw { - source?: serializers.ticketing.ValidationProblemSource.Raw | null; + source?: ValidationProblemSource.Raw | null; title: string; detail: string; problem_type: string; diff --git a/src/serialization/resources/ticketing/types/EventTypeEnum.ts b/src/serialization/resources/ticketing/types/EventTypeEnum.ts index ac8be6442..b9598fec4 100644 --- a/src/serialization/resources/ticketing/types/EventTypeEnum.ts +++ b/src/serialization/resources/ticketing/types/EventTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const EventTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/ExternalTargetFieldApi.ts b/src/serialization/resources/ticketing/types/ExternalTargetFieldApi.ts index 345c6df08..98e931c99 100644 --- a/src/serialization/resources/ticketing/types/ExternalTargetFieldApi.ts +++ b/src/serialization/resources/ticketing/types/ExternalTargetFieldApi.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ExternalTargetFieldApi: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/ExternalTargetFieldApiResponse.ts b/src/serialization/resources/ticketing/types/ExternalTargetFieldApiResponse.ts index d4593205f..18b6f3f8e 100644 --- a/src/serialization/resources/ticketing/types/ExternalTargetFieldApiResponse.ts +++ b/src/serialization/resources/ticketing/types/ExternalTargetFieldApiResponse.ts @@ -2,116 +2,40 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ExternalTargetFieldApi } from "./ExternalTargetFieldApi"; export const ExternalTargetFieldApiResponse: core.serialization.ObjectSchema< serializers.ticketing.ExternalTargetFieldApiResponse.Raw, Merge.ticketing.ExternalTargetFieldApiResponse > = core.serialization.object({ - ticket: core.serialization.property( - "Ticket", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ExternalTargetFieldApi) - ) - .optional() - ), - comment: core.serialization.property( - "Comment", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ExternalTargetFieldApi) - ) - .optional() - ), - project: core.serialization.property( - "Project", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ExternalTargetFieldApi) - ) - .optional() - ), - collection: core.serialization.property( - "Collection", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ExternalTargetFieldApi) - ) - .optional() - ), - user: core.serialization.property( - "User", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ExternalTargetFieldApi) - ) - .optional() - ), - role: core.serialization.property( - "Role", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ExternalTargetFieldApi) - ) - .optional() - ), - account: core.serialization.property( - "Account", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ExternalTargetFieldApi) - ) - .optional() - ), - team: core.serialization.property( - "Team", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ExternalTargetFieldApi) - ) - .optional() - ), - attachment: core.serialization.property( - "Attachment", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ExternalTargetFieldApi) - ) - .optional() - ), - tag: core.serialization.property( - "Tag", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ExternalTargetFieldApi) - ) - .optional() - ), - contact: core.serialization.property( - "Contact", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ExternalTargetFieldApi) - ) - .optional() - ), + ticket: core.serialization.property("Ticket", core.serialization.list(ExternalTargetFieldApi).optional()), + comment: core.serialization.property("Comment", core.serialization.list(ExternalTargetFieldApi).optional()), + project: core.serialization.property("Project", core.serialization.list(ExternalTargetFieldApi).optional()), + collection: core.serialization.property("Collection", core.serialization.list(ExternalTargetFieldApi).optional()), + user: core.serialization.property("User", core.serialization.list(ExternalTargetFieldApi).optional()), + role: core.serialization.property("Role", core.serialization.list(ExternalTargetFieldApi).optional()), + account: core.serialization.property("Account", core.serialization.list(ExternalTargetFieldApi).optional()), + team: core.serialization.property("Team", core.serialization.list(ExternalTargetFieldApi).optional()), + attachment: core.serialization.property("Attachment", core.serialization.list(ExternalTargetFieldApi).optional()), + tag: core.serialization.property("Tag", core.serialization.list(ExternalTargetFieldApi).optional()), + contact: core.serialization.property("Contact", core.serialization.list(ExternalTargetFieldApi).optional()), }); export declare namespace ExternalTargetFieldApiResponse { interface Raw { - Ticket?: serializers.ticketing.ExternalTargetFieldApi.Raw[] | null; - Comment?: serializers.ticketing.ExternalTargetFieldApi.Raw[] | null; - Project?: serializers.ticketing.ExternalTargetFieldApi.Raw[] | null; - Collection?: serializers.ticketing.ExternalTargetFieldApi.Raw[] | null; - User?: serializers.ticketing.ExternalTargetFieldApi.Raw[] | null; - Role?: serializers.ticketing.ExternalTargetFieldApi.Raw[] | null; - Account?: serializers.ticketing.ExternalTargetFieldApi.Raw[] | null; - Team?: serializers.ticketing.ExternalTargetFieldApi.Raw[] | null; - Attachment?: serializers.ticketing.ExternalTargetFieldApi.Raw[] | null; - Tag?: serializers.ticketing.ExternalTargetFieldApi.Raw[] | null; - Contact?: serializers.ticketing.ExternalTargetFieldApi.Raw[] | null; + Ticket?: ExternalTargetFieldApi.Raw[] | null; + Comment?: ExternalTargetFieldApi.Raw[] | null; + Project?: ExternalTargetFieldApi.Raw[] | null; + Collection?: ExternalTargetFieldApi.Raw[] | null; + User?: ExternalTargetFieldApi.Raw[] | null; + Role?: ExternalTargetFieldApi.Raw[] | null; + Account?: ExternalTargetFieldApi.Raw[] | null; + Team?: ExternalTargetFieldApi.Raw[] | null; + Attachment?: ExternalTargetFieldApi.Raw[] | null; + Tag?: ExternalTargetFieldApi.Raw[] | null; + Contact?: ExternalTargetFieldApi.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/FieldFormatEnum.ts b/src/serialization/resources/ticketing/types/FieldFormatEnum.ts index f8159207f..fa2e4436b 100644 --- a/src/serialization/resources/ticketing/types/FieldFormatEnum.ts +++ b/src/serialization/resources/ticketing/types/FieldFormatEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldFormatEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/FieldMappingApiInstance.ts b/src/serialization/resources/ticketing/types/FieldMappingApiInstance.ts index 386d99bdb..38b5eefce 100644 --- a/src/serialization/resources/ticketing/types/FieldMappingApiInstance.ts +++ b/src/serialization/resources/ticketing/types/FieldMappingApiInstance.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstanceTargetField } from "./FieldMappingApiInstanceTargetField"; +import { FieldMappingApiInstanceRemoteField } from "./FieldMappingApiInstanceRemoteField"; export const FieldMappingApiInstance: core.serialization.ObjectSchema< serializers.ticketing.FieldMappingApiInstance.Raw, @@ -12,25 +14,15 @@ export const FieldMappingApiInstance: core.serialization.ObjectSchema< > = core.serialization.object({ id: core.serialization.string().optional(), isIntegrationWide: core.serialization.property("is_integration_wide", core.serialization.boolean().optional()), - targetField: core.serialization.property( - "target_field", - core.serialization - .lazyObject(async () => (await import("../../..")).ticketing.FieldMappingApiInstanceTargetField) - .optional() - ), - remoteField: core.serialization.property( - "remote_field", - core.serialization - .lazyObject(async () => (await import("../../..")).ticketing.FieldMappingApiInstanceRemoteField) - .optional() - ), + targetField: core.serialization.property("target_field", FieldMappingApiInstanceTargetField.optional()), + remoteField: core.serialization.property("remote_field", FieldMappingApiInstanceRemoteField.optional()), }); export declare namespace FieldMappingApiInstance { interface Raw { id?: string | null; is_integration_wide?: boolean | null; - target_field?: serializers.ticketing.FieldMappingApiInstanceTargetField.Raw | null; - remote_field?: serializers.ticketing.FieldMappingApiInstanceRemoteField.Raw | null; + target_field?: FieldMappingApiInstanceTargetField.Raw | null; + remote_field?: FieldMappingApiInstanceRemoteField.Raw | null; } } diff --git a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteField.ts b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteField.ts index 48bd9fc40..24e7c1a31 100644 --- a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteField.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo } from "./FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo"; export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema< serializers.ticketing.FieldMappingApiInstanceRemoteField.Raw, @@ -14,9 +15,7 @@ export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()), remoteEndpointInfo: core.serialization.property( "remote_endpoint_info", - core.serialization.lazyObject( - async () => (await import("../../..")).ticketing.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - ) + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo ), }); @@ -24,6 +23,6 @@ export declare namespace FieldMappingApiInstanceRemoteField { interface Raw { remote_key_name: string; schema: Record; - remote_endpoint_info: serializers.ticketing.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; } } diff --git a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts index d07480af6..0647c8381 100644 --- a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts +++ b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceResponse.ts b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceResponse.ts index 7432f1489..949d6c845 100644 --- a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceResponse.ts +++ b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceResponse.ts @@ -2,116 +2,40 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstance } from "./FieldMappingApiInstance"; export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< serializers.ticketing.FieldMappingApiInstanceResponse.Raw, Merge.ticketing.FieldMappingApiInstanceResponse > = core.serialization.object({ - ticket: core.serialization.property( - "Ticket", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.FieldMappingApiInstance) - ) - .optional() - ), - comment: core.serialization.property( - "Comment", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.FieldMappingApiInstance) - ) - .optional() - ), - project: core.serialization.property( - "Project", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.FieldMappingApiInstance) - ) - .optional() - ), - collection: core.serialization.property( - "Collection", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.FieldMappingApiInstance) - ) - .optional() - ), - user: core.serialization.property( - "User", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.FieldMappingApiInstance) - ) - .optional() - ), - role: core.serialization.property( - "Role", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.FieldMappingApiInstance) - ) - .optional() - ), - account: core.serialization.property( - "Account", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.FieldMappingApiInstance) - ) - .optional() - ), - team: core.serialization.property( - "Team", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.FieldMappingApiInstance) - ) - .optional() - ), - attachment: core.serialization.property( - "Attachment", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.FieldMappingApiInstance) - ) - .optional() - ), - tag: core.serialization.property( - "Tag", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.FieldMappingApiInstance) - ) - .optional() - ), - contact: core.serialization.property( - "Contact", - core.serialization - .list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.FieldMappingApiInstance) - ) - .optional() - ), + ticket: core.serialization.property("Ticket", core.serialization.list(FieldMappingApiInstance).optional()), + comment: core.serialization.property("Comment", core.serialization.list(FieldMappingApiInstance).optional()), + project: core.serialization.property("Project", core.serialization.list(FieldMappingApiInstance).optional()), + collection: core.serialization.property("Collection", core.serialization.list(FieldMappingApiInstance).optional()), + user: core.serialization.property("User", core.serialization.list(FieldMappingApiInstance).optional()), + role: core.serialization.property("Role", core.serialization.list(FieldMappingApiInstance).optional()), + account: core.serialization.property("Account", core.serialization.list(FieldMappingApiInstance).optional()), + team: core.serialization.property("Team", core.serialization.list(FieldMappingApiInstance).optional()), + attachment: core.serialization.property("Attachment", core.serialization.list(FieldMappingApiInstance).optional()), + tag: core.serialization.property("Tag", core.serialization.list(FieldMappingApiInstance).optional()), + contact: core.serialization.property("Contact", core.serialization.list(FieldMappingApiInstance).optional()), }); export declare namespace FieldMappingApiInstanceResponse { interface Raw { - Ticket?: serializers.ticketing.FieldMappingApiInstance.Raw[] | null; - Comment?: serializers.ticketing.FieldMappingApiInstance.Raw[] | null; - Project?: serializers.ticketing.FieldMappingApiInstance.Raw[] | null; - Collection?: serializers.ticketing.FieldMappingApiInstance.Raw[] | null; - User?: serializers.ticketing.FieldMappingApiInstance.Raw[] | null; - Role?: serializers.ticketing.FieldMappingApiInstance.Raw[] | null; - Account?: serializers.ticketing.FieldMappingApiInstance.Raw[] | null; - Team?: serializers.ticketing.FieldMappingApiInstance.Raw[] | null; - Attachment?: serializers.ticketing.FieldMappingApiInstance.Raw[] | null; - Tag?: serializers.ticketing.FieldMappingApiInstance.Raw[] | null; - Contact?: serializers.ticketing.FieldMappingApiInstance.Raw[] | null; + Ticket?: FieldMappingApiInstance.Raw[] | null; + Comment?: FieldMappingApiInstance.Raw[] | null; + Project?: FieldMappingApiInstance.Raw[] | null; + Collection?: FieldMappingApiInstance.Raw[] | null; + User?: FieldMappingApiInstance.Raw[] | null; + Role?: FieldMappingApiInstance.Raw[] | null; + Account?: FieldMappingApiInstance.Raw[] | null; + Team?: FieldMappingApiInstance.Raw[] | null; + Attachment?: FieldMappingApiInstance.Raw[] | null; + Tag?: FieldMappingApiInstance.Raw[] | null; + Contact?: FieldMappingApiInstance.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceTargetField.ts b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceTargetField.ts index 3afd4efc9..5379decd6 100644 --- a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceTargetField.ts +++ b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceTargetField.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldMappingApiInstanceTargetField: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/FieldMappingInstanceResponse.ts b/src/serialization/resources/ticketing/types/FieldMappingInstanceResponse.ts index 1cdb82f49..700b0c256 100644 --- a/src/serialization/resources/ticketing/types/FieldMappingInstanceResponse.ts +++ b/src/serialization/resources/ticketing/types/FieldMappingInstanceResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldMappingApiInstance } from "./FieldMappingApiInstance"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const FieldMappingInstanceResponse: core.serialization.ObjectSchema< serializers.ticketing.FieldMappingInstanceResponse.Raw, Merge.ticketing.FieldMappingInstanceResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).ticketing.FieldMappingApiInstance), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.DebugModeLog)) - .optional(), + model: FieldMappingApiInstance, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace FieldMappingInstanceResponse { interface Raw { - model: serializers.ticketing.FieldMappingApiInstance.Raw; - warnings: serializers.ticketing.WarningValidationProblem.Raw[]; - errors: serializers.ticketing.ErrorValidationProblem.Raw[]; - logs?: serializers.ticketing.DebugModeLog.Raw[] | null; + model: FieldMappingApiInstance.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/FieldPermissionDeserializer.ts b/src/serialization/resources/ticketing/types/FieldPermissionDeserializer.ts index 3196a044f..1029bbd30 100644 --- a/src/serialization/resources/ticketing/types/FieldPermissionDeserializer.ts +++ b/src/serialization/resources/ticketing/types/FieldPermissionDeserializer.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldPermissionDeserializer: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/FieldPermissionDeserializerRequest.ts b/src/serialization/resources/ticketing/types/FieldPermissionDeserializerRequest.ts index 8ecba31ce..63d9743bf 100644 --- a/src/serialization/resources/ticketing/types/FieldPermissionDeserializerRequest.ts +++ b/src/serialization/resources/ticketing/types/FieldPermissionDeserializerRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldPermissionDeserializerRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/FieldTypeEnum.ts b/src/serialization/resources/ticketing/types/FieldTypeEnum.ts index 2c6634a8a..af24bf1e1 100644 --- a/src/serialization/resources/ticketing/types/FieldTypeEnum.ts +++ b/src/serialization/resources/ticketing/types/FieldTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const FieldTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/IndividualCommonModelScopeDeserializer.ts b/src/serialization/resources/ticketing/types/IndividualCommonModelScopeDeserializer.ts index 6b1952221..7794b3e2d 100644 --- a/src/serialization/resources/ticketing/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/serialization/resources/ticketing/types/IndividualCommonModelScopeDeserializer.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ModelPermissionDeserializer } from "./ModelPermissionDeserializer"; +import { FieldPermissionDeserializer } from "./FieldPermissionDeserializer"; export const IndividualCommonModelScopeDeserializer: core.serialization.ObjectSchema< serializers.ticketing.IndividualCommonModelScopeDeserializer.Raw, @@ -13,27 +15,15 @@ export const IndividualCommonModelScopeDeserializer: core.serialization.ObjectSc modelName: core.serialization.property("model_name", core.serialization.string()), modelPermissions: core.serialization.property( "model_permissions", - core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject( - async () => (await import("../../..")).ticketing.ModelPermissionDeserializer - ) - ) - .optional() - ), - fieldPermissions: core.serialization.property( - "field_permissions", - core.serialization - .lazyObject(async () => (await import("../../..")).ticketing.FieldPermissionDeserializer) - .optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializer).optional() ), + fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializer.optional()), }); export declare namespace IndividualCommonModelScopeDeserializer { interface Raw { model_name: string; - model_permissions?: Record | null; - field_permissions?: serializers.ticketing.FieldPermissionDeserializer.Raw | null; + model_permissions?: Record | null; + field_permissions?: FieldPermissionDeserializer.Raw | null; } } diff --git a/src/serialization/resources/ticketing/types/IndividualCommonModelScopeDeserializerRequest.ts b/src/serialization/resources/ticketing/types/IndividualCommonModelScopeDeserializerRequest.ts index 3cf8f53dd..f5c65fc96 100644 --- a/src/serialization/resources/ticketing/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/ticketing/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ModelPermissionDeserializerRequest } from "./ModelPermissionDeserializerRequest"; +import { FieldPermissionDeserializerRequest } from "./FieldPermissionDeserializerRequest"; export const IndividualCommonModelScopeDeserializerRequest: core.serialization.ObjectSchema< serializers.ticketing.IndividualCommonModelScopeDeserializerRequest.Raw, @@ -13,27 +15,15 @@ export const IndividualCommonModelScopeDeserializerRequest: core.serialization.O modelName: core.serialization.property("model_name", core.serialization.string()), modelPermissions: core.serialization.property( "model_permissions", - core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject( - async () => (await import("../../..")).ticketing.ModelPermissionDeserializerRequest - ) - ) - .optional() - ), - fieldPermissions: core.serialization.property( - "field_permissions", - core.serialization - .lazyObject(async () => (await import("../../..")).ticketing.FieldPermissionDeserializerRequest) - .optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializerRequest).optional() ), + fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializerRequest.optional()), }); export declare namespace IndividualCommonModelScopeDeserializerRequest { interface Raw { model_name: string; - model_permissions?: Record | null; - field_permissions?: serializers.ticketing.FieldPermissionDeserializerRequest.Raw | null; + model_permissions?: Record | null; + field_permissions?: FieldPermissionDeserializerRequest.Raw | null; } } diff --git a/src/serialization/resources/ticketing/types/Issue.ts b/src/serialization/resources/ticketing/types/Issue.ts index b32a97bca..985ccf8a9 100644 --- a/src/serialization/resources/ticketing/types/Issue.ts +++ b/src/serialization/resources/ticketing/types/Issue.ts @@ -2,14 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IssueStatus } from "./IssueStatus"; export const Issue: core.serialization.ObjectSchema = core.serialization.object({ id: core.serialization.string().optional(), - status: core.serialization.lazy(async () => (await import("../../..")).ticketing.IssueStatus).optional(), + status: IssueStatus.optional(), errorDescription: core.serialization.property("error_description", core.serialization.string()), endUser: core.serialization.property( "end_user", @@ -27,7 +28,7 @@ export const Issue: core.serialization.ObjectSchema | null; first_incident_time?: string | null; diff --git a/src/serialization/resources/ticketing/types/IssueStatus.ts b/src/serialization/resources/ticketing/types/IssueStatus.ts index 46bf21718..72fa75987 100644 --- a/src/serialization/resources/ticketing/types/IssueStatus.ts +++ b/src/serialization/resources/ticketing/types/IssueStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { IssueStatusEnum } from "./IssueStatusEnum"; export const IssueStatus: core.serialization.Schema< serializers.ticketing.IssueStatus.Raw, Merge.ticketing.IssueStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ticketing.IssueStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([IssueStatusEnum, core.serialization.string()]); export declare namespace IssueStatus { - type Raw = serializers.ticketing.IssueStatusEnum.Raw | string; + type Raw = IssueStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/IssueStatusEnum.ts b/src/serialization/resources/ticketing/types/IssueStatusEnum.ts index f0afd31dd..509ca7bd1 100644 --- a/src/serialization/resources/ticketing/types/IssueStatusEnum.ts +++ b/src/serialization/resources/ticketing/types/IssueStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const IssueStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/ItemFormatEnum.ts b/src/serialization/resources/ticketing/types/ItemFormatEnum.ts index d46121194..412cb61c4 100644 --- a/src/serialization/resources/ticketing/types/ItemFormatEnum.ts +++ b/src/serialization/resources/ticketing/types/ItemFormatEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ItemFormatEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/ItemSchema.ts b/src/serialization/resources/ticketing/types/ItemSchema.ts index 1eac75a42..c9d7f8719 100644 --- a/src/serialization/resources/ticketing/types/ItemSchema.ts +++ b/src/serialization/resources/ticketing/types/ItemSchema.ts @@ -2,22 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ItemTypeEnum } from "./ItemTypeEnum"; +import { ItemFormatEnum } from "./ItemFormatEnum"; export const ItemSchema: core.serialization.ObjectSchema< serializers.ticketing.ItemSchema.Raw, Merge.ticketing.ItemSchema > = core.serialization.object({ - itemType: core.serialization.property( - "item_type", - core.serialization.lazy(async () => (await import("../../..")).ticketing.ItemTypeEnum).optional() - ), - itemFormat: core.serialization.property( - "item_format", - core.serialization.lazy(async () => (await import("../../..")).ticketing.ItemFormatEnum).optional() - ), + itemType: core.serialization.property("item_type", ItemTypeEnum.optional()), + itemFormat: core.serialization.property("item_format", ItemFormatEnum.optional()), itemChoices: core.serialization.property( "item_choices", core.serialization.list(core.serialization.string()).optional() @@ -26,8 +22,8 @@ export const ItemSchema: core.serialization.ObjectSchema< export declare namespace ItemSchema { interface Raw { - item_type?: serializers.ticketing.ItemTypeEnum.Raw | null; - item_format?: serializers.ticketing.ItemFormatEnum.Raw | null; + item_type?: ItemTypeEnum.Raw | null; + item_format?: ItemFormatEnum.Raw | null; item_choices?: string[] | null; } } diff --git a/src/serialization/resources/ticketing/types/ItemTypeEnum.ts b/src/serialization/resources/ticketing/types/ItemTypeEnum.ts index 6cb4dc7ba..860f206d5 100644 --- a/src/serialization/resources/ticketing/types/ItemTypeEnum.ts +++ b/src/serialization/resources/ticketing/types/ItemTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ItemTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/LanguageEnum.ts b/src/serialization/resources/ticketing/types/LanguageEnum.ts index 9a3b5d8d4..c5f756b20 100644 --- a/src/serialization/resources/ticketing/types/LanguageEnum.ts +++ b/src/serialization/resources/ticketing/types/LanguageEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LanguageEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/LinkToken.ts b/src/serialization/resources/ticketing/types/LinkToken.ts index 6c4e9a644..f6b2db48c 100644 --- a/src/serialization/resources/ticketing/types/LinkToken.ts +++ b/src/serialization/resources/ticketing/types/LinkToken.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LinkToken: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/LinkedAccountStatus.ts b/src/serialization/resources/ticketing/types/LinkedAccountStatus.ts index 19ed3bdde..346a7776a 100644 --- a/src/serialization/resources/ticketing/types/LinkedAccountStatus.ts +++ b/src/serialization/resources/ticketing/types/LinkedAccountStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const LinkedAccountStatus: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/MetaResponse.ts b/src/serialization/resources/ticketing/types/MetaResponse.ts index 4e3131486..dfd321594 100644 --- a/src/serialization/resources/ticketing/types/MetaResponse.ts +++ b/src/serialization/resources/ticketing/types/MetaResponse.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { LinkedAccountStatus } from "./LinkedAccountStatus"; export const MetaResponse: core.serialization.ObjectSchema< serializers.ticketing.MetaResponse.Raw, @@ -18,9 +19,7 @@ export const MetaResponse: core.serialization.ObjectSchema< "remote_field_classes", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - status: core.serialization - .lazyObject(async () => (await import("../../..")).ticketing.LinkedAccountStatus) - .optional(), + status: LinkedAccountStatus.optional(), hasConditionalParams: core.serialization.property("has_conditional_params", core.serialization.boolean()), hasRequiredLinkedAccountParams: core.serialization.property( "has_required_linked_account_params", @@ -32,7 +31,7 @@ export declare namespace MetaResponse { interface Raw { request_schema: Record; remote_field_classes?: Record | null; - status?: serializers.ticketing.LinkedAccountStatus.Raw | null; + status?: LinkedAccountStatus.Raw | null; has_conditional_params: boolean; has_required_linked_account_params: boolean; } diff --git a/src/serialization/resources/ticketing/types/MethodEnum.ts b/src/serialization/resources/ticketing/types/MethodEnum.ts index 200af64fa..9ee5310fd 100644 --- a/src/serialization/resources/ticketing/types/MethodEnum.ts +++ b/src/serialization/resources/ticketing/types/MethodEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const MethodEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ticketing/types/ModelOperation.ts b/src/serialization/resources/ticketing/types/ModelOperation.ts index ff7d8e5d2..99ec84e3b 100644 --- a/src/serialization/resources/ticketing/types/ModelOperation.ts +++ b/src/serialization/resources/ticketing/types/ModelOperation.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelOperation: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/ModelPermissionDeserializer.ts b/src/serialization/resources/ticketing/types/ModelPermissionDeserializer.ts index b6ca15d27..722b5f4d8 100644 --- a/src/serialization/resources/ticketing/types/ModelPermissionDeserializer.ts +++ b/src/serialization/resources/ticketing/types/ModelPermissionDeserializer.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelPermissionDeserializer: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/ModelPermissionDeserializerRequest.ts b/src/serialization/resources/ticketing/types/ModelPermissionDeserializerRequest.ts index 3064c6729..178cc13d0 100644 --- a/src/serialization/resources/ticketing/types/ModelPermissionDeserializerRequest.ts +++ b/src/serialization/resources/ticketing/types/ModelPermissionDeserializerRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ModelPermissionDeserializerRequest: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/MultipartFormFieldRequest.ts b/src/serialization/resources/ticketing/types/MultipartFormFieldRequest.ts index 06ffa2cac..c21367388 100644 --- a/src/serialization/resources/ticketing/types/MultipartFormFieldRequest.ts +++ b/src/serialization/resources/ticketing/types/MultipartFormFieldRequest.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { MultipartFormFieldRequestEncoding } from "./MultipartFormFieldRequestEncoding"; export const MultipartFormFieldRequest: core.serialization.ObjectSchema< serializers.ticketing.MultipartFormFieldRequest.Raw, @@ -12,9 +13,7 @@ export const MultipartFormFieldRequest: core.serialization.ObjectSchema< > = core.serialization.object({ name: core.serialization.string(), data: core.serialization.string(), - encoding: core.serialization - .lazy(async () => (await import("../../..")).ticketing.MultipartFormFieldRequestEncoding) - .optional(), + encoding: MultipartFormFieldRequestEncoding.optional(), fileName: core.serialization.property("file_name", core.serialization.string().optional()), contentType: core.serialization.property("content_type", core.serialization.string().optional()), }); @@ -23,7 +22,7 @@ export declare namespace MultipartFormFieldRequest { interface Raw { name: string; data: string; - encoding?: serializers.ticketing.MultipartFormFieldRequestEncoding.Raw | null; + encoding?: MultipartFormFieldRequestEncoding.Raw | null; file_name?: string | null; content_type?: string | null; } diff --git a/src/serialization/resources/ticketing/types/MultipartFormFieldRequestEncoding.ts b/src/serialization/resources/ticketing/types/MultipartFormFieldRequestEncoding.ts index b3b5ffddc..7c1f08af7 100644 --- a/src/serialization/resources/ticketing/types/MultipartFormFieldRequestEncoding.ts +++ b/src/serialization/resources/ticketing/types/MultipartFormFieldRequestEncoding.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { EncodingEnum } from "./EncodingEnum"; export const MultipartFormFieldRequestEncoding: core.serialization.Schema< serializers.ticketing.MultipartFormFieldRequestEncoding.Raw, Merge.ticketing.MultipartFormFieldRequestEncoding -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ticketing.EncodingEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([EncodingEnum, core.serialization.string()]); export declare namespace MultipartFormFieldRequestEncoding { - type Raw = serializers.ticketing.EncodingEnum.Raw | string; + type Raw = EncodingEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.ts b/src/serialization/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.ts index c34ecab20..7370c0c7d 100644 --- a/src/serialization/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AccountDetailsAndActions } from "./AccountDetailsAndActions"; export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSchema< serializers.ticketing.PaginatedAccountDetailsAndActionsList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSch > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.AccountDetailsAndActions)) - .optional(), + results: core.serialization.list(AccountDetailsAndActions).optional(), }); export declare namespace PaginatedAccountDetailsAndActionsList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ticketing.AccountDetailsAndActions.Raw[] | null; + results?: AccountDetailsAndActions.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/PaginatedAccountList.ts b/src/serialization/resources/ticketing/types/PaginatedAccountList.ts index d23d16785..6aa67bddd 100644 --- a/src/serialization/resources/ticketing/types/PaginatedAccountList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedAccountList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const PaginatedAccountList: core.serialization.ObjectSchema< serializers.ticketing.PaginatedAccountList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAccountList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Account)) - .optional(), + results: core.serialization.list(Account).optional(), }); export declare namespace PaginatedAccountList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ticketing.Account.Raw[] | null; + results?: Account.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/PaginatedAttachmentList.ts b/src/serialization/resources/ticketing/types/PaginatedAttachmentList.ts index 80d04c09d..bb4b3d2d7 100644 --- a/src/serialization/resources/ticketing/types/PaginatedAttachmentList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedAttachmentList.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PaginatedAttachmentList: core.serialization.ObjectSchema< @@ -12,9 +12,7 @@ export const PaginatedAttachmentList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Attachment)) - .optional(), + results: core.serialization.list(core.serialization.lazyObject(() => serializers.ticketing.Attachment)).optional(), }); export declare namespace PaginatedAttachmentList { diff --git a/src/serialization/resources/ticketing/types/PaginatedAuditLogEventList.ts b/src/serialization/resources/ticketing/types/PaginatedAuditLogEventList.ts index 371dac2e2..a3c9ac7b1 100644 --- a/src/serialization/resources/ticketing/types/PaginatedAuditLogEventList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedAuditLogEventList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { AuditLogEvent } from "./AuditLogEvent"; export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< serializers.ticketing.PaginatedAuditLogEventList.Raw, @@ -12,15 +13,13 @@ export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.AuditLogEvent)) - .optional(), + results: core.serialization.list(AuditLogEvent).optional(), }); export declare namespace PaginatedAuditLogEventList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ticketing.AuditLogEvent.Raw[] | null; + results?: AuditLogEvent.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/PaginatedCollectionList.ts b/src/serialization/resources/ticketing/types/PaginatedCollectionList.ts index 56b432ce8..d6f35921d 100644 --- a/src/serialization/resources/ticketing/types/PaginatedCollectionList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedCollectionList.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PaginatedCollectionList: core.serialization.ObjectSchema< @@ -12,9 +12,7 @@ export const PaginatedCollectionList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Collection)) - .optional(), + results: core.serialization.list(core.serialization.lazyObject(() => serializers.ticketing.Collection)).optional(), }); export declare namespace PaginatedCollectionList { diff --git a/src/serialization/resources/ticketing/types/PaginatedCommentList.ts b/src/serialization/resources/ticketing/types/PaginatedCommentList.ts index 2bffaff7f..17d48d223 100644 --- a/src/serialization/resources/ticketing/types/PaginatedCommentList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedCommentList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Comment } from "./Comment"; export const PaginatedCommentList: core.serialization.ObjectSchema< serializers.ticketing.PaginatedCommentList.Raw, @@ -12,15 +13,13 @@ export const PaginatedCommentList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Comment)) - .optional(), + results: core.serialization.list(Comment).optional(), }); export declare namespace PaginatedCommentList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ticketing.Comment.Raw[] | null; + results?: Comment.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/PaginatedContactList.ts b/src/serialization/resources/ticketing/types/PaginatedContactList.ts index 2686d4585..2abc892ac 100644 --- a/src/serialization/resources/ticketing/types/PaginatedContactList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedContactList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const PaginatedContactList: core.serialization.ObjectSchema< serializers.ticketing.PaginatedContactList.Raw, @@ -12,15 +13,13 @@ export const PaginatedContactList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Contact)) - .optional(), + results: core.serialization.list(Contact).optional(), }); export declare namespace PaginatedContactList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ticketing.Contact.Raw[] | null; + results?: Contact.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/PaginatedIssueList.ts b/src/serialization/resources/ticketing/types/PaginatedIssueList.ts index 7b616d928..c781af4ae 100644 --- a/src/serialization/resources/ticketing/types/PaginatedIssueList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedIssueList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Issue } from "./Issue"; export const PaginatedIssueList: core.serialization.ObjectSchema< serializers.ticketing.PaginatedIssueList.Raw, @@ -12,15 +13,13 @@ export const PaginatedIssueList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Issue)) - .optional(), + results: core.serialization.list(Issue).optional(), }); export declare namespace PaginatedIssueList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ticketing.Issue.Raw[] | null; + results?: Issue.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/PaginatedProjectList.ts b/src/serialization/resources/ticketing/types/PaginatedProjectList.ts index bd2ff9a2a..9ba511c80 100644 --- a/src/serialization/resources/ticketing/types/PaginatedProjectList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedProjectList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Project } from "./Project"; export const PaginatedProjectList: core.serialization.ObjectSchema< serializers.ticketing.PaginatedProjectList.Raw, @@ -12,15 +13,13 @@ export const PaginatedProjectList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Project)) - .optional(), + results: core.serialization.list(Project).optional(), }); export declare namespace PaginatedProjectList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ticketing.Project.Raw[] | null; + results?: Project.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/PaginatedRemoteFieldClassList.ts b/src/serialization/resources/ticketing/types/PaginatedRemoteFieldClassList.ts index c5dd1047a..b33281623 100644 --- a/src/serialization/resources/ticketing/types/PaginatedRemoteFieldClassList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedRemoteFieldClassList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldClass } from "./RemoteFieldClass"; export const PaginatedRemoteFieldClassList: core.serialization.ObjectSchema< serializers.ticketing.PaginatedRemoteFieldClassList.Raw, @@ -12,15 +13,13 @@ export const PaginatedRemoteFieldClassList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldClass)) - .optional(), + results: core.serialization.list(RemoteFieldClass).optional(), }); export declare namespace PaginatedRemoteFieldClassList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ticketing.RemoteFieldClass.Raw[] | null; + results?: RemoteFieldClass.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/PaginatedRoleList.ts b/src/serialization/resources/ticketing/types/PaginatedRoleList.ts index 763828963..e25b28088 100644 --- a/src/serialization/resources/ticketing/types/PaginatedRoleList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedRoleList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Role } from "./Role"; export const PaginatedRoleList: core.serialization.ObjectSchema< serializers.ticketing.PaginatedRoleList.Raw, @@ -12,15 +13,13 @@ export const PaginatedRoleList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Role)) - .optional(), + results: core.serialization.list(Role).optional(), }); export declare namespace PaginatedRoleList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ticketing.Role.Raw[] | null; + results?: Role.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/PaginatedSyncStatusList.ts b/src/serialization/resources/ticketing/types/PaginatedSyncStatusList.ts index a121fe613..f0de2089c 100644 --- a/src/serialization/resources/ticketing/types/PaginatedSyncStatusList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedSyncStatusList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { SyncStatus } from "./SyncStatus"; export const PaginatedSyncStatusList: core.serialization.ObjectSchema< serializers.ticketing.PaginatedSyncStatusList.Raw, @@ -12,15 +13,13 @@ export const PaginatedSyncStatusList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.SyncStatus)) - .optional(), + results: core.serialization.list(SyncStatus).optional(), }); export declare namespace PaginatedSyncStatusList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ticketing.SyncStatus.Raw[] | null; + results?: SyncStatus.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/PaginatedTagList.ts b/src/serialization/resources/ticketing/types/PaginatedTagList.ts index 806f956cd..0b2551363 100644 --- a/src/serialization/resources/ticketing/types/PaginatedTagList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedTagList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Tag } from "./Tag"; export const PaginatedTagList: core.serialization.ObjectSchema< serializers.ticketing.PaginatedTagList.Raw, @@ -12,15 +13,13 @@ export const PaginatedTagList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Tag)) - .optional(), + results: core.serialization.list(Tag).optional(), }); export declare namespace PaginatedTagList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ticketing.Tag.Raw[] | null; + results?: Tag.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/PaginatedTeamList.ts b/src/serialization/resources/ticketing/types/PaginatedTeamList.ts index bfcebf955..3154fc86b 100644 --- a/src/serialization/resources/ticketing/types/PaginatedTeamList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedTeamList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Team } from "./Team"; export const PaginatedTeamList: core.serialization.ObjectSchema< serializers.ticketing.PaginatedTeamList.Raw, @@ -12,15 +13,13 @@ export const PaginatedTeamList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Team)) - .optional(), + results: core.serialization.list(Team).optional(), }); export declare namespace PaginatedTeamList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ticketing.Team.Raw[] | null; + results?: Team.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/PaginatedTicketList.ts b/src/serialization/resources/ticketing/types/PaginatedTicketList.ts index 6c6e91f08..aa364f99b 100644 --- a/src/serialization/resources/ticketing/types/PaginatedTicketList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedTicketList.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PaginatedTicketList: core.serialization.ObjectSchema< @@ -12,9 +12,7 @@ export const PaginatedTicketList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Ticket)) - .optional(), + results: core.serialization.list(core.serialization.lazyObject(() => serializers.ticketing.Ticket)).optional(), }); export declare namespace PaginatedTicketList { diff --git a/src/serialization/resources/ticketing/types/PaginatedUserList.ts b/src/serialization/resources/ticketing/types/PaginatedUserList.ts index 0216b654b..82b8ffec9 100644 --- a/src/serialization/resources/ticketing/types/PaginatedUserList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedUserList.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const PaginatedUserList: core.serialization.ObjectSchema< serializers.ticketing.PaginatedUserList.Raw, @@ -12,15 +13,13 @@ export const PaginatedUserList: core.serialization.ObjectSchema< > = core.serialization.object({ next: core.serialization.string().optional(), previous: core.serialization.string().optional(), - results: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.User)) - .optional(), + results: core.serialization.list(User).optional(), }); export declare namespace PaginatedUserList { interface Raw { next?: string | null; previous?: string | null; - results?: serializers.ticketing.User.Raw[] | null; + results?: User.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/PatchedTicketRequest.ts b/src/serialization/resources/ticketing/types/PatchedTicketRequest.ts index 5037d1a03..eb43ad6ea 100644 --- a/src/serialization/resources/ticketing/types/PatchedTicketRequest.ts +++ b/src/serialization/resources/ticketing/types/PatchedTicketRequest.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PatchedTicketRequestStatus } from "./PatchedTicketRequestStatus"; +import { PatchedTicketRequestPriority } from "./PatchedTicketRequestPriority"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const PatchedTicketRequest: core.serialization.ObjectSchema< serializers.ticketing.PatchedTicketRequest.Raw, @@ -14,9 +17,7 @@ export const PatchedTicketRequest: core.serialization.ObjectSchema< assignees: core.serialization.list(core.serialization.string().optional()).optional(), creator: core.serialization.string().optional(), dueDate: core.serialization.property("due_date", core.serialization.date().optional()), - status: core.serialization - .lazy(async () => (await import("../../..")).ticketing.PatchedTicketRequestStatus) - .optional(), + status: PatchedTicketRequestStatus.optional(), description: core.serialization.string().optional(), collections: core.serialization.list(core.serialization.string().optional()).optional(), ticketType: core.serialization.property("ticket_type", core.serialization.string().optional()), @@ -26,9 +27,7 @@ export const PatchedTicketRequest: core.serialization.ObjectSchema< tags: core.serialization.list(core.serialization.string().optional()).optional(), completedAt: core.serialization.property("completed_at", core.serialization.date().optional()), ticketUrl: core.serialization.property("ticket_url", core.serialization.string().optional()), - priority: core.serialization - .lazy(async () => (await import("../../..")).ticketing.PatchedTicketRequestPriority) - .optional(), + priority: PatchedTicketRequestPriority.optional(), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -37,12 +36,7 @@ export const PatchedTicketRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PatchedTicketRequest { @@ -51,7 +45,7 @@ export declare namespace PatchedTicketRequest { assignees?: (string | null | undefined)[] | null; creator?: string | null; due_date?: string | null; - status?: serializers.ticketing.PatchedTicketRequestStatus.Raw | null; + status?: PatchedTicketRequestStatus.Raw | null; description?: string | null; collections?: (string | null | undefined)[] | null; ticket_type?: string | null; @@ -61,9 +55,9 @@ export declare namespace PatchedTicketRequest { tags?: (string | null | undefined)[] | null; completed_at?: string | null; ticket_url?: string | null; - priority?: serializers.ticketing.PatchedTicketRequestPriority.Raw | null; + priority?: PatchedTicketRequestPriority.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.ticketing.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/PatchedTicketRequestPriority.ts b/src/serialization/resources/ticketing/types/PatchedTicketRequestPriority.ts index 91c46bd28..1c69984ea 100644 --- a/src/serialization/resources/ticketing/types/PatchedTicketRequestPriority.ts +++ b/src/serialization/resources/ticketing/types/PatchedTicketRequestPriority.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PriorityEnum } from "./PriorityEnum"; export const PatchedTicketRequestPriority: core.serialization.Schema< serializers.ticketing.PatchedTicketRequestPriority.Raw, Merge.ticketing.PatchedTicketRequestPriority -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ticketing.PriorityEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PriorityEnum, core.serialization.string()]); export declare namespace PatchedTicketRequestPriority { - type Raw = serializers.ticketing.PriorityEnum.Raw | string; + type Raw = PriorityEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/PatchedTicketRequestStatus.ts b/src/serialization/resources/ticketing/types/PatchedTicketRequestStatus.ts index 2f23b173e..e26acef5e 100644 --- a/src/serialization/resources/ticketing/types/PatchedTicketRequestStatus.ts +++ b/src/serialization/resources/ticketing/types/PatchedTicketRequestStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TicketStatusEnum } from "./TicketStatusEnum"; export const PatchedTicketRequestStatus: core.serialization.Schema< serializers.ticketing.PatchedTicketRequestStatus.Raw, Merge.ticketing.PatchedTicketRequestStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([TicketStatusEnum, core.serialization.string()]); export declare namespace PatchedTicketRequestStatus { - type Raw = serializers.ticketing.TicketStatusEnum.Raw | string; + type Raw = TicketStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/PriorityEnum.ts b/src/serialization/resources/ticketing/types/PriorityEnum.ts index 8cd8f1531..cd63c03ca 100644 --- a/src/serialization/resources/ticketing/types/PriorityEnum.ts +++ b/src/serialization/resources/ticketing/types/PriorityEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const PriorityEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/Project.ts b/src/serialization/resources/ticketing/types/Project.ts index 04f873697..8b6deb44a 100644 --- a/src/serialization/resources/ticketing/types/Project.ts +++ b/src/serialization/resources/ticketing/types/Project.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; export const Project: core.serialization.ObjectSchema = core.serialization.object({ @@ -19,12 +20,7 @@ export const Project: core.serialization.ObjectSchema (await import("../../..")).ticketing.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Project { @@ -37,6 +33,6 @@ export declare namespace Project { description?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ticketing.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/RemoteData.ts b/src/serialization/resources/ticketing/types/RemoteData.ts index 822894614..feb8816f2 100644 --- a/src/serialization/resources/ticketing/types/RemoteData.ts +++ b/src/serialization/resources/ticketing/types/RemoteData.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteData: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/RemoteEndpointInfo.ts b/src/serialization/resources/ticketing/types/RemoteEndpointInfo.ts index c3677d684..ab7bb1649 100644 --- a/src/serialization/resources/ticketing/types/RemoteEndpointInfo.ts +++ b/src/serialization/resources/ticketing/types/RemoteEndpointInfo.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteEndpointInfo: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/RemoteField.ts b/src/serialization/resources/ticketing/types/RemoteField.ts index 975736bb0..33fb60861 100644 --- a/src/serialization/resources/ticketing/types/RemoteField.ts +++ b/src/serialization/resources/ticketing/types/RemoteField.ts @@ -2,24 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldRemoteFieldClass } from "./RemoteFieldRemoteFieldClass"; export const RemoteField: core.serialization.ObjectSchema< serializers.ticketing.RemoteField.Raw, Merge.ticketing.RemoteField > = core.serialization.object({ - remoteFieldClass: core.serialization.property( - "remote_field_class", - core.serialization.lazy(async () => (await import("../../..")).ticketing.RemoteFieldRemoteFieldClass) - ), + remoteFieldClass: core.serialization.property("remote_field_class", RemoteFieldRemoteFieldClass), value: core.serialization.unknown().optional(), }); export declare namespace RemoteField { interface Raw { - remote_field_class: serializers.ticketing.RemoteFieldRemoteFieldClass.Raw; + remote_field_class: RemoteFieldRemoteFieldClass.Raw; value?: unknown | null; } } diff --git a/src/serialization/resources/ticketing/types/RemoteFieldApi.ts b/src/serialization/resources/ticketing/types/RemoteFieldApi.ts index a3231d072..46c7e3503 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldApi.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldApi.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteEndpointInfo } from "./RemoteEndpointInfo"; +import { AdvancedMetadata } from "./AdvancedMetadata"; +import { RemoteFieldApiCoverage } from "./RemoteFieldApiCoverage"; export const RemoteFieldApi: core.serialization.ObjectSchema< serializers.ticketing.RemoteFieldApi.Raw, @@ -12,30 +15,22 @@ export const RemoteFieldApi: core.serialization.ObjectSchema< > = core.serialization.object({ schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()), remoteKeyName: core.serialization.property("remote_key_name", core.serialization.string()), - remoteEndpointInfo: core.serialization.property( - "remote_endpoint_info", - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteEndpointInfo) - ), + remoteEndpointInfo: core.serialization.property("remote_endpoint_info", RemoteEndpointInfo), exampleValues: core.serialization.property( "example_values", core.serialization.list(core.serialization.unknown()).optional() ), - advancedMetadata: core.serialization.property( - "advanced_metadata", - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.AdvancedMetadata).optional() - ), - coverage: core.serialization - .lazy(async () => (await import("../../..")).ticketing.RemoteFieldApiCoverage) - .optional(), + advancedMetadata: core.serialization.property("advanced_metadata", AdvancedMetadata.optional()), + coverage: RemoteFieldApiCoverage.optional(), }); export declare namespace RemoteFieldApi { interface Raw { schema: Record; remote_key_name: string; - remote_endpoint_info: serializers.ticketing.RemoteEndpointInfo.Raw; + remote_endpoint_info: RemoteEndpointInfo.Raw; example_values?: unknown[] | null; - advanced_metadata?: serializers.ticketing.AdvancedMetadata.Raw | null; - coverage?: serializers.ticketing.RemoteFieldApiCoverage.Raw | null; + advanced_metadata?: AdvancedMetadata.Raw | null; + coverage?: RemoteFieldApiCoverage.Raw | null; } } diff --git a/src/serialization/resources/ticketing/types/RemoteFieldApiCoverage.ts b/src/serialization/resources/ticketing/types/RemoteFieldApiCoverage.ts index 1669af96b..c6fb85821 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldApiCoverage.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldApiCoverage.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteFieldApiCoverage: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/RemoteFieldApiResponse.ts b/src/serialization/resources/ticketing/types/RemoteFieldApiResponse.ts index 9cc40eb6c..a8dc58c2e 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldApiResponse.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldApiResponse.ts @@ -2,94 +2,40 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldApi } from "./RemoteFieldApi"; export const RemoteFieldApiResponse: core.serialization.ObjectSchema< serializers.ticketing.RemoteFieldApiResponse.Raw, Merge.ticketing.RemoteFieldApiResponse > = core.serialization.object({ - ticket: core.serialization.property( - "Ticket", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldApi)) - .optional() - ), - comment: core.serialization.property( - "Comment", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldApi)) - .optional() - ), - project: core.serialization.property( - "Project", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldApi)) - .optional() - ), - collection: core.serialization.property( - "Collection", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldApi)) - .optional() - ), - user: core.serialization.property( - "User", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldApi)) - .optional() - ), - role: core.serialization.property( - "Role", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldApi)) - .optional() - ), - account: core.serialization.property( - "Account", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldApi)) - .optional() - ), - team: core.serialization.property( - "Team", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldApi)) - .optional() - ), - attachment: core.serialization.property( - "Attachment", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldApi)) - .optional() - ), - tag: core.serialization.property( - "Tag", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldApi)) - .optional() - ), - contact: core.serialization.property( - "Contact", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldApi)) - .optional() - ), + ticket: core.serialization.property("Ticket", core.serialization.list(RemoteFieldApi).optional()), + comment: core.serialization.property("Comment", core.serialization.list(RemoteFieldApi).optional()), + project: core.serialization.property("Project", core.serialization.list(RemoteFieldApi).optional()), + collection: core.serialization.property("Collection", core.serialization.list(RemoteFieldApi).optional()), + user: core.serialization.property("User", core.serialization.list(RemoteFieldApi).optional()), + role: core.serialization.property("Role", core.serialization.list(RemoteFieldApi).optional()), + account: core.serialization.property("Account", core.serialization.list(RemoteFieldApi).optional()), + team: core.serialization.property("Team", core.serialization.list(RemoteFieldApi).optional()), + attachment: core.serialization.property("Attachment", core.serialization.list(RemoteFieldApi).optional()), + tag: core.serialization.property("Tag", core.serialization.list(RemoteFieldApi).optional()), + contact: core.serialization.property("Contact", core.serialization.list(RemoteFieldApi).optional()), }); export declare namespace RemoteFieldApiResponse { interface Raw { - Ticket?: serializers.ticketing.RemoteFieldApi.Raw[] | null; - Comment?: serializers.ticketing.RemoteFieldApi.Raw[] | null; - Project?: serializers.ticketing.RemoteFieldApi.Raw[] | null; - Collection?: serializers.ticketing.RemoteFieldApi.Raw[] | null; - User?: serializers.ticketing.RemoteFieldApi.Raw[] | null; - Role?: serializers.ticketing.RemoteFieldApi.Raw[] | null; - Account?: serializers.ticketing.RemoteFieldApi.Raw[] | null; - Team?: serializers.ticketing.RemoteFieldApi.Raw[] | null; - Attachment?: serializers.ticketing.RemoteFieldApi.Raw[] | null; - Tag?: serializers.ticketing.RemoteFieldApi.Raw[] | null; - Contact?: serializers.ticketing.RemoteFieldApi.Raw[] | null; + Ticket?: RemoteFieldApi.Raw[] | null; + Comment?: RemoteFieldApi.Raw[] | null; + Project?: RemoteFieldApi.Raw[] | null; + Collection?: RemoteFieldApi.Raw[] | null; + User?: RemoteFieldApi.Raw[] | null; + Role?: RemoteFieldApi.Raw[] | null; + Account?: RemoteFieldApi.Raw[] | null; + Team?: RemoteFieldApi.Raw[] | null; + Attachment?: RemoteFieldApi.Raw[] | null; + Tag?: RemoteFieldApi.Raw[] | null; + Contact?: RemoteFieldApi.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/RemoteFieldClass.ts b/src/serialization/resources/ticketing/types/RemoteFieldClass.ts index ecd30ddf5..7fd079f44 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldClass.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldClass.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldClassFieldType } from "./RemoteFieldClassFieldType"; +import { RemoteFieldClassFieldFormat } from "./RemoteFieldClassFieldFormat"; +import { RemoteFieldClassFieldChoicesItem } from "./RemoteFieldClassFieldChoicesItem"; +import { ItemSchema } from "./ItemSchema"; export const RemoteFieldClass: core.serialization.ObjectSchema< serializers.ticketing.RemoteFieldClass.Raw, @@ -16,28 +20,13 @@ export const RemoteFieldClass: core.serialization.ObjectSchema< description: core.serialization.string().optional(), isCustom: core.serialization.property("is_custom", core.serialization.boolean().optional()), isRequired: core.serialization.property("is_required", core.serialization.boolean().optional()), - fieldType: core.serialization.property( - "field_type", - core.serialization.lazy(async () => (await import("../../..")).ticketing.RemoteFieldClassFieldType).optional() - ), - fieldFormat: core.serialization.property( - "field_format", - core.serialization.lazy(async () => (await import("../../..")).ticketing.RemoteFieldClassFieldFormat).optional() - ), + fieldType: core.serialization.property("field_type", RemoteFieldClassFieldType.optional()), + fieldFormat: core.serialization.property("field_format", RemoteFieldClassFieldFormat.optional()), fieldChoices: core.serialization.property( "field_choices", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../..")).ticketing.RemoteFieldClassFieldChoicesItem - ) - ) - .optional() - ), - itemSchema: core.serialization.property( - "item_schema", - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ItemSchema).optional() + core.serialization.list(RemoteFieldClassFieldChoicesItem).optional() ), + itemSchema: core.serialization.property("item_schema", ItemSchema.optional()), }); export declare namespace RemoteFieldClass { @@ -48,9 +37,9 @@ export declare namespace RemoteFieldClass { description?: string | null; is_custom?: boolean | null; is_required?: boolean | null; - field_type?: serializers.ticketing.RemoteFieldClassFieldType.Raw | null; - field_format?: serializers.ticketing.RemoteFieldClassFieldFormat.Raw | null; - field_choices?: serializers.ticketing.RemoteFieldClassFieldChoicesItem.Raw[] | null; - item_schema?: serializers.ticketing.ItemSchema.Raw | null; + field_type?: RemoteFieldClassFieldType.Raw | null; + field_format?: RemoteFieldClassFieldFormat.Raw | null; + field_choices?: RemoteFieldClassFieldChoicesItem.Raw[] | null; + item_schema?: ItemSchema.Raw | null; } } diff --git a/src/serialization/resources/ticketing/types/RemoteFieldClassFieldChoicesItem.ts b/src/serialization/resources/ticketing/types/RemoteFieldClassFieldChoicesItem.ts index f3432d20c..da50a2658 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldClassFieldChoicesItem.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldClassFieldChoicesItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteFieldClassFieldChoicesItem: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/RemoteFieldClassFieldFormat.ts b/src/serialization/resources/ticketing/types/RemoteFieldClassFieldFormat.ts index af0d71036..5ed706755 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldClassFieldFormat.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldClassFieldFormat.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldFormatEnum } from "./FieldFormatEnum"; export const RemoteFieldClassFieldFormat: core.serialization.Schema< serializers.ticketing.RemoteFieldClassFieldFormat.Raw, Merge.ticketing.RemoteFieldClassFieldFormat -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazy(async () => (await import("../../..")).ticketing.FieldFormatEnum), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), FieldFormatEnum]); export declare namespace RemoteFieldClassFieldFormat { - type Raw = string | serializers.ticketing.FieldFormatEnum.Raw; + type Raw = string | FieldFormatEnum.Raw; } diff --git a/src/serialization/resources/ticketing/types/RemoteFieldClassFieldType.ts b/src/serialization/resources/ticketing/types/RemoteFieldClassFieldType.ts index 6d9224836..8172d5ece 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldClassFieldType.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldClassFieldType.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { FieldTypeEnum } from "./FieldTypeEnum"; export const RemoteFieldClassFieldType: core.serialization.Schema< serializers.ticketing.RemoteFieldClassFieldType.Raw, Merge.ticketing.RemoteFieldClassFieldType -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazy(async () => (await import("../../..")).ticketing.FieldTypeEnum), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), FieldTypeEnum]); export declare namespace RemoteFieldClassFieldType { - type Raw = string | serializers.ticketing.FieldTypeEnum.Raw; + type Raw = string | FieldTypeEnum.Raw; } diff --git a/src/serialization/resources/ticketing/types/RemoteFieldRemoteFieldClass.ts b/src/serialization/resources/ticketing/types/RemoteFieldRemoteFieldClass.ts index 96e4add47..b642bb1de 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldRemoteFieldClass.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldRemoteFieldClass.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldClass } from "./RemoteFieldClass"; export const RemoteFieldRemoteFieldClass: core.serialization.Schema< serializers.ticketing.RemoteFieldRemoteFieldClass.Raw, Merge.ticketing.RemoteFieldRemoteFieldClass -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldClass), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteFieldClass]); export declare namespace RemoteFieldRemoteFieldClass { - type Raw = string | serializers.ticketing.RemoteFieldClass.Raw; + type Raw = string | RemoteFieldClass.Raw; } diff --git a/src/serialization/resources/ticketing/types/RemoteFieldRequest.ts b/src/serialization/resources/ticketing/types/RemoteFieldRequest.ts index a0704845a..5eb649b6f 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldRequest.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldRequest.ts @@ -2,24 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldRequestRemoteFieldClass } from "./RemoteFieldRequestRemoteFieldClass"; export const RemoteFieldRequest: core.serialization.ObjectSchema< serializers.ticketing.RemoteFieldRequest.Raw, Merge.ticketing.RemoteFieldRequest > = core.serialization.object({ - remoteFieldClass: core.serialization.property( - "remote_field_class", - core.serialization.lazy(async () => (await import("../../..")).ticketing.RemoteFieldRequestRemoteFieldClass) - ), + remoteFieldClass: core.serialization.property("remote_field_class", RemoteFieldRequestRemoteFieldClass), value: core.serialization.string().optional(), }); export declare namespace RemoteFieldRequest { interface Raw { - remote_field_class: serializers.ticketing.RemoteFieldRequestRemoteFieldClass.Raw; + remote_field_class: RemoteFieldRequestRemoteFieldClass.Raw; value?: string | null; } } diff --git a/src/serialization/resources/ticketing/types/RemoteFieldRequestRemoteFieldClass.ts b/src/serialization/resources/ticketing/types/RemoteFieldRequestRemoteFieldClass.ts index 41f313bfe..e27e68fdd 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldRequestRemoteFieldClass.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldRequestRemoteFieldClass.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteFieldClass } from "./RemoteFieldClass"; export const RemoteFieldRequestRemoteFieldClass: core.serialization.Schema< serializers.ticketing.RemoteFieldRequestRemoteFieldClass.Raw, Merge.ticketing.RemoteFieldRequestRemoteFieldClass -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldClass), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteFieldClass]); export declare namespace RemoteFieldRequestRemoteFieldClass { - type Raw = string | serializers.ticketing.RemoteFieldClass.Raw; + type Raw = string | RemoteFieldClass.Raw; } diff --git a/src/serialization/resources/ticketing/types/RemoteKey.ts b/src/serialization/resources/ticketing/types/RemoteKey.ts index 904381125..4acf48d6d 100644 --- a/src/serialization/resources/ticketing/types/RemoteKey.ts +++ b/src/serialization/resources/ticketing/types/RemoteKey.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RemoteKey: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/RemoteResponse.ts b/src/serialization/resources/ticketing/types/RemoteResponse.ts index 6967a0dca..657a03fb7 100644 --- a/src/serialization/resources/ticketing/types/RemoteResponse.ts +++ b/src/serialization/resources/ticketing/types/RemoteResponse.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ResponseTypeEnum } from "./ResponseTypeEnum"; export const RemoteResponse: core.serialization.ObjectSchema< serializers.ticketing.RemoteResponse.Raw, @@ -18,10 +19,7 @@ export const RemoteResponse: core.serialization.ObjectSchema< "response_headers", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - responseType: core.serialization.property( - "response_type", - core.serialization.lazy(async () => (await import("../../..")).ticketing.ResponseTypeEnum).optional() - ), + responseType: core.serialization.property("response_type", ResponseTypeEnum.optional()), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), }); @@ -32,7 +30,7 @@ export declare namespace RemoteResponse { status: number; response?: unknown; response_headers?: Record | null; - response_type?: serializers.ticketing.ResponseTypeEnum.Raw | null; + response_type?: ResponseTypeEnum.Raw | null; headers?: Record | null; } } diff --git a/src/serialization/resources/ticketing/types/RequestFormatEnum.ts b/src/serialization/resources/ticketing/types/RequestFormatEnum.ts index ff92d2a12..4a3c99390 100644 --- a/src/serialization/resources/ticketing/types/RequestFormatEnum.ts +++ b/src/serialization/resources/ticketing/types/RequestFormatEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RequestFormatEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/ResponseTypeEnum.ts b/src/serialization/resources/ticketing/types/ResponseTypeEnum.ts index 77005c84a..fb300a362 100644 --- a/src/serialization/resources/ticketing/types/ResponseTypeEnum.ts +++ b/src/serialization/resources/ticketing/types/ResponseTypeEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ResponseTypeEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/Role.ts b/src/serialization/resources/ticketing/types/Role.ts index 14c45de25..35b9fae42 100644 --- a/src/serialization/resources/ticketing/types/Role.ts +++ b/src/serialization/resources/ticketing/types/Role.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RoleTicketActionsItem } from "./RoleTicketActionsItem"; +import { RoleTicketAccess } from "./RoleTicketAccess"; +import { RemoteData } from "./RemoteData"; export const Role: core.serialization.ObjectSchema = core.serialization.object({ @@ -15,29 +18,15 @@ export const Role: core.serialization.ObjectSchema (await import("../../..")).ticketing.RoleTicketActionsItem) - .optional() - ) - .optional() - ), - ticketAccess: core.serialization.property( - "ticket_access", - core.serialization.lazy(async () => (await import("../../..")).ticketing.RoleTicketAccess).optional() + core.serialization.list(RoleTicketActionsItem.optional()).optional() ), + ticketAccess: core.serialization.property("ticket_access", RoleTicketAccess.optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Role { @@ -47,10 +36,10 @@ export declare namespace Role { created_at?: string | null; modified_at?: string | null; name?: string | null; - ticket_actions?: (serializers.ticketing.RoleTicketActionsItem.Raw | null | undefined)[] | null; - ticket_access?: serializers.ticketing.RoleTicketAccess.Raw | null; + ticket_actions?: (RoleTicketActionsItem.Raw | null | undefined)[] | null; + ticket_access?: RoleTicketAccess.Raw | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ticketing.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/RoleEnum.ts b/src/serialization/resources/ticketing/types/RoleEnum.ts index 2921a2c2b..9ef716508 100644 --- a/src/serialization/resources/ticketing/types/RoleEnum.ts +++ b/src/serialization/resources/ticketing/types/RoleEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const RoleEnum: core.serialization.Schema = diff --git a/src/serialization/resources/ticketing/types/RoleTicketAccess.ts b/src/serialization/resources/ticketing/types/RoleTicketAccess.ts index faa8d0cc5..4c58fddd2 100644 --- a/src/serialization/resources/ticketing/types/RoleTicketAccess.ts +++ b/src/serialization/resources/ticketing/types/RoleTicketAccess.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TicketAccessEnum } from "./TicketAccessEnum"; export const RoleTicketAccess: core.serialization.Schema< serializers.ticketing.RoleTicketAccess.Raw, Merge.ticketing.RoleTicketAccess -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketAccessEnum), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TicketAccessEnum]); export declare namespace RoleTicketAccess { - type Raw = string | serializers.ticketing.TicketAccessEnum.Raw; + type Raw = string | TicketAccessEnum.Raw; } diff --git a/src/serialization/resources/ticketing/types/RoleTicketActionsItem.ts b/src/serialization/resources/ticketing/types/RoleTicketActionsItem.ts index 08b56c2f0..aafc96813 100644 --- a/src/serialization/resources/ticketing/types/RoleTicketActionsItem.ts +++ b/src/serialization/resources/ticketing/types/RoleTicketActionsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TicketActionsEnum } from "./TicketActionsEnum"; export const RoleTicketActionsItem: core.serialization.Schema< serializers.ticketing.RoleTicketActionsItem.Raw, Merge.ticketing.RoleTicketActionsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketActionsEnum), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), TicketActionsEnum]); export declare namespace RoleTicketActionsItem { - type Raw = string | serializers.ticketing.TicketActionsEnum.Raw; + type Raw = string | TicketActionsEnum.Raw; } diff --git a/src/serialization/resources/ticketing/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/serialization/resources/ticketing/types/SelectiveSyncConfigurationsUsageEnum.ts index 0c52dfcef..111b26381 100644 --- a/src/serialization/resources/ticketing/types/SelectiveSyncConfigurationsUsageEnum.ts +++ b/src/serialization/resources/ticketing/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const SelectiveSyncConfigurationsUsageEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/SyncStatus.ts b/src/serialization/resources/ticketing/types/SyncStatus.ts index db2a7a840..0d8ca5788 100644 --- a/src/serialization/resources/ticketing/types/SyncStatus.ts +++ b/src/serialization/resources/ticketing/types/SyncStatus.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { SyncStatusStatusEnum } from "./SyncStatusStatusEnum"; +import { SelectiveSyncConfigurationsUsageEnum } from "./SelectiveSyncConfigurationsUsageEnum"; export const SyncStatus: core.serialization.ObjectSchema< serializers.ticketing.SyncStatus.Raw, @@ -14,13 +16,11 @@ export const SyncStatus: core.serialization.ObjectSchema< modelId: core.serialization.property("model_id", core.serialization.string()), lastSyncStart: core.serialization.property("last_sync_start", core.serialization.date().optional()), nextSyncStart: core.serialization.property("next_sync_start", core.serialization.date().optional()), - status: core.serialization.lazy(async () => (await import("../../..")).ticketing.SyncStatusStatusEnum), + status: SyncStatusStatusEnum, isInitialSync: core.serialization.property("is_initial_sync", core.serialization.boolean()), selectiveSyncConfigurationsUsage: core.serialization.property( "selective_sync_configurations_usage", - core.serialization - .lazy(async () => (await import("../../..")).ticketing.SelectiveSyncConfigurationsUsageEnum) - .optional() + SelectiveSyncConfigurationsUsageEnum.optional() ), }); @@ -30,8 +30,8 @@ export declare namespace SyncStatus { model_id: string; last_sync_start?: string | null; next_sync_start?: string | null; - status: serializers.ticketing.SyncStatusStatusEnum.Raw; + status: SyncStatusStatusEnum.Raw; is_initial_sync: boolean; - selective_sync_configurations_usage?: serializers.ticketing.SelectiveSyncConfigurationsUsageEnum.Raw | null; + selective_sync_configurations_usage?: SelectiveSyncConfigurationsUsageEnum.Raw | null; } } diff --git a/src/serialization/resources/ticketing/types/SyncStatusStatusEnum.ts b/src/serialization/resources/ticketing/types/SyncStatusStatusEnum.ts index 135abb1a3..50cfc009a 100644 --- a/src/serialization/resources/ticketing/types/SyncStatusStatusEnum.ts +++ b/src/serialization/resources/ticketing/types/SyncStatusStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const SyncStatusStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/Tag.ts b/src/serialization/resources/ticketing/types/Tag.ts index 51c26a50a..1881b3b50 100644 --- a/src/serialization/resources/ticketing/types/Tag.ts +++ b/src/serialization/resources/ticketing/types/Tag.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; export const Tag: core.serialization.ObjectSchema = core.serialization.object({ @@ -18,12 +19,7 @@ export const Tag: core.serialization.ObjectSchema (await import("../../..")).ticketing.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Tag { @@ -35,6 +31,6 @@ export declare namespace Tag { name?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ticketing.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/Team.ts b/src/serialization/resources/ticketing/types/Team.ts index 455022819..80e7423b3 100644 --- a/src/serialization/resources/ticketing/types/Team.ts +++ b/src/serialization/resources/ticketing/types/Team.ts @@ -2,9 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { RemoteData } from "./RemoteData"; export const Team: core.serialization.ObjectSchema = core.serialization.object({ @@ -19,12 +20,7 @@ export const Team: core.serialization.ObjectSchema (await import("../../..")).ticketing.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Team { @@ -37,6 +33,6 @@ export declare namespace Team { description?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ticketing.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/Ticket.ts b/src/serialization/resources/ticketing/types/Ticket.ts index dc9574441..a47562f27 100644 --- a/src/serialization/resources/ticketing/types/Ticket.ts +++ b/src/serialization/resources/ticketing/types/Ticket.ts @@ -2,9 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TicketAssigneesItem } from "./TicketAssigneesItem"; +import { TicketCreator } from "./TicketCreator"; +import { TicketStatus } from "./TicketStatus"; +import { TicketCollectionsItem } from "./TicketCollectionsItem"; +import { TicketAccount } from "./TicketAccount"; +import { TicketContact } from "./TicketContact"; +import { TicketPriority } from "./TicketPriority"; +import { RemoteData } from "./RemoteData"; +import { RemoteField } from "./RemoteField"; export const Ticket: core.serialization.ObjectSchema = core.serialization.object({ @@ -13,35 +22,21 @@ export const Ticket: core.serialization.ObjectSchema (await import("../../..")).ticketing.TicketAssigneesItem).optional() - ) - .optional(), - creator: core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketCreator).optional(), + assignees: core.serialization.list(TicketAssigneesItem.optional()).optional(), + creator: TicketCreator.optional(), dueDate: core.serialization.property("due_date", core.serialization.date().optional()), - status: core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketStatus).optional(), + status: TicketStatus.optional(), description: core.serialization.string().optional(), - collections: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).ticketing.TicketCollectionsItem) - .optional() - ) - .optional(), + collections: core.serialization.list(TicketCollectionsItem.optional()).optional(), ticketType: core.serialization.property("ticket_type", core.serialization.string().optional()), - account: core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketAccount).optional(), - contact: core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketContact).optional(), + account: TicketAccount.optional(), + contact: TicketContact.optional(), parentTicket: core.serialization.property( "parent_ticket", - core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketParentTicket).optional() + core.serialization.lazy(() => serializers.ticketing.TicketParentTicket).optional() ), attachments: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).ticketing.TicketAttachmentsItem) - .optional() - ) + .list(core.serialization.lazy(() => serializers.ticketing.TicketAttachmentsItem).optional()) .optional(), tags: core.serialization.list(core.serialization.string().optional()).optional(), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), @@ -49,23 +44,13 @@ export const Ticket: core.serialization.ObjectSchema (await import("../../..")).ticketing.TicketPriority).optional(), + priority: TicketPriority.optional(), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteData)) - .optional() - ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteField)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace Ticket { @@ -75,15 +60,15 @@ export declare namespace Ticket { created_at?: string | null; modified_at?: string | null; name?: string | null; - assignees?: (serializers.ticketing.TicketAssigneesItem.Raw | null | undefined)[] | null; - creator?: serializers.ticketing.TicketCreator.Raw | null; + assignees?: (TicketAssigneesItem.Raw | null | undefined)[] | null; + creator?: TicketCreator.Raw | null; due_date?: string | null; - status?: serializers.ticketing.TicketStatus.Raw | null; + status?: TicketStatus.Raw | null; description?: string | null; - collections?: (serializers.ticketing.TicketCollectionsItem.Raw | null | undefined)[] | null; + collections?: (TicketCollectionsItem.Raw | null | undefined)[] | null; ticket_type?: string | null; - account?: serializers.ticketing.TicketAccount.Raw | null; - contact?: serializers.ticketing.TicketContact.Raw | null; + account?: TicketAccount.Raw | null; + contact?: TicketContact.Raw | null; parent_ticket?: serializers.ticketing.TicketParentTicket.Raw | null; attachments?: (serializers.ticketing.TicketAttachmentsItem.Raw | null | undefined)[] | null; tags?: (string | null | undefined)[] | null; @@ -92,9 +77,9 @@ export declare namespace Ticket { completed_at?: string | null; remote_was_deleted?: boolean | null; ticket_url?: string | null; - priority?: serializers.ticketing.TicketPriority.Raw | null; + priority?: TicketPriority.Raw | null; field_mappings?: Record | null; - remote_data?: serializers.ticketing.RemoteData.Raw[] | null; - remote_fields?: serializers.ticketing.RemoteField.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; + remote_fields?: RemoteField.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/TicketAccessEnum.ts b/src/serialization/resources/ticketing/types/TicketAccessEnum.ts index e941dcf38..f19560f62 100644 --- a/src/serialization/resources/ticketing/types/TicketAccessEnum.ts +++ b/src/serialization/resources/ticketing/types/TicketAccessEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TicketAccessEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/TicketAccount.ts b/src/serialization/resources/ticketing/types/TicketAccount.ts index b2d077ab4..9e8efa767 100644 --- a/src/serialization/resources/ticketing/types/TicketAccount.ts +++ b/src/serialization/resources/ticketing/types/TicketAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const TicketAccount: core.serialization.Schema< serializers.ticketing.TicketAccount.Raw, Merge.ticketing.TicketAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace TicketAccount { - type Raw = string | serializers.ticketing.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketActionsEnum.ts b/src/serialization/resources/ticketing/types/TicketActionsEnum.ts index 89604a509..b94113ad8 100644 --- a/src/serialization/resources/ticketing/types/TicketActionsEnum.ts +++ b/src/serialization/resources/ticketing/types/TicketActionsEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TicketActionsEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/TicketAssigneesItem.ts b/src/serialization/resources/ticketing/types/TicketAssigneesItem.ts index 34892adb1..f5e100b13 100644 --- a/src/serialization/resources/ticketing/types/TicketAssigneesItem.ts +++ b/src/serialization/resources/ticketing/types/TicketAssigneesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const TicketAssigneesItem: core.serialization.Schema< serializers.ticketing.TicketAssigneesItem.Raw, Merge.ticketing.TicketAssigneesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace TicketAssigneesItem { - type Raw = string | serializers.ticketing.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketAttachmentsItem.ts b/src/serialization/resources/ticketing/types/TicketAttachmentsItem.ts index fa4e19be7..ea49e7e7f 100644 --- a/src/serialization/resources/ticketing/types/TicketAttachmentsItem.ts +++ b/src/serialization/resources/ticketing/types/TicketAttachmentsItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TicketAttachmentsItem: core.serialization.Schema< @@ -11,7 +11,7 @@ export const TicketAttachmentsItem: core.serialization.Schema< Merge.ticketing.TicketAttachmentsItem > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Attachment), + core.serialization.lazyObject(() => serializers.ticketing.Attachment), ]); export declare namespace TicketAttachmentsItem { diff --git a/src/serialization/resources/ticketing/types/TicketCollectionsItem.ts b/src/serialization/resources/ticketing/types/TicketCollectionsItem.ts index 867890a09..1156e1020 100644 --- a/src/serialization/resources/ticketing/types/TicketCollectionsItem.ts +++ b/src/serialization/resources/ticketing/types/TicketCollectionsItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TicketCollectionsItem: core.serialization.Schema< @@ -11,7 +11,7 @@ export const TicketCollectionsItem: core.serialization.Schema< Merge.ticketing.TicketCollectionsItem > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Collection), + core.serialization.lazyObject(() => serializers.ticketing.Collection), ]); export declare namespace TicketCollectionsItem { diff --git a/src/serialization/resources/ticketing/types/TicketContact.ts b/src/serialization/resources/ticketing/types/TicketContact.ts index 8c5985522..1e8de6a59 100644 --- a/src/serialization/resources/ticketing/types/TicketContact.ts +++ b/src/serialization/resources/ticketing/types/TicketContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const TicketContact: core.serialization.Schema< serializers.ticketing.TicketContact.Raw, Merge.ticketing.TicketContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace TicketContact { - type Raw = string | serializers.ticketing.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketCreator.ts b/src/serialization/resources/ticketing/types/TicketCreator.ts index 4ac7ecd3b..1ecba8482 100644 --- a/src/serialization/resources/ticketing/types/TicketCreator.ts +++ b/src/serialization/resources/ticketing/types/TicketCreator.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const TicketCreator: core.serialization.Schema< serializers.ticketing.TicketCreator.Raw, Merge.ticketing.TicketCreator -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace TicketCreator { - type Raw = string | serializers.ticketing.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketParentTicket.ts b/src/serialization/resources/ticketing/types/TicketParentTicket.ts index 3ef2833da..907914602 100644 --- a/src/serialization/resources/ticketing/types/TicketParentTicket.ts +++ b/src/serialization/resources/ticketing/types/TicketParentTicket.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TicketParentTicket: core.serialization.Schema< @@ -11,7 +11,7 @@ export const TicketParentTicket: core.serialization.Schema< Merge.ticketing.TicketParentTicket > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Ticket), + core.serialization.lazyObject(() => serializers.ticketing.Ticket), ]); export declare namespace TicketParentTicket { diff --git a/src/serialization/resources/ticketing/types/TicketPriority.ts b/src/serialization/resources/ticketing/types/TicketPriority.ts index d2dfa7b00..62feb769e 100644 --- a/src/serialization/resources/ticketing/types/TicketPriority.ts +++ b/src/serialization/resources/ticketing/types/TicketPriority.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PriorityEnum } from "./PriorityEnum"; export const TicketPriority: core.serialization.Schema< serializers.ticketing.TicketPriority.Raw, Merge.ticketing.TicketPriority -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ticketing.PriorityEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PriorityEnum, core.serialization.string()]); export declare namespace TicketPriority { - type Raw = serializers.ticketing.PriorityEnum.Raw | string; + type Raw = PriorityEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/TicketRequest.ts b/src/serialization/resources/ticketing/types/TicketRequest.ts index e66789435..0e337de61 100644 --- a/src/serialization/resources/ticketing/types/TicketRequest.ts +++ b/src/serialization/resources/ticketing/types/TicketRequest.ts @@ -2,53 +2,40 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TicketRequestAssigneesItem } from "./TicketRequestAssigneesItem"; +import { TicketRequestCreator } from "./TicketRequestCreator"; +import { TicketRequestStatus } from "./TicketRequestStatus"; +import { TicketRequestCollectionsItem } from "./TicketRequestCollectionsItem"; +import { TicketRequestAccount } from "./TicketRequestAccount"; +import { TicketRequestContact } from "./TicketRequestContact"; +import { TicketRequestParentTicket } from "./TicketRequestParentTicket"; +import { TicketRequestAttachmentsItem } from "./TicketRequestAttachmentsItem"; +import { TicketRequestPriority } from "./TicketRequestPriority"; +import { RemoteFieldRequest } from "./RemoteFieldRequest"; export const TicketRequest: core.serialization.ObjectSchema< serializers.ticketing.TicketRequest.Raw, Merge.ticketing.TicketRequest > = core.serialization.object({ name: core.serialization.string().optional(), - assignees: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).ticketing.TicketRequestAssigneesItem) - .optional() - ) - .optional(), - creator: core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketRequestCreator).optional(), + assignees: core.serialization.list(TicketRequestAssigneesItem.optional()).optional(), + creator: TicketRequestCreator.optional(), dueDate: core.serialization.property("due_date", core.serialization.date().optional()), - status: core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketRequestStatus).optional(), + status: TicketRequestStatus.optional(), description: core.serialization.string().optional(), - collections: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).ticketing.TicketRequestCollectionsItem) - .optional() - ) - .optional(), + collections: core.serialization.list(TicketRequestCollectionsItem.optional()).optional(), ticketType: core.serialization.property("ticket_type", core.serialization.string().optional()), - account: core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketRequestAccount).optional(), - contact: core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketRequestContact).optional(), - parentTicket: core.serialization.property( - "parent_ticket", - core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketRequestParentTicket).optional() - ), - attachments: core.serialization - .list( - core.serialization - .lazy(async () => (await import("../../..")).ticketing.TicketRequestAttachmentsItem) - .optional() - ) - .optional(), + account: TicketRequestAccount.optional(), + contact: TicketRequestContact.optional(), + parentTicket: core.serialization.property("parent_ticket", TicketRequestParentTicket.optional()), + attachments: core.serialization.list(TicketRequestAttachmentsItem.optional()).optional(), tags: core.serialization.list(core.serialization.string().optional()).optional(), completedAt: core.serialization.property("completed_at", core.serialization.date().optional()), ticketUrl: core.serialization.property("ticket_url", core.serialization.string().optional()), - priority: core.serialization - .lazy(async () => (await import("../../..")).ticketing.TicketRequestPriority) - .optional(), + priority: TicketRequestPriority.optional(), integrationParams: core.serialization.property( "integration_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() @@ -57,34 +44,29 @@ export const TicketRequest: core.serialization.ObjectSchema< "linked_account_params", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteFields: core.serialization.property( - "remote_fields", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteFieldRequest)) - .optional() - ), + remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace TicketRequest { interface Raw { name?: string | null; - assignees?: (serializers.ticketing.TicketRequestAssigneesItem.Raw | null | undefined)[] | null; - creator?: serializers.ticketing.TicketRequestCreator.Raw | null; + assignees?: (TicketRequestAssigneesItem.Raw | null | undefined)[] | null; + creator?: TicketRequestCreator.Raw | null; due_date?: string | null; - status?: serializers.ticketing.TicketRequestStatus.Raw | null; + status?: TicketRequestStatus.Raw | null; description?: string | null; - collections?: (serializers.ticketing.TicketRequestCollectionsItem.Raw | null | undefined)[] | null; + collections?: (TicketRequestCollectionsItem.Raw | null | undefined)[] | null; ticket_type?: string | null; - account?: serializers.ticketing.TicketRequestAccount.Raw | null; - contact?: serializers.ticketing.TicketRequestContact.Raw | null; - parent_ticket?: serializers.ticketing.TicketRequestParentTicket.Raw | null; - attachments?: (serializers.ticketing.TicketRequestAttachmentsItem.Raw | null | undefined)[] | null; + account?: TicketRequestAccount.Raw | null; + contact?: TicketRequestContact.Raw | null; + parent_ticket?: TicketRequestParentTicket.Raw | null; + attachments?: (TicketRequestAttachmentsItem.Raw | null | undefined)[] | null; tags?: (string | null | undefined)[] | null; completed_at?: string | null; ticket_url?: string | null; - priority?: serializers.ticketing.TicketRequestPriority.Raw | null; + priority?: TicketRequestPriority.Raw | null; integration_params?: Record | null; linked_account_params?: Record | null; - remote_fields?: serializers.ticketing.RemoteFieldRequest.Raw[] | null; + remote_fields?: RemoteFieldRequest.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/TicketRequestAccount.ts b/src/serialization/resources/ticketing/types/TicketRequestAccount.ts index 40bfda797..acf3788db 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestAccount.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestAccount.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Account } from "./Account"; export const TicketRequestAccount: core.serialization.Schema< serializers.ticketing.TicketRequestAccount.Raw, Merge.ticketing.TicketRequestAccount -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Account), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace TicketRequestAccount { - type Raw = string | serializers.ticketing.Account.Raw; + type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketRequestAssigneesItem.ts b/src/serialization/resources/ticketing/types/TicketRequestAssigneesItem.ts index 53a88d636..db1d099ea 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestAssigneesItem.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestAssigneesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const TicketRequestAssigneesItem: core.serialization.Schema< serializers.ticketing.TicketRequestAssigneesItem.Raw, Merge.ticketing.TicketRequestAssigneesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace TicketRequestAssigneesItem { - type Raw = string | serializers.ticketing.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketRequestAttachmentsItem.ts b/src/serialization/resources/ticketing/types/TicketRequestAttachmentsItem.ts index e20eea822..f91d714a4 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestAttachmentsItem.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestAttachmentsItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TicketRequestAttachmentsItem: core.serialization.Schema< @@ -11,7 +11,7 @@ export const TicketRequestAttachmentsItem: core.serialization.Schema< Merge.ticketing.TicketRequestAttachmentsItem > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Attachment), + core.serialization.lazyObject(() => serializers.ticketing.Attachment), ]); export declare namespace TicketRequestAttachmentsItem { diff --git a/src/serialization/resources/ticketing/types/TicketRequestCollectionsItem.ts b/src/serialization/resources/ticketing/types/TicketRequestCollectionsItem.ts index 5e69af54e..309d30725 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestCollectionsItem.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestCollectionsItem.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TicketRequestCollectionsItem: core.serialization.Schema< @@ -11,7 +11,7 @@ export const TicketRequestCollectionsItem: core.serialization.Schema< Merge.ticketing.TicketRequestCollectionsItem > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Collection), + core.serialization.lazyObject(() => serializers.ticketing.Collection), ]); export declare namespace TicketRequestCollectionsItem { diff --git a/src/serialization/resources/ticketing/types/TicketRequestContact.ts b/src/serialization/resources/ticketing/types/TicketRequestContact.ts index 843373c70..f57bedabf 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestContact.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestContact.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; export const TicketRequestContact: core.serialization.Schema< serializers.ticketing.TicketRequestContact.Raw, Merge.ticketing.TicketRequestContact -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Contact), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace TicketRequestContact { - type Raw = string | serializers.ticketing.Contact.Raw; + type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketRequestCreator.ts b/src/serialization/resources/ticketing/types/TicketRequestCreator.ts index 05c6e2c56..9bbe6e695 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestCreator.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestCreator.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { User } from "./User"; export const TicketRequestCreator: core.serialization.Schema< serializers.ticketing.TicketRequestCreator.Raw, Merge.ticketing.TicketRequestCreator -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.User), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace TicketRequestCreator { - type Raw = string | serializers.ticketing.User.Raw; + type Raw = string | User.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketRequestParentTicket.ts b/src/serialization/resources/ticketing/types/TicketRequestParentTicket.ts index 65598e126..b0be4f9f1 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestParentTicket.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestParentTicket.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TicketRequestParentTicket: core.serialization.Schema< @@ -11,7 +11,7 @@ export const TicketRequestParentTicket: core.serialization.Schema< Merge.ticketing.TicketRequestParentTicket > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Ticket), + core.serialization.lazyObject(() => serializers.ticketing.Ticket), ]); export declare namespace TicketRequestParentTicket { diff --git a/src/serialization/resources/ticketing/types/TicketRequestPriority.ts b/src/serialization/resources/ticketing/types/TicketRequestPriority.ts index ff9949325..79cd0fa78 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestPriority.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestPriority.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { PriorityEnum } from "./PriorityEnum"; export const TicketRequestPriority: core.serialization.Schema< serializers.ticketing.TicketRequestPriority.Raw, Merge.ticketing.TicketRequestPriority -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ticketing.PriorityEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([PriorityEnum, core.serialization.string()]); export declare namespace TicketRequestPriority { - type Raw = serializers.ticketing.PriorityEnum.Raw | string; + type Raw = PriorityEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/TicketRequestStatus.ts b/src/serialization/resources/ticketing/types/TicketRequestStatus.ts index 50bce7f3c..37bc724ad 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestStatus.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TicketStatusEnum } from "./TicketStatusEnum"; export const TicketRequestStatus: core.serialization.Schema< serializers.ticketing.TicketRequestStatus.Raw, Merge.ticketing.TicketRequestStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([TicketStatusEnum, core.serialization.string()]); export declare namespace TicketRequestStatus { - type Raw = serializers.ticketing.TicketStatusEnum.Raw | string; + type Raw = TicketStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/TicketResponse.ts b/src/serialization/resources/ticketing/types/TicketResponse.ts index cd6c0074e..af65a156f 100644 --- a/src/serialization/resources/ticketing/types/TicketResponse.ts +++ b/src/serialization/resources/ticketing/types/TicketResponse.ts @@ -2,31 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const TicketResponse: core.serialization.ObjectSchema< serializers.ticketing.TicketResponse.Raw, Merge.ticketing.TicketResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Ticket), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.DebugModeLog)) - .optional(), + model: core.serialization.lazyObject(() => serializers.ticketing.Ticket), + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace TicketResponse { interface Raw { model: serializers.ticketing.Ticket.Raw; - warnings: serializers.ticketing.WarningValidationProblem.Raw[]; - errors: serializers.ticketing.ErrorValidationProblem.Raw[]; - logs?: serializers.ticketing.DebugModeLog.Raw[] | null; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/TicketStatus.ts b/src/serialization/resources/ticketing/types/TicketStatus.ts index 0340f30de..9b9543531 100644 --- a/src/serialization/resources/ticketing/types/TicketStatus.ts +++ b/src/serialization/resources/ticketing/types/TicketStatus.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { TicketStatusEnum } from "./TicketStatusEnum"; export const TicketStatus: core.serialization.Schema< serializers.ticketing.TicketStatus.Raw, Merge.ticketing.TicketStatus -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazy(async () => (await import("../../..")).ticketing.TicketStatusEnum), - core.serialization.string(), -]); +> = core.serialization.undiscriminatedUnion([TicketStatusEnum, core.serialization.string()]); export declare namespace TicketStatus { - type Raw = serializers.ticketing.TicketStatusEnum.Raw | string; + type Raw = TicketStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/TicketStatusEnum.ts b/src/serialization/resources/ticketing/types/TicketStatusEnum.ts index 195a637a1..531dcc928 100644 --- a/src/serialization/resources/ticketing/types/TicketStatusEnum.ts +++ b/src/serialization/resources/ticketing/types/TicketStatusEnum.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const TicketStatusEnum: core.serialization.Schema< diff --git a/src/serialization/resources/ticketing/types/TicketingAttachmentResponse.ts b/src/serialization/resources/ticketing/types/TicketingAttachmentResponse.ts index 6487a1c84..8e636a0a7 100644 --- a/src/serialization/resources/ticketing/types/TicketingAttachmentResponse.ts +++ b/src/serialization/resources/ticketing/types/TicketingAttachmentResponse.ts @@ -2,31 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const TicketingAttachmentResponse: core.serialization.ObjectSchema< serializers.ticketing.TicketingAttachmentResponse.Raw, Merge.ticketing.TicketingAttachmentResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Attachment), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.DebugModeLog)) - .optional(), + model: core.serialization.lazyObject(() => serializers.ticketing.Attachment), + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace TicketingAttachmentResponse { interface Raw { model: serializers.ticketing.Attachment.Raw; - warnings: serializers.ticketing.WarningValidationProblem.Raw[]; - errors: serializers.ticketing.ErrorValidationProblem.Raw[]; - logs?: serializers.ticketing.DebugModeLog.Raw[] | null; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/TicketingContactResponse.ts b/src/serialization/resources/ticketing/types/TicketingContactResponse.ts index 4bf479ba0..d5f7fc728 100644 --- a/src/serialization/resources/ticketing/types/TicketingContactResponse.ts +++ b/src/serialization/resources/ticketing/types/TicketingContactResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Contact } from "./Contact"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; export const TicketingContactResponse: core.serialization.ObjectSchema< serializers.ticketing.TicketingContactResponse.Raw, Merge.ticketing.TicketingContactResponse > = core.serialization.object({ - model: core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Contact), - warnings: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.WarningValidationProblem) - ), - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.ErrorValidationProblem) - ), - logs: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.DebugModeLog)) - .optional(), + model: Contact, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), }); export declare namespace TicketingContactResponse { interface Raw { - model: serializers.ticketing.Contact.Raw; - warnings: serializers.ticketing.WarningValidationProblem.Raw[]; - errors: serializers.ticketing.ErrorValidationProblem.Raw[]; - logs?: serializers.ticketing.DebugModeLog.Raw[] | null; + model: Contact.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/User.ts b/src/serialization/resources/ticketing/types/User.ts index d7875dd7d..e624b6253 100644 --- a/src/serialization/resources/ticketing/types/User.ts +++ b/src/serialization/resources/ticketing/types/User.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { UserTeamsItem } from "./UserTeamsItem"; +import { UserRolesItem } from "./UserRolesItem"; +import { RemoteData } from "./RemoteData"; export const User: core.serialization.ObjectSchema = core.serialization.object({ @@ -15,24 +18,15 @@ export const User: core.serialization.ObjectSchema (await import("../../..")).ticketing.UserTeamsItem).optional()) - .optional(), - roles: core.serialization - .list(core.serialization.lazy(async () => (await import("../../..")).ticketing.UserRolesItem).optional()) - .optional(), + teams: core.serialization.list(UserTeamsItem.optional()).optional(), + roles: core.serialization.list(UserRolesItem.optional()).optional(), avatar: core.serialization.string().optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() ), - remoteData: core.serialization.property( - "remote_data", - core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../..")).ticketing.RemoteData)) - .optional() - ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace User { @@ -44,11 +38,11 @@ export declare namespace User { name?: string | null; email_address?: string | null; is_active?: boolean | null; - teams?: (serializers.ticketing.UserTeamsItem.Raw | null | undefined)[] | null; - roles?: (serializers.ticketing.UserRolesItem.Raw | null | undefined)[] | null; + teams?: (UserTeamsItem.Raw | null | undefined)[] | null; + roles?: (UserRolesItem.Raw | null | undefined)[] | null; avatar?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; - remote_data?: serializers.ticketing.RemoteData.Raw[] | null; + remote_data?: RemoteData.Raw[] | null; } } diff --git a/src/serialization/resources/ticketing/types/UserRolesItem.ts b/src/serialization/resources/ticketing/types/UserRolesItem.ts index 826f3e6b3..6195574bc 100644 --- a/src/serialization/resources/ticketing/types/UserRolesItem.ts +++ b/src/serialization/resources/ticketing/types/UserRolesItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Role } from "./Role"; export const UserRolesItem: core.serialization.Schema< serializers.ticketing.UserRolesItem.Raw, Merge.ticketing.UserRolesItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Role), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Role]); export declare namespace UserRolesItem { - type Raw = string | serializers.ticketing.Role.Raw; + type Raw = string | Role.Raw; } diff --git a/src/serialization/resources/ticketing/types/UserTeamsItem.ts b/src/serialization/resources/ticketing/types/UserTeamsItem.ts index d5a2c6f1d..7b457fe6f 100644 --- a/src/serialization/resources/ticketing/types/UserTeamsItem.ts +++ b/src/serialization/resources/ticketing/types/UserTeamsItem.ts @@ -2,18 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { Team } from "./Team"; export const UserTeamsItem: core.serialization.Schema< serializers.ticketing.UserTeamsItem.Raw, Merge.ticketing.UserTeamsItem -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../..")).ticketing.Team), -]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Team]); export declare namespace UserTeamsItem { - type Raw = string | serializers.ticketing.Team.Raw; + type Raw = string | Team.Raw; } diff --git a/src/serialization/resources/ticketing/types/ValidationProblemSource.ts b/src/serialization/resources/ticketing/types/ValidationProblemSource.ts index 1107b86eb..fb045872e 100644 --- a/src/serialization/resources/ticketing/types/ValidationProblemSource.ts +++ b/src/serialization/resources/ticketing/types/ValidationProblemSource.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const ValidationProblemSource: core.serialization.ObjectSchema< diff --git a/src/serialization/resources/ticketing/types/WarningValidationProblem.ts b/src/serialization/resources/ticketing/types/WarningValidationProblem.ts index fcb65aa5d..b997b79e3 100644 --- a/src/serialization/resources/ticketing/types/WarningValidationProblem.ts +++ b/src/serialization/resources/ticketing/types/WarningValidationProblem.ts @@ -2,17 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; +import { ValidationProblemSource } from "./ValidationProblemSource"; export const WarningValidationProblem: core.serialization.ObjectSchema< serializers.ticketing.WarningValidationProblem.Raw, Merge.ticketing.WarningValidationProblem > = core.serialization.object({ - source: core.serialization - .lazyObject(async () => (await import("../../..")).ticketing.ValidationProblemSource) - .optional(), + source: ValidationProblemSource.optional(), title: core.serialization.string(), detail: core.serialization.string(), problemType: core.serialization.property("problem_type", core.serialization.string()), @@ -20,7 +19,7 @@ export const WarningValidationProblem: core.serialization.ObjectSchema< export declare namespace WarningValidationProblem { interface Raw { - source?: serializers.ticketing.ValidationProblemSource.Raw | null; + source?: ValidationProblemSource.Raw | null; title: string; detail: string; problem_type: string; diff --git a/src/serialization/resources/ticketing/types/WebhookReceiver.ts b/src/serialization/resources/ticketing/types/WebhookReceiver.ts index ecd6ff76f..8f49d1935 100644 --- a/src/serialization/resources/ticketing/types/WebhookReceiver.ts +++ b/src/serialization/resources/ticketing/types/WebhookReceiver.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Merge from "../../../../api"; +import * as serializers from "../../../index"; +import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; export const WebhookReceiver: core.serialization.ObjectSchema< diff --git a/src/version.ts b/src/version.ts new file mode 100644 index 000000000..22eda0979 --- /dev/null +++ b/src/version.ts @@ -0,0 +1 @@ +export const SDK_VERSION = "1.1.0"; diff --git a/tests/custom.test.ts b/tests/custom.test.ts new file mode 100644 index 000000000..7f5e031c8 --- /dev/null +++ b/tests/custom.test.ts @@ -0,0 +1,13 @@ +/** + * This is a custom test file, if you wish to add more tests + * to your SDK. + * Be sure to mark this file in `.fernignore`. + * + * If you include example requests/responses in your fern definition, + * you will have tests automatically generated for you. + */ +describe("test", () => { + it("default", () => { + expect(true).toBe(true); + }); +}); diff --git a/tests/unit/auth/BasicAuth.test.ts b/tests/unit/auth/BasicAuth.test.ts new file mode 100644 index 000000000..fc35704e0 --- /dev/null +++ b/tests/unit/auth/BasicAuth.test.ts @@ -0,0 +1,22 @@ +import { BasicAuth } from "../../../src/core/auth/BasicAuth"; + +describe("BasicAuth", () => { + describe("toAuthorizationHeader", () => { + it("correctly converts to header", () => { + expect( + BasicAuth.toAuthorizationHeader({ + username: "username", + password: "password", + }) + ).toBe("Basic dXNlcm5hbWU6cGFzc3dvcmQ="); + }); + }); + describe("fromAuthorizationHeader", () => { + it("correctly parses header", () => { + expect(BasicAuth.fromAuthorizationHeader("Basic dXNlcm5hbWU6cGFzc3dvcmQ=")).toEqual({ + username: "username", + password: "password", + }); + }); + }); +}); diff --git a/tests/unit/auth/BearerToken.test.ts b/tests/unit/auth/BearerToken.test.ts new file mode 100644 index 000000000..7757b87cb --- /dev/null +++ b/tests/unit/auth/BearerToken.test.ts @@ -0,0 +1,14 @@ +import { BearerToken } from "../../../src/core/auth/BearerToken"; + +describe("BearerToken", () => { + describe("toAuthorizationHeader", () => { + it("correctly converts to header", () => { + expect(BearerToken.toAuthorizationHeader("my-token")).toBe("Bearer my-token"); + }); + }); + describe("fromAuthorizationHeader", () => { + it("correctly parses header", () => { + expect(BearerToken.fromAuthorizationHeader("Bearer my-token")).toBe("my-token"); + }); + }); +}); diff --git a/tests/unit/fetcher/Fetcher.test.ts b/tests/unit/fetcher/Fetcher.test.ts new file mode 100644 index 000000000..ff8042175 --- /dev/null +++ b/tests/unit/fetcher/Fetcher.test.ts @@ -0,0 +1,73 @@ +import fs from "fs"; +import { Fetcher, fetcherImpl } from "../../../src/core/fetcher/Fetcher"; +import { join } from "path"; + +describe("Test fetcherImpl", () => { + it("should handle successful request", async () => { + const mockArgs: Fetcher.Args = { + url: "https://httpbin.org/post", + method: "POST", + headers: { "X-Test": "x-test-header" }, + body: { data: "test" }, + contentType: "application/json", + requestType: "json", + }; + + global.fetch = jest.fn().mockResolvedValue({ + ok: true, + status: 200, + text: () => Promise.resolve(JSON.stringify({ data: "test" })), + json: () => ({ data: "test" }), + }); + + const result = await fetcherImpl(mockArgs); + expect(result.ok).toBe(true); + if (result.ok) { + expect(result.body).toEqual({ data: "test" }); + } + + expect(global.fetch).toHaveBeenCalledWith( + "https://httpbin.org/post", + expect.objectContaining({ + method: "POST", + headers: expect.objectContaining({ "X-Test": "x-test-header" }), + body: JSON.stringify({ data: "test" }), + }) + ); + }); + + it("should send octet stream", async () => { + const url = "https://httpbin.org/post/file"; + const mockArgs: Fetcher.Args = { + url, + method: "POST", + headers: { "X-Test": "x-test-header" }, + contentType: "application/octet-stream", + requestType: "bytes", + duplex: "half", + body: fs.createReadStream(join(__dirname, "test-file.txt")), + }; + + global.fetch = jest.fn().mockResolvedValue({ + ok: true, + status: 200, + text: () => Promise.resolve(JSON.stringify({ data: "test" })), + json: () => Promise.resolve({ data: "test" }), + }); + + const result = await fetcherImpl(mockArgs); + + expect(global.fetch).toHaveBeenCalledWith( + url, + expect.objectContaining({ + method: "POST", + headers: expect.objectContaining({ "X-Test": "x-test-header" }), + body: expect.any(fs.ReadStream), + }) + ); + expect(result.ok).toBe(true); + if (result.ok) { + expect(result.body).toEqual({ data: "test" }); + } + }); +}); diff --git a/tests/unit/fetcher/createRequestUrl.test.ts b/tests/unit/fetcher/createRequestUrl.test.ts new file mode 100644 index 000000000..f2cd24b67 --- /dev/null +++ b/tests/unit/fetcher/createRequestUrl.test.ts @@ -0,0 +1,51 @@ +import { createRequestUrl } from "../../../src/core/fetcher/createRequestUrl"; + +describe("Test createRequestUrl", () => { + it("should return the base URL when no query parameters are provided", () => { + const baseUrl = "https://api.example.com"; + expect(createRequestUrl(baseUrl)).toBe(baseUrl); + }); + + it("should append simple query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { key: "value", another: "param" }; + expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?key=value&another=param"); + }); + + it("should handle array query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { items: ["a", "b", "c"] }; + expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?items=a&items=b&items=c"); + }); + + it("should handle object query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { filter: { name: "John", age: 30 } }; + expect(createRequestUrl(baseUrl, queryParams)).toBe( + "https://api.example.com?filter%5Bname%5D=John&filter%5Bage%5D=30" + ); + }); + + it("should handle mixed types of query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { + simple: "value", + array: ["x", "y"], + object: { key: "value" }, + }; + expect(createRequestUrl(baseUrl, queryParams)).toBe( + "https://api.example.com?simple=value&array=x&array=y&object%5Bkey%5D=value" + ); + }); + + it("should handle empty query parameters object", () => { + const baseUrl = "https://api.example.com"; + expect(createRequestUrl(baseUrl, {})).toBe(baseUrl); + }); + + it("should encode special characters in query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { special: "a&b=c d" }; + expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?special=a%26b%3Dc%20d"); + }); +}); diff --git a/tests/unit/fetcher/getFetchFn.test.ts b/tests/unit/fetcher/getFetchFn.test.ts new file mode 100644 index 000000000..9b315ad09 --- /dev/null +++ b/tests/unit/fetcher/getFetchFn.test.ts @@ -0,0 +1,22 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { getFetchFn } from "../../../src/core/fetcher/getFetchFn"; + +describe("Test for getFetchFn", () => { + it("should get node-fetch function", async () => { + if (RUNTIME.type == "node") { + if (RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) { + expect(await getFetchFn()).toBe(fetch); + } else { + expect(await getFetchFn()).toEqual((await import("node-fetch")).default as any); + } + } + }); + + it("should get fetch function", async () => { + if (RUNTIME.type == "browser") { + const fetchFn = await getFetchFn(); + expect(typeof fetchFn).toBe("function"); + expect(fetchFn.name).toBe("fetch"); + } + }); +}); diff --git a/tests/unit/fetcher/getRequestBody.test.ts b/tests/unit/fetcher/getRequestBody.test.ts new file mode 100644 index 000000000..919604c2e --- /dev/null +++ b/tests/unit/fetcher/getRequestBody.test.ts @@ -0,0 +1,77 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { getRequestBody } from "../../../src/core/fetcher/getRequestBody"; + +describe("Test getRequestBody", () => { + it("should return FormData as is in Node environment", async () => { + if (RUNTIME.type === "node") { + const formData = new (await import("formdata-node")).FormData(); + formData.append("key", "value"); + const result = await getRequestBody({ + body: formData, + type: "file", + }); + expect(result).toBe(formData); + } + }); + + it("should stringify body if not FormData in Node environment", async () => { + if (RUNTIME.type === "node") { + const body = { key: "value" }; + const result = await getRequestBody({ + body, + type: "json", + }); + expect(result).toBe('{"key":"value"}'); + } + }); + + it("should return FormData in browser environment", async () => { + if (RUNTIME.type === "browser") { + const formData = new (await import("form-data")).default(); + formData.append("key", "value"); + const result = await getRequestBody({ + body: formData, + type: "file", + }); + expect(result).toBe(formData); + } + }); + + it("should stringify body if not FormData in browser environment", async () => { + if (RUNTIME.type === "browser") { + const body = { key: "value" }; + const result = await getRequestBody({ + body, + type: "json", + }); + expect(result).toBe('{"key":"value"}'); + } + }); + + it("should return the Uint8Array", async () => { + const input = new Uint8Array([1, 2, 3]); + const result = await getRequestBody({ + body: input, + type: "bytes", + }); + expect(result).toBe(input); + }); + + it("should return the input for content-type 'application/x-www-form-urlencoded'", async () => { + const input = "key=value&another=param"; + const result = await getRequestBody({ + body: input, + type: "other", + }); + expect(result).toBe(input); + }); + + it("should JSON stringify objects", async () => { + const input = { key: "value" }; + const result = await getRequestBody({ + body: input, + type: "json", + }); + expect(result).toBe('{"key":"value"}'); + }); +}); diff --git a/tests/unit/fetcher/getResponseBody.test.ts b/tests/unit/fetcher/getResponseBody.test.ts new file mode 100644 index 000000000..1030c517c --- /dev/null +++ b/tests/unit/fetcher/getResponseBody.test.ts @@ -0,0 +1,64 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { getResponseBody } from "../../../src/core/fetcher/getResponseBody"; +import { chooseStreamWrapper } from "../../../src/core/fetcher/stream-wrappers/chooseStreamWrapper"; + +describe("Test getResponseBody", () => { + it("should handle blob response type", async () => { + const mockBlob = new Blob(["test"], { type: "text/plain" }); + const mockResponse = new Response(mockBlob); + const result = await getResponseBody(mockResponse, "blob"); + // @ts-expect-error + expect(result.constructor.name).toBe("Blob"); + }); + + it("should handle sse response type", async () => { + if (RUNTIME.type === "node") { + const mockStream = new ReadableStream(); + const mockResponse = new Response(mockStream); + const result = await getResponseBody(mockResponse, "sse"); + expect(result).toBe(mockStream); + } + }); + + it("should handle streaming response type", async () => { + if (RUNTIME.type === "node") { + const mockStream = new ReadableStream(); + const mockResponse = new Response(mockStream); + const result = await getResponseBody(mockResponse, "streaming"); + // need to reinstantiate string as a result of locked state in Readable Stream after registration with Response + expect(JSON.stringify(result)).toBe(JSON.stringify(await chooseStreamWrapper(new ReadableStream()))); + } + }); + + it("should handle text response type", async () => { + const mockResponse = new Response("test text"); + const result = await getResponseBody(mockResponse, "text"); + expect(result).toBe("test text"); + }); + + it("should handle JSON response", async () => { + const mockJson = { key: "value" }; + const mockResponse = new Response(JSON.stringify(mockJson)); + const result = await getResponseBody(mockResponse); + expect(result).toEqual(mockJson); + }); + + it("should handle empty response", async () => { + const mockResponse = new Response(""); + const result = await getResponseBody(mockResponse); + expect(result).toBeUndefined(); + }); + + it("should handle non-JSON response", async () => { + const mockResponse = new Response("invalid json"); + const result = await getResponseBody(mockResponse); + expect(result).toEqual({ + ok: false, + error: { + reason: "non-json", + statusCode: 200, + rawBody: "invalid json", + }, + }); + }); +}); diff --git a/tests/unit/fetcher/makeRequest.test.ts b/tests/unit/fetcher/makeRequest.test.ts new file mode 100644 index 000000000..be94ab45f --- /dev/null +++ b/tests/unit/fetcher/makeRequest.test.ts @@ -0,0 +1,54 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { makeRequest } from "../../../src/core/fetcher/makeRequest"; + +describe("Test makeRequest", () => { + const mockPostUrl = "https://httpbin.org/post"; + const mockGetUrl = "https://httpbin.org/get"; + const mockHeaders = { "Content-Type": "application/json" }; + const mockBody = JSON.stringify({ key: "value" }); + + let mockFetch: jest.Mock; + + beforeEach(() => { + mockFetch = jest.fn(); + mockFetch.mockResolvedValue(new Response(JSON.stringify({ test: "successful" }), { status: 200 })); + }); + + it("should handle POST request correctly", async () => { + const response = await makeRequest(mockFetch, mockPostUrl, "POST", mockHeaders, mockBody); + const responseBody = await response.json(); + expect(responseBody).toEqual({ test: "successful" }); + expect(mockFetch).toHaveBeenCalledTimes(1); + const [calledUrl, calledOptions] = mockFetch.mock.calls[0]; + expect(calledUrl).toBe(mockPostUrl); + expect(calledOptions).toEqual( + expect.objectContaining({ + method: "POST", + headers: mockHeaders, + body: mockBody, + credentials: undefined, + }) + ); + expect(calledOptions.signal).toBeDefined(); + expect(calledOptions.signal).toBeInstanceOf(AbortSignal); + }); + + it("should handle GET request correctly", async () => { + const response = await makeRequest(mockFetch, mockGetUrl, "GET", mockHeaders, undefined); + const responseBody = await response.json(); + expect(responseBody).toEqual({ test: "successful" }); + expect(mockFetch).toHaveBeenCalledTimes(1); + const [calledUrl, calledOptions] = mockFetch.mock.calls[0]; + expect(calledUrl).toBe(mockGetUrl); + expect(calledOptions).toEqual( + expect.objectContaining({ + method: "GET", + headers: mockHeaders, + body: undefined, + credentials: undefined, + }) + ); + expect(calledOptions.signal).toBeDefined(); + expect(calledOptions.signal).toBeInstanceOf(AbortSignal); + }); +}); diff --git a/tests/unit/fetcher/requestWithRetries.test.ts b/tests/unit/fetcher/requestWithRetries.test.ts new file mode 100644 index 000000000..6f77f093e --- /dev/null +++ b/tests/unit/fetcher/requestWithRetries.test.ts @@ -0,0 +1,133 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { requestWithRetries } from "../../../src/core/fetcher/requestWithRetries"; + +describe("requestWithRetries", () => { + let mockFetch: jest.Mock; + let originalMathRandom: typeof Math.random; + let setTimeoutSpy: jest.SpyInstance; + + beforeEach(() => { + mockFetch = jest.fn(); + originalMathRandom = Math.random; + + // Mock Math.random for consistent jitter + Math.random = jest.fn(() => 0.5); + + jest.useFakeTimers({ doNotFake: ["nextTick"] }); + }); + + afterEach(() => { + Math.random = originalMathRandom; + jest.clearAllMocks(); + jest.clearAllTimers(); + }); + + it("should retry on retryable status codes", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + process.nextTick(callback); + return null as any; + }); + + const retryableStatuses = [408, 409, 429, 500, 502]; + let callCount = 0; + + mockFetch.mockImplementation(async () => { + if (callCount < retryableStatuses.length) { + return new Response("", { status: retryableStatuses[callCount++] }); + } + return new Response("", { status: 200 }); + }); + + const responsePromise = requestWithRetries(() => mockFetch(), retryableStatuses.length); + await jest.runAllTimersAsync(); + const response = await responsePromise; + + expect(mockFetch).toHaveBeenCalledTimes(retryableStatuses.length + 1); + expect(response.status).toBe(200); + }); + + it("should respect maxRetries limit", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + process.nextTick(callback); + return null as any; + }); + + const maxRetries = 2; + mockFetch.mockResolvedValue(new Response("", { status: 500 })); + + const responsePromise = requestWithRetries(() => mockFetch(), maxRetries); + await jest.runAllTimersAsync(); + const response = await responsePromise; + + expect(mockFetch).toHaveBeenCalledTimes(maxRetries + 1); + expect(response.status).toBe(500); + }); + + it("should not retry on success status codes", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + process.nextTick(callback); + return null as any; + }); + + const successStatuses = [200, 201, 202]; + + for (const status of successStatuses) { + mockFetch.mockReset(); + setTimeoutSpy.mockClear(); + mockFetch.mockResolvedValueOnce(new Response("", { status })); + + const responsePromise = requestWithRetries(() => mockFetch(), 3); + await jest.runAllTimersAsync(); + await responsePromise; + + expect(mockFetch).toHaveBeenCalledTimes(1); + expect(setTimeoutSpy).not.toHaveBeenCalled(); + } + }); + + it("should apply correct exponential backoff with jitter", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + process.nextTick(callback); + return null as any; + }); + + mockFetch.mockResolvedValue(new Response("", { status: 500 })); + const maxRetries = 3; + const expectedDelays = [1000, 2000, 4000]; + + const responsePromise = requestWithRetries(() => mockFetch(), maxRetries); + await jest.runAllTimersAsync(); + await responsePromise; + + // Verify setTimeout calls + expect(setTimeoutSpy).toHaveBeenCalledTimes(expectedDelays.length); + + expectedDelays.forEach((delay, index) => { + expect(setTimeoutSpy).toHaveBeenNthCalledWith(index + 1, expect.any(Function), delay); + }); + + expect(mockFetch).toHaveBeenCalledTimes(maxRetries + 1); + }); + + it("should handle concurrent retries independently", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + process.nextTick(callback); + return null as any; + }); + + mockFetch + .mockResolvedValueOnce(new Response("", { status: 500 })) + .mockResolvedValueOnce(new Response("", { status: 500 })) + .mockResolvedValueOnce(new Response("", { status: 200 })) + .mockResolvedValueOnce(new Response("", { status: 200 })); + + const promise1 = requestWithRetries(() => mockFetch(), 1); + const promise2 = requestWithRetries(() => mockFetch(), 1); + + await jest.runAllTimersAsync(); + const [response1, response2] = await Promise.all([promise1, promise2]); + + expect(response1.status).toBe(200); + expect(response2.status).toBe(200); + }); +}); diff --git a/tests/unit/fetcher/signals.test.ts b/tests/unit/fetcher/signals.test.ts new file mode 100644 index 000000000..9cabfa074 --- /dev/null +++ b/tests/unit/fetcher/signals.test.ts @@ -0,0 +1,69 @@ +import { anySignal, getTimeoutSignal } from "../../../src/core/fetcher/signals"; + +describe("Test getTimeoutSignal", () => { + beforeEach(() => { + jest.useFakeTimers(); + }); + + afterEach(() => { + jest.useRealTimers(); + }); + + it("should return an object with signal and abortId", () => { + const { signal, abortId } = getTimeoutSignal(1000); + + expect(signal).toBeDefined(); + expect(abortId).toBeDefined(); + expect(signal).toBeInstanceOf(AbortSignal); + expect(signal.aborted).toBe(false); + }); + + it("should create a signal that aborts after the specified timeout", () => { + const timeoutMs = 5000; + const { signal } = getTimeoutSignal(timeoutMs); + + expect(signal.aborted).toBe(false); + + jest.advanceTimersByTime(timeoutMs - 1); + expect(signal.aborted).toBe(false); + + jest.advanceTimersByTime(1); + expect(signal.aborted).toBe(true); + }); +}); + +describe("Test anySignal", () => { + it("should return an AbortSignal", () => { + const signal = anySignal(new AbortController().signal); + expect(signal).toBeInstanceOf(AbortSignal); + }); + + it("should abort when any of the input signals is aborted", () => { + const controller1 = new AbortController(); + const controller2 = new AbortController(); + const signal = anySignal(controller1.signal, controller2.signal); + + expect(signal.aborted).toBe(false); + controller1.abort(); + expect(signal.aborted).toBe(true); + }); + + it("should handle an array of signals", () => { + const controller1 = new AbortController(); + const controller2 = new AbortController(); + const signal = anySignal([controller1.signal, controller2.signal]); + + expect(signal.aborted).toBe(false); + controller2.abort(); + expect(signal.aborted).toBe(true); + }); + + it("should abort immediately if one of the input signals is already aborted", () => { + const controller1 = new AbortController(); + const controller2 = new AbortController(); + controller1.abort(); + + const signal = anySignal(controller1.signal, controller2.signal); + expect(signal.aborted).toBe(true); + }); +}); diff --git a/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts new file mode 100644 index 000000000..1dc9be0cc --- /dev/null +++ b/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts @@ -0,0 +1,178 @@ +import { Node18UniversalStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper"; + +describe("Node18UniversalStreamWrapper", () => { + it("should set encoding to utf-8", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const setEncodingSpy = jest.spyOn(stream, "setEncoding"); + + stream.setEncoding("utf-8"); + + expect(setEncodingSpy).toHaveBeenCalledWith("utf-8"); + }); + + it("should register an event listener for readable", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const onSpy = jest.spyOn(stream, "on"); + + stream.on("readable", () => {}); + + expect(onSpy).toHaveBeenCalledWith("readable", expect.any(Function)); + }); + + it("should remove an event listener for data", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const offSpy = jest.spyOn(stream, "off"); + + const fn = () => {}; + stream.on("data", fn); + stream.off("data", fn); + + expect(offSpy).toHaveBeenCalledWith("data", expect.any(Function)); + }); + + it("should write to dest when calling pipe to writable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + const dest = new WritableStream({ + write(chunk) { + expect(chunk).toEqual(new TextEncoder().encode("test")); + }, + }); + + stream.pipe(dest); + }); + + it("should write to dest when calling pipe to node writable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + const dest = new (await import("readable-stream")).Writable({ + write(chunk, encoding, callback) { + expect(chunk.toString()).toEqual("test"); + callback(); + }, + }); + + stream.pipe(dest); + }); + + it("should write nothing when calling pipe and unpipe", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + const buffer: Uint8Array[] = []; + const dest = new WritableStream({ + write(chunk) { + buffer.push(chunk); + }, + }); + + stream.pipe(dest); + stream.unpipe(dest); + expect(buffer).toEqual([]); + }); + + it("should destroy the stream", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const destroySpy = jest.spyOn(stream, "destroy"); + + stream.destroy(); + + expect(destroySpy).toHaveBeenCalled(); + }); + + it("should pause and resume the stream", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const pauseSpy = jest.spyOn(stream, "pause"); + const resumeSpy = jest.spyOn(stream, "resume"); + + expect(stream.isPaused).toBe(false); + stream.pause(); + expect(stream.isPaused).toBe(true); + stream.resume(); + + expect(pauseSpy).toHaveBeenCalled(); + expect(resumeSpy).toHaveBeenCalled(); + }); + + it("should read the stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + + expect(await stream.read()).toEqual(new TextEncoder().encode("test")); + expect(await stream.read()).toEqual(new TextEncoder().encode("test")); + }); + + it("should read the stream as text", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + + const data = await stream.text(); + + expect(data).toEqual("testtest"); + }); + + it("should read the stream as json", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode(JSON.stringify({ test: "test" }))); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + + const data = await stream.json(); + + expect(data).toEqual({ test: "test" }); + }); + + it("should allow use with async iteratable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + let data = ""; + const stream = new Node18UniversalStreamWrapper(rawStream); + for await (const chunk of stream) { + data += new TextDecoder().decode(chunk); + } + + expect(data).toEqual("testtest"); + }); +}); diff --git a/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts new file mode 100644 index 000000000..0c99d3b26 --- /dev/null +++ b/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts @@ -0,0 +1,124 @@ +import { NodePre18StreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/NodePre18StreamWrapper"; + +describe("NodePre18StreamWrapper", () => { + it("should set encoding to utf-8", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const setEncodingSpy = jest.spyOn(stream, "setEncoding"); + + stream.setEncoding("utf-8"); + + expect(setEncodingSpy).toHaveBeenCalledWith("utf-8"); + }); + + it("should register an event listener for readable", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const onSpy = jest.spyOn(stream, "on"); + + stream.on("readable", () => {}); + + expect(onSpy).toHaveBeenCalledWith("readable", expect.any(Function)); + }); + + it("should remove an event listener for data", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const offSpy = jest.spyOn(stream, "off"); + + const fn = () => {}; + stream.on("data", fn); + stream.off("data", fn); + + expect(offSpy).toHaveBeenCalledWith("data", expect.any(Function)); + }); + + it("should write to dest when calling pipe to node writable stream", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const dest = new (await import("readable-stream")).Writable({ + write(chunk, encoding, callback) { + expect(chunk.toString()).toEqual("test"); + callback(); + }, + }); + + stream.pipe(dest); + }); + + it("should write nothing when calling pipe and unpipe", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const buffer: Uint8Array[] = []; + const dest = new (await import("readable-stream")).Writable({ + write(chunk, encoding, callback) { + buffer.push(chunk); + callback(); + }, + }); + stream.pipe(dest); + stream.unpipe(); + + expect(buffer).toEqual([]); + }); + + it("should destroy the stream", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const destroySpy = jest.spyOn(stream, "destroy"); + + stream.destroy(); + + expect(destroySpy).toHaveBeenCalledWith(); + }); + + it("should pause the stream and resume", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const pauseSpy = jest.spyOn(stream, "pause"); + + stream.pause(); + expect(stream.isPaused).toBe(true); + stream.resume(); + expect(stream.isPaused).toBe(false); + + expect(pauseSpy).toHaveBeenCalledWith(); + }); + + it("should read the stream", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + + expect(await stream.read()).toEqual("test"); + expect(await stream.read()).toEqual("test"); + }); + + it("should read the stream as text", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + + const data = await stream.text(); + + expect(data).toEqual("testtest"); + }); + + it("should read the stream as json", async () => { + const rawStream = (await import("readable-stream")).Readable.from([JSON.stringify({ test: "test" })]); + const stream = new NodePre18StreamWrapper(rawStream); + + const data = await stream.json(); + + expect(data).toEqual({ test: "test" }); + }); + + it("should allow use with async iteratable stream", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + let data = ""; + const stream = new NodePre18StreamWrapper(rawStream); + for await (const chunk of stream) { + data += chunk; + } + + expect(data).toEqual("testtest"); + }); +}); diff --git a/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts new file mode 100644 index 000000000..1d171ce6c --- /dev/null +++ b/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts @@ -0,0 +1,153 @@ +import { UndiciStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/UndiciStreamWrapper"; + +describe("UndiciStreamWrapper", () => { + it("should set encoding to utf-8", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const setEncodingSpy = jest.spyOn(stream, "setEncoding"); + + stream.setEncoding("utf-8"); + + expect(setEncodingSpy).toHaveBeenCalledWith("utf-8"); + }); + + it("should register an event listener for readable", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const onSpy = jest.spyOn(stream, "on"); + + stream.on("readable", () => {}); + + expect(onSpy).toHaveBeenCalledWith("readable", expect.any(Function)); + }); + + it("should remove an event listener for data", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const offSpy = jest.spyOn(stream, "off"); + + const fn = () => {}; + stream.on("data", fn); + stream.off("data", fn); + + expect(offSpy).toHaveBeenCalledWith("data", expect.any(Function)); + }); + + it("should write to dest when calling pipe to writable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new UndiciStreamWrapper(rawStream); + const dest = new WritableStream({ + write(chunk) { + expect(chunk).toEqual(new TextEncoder().encode("test")); + }, + }); + + stream.pipe(dest); + }); + + it("should write nothing when calling pipe and unpipe", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const buffer: Uint8Array[] = []; + const dest = new WritableStream({ + write(chunk) { + buffer.push(chunk); + }, + }); + stream.pipe(dest); + stream.unpipe(dest); + + expect(buffer).toEqual([]); + }); + + it("should destroy the stream", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const destroySpy = jest.spyOn(stream, "destroy"); + + stream.destroy(); + + expect(destroySpy).toHaveBeenCalled(); + }); + + it("should pause and resume the stream", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const pauseSpy = jest.spyOn(stream, "pause"); + const resumeSpy = jest.spyOn(stream, "resume"); + + expect(stream.isPaused).toBe(false); + stream.pause(); + expect(stream.isPaused).toBe(true); + stream.resume(); + + expect(pauseSpy).toHaveBeenCalled(); + expect(resumeSpy).toHaveBeenCalled(); + }); + + it("should read the stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new UndiciStreamWrapper(rawStream); + + expect(await stream.read()).toEqual(new TextEncoder().encode("test")); + expect(await stream.read()).toEqual(new TextEncoder().encode("test")); + }); + + it("should read the stream as text", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new UndiciStreamWrapper(rawStream); + + const data = await stream.text(); + + expect(data).toEqual("testtest"); + }); + + it("should read the stream as json", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode(JSON.stringify({ test: "test" }))); + controller.close(); + }, + }); + const stream = new UndiciStreamWrapper(rawStream); + + const data = await stream.json(); + + expect(data).toEqual({ test: "test" }); + }); + + it("should allow use with async iteratable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + let data = ""; + const stream = new UndiciStreamWrapper(rawStream); + for await (const chunk of stream) { + data += new TextDecoder().decode(chunk); + } + + expect(data).toEqual("testtest"); + }); +}); diff --git a/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts new file mode 100644 index 000000000..17cf37a2f --- /dev/null +++ b/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts @@ -0,0 +1,43 @@ +import { RUNTIME } from "../../../../src/core/runtime"; +import { chooseStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/chooseStreamWrapper"; +import { Node18UniversalStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper"; +import { NodePre18StreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/NodePre18StreamWrapper"; +import { UndiciStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/UndiciStreamWrapper"; + +describe("chooseStreamWrapper", () => { + beforeEach(() => { + RUNTIME.type = "unknown"; + RUNTIME.parsedVersion = 0; + }); + + it('should return a Node18UniversalStreamWrapper when RUNTIME.type is "node" and RUNTIME.parsedVersion is not null and RUNTIME.parsedVersion is greater than or equal to 18', async () => { + const expected = new Node18UniversalStreamWrapper(new ReadableStream()); + RUNTIME.type = "node"; + RUNTIME.parsedVersion = 18; + + const result = await chooseStreamWrapper(new ReadableStream()); + + expect(JSON.stringify(result)).toBe(JSON.stringify(expected)); + }); + + it('should return a NodePre18StreamWrapper when RUNTIME.type is "node" and RUNTIME.parsedVersion is not null and RUNTIME.parsedVersion is less than 18', async () => { + const stream = await import("readable-stream"); + const expected = new NodePre18StreamWrapper(new stream.Readable()); + + RUNTIME.type = "node"; + RUNTIME.parsedVersion = 16; + + const result = await chooseStreamWrapper(new stream.Readable()); + + expect(JSON.stringify(result)).toEqual(JSON.stringify(expected)); + }); + + it('should return a Undici when RUNTIME.type is not "node"', async () => { + const expected = new UndiciStreamWrapper(new ReadableStream()); + RUNTIME.type = "browser"; + + const result = await chooseStreamWrapper(new ReadableStream()); + + expect(JSON.stringify(result)).toEqual(JSON.stringify(expected)); + }); +}); diff --git a/tests/unit/fetcher/stream-wrappers/webpack.test.ts b/tests/unit/fetcher/stream-wrappers/webpack.test.ts new file mode 100644 index 000000000..557db6dc4 --- /dev/null +++ b/tests/unit/fetcher/stream-wrappers/webpack.test.ts @@ -0,0 +1,38 @@ +import webpack from "webpack"; + +describe("test env compatibility", () => { + test("webpack", () => { + return new Promise((resolve, reject) => { + webpack( + { + mode: "production", + entry: "./src/index.ts", + module: { + rules: [ + { + test: /\.tsx?$/, + use: "ts-loader", + exclude: /node_modules/, + }, + ], + }, + resolve: { + extensions: [".tsx", ".ts", ".js"], + }, + }, + (err, stats) => { + try { + expect(err).toBe(null); + if (stats?.hasErrors()) { + console.log(stats?.toString()); + } + expect(stats?.hasErrors()).toBe(false); + resolve(); + } catch (error) { + reject(error); + } + } + ); + }); + }, 60_000); +}); diff --git a/tests/unit/fetcher/test-file.txt b/tests/unit/fetcher/test-file.txt new file mode 100644 index 000000000..c66d471e3 --- /dev/null +++ b/tests/unit/fetcher/test-file.txt @@ -0,0 +1 @@ +This is a test file! diff --git a/tests/unit/zurg/bigint/bigint.test.ts b/tests/unit/zurg/bigint/bigint.test.ts new file mode 100644 index 000000000..cf9935a74 --- /dev/null +++ b/tests/unit/zurg/bigint/bigint.test.ts @@ -0,0 +1,24 @@ +import { bigint } from "../../../../src/core/schemas/builders/bigint"; +import { itSchema } from "../utils/itSchema"; +import { itValidateJson, itValidateParse } from "../utils/itValidate"; + +describe("bigint", () => { + itSchema("converts between raw string and parsed bigint", bigint(), { + raw: "123456789012345678901234567890123456789012345678901234567890", + parsed: BigInt("123456789012345678901234567890123456789012345678901234567890"), + }); + + itValidateParse("non-string", bigint(), 42, [ + { + message: "Expected string. Received 42.", + path: [], + }, + ]); + + itValidateJson("non-bigint", bigint(), "hello", [ + { + message: 'Expected bigint. Received "hello".', + path: [], + }, + ]); +}); diff --git a/tests/unit/zurg/date/date.test.ts b/tests/unit/zurg/date/date.test.ts new file mode 100644 index 000000000..2790268a0 --- /dev/null +++ b/tests/unit/zurg/date/date.test.ts @@ -0,0 +1,31 @@ +import { date } from "../../../../src/core/schemas/builders/date"; +import { itSchema } from "../utils/itSchema"; +import { itValidateJson, itValidateParse } from "../utils/itValidate"; + +describe("date", () => { + itSchema("converts between raw ISO string and parsed Date", date(), { + raw: "2022-09-29T05:41:21.939Z", + parsed: new Date("2022-09-29T05:41:21.939Z"), + }); + + itValidateParse("non-string", date(), 42, [ + { + message: "Expected string. Received 42.", + path: [], + }, + ]); + + itValidateParse("non-ISO", date(), "hello world", [ + { + message: 'Expected ISO 8601 date string. Received "hello world".', + path: [], + }, + ]); + + itValidateJson("non-Date", date(), "hello", [ + { + message: 'Expected Date object. Received "hello".', + path: [], + }, + ]); +}); diff --git a/tests/unit/zurg/enum/enum.test.ts b/tests/unit/zurg/enum/enum.test.ts new file mode 100644 index 000000000..ab0df0285 --- /dev/null +++ b/tests/unit/zurg/enum/enum.test.ts @@ -0,0 +1,30 @@ +import { enum_ } from "../../../../src/core/schemas/builders/enum"; +import { itSchemaIdentity } from "../utils/itSchema"; +import { itValidate } from "../utils/itValidate"; + +describe("enum", () => { + itSchemaIdentity(enum_(["A", "B", "C"]), "A"); + + itSchemaIdentity(enum_(["A", "B", "C"]), "D" as any, { + opts: { allowUnrecognizedEnumValues: true }, + }); + + itValidate("invalid enum", enum_(["A", "B", "C"]), "D", [ + { + message: 'Expected enum. Received "D".', + path: [], + }, + ]); + + itValidate( + "non-string", + enum_(["A", "B", "C"]), + [], + [ + { + message: "Expected string. Received list.", + path: [], + }, + ] + ); +}); diff --git a/tests/unit/zurg/lazy/lazy.test.ts b/tests/unit/zurg/lazy/lazy.test.ts new file mode 100644 index 000000000..6906bf4cf --- /dev/null +++ b/tests/unit/zurg/lazy/lazy.test.ts @@ -0,0 +1,57 @@ +import { Schema } from "../../../../src/core/schemas/Schema"; +import { lazy, list, object, string } from "../../../../src/core/schemas/builders"; +import { itSchemaIdentity } from "../utils/itSchema"; + +describe("lazy", () => { + it("doesn't run immediately", () => { + let wasRun = false; + lazy(() => { + wasRun = true; + return string(); + }); + expect(wasRun).toBe(false); + }); + + it("only runs first time", async () => { + let count = 0; + const schema = lazy(() => { + count++; + return string(); + }); + await schema.parse("hello"); + await schema.json("world"); + expect(count).toBe(1); + }); + + itSchemaIdentity( + lazy(() => object({})), + { foo: "hello" }, + { + title: "passes opts through", + opts: { unrecognizedObjectKeys: "passthrough" }, + } + ); + + itSchemaIdentity( + lazy(() => object({ foo: string() })), + { foo: "hello" } + ); + + // eslint-disable-next-line jest/expect-expect + it("self-referencial schema doesn't compile", () => { + () => { + // @ts-expect-error + const a = lazy(() => object({ foo: a })); + }; + }); + + // eslint-disable-next-line jest/expect-expect + it("self-referencial compiles with explicit type", () => { + () => { + interface TreeNode { + children: TreeNode[]; + } + const TreeNode: Schema = lazy(() => object({ children: list(TreeNode) })); + }; + }); +}); diff --git a/tests/unit/zurg/lazy/lazyObject.test.ts b/tests/unit/zurg/lazy/lazyObject.test.ts new file mode 100644 index 000000000..8813cc9fb --- /dev/null +++ b/tests/unit/zurg/lazy/lazyObject.test.ts @@ -0,0 +1,18 @@ +import { lazyObject, number, object, string } from "../../../../src/core/schemas/builders"; +import { itSchemaIdentity } from "../utils/itSchema"; + +describe("lazy", () => { + itSchemaIdentity( + lazyObject(() => object({ foo: string() })), + { foo: "hello" } + ); + + itSchemaIdentity( + lazyObject(() => object({ foo: string() })).extend(object({ bar: number() })), + { + foo: "hello", + bar: 42, + }, + { title: "returned schema has object utils" } + ); +}); diff --git a/tests/unit/zurg/lazy/recursive/a.ts b/tests/unit/zurg/lazy/recursive/a.ts new file mode 100644 index 000000000..8b7d5e40c --- /dev/null +++ b/tests/unit/zurg/lazy/recursive/a.ts @@ -0,0 +1,7 @@ +import { object } from "../../../../../src/core/schemas/builders/object"; +import { schemaB } from "./b"; + +// @ts-expect-error +export const schemaA = object({ + b: schemaB, +}); diff --git a/tests/unit/zurg/lazy/recursive/b.ts b/tests/unit/zurg/lazy/recursive/b.ts new file mode 100644 index 000000000..fb219d54c --- /dev/null +++ b/tests/unit/zurg/lazy/recursive/b.ts @@ -0,0 +1,8 @@ +import { object } from "../../../../../src/core/schemas/builders/object"; +import { optional } from "../../../../../src/core/schemas/builders/schema-utils"; +import { schemaA } from "./a"; + +// @ts-expect-error +export const schemaB = object({ + a: optional(schemaA), +}); diff --git a/tests/unit/zurg/list/list.test.ts b/tests/unit/zurg/list/list.test.ts new file mode 100644 index 000000000..424ed642d --- /dev/null +++ b/tests/unit/zurg/list/list.test.ts @@ -0,0 +1,41 @@ +import { list, object, property, string } from "../../../../src/core/schemas/builders"; +import { itSchema, itSchemaIdentity } from "../utils/itSchema"; +import { itValidate } from "../utils/itValidate"; + +describe("list", () => { + itSchemaIdentity(list(string()), ["hello", "world"], { + title: "functions as identity when item type is primitive", + }); + + itSchema( + "converts objects correctly", + list( + object({ + helloWorld: property("hello_world", string()), + }) + ), + { + raw: [{ hello_world: "123" }], + parsed: [{ helloWorld: "123" }], + } + ); + + itValidate("not a list", list(string()), 42, [ + { + path: [], + message: "Expected list. Received 42.", + }, + ]); + + itValidate( + "invalid item type", + list(string()), + [42], + [ + { + path: ["[0]"], + message: "Expected string. Received 42.", + }, + ] + ); +}); diff --git a/tests/unit/zurg/literals/stringLiteral.test.ts b/tests/unit/zurg/literals/stringLiteral.test.ts new file mode 100644 index 000000000..fa6c88873 --- /dev/null +++ b/tests/unit/zurg/literals/stringLiteral.test.ts @@ -0,0 +1,21 @@ +import { stringLiteral } from "../../../../src/core/schemas/builders"; +import { itSchemaIdentity } from "../utils/itSchema"; +import { itValidate } from "../utils/itValidate"; + +describe("stringLiteral", () => { + itSchemaIdentity(stringLiteral("A"), "A"); + + itValidate("incorrect string", stringLiteral("A"), "B", [ + { + path: [], + message: 'Expected "A". Received "B".', + }, + ]); + + itValidate("non-string", stringLiteral("A"), 42, [ + { + path: [], + message: 'Expected "A". Received 42.', + }, + ]); +}); diff --git a/tests/unit/zurg/object-like/withParsedProperties.test.ts b/tests/unit/zurg/object-like/withParsedProperties.test.ts new file mode 100644 index 000000000..9f5dd0ed3 --- /dev/null +++ b/tests/unit/zurg/object-like/withParsedProperties.test.ts @@ -0,0 +1,57 @@ +import { object, property, string, stringLiteral } from "../../../../src/core/schemas/builders"; + +describe("withParsedProperties", () => { + it("Added properties included on parsed object", async () => { + const schema = object({ + foo: property("raw_foo", string()), + bar: stringLiteral("bar"), + }).withParsedProperties({ + printFoo: (parsed) => () => parsed.foo, + printHelloWorld: () => () => "Hello world", + helloWorld: "Hello world", + }); + + const parsed = await schema.parse({ raw_foo: "value of foo", bar: "bar" }); + if (!parsed.ok) { + throw new Error("Failed to parse"); + } + expect(parsed.value.printFoo()).toBe("value of foo"); + expect(parsed.value.printHelloWorld()).toBe("Hello world"); + expect(parsed.value.helloWorld).toBe("Hello world"); + }); + + it("Added property is removed on raw object", async () => { + const schema = object({ + foo: property("raw_foo", string()), + bar: stringLiteral("bar"), + }).withParsedProperties({ + printFoo: (parsed) => () => parsed.foo, + }); + + const original = { raw_foo: "value of foo", bar: "bar" } as const; + const parsed = await schema.parse(original); + if (!parsed.ok) { + throw new Error("Failed to parse()"); + } + + const raw = await schema.json(parsed.value); + + if (!raw.ok) { + throw new Error("Failed to json()"); + } + + expect(raw.value).toEqual(original); + }); + + describe("compile", () => { + // eslint-disable-next-line jest/expect-expect + it("doesn't compile with non-object schema", () => { + () => + object({ + foo: string(), + }) + // @ts-expect-error + .withParsedProperties(42); + }); + }); +}); diff --git a/tests/unit/zurg/object/extend.test.ts b/tests/unit/zurg/object/extend.test.ts new file mode 100644 index 000000000..54fc8c4eb --- /dev/null +++ b/tests/unit/zurg/object/extend.test.ts @@ -0,0 +1,89 @@ +import { boolean, object, property, string, stringLiteral } from "../../../../src/core/schemas/builders"; +import { itSchema, itSchemaIdentity } from "../utils/itSchema"; + +describe("extend", () => { + itSchemaIdentity( + object({ + foo: string(), + }).extend( + object({ + bar: stringLiteral("bar"), + }) + ), + { + foo: "", + bar: "bar", + } as const, + { + title: "extended properties are included in schema", + } + ); + + itSchemaIdentity( + object({ + foo: string(), + }) + .extend( + object({ + bar: stringLiteral("bar"), + }) + ) + .extend( + object({ + baz: boolean(), + }) + ), + { + foo: "", + bar: "bar", + baz: true, + } as const, + { + title: "extensions can be extended", + } + ); + + itSchema( + "converts nested object", + object({ + item: object({ + helloWorld: property("hello_world", string()), + }), + }).extend( + object({ + goodbye: property("goodbye_raw", string()), + }) + ), + { + raw: { item: { hello_world: "yo" }, goodbye_raw: "peace" }, + parsed: { item: { helloWorld: "yo" }, goodbye: "peace" }, + } + ); + + itSchema( + "extensions work with raw/parsed property name conversions", + object({ + item: property("item_raw", string()), + }).extend( + object({ + goodbye: property("goodbye_raw", string()), + }) + ), + { + raw: { item_raw: "hi", goodbye_raw: "peace" }, + parsed: { item: "hi", goodbye: "peace" }, + } + ); + + describe("compile", () => { + // eslint-disable-next-line jest/expect-expect + it("doesn't compile with non-object schema", () => { + () => + object({ + foo: string(), + }) + // @ts-expect-error + .extend([]); + }); + }); +}); diff --git a/tests/unit/zurg/object/object.test.ts b/tests/unit/zurg/object/object.test.ts new file mode 100644 index 000000000..0acf0e240 --- /dev/null +++ b/tests/unit/zurg/object/object.test.ts @@ -0,0 +1,255 @@ +import { any, number, object, property, string, stringLiteral, unknown } from "../../../../src/core/schemas/builders"; +import { itJson, itParse, itSchema, itSchemaIdentity } from "../utils/itSchema"; +import { itValidate } from "../utils/itValidate"; + +describe("object", () => { + itSchemaIdentity( + object({ + foo: string(), + bar: stringLiteral("bar"), + }), + { + foo: "", + bar: "bar", + }, + { + title: "functions as identity when values are primitives and property() isn't used", + } + ); + + itSchema( + "uses raw key from property()", + object({ + foo: property("raw_foo", string()), + bar: stringLiteral("bar"), + }), + { + raw: { raw_foo: "foo", bar: "bar" }, + parsed: { foo: "foo", bar: "bar" }, + } + ); + + itSchema( + "keys with unknown type can be omitted", + object({ + foo: unknown(), + }), + { + raw: {}, + parsed: {}, + } + ); + + itSchema( + "keys with any type can be omitted", + object({ + foo: any(), + }), + { + raw: {}, + parsed: {}, + } + ); + + describe("unrecognizedObjectKeys", () => { + describe("parse", () => { + itParse( + 'includes unknown values when unrecognizedObjectKeys === "passthrough"', + object({ + foo: property("raw_foo", string()), + bar: stringLiteral("bar"), + }), + { + raw: { + raw_foo: "foo", + bar: "bar", + // @ts-expect-error + baz: "yoyo", + }, + parsed: { + foo: "foo", + bar: "bar", + // @ts-expect-error + baz: "yoyo", + }, + opts: { + unrecognizedObjectKeys: "passthrough", + }, + } + ); + + itParse( + 'strips unknown values when unrecognizedObjectKeys === "strip"', + object({ + foo: property("raw_foo", string()), + bar: stringLiteral("bar"), + }), + { + raw: { + raw_foo: "foo", + bar: "bar", + // @ts-expect-error + baz: "yoyo", + }, + parsed: { + foo: "foo", + bar: "bar", + }, + opts: { + unrecognizedObjectKeys: "strip", + }, + } + ); + }); + + describe("json", () => { + itJson( + 'includes unknown values when unrecognizedObjectKeys === "passthrough"', + object({ + foo: property("raw_foo", string()), + bar: stringLiteral("bar"), + }), + { + raw: { + raw_foo: "foo", + bar: "bar", + // @ts-expect-error + baz: "yoyo", + }, + parsed: { + foo: "foo", + bar: "bar", + // @ts-expect-error + baz: "yoyo", + }, + opts: { + unrecognizedObjectKeys: "passthrough", + }, + } + ); + + itJson( + 'strips unknown values when unrecognizedObjectKeys === "strip"', + object({ + foo: property("raw_foo", string()), + bar: stringLiteral("bar"), + }), + { + raw: { + raw_foo: "foo", + bar: "bar", + }, + parsed: { + foo: "foo", + bar: "bar", + // @ts-expect-error + baz: "yoyo", + }, + opts: { + unrecognizedObjectKeys: "strip", + }, + } + ); + }); + }); + + describe("nullish properties", () => { + itSchema("missing properties are not added", object({ foo: property("raw_foo", string().optional()) }), { + raw: {}, + parsed: {}, + }); + + itSchema("undefined properties are not dropped", object({ foo: property("raw_foo", string().optional()) }), { + raw: { raw_foo: null }, + parsed: { foo: undefined }, + }); + + itSchema("null properties are not dropped", object({ foo: property("raw_foo", string().optional()) }), { + raw: { raw_foo: null }, + parsed: { foo: undefined }, + }); + + describe("extensions", () => { + itSchema( + "undefined properties are not dropped", + object({}).extend(object({ foo: property("raw_foo", string().optional()) })), + { + raw: { raw_foo: null }, + parsed: { foo: undefined }, + } + ); + + describe("parse()", () => { + itParse( + "null properties are not dropped", + object({}).extend(object({ foo: property("raw_foo", string().optional()) })), + { + raw: { raw_foo: null }, + parsed: { foo: undefined }, + } + ); + }); + }); + }); + + itValidate( + "missing property", + object({ + foo: string(), + bar: stringLiteral("bar"), + }), + { foo: "hello" }, + [ + { + path: [], + message: 'Missing required key "bar"', + }, + ] + ); + + itValidate( + "extra property", + object({ + foo: string(), + bar: stringLiteral("bar"), + }), + { foo: "hello", bar: "bar", baz: 42 }, + [ + { + path: ["baz"], + message: 'Unexpected key "baz"', + }, + ] + ); + + itValidate( + "not an object", + object({ + foo: string(), + bar: stringLiteral("bar"), + }), + [], + [ + { + path: [], + message: "Expected object. Received list.", + }, + ] + ); + + itValidate( + "nested validation error", + object({ + foo: object({ + bar: number(), + }), + }), + { foo: { bar: "hello" } }, + [ + { + path: ["foo", "bar"], + message: 'Expected number. Received "hello".', + }, + ] + ); +}); diff --git a/tests/unit/zurg/object/objectWithoutOptionalProperties.test.ts b/tests/unit/zurg/object/objectWithoutOptionalProperties.test.ts new file mode 100644 index 000000000..d87a65feb --- /dev/null +++ b/tests/unit/zurg/object/objectWithoutOptionalProperties.test.ts @@ -0,0 +1,21 @@ +import { objectWithoutOptionalProperties, string, stringLiteral } from "../../../../src/core/schemas/builders"; +import { itSchema } from "../utils/itSchema"; + +describe("objectWithoutOptionalProperties", () => { + itSchema( + "all properties are required", + objectWithoutOptionalProperties({ + foo: string(), + bar: stringLiteral("bar").optional(), + }), + { + raw: { + foo: "hello", + }, + // @ts-expect-error + parsed: { + foo: "hello", + }, + } + ); +}); diff --git a/tests/unit/zurg/object/passthrough.test.ts b/tests/unit/zurg/object/passthrough.test.ts new file mode 100644 index 000000000..28ce3b1fe --- /dev/null +++ b/tests/unit/zurg/object/passthrough.test.ts @@ -0,0 +1,87 @@ +import { object, string, stringLiteral } from "../../../../src/core/schemas/builders"; +import { itJson, itParse, itSchema } from "../utils/itSchema"; +import { itValidate } from "../utils/itValidate"; + +describe("passthrough", () => { + const baseSchema = object({ + foo: string(), + bar: stringLiteral("bar"), + }); + + describe("parse", () => { + itParse("includes unknown values", baseSchema.passthrough(), { + raw: { + foo: "hello", + bar: "bar", + baz: "extra", + }, + parsed: { + foo: "hello", + bar: "bar", + baz: "extra", + }, + }); + + itValidate( + "preserves schema validation", + baseSchema.passthrough(), + { + foo: 123, + bar: "bar", + baz: "extra", + }, + [ + { + path: ["foo"], + message: "Expected string. Received 123.", + }, + ] + ); + }); + + describe("json", () => { + itJson("includes unknown values", baseSchema.passthrough(), { + raw: { + foo: "hello", + bar: "bar", + + baz: "extra", + }, + parsed: { + foo: "hello", + bar: "bar", + + baz: "extra", + }, + }); + + itValidate( + "preserves schema validation", + baseSchema.passthrough(), + { + foo: "hello", + bar: "wrong", + baz: "extra", + }, + [ + { + path: ["bar"], + message: 'Expected "bar". Received "wrong".', + }, + ] + ); + }); + + itSchema("preserves schema validation in both directions", baseSchema.passthrough(), { + raw: { + foo: "hello", + bar: "bar", + extra: 42, + }, + parsed: { + foo: "hello", + bar: "bar", + extra: 42, + }, + }); +}); diff --git a/tests/unit/zurg/primitives/any.test.ts b/tests/unit/zurg/primitives/any.test.ts new file mode 100644 index 000000000..1adbbe2a8 --- /dev/null +++ b/tests/unit/zurg/primitives/any.test.ts @@ -0,0 +1,6 @@ +import { any } from "../../../../src/core/schemas/builders"; +import { itSchemaIdentity } from "../utils/itSchema"; + +describe("any", () => { + itSchemaIdentity(any(), true); +}); diff --git a/tests/unit/zurg/primitives/boolean.test.ts b/tests/unit/zurg/primitives/boolean.test.ts new file mode 100644 index 000000000..897a8295d --- /dev/null +++ b/tests/unit/zurg/primitives/boolean.test.ts @@ -0,0 +1,14 @@ +import { boolean } from "../../../../src/core/schemas/builders"; +import { itSchemaIdentity } from "../utils/itSchema"; +import { itValidate } from "../utils/itValidate"; + +describe("boolean", () => { + itSchemaIdentity(boolean(), true); + + itValidate("non-boolean", boolean(), {}, [ + { + path: [], + message: "Expected boolean. Received object.", + }, + ]); +}); diff --git a/tests/unit/zurg/primitives/number.test.ts b/tests/unit/zurg/primitives/number.test.ts new file mode 100644 index 000000000..2d01415a6 --- /dev/null +++ b/tests/unit/zurg/primitives/number.test.ts @@ -0,0 +1,14 @@ +import { number } from "../../../../src/core/schemas/builders"; +import { itSchemaIdentity } from "../utils/itSchema"; +import { itValidate } from "../utils/itValidate"; + +describe("number", () => { + itSchemaIdentity(number(), 42); + + itValidate("non-number", number(), "hello", [ + { + path: [], + message: 'Expected number. Received "hello".', + }, + ]); +}); diff --git a/tests/unit/zurg/primitives/string.test.ts b/tests/unit/zurg/primitives/string.test.ts new file mode 100644 index 000000000..57b236878 --- /dev/null +++ b/tests/unit/zurg/primitives/string.test.ts @@ -0,0 +1,14 @@ +import { string } from "../../../../src/core/schemas/builders"; +import { itSchemaIdentity } from "../utils/itSchema"; +import { itValidate } from "../utils/itValidate"; + +describe("string", () => { + itSchemaIdentity(string(), "hello"); + + itValidate("non-string", string(), 42, [ + { + path: [], + message: "Expected string. Received 42.", + }, + ]); +}); diff --git a/tests/unit/zurg/primitives/unknown.test.ts b/tests/unit/zurg/primitives/unknown.test.ts new file mode 100644 index 000000000..4d17a7dbd --- /dev/null +++ b/tests/unit/zurg/primitives/unknown.test.ts @@ -0,0 +1,6 @@ +import { unknown } from "../../../../src/core/schemas/builders"; +import { itSchemaIdentity } from "../utils/itSchema"; + +describe("unknown", () => { + itSchemaIdentity(unknown(), true); +}); diff --git a/tests/unit/zurg/record/record.test.ts b/tests/unit/zurg/record/record.test.ts new file mode 100644 index 000000000..7e4ba39cc --- /dev/null +++ b/tests/unit/zurg/record/record.test.ts @@ -0,0 +1,34 @@ +import { number, record, string } from "../../../../src/core/schemas/builders"; +import { itSchemaIdentity } from "../utils/itSchema"; +import { itValidate } from "../utils/itValidate"; + +describe("record", () => { + itSchemaIdentity(record(string(), string()), { hello: "world" }); + itSchemaIdentity(record(number(), string()), { 42: "world" }); + + itValidate( + "non-record", + record(number(), string()), + [], + [ + { + path: [], + message: "Expected object. Received list.", + }, + ] + ); + + itValidate("invalid key type", record(number(), string()), { hello: "world" }, [ + { + path: ["hello (key)"], + message: 'Expected number. Received "hello".', + }, + ]); + + itValidate("invalid value type", record(string(), number()), { hello: "world" }, [ + { + path: ["hello"], + message: 'Expected number. Received "world".', + }, + ]); +}); diff --git a/tests/unit/zurg/schema-utils/getSchemaUtils.test.ts b/tests/unit/zurg/schema-utils/getSchemaUtils.test.ts new file mode 100644 index 000000000..da10086bc --- /dev/null +++ b/tests/unit/zurg/schema-utils/getSchemaUtils.test.ts @@ -0,0 +1,83 @@ +import { object, string } from "../../../../src/core/schemas/builders"; +import { itSchema } from "../utils/itSchema"; + +describe("getSchemaUtils", () => { + describe("optional()", () => { + itSchema("optional fields allow original schema", string().optional(), { + raw: "hello", + parsed: "hello", + }); + + itSchema("optional fields are not required", string().optional(), { + raw: null, + parsed: undefined, + }); + }); + + describe("transform()", () => { + itSchema( + "transorm and untransform run correctly", + string().transform({ + transform: (x) => x + "X", + untransform: (x) => (x as string).slice(0, -1), + }), + { + raw: "hello", + parsed: "helloX", + } + ); + }); + + describe("parseOrThrow()", () => { + it("parses valid value", async () => { + const value = string().parseOrThrow("hello"); + expect(value).toBe("hello"); + }); + + it("throws on invalid value", async () => { + const value = () => object({ a: string(), b: string() }).parseOrThrow({ a: 24 }); + expect(value).toThrowError(new Error('a: Expected string. Received 24.; Missing required key "b"')); + }); + }); + + describe("jsonOrThrow()", () => { + it("serializes valid value", async () => { + const value = string().jsonOrThrow("hello"); + expect(value).toBe("hello"); + }); + + it("throws on invalid value", async () => { + const value = () => object({ a: string(), b: string() }).jsonOrThrow({ a: 24 }); + expect(value).toThrowError(new Error('a: Expected string. Received 24.; Missing required key "b"')); + }); + }); + + describe("omitUndefined", () => { + it("serializes undefined as null", async () => { + const value = object({ + a: string().optional(), + b: string().optional(), + }).jsonOrThrow({ + a: "hello", + b: undefined, + }); + expect(value).toEqual({ a: "hello", b: null }); + }); + + it("omits undefined values", async () => { + const value = object({ + a: string().optional(), + b: string().optional(), + }).jsonOrThrow( + { + a: "hello", + b: undefined, + }, + { + omitUndefined: true, + } + ); + expect(value).toEqual({ a: "hello" }); + }); + }); +}); diff --git a/tests/unit/zurg/schema.test.ts b/tests/unit/zurg/schema.test.ts new file mode 100644 index 000000000..94089a9a9 --- /dev/null +++ b/tests/unit/zurg/schema.test.ts @@ -0,0 +1,78 @@ +import { + boolean, + discriminant, + list, + number, + object, + string, + stringLiteral, + union, +} from "../../../src/core/schemas/builders"; +import { booleanLiteral } from "../../../src/core/schemas/builders/literals/booleanLiteral"; +import { property } from "../../../src/core/schemas/builders/object/property"; +import { itSchema } from "./utils/itSchema"; + +describe("Schema", () => { + itSchema( + "large nested object", + object({ + a: string(), + b: stringLiteral("b value"), + c: property( + "raw_c", + list( + object({ + animal: union(discriminant("type", "_type"), { + dog: object({ value: boolean() }), + cat: object({ value: property("raw_cat", number()) }), + }), + }) + ) + ), + d: property("raw_d", boolean()), + e: booleanLiteral(true), + }), + { + raw: { + a: "hello", + b: "b value", + raw_c: [ + { + animal: { + _type: "dog", + value: true, + }, + }, + { + animal: { + _type: "cat", + raw_cat: 42, + }, + }, + ], + raw_d: false, + e: true, + }, + parsed: { + a: "hello", + b: "b value", + c: [ + { + animal: { + type: "dog", + value: true, + }, + }, + { + animal: { + type: "cat", + value: 42, + }, + }, + ], + d: false, + e: true, + }, + } + ); +}); diff --git a/tests/unit/zurg/set/set.test.ts b/tests/unit/zurg/set/set.test.ts new file mode 100644 index 000000000..e17f908c8 --- /dev/null +++ b/tests/unit/zurg/set/set.test.ts @@ -0,0 +1,48 @@ +import { set, string } from "../../../../src/core/schemas/builders"; +import { itSchema } from "../utils/itSchema"; +import { itValidateJson, itValidateParse } from "../utils/itValidate"; + +describe("set", () => { + itSchema("converts between raw list and parsed Set", set(string()), { + raw: ["A", "B"], + parsed: new Set(["A", "B"]), + }); + + itValidateParse("not a list", set(string()), 42, [ + { + path: [], + message: "Expected list. Received 42.", + }, + ]); + + itValidateJson( + "not a Set", + set(string()), + [], + [ + { + path: [], + message: "Expected Set. Received list.", + }, + ] + ); + + itValidateParse( + "invalid item type", + set(string()), + [42], + [ + { + path: ["[0]"], + message: "Expected string. Received 42.", + }, + ] + ); + + itValidateJson("invalid item type", set(string()), new Set([42]), [ + { + path: ["[0]"], + message: "Expected string. Received 42.", + }, + ]); +}); diff --git a/tests/unit/zurg/skipValidation.test.ts b/tests/unit/zurg/skipValidation.test.ts new file mode 100644 index 000000000..5dc88096a --- /dev/null +++ b/tests/unit/zurg/skipValidation.test.ts @@ -0,0 +1,45 @@ +/* eslint-disable no-console */ + +import { boolean, number, object, property, string, undiscriminatedUnion } from "../../../src/core/schemas/builders"; + +describe("skipValidation", () => { + it("allows data that doesn't conform to the schema", async () => { + const warningLogs: string[] = []; + const originalConsoleWarn = console.warn; + console.warn = (...args) => warningLogs.push(args.join(" ")); + + const schema = object({ + camelCase: property("snake_case", string()), + numberProperty: number(), + requiredProperty: boolean(), + anyPrimitive: undiscriminatedUnion([string(), number(), boolean()]), + }); + + const parsed = await schema.parse( + { + snake_case: "hello", + numberProperty: "oops", + anyPrimitive: true, + }, + { + skipValidation: true, + } + ); + + expect(parsed).toEqual({ + ok: true, + value: { + camelCase: "hello", + numberProperty: "oops", + anyPrimitive: true, + }, + }); + + expect(warningLogs).toEqual([ + `Failed to validate. + - numberProperty: Expected number. Received "oops".`, + ]); + + console.warn = originalConsoleWarn; + }); +}); diff --git a/tests/unit/zurg/undiscriminated-union/undiscriminatedUnion.test.ts b/tests/unit/zurg/undiscriminated-union/undiscriminatedUnion.test.ts new file mode 100644 index 000000000..0e6643337 --- /dev/null +++ b/tests/unit/zurg/undiscriminated-union/undiscriminatedUnion.test.ts @@ -0,0 +1,44 @@ +import { number, object, property, string, undiscriminatedUnion } from "../../../../src/core/schemas/builders"; +import { itSchema, itSchemaIdentity } from "../utils/itSchema"; + +describe("undiscriminatedUnion", () => { + itSchemaIdentity(undiscriminatedUnion([string(), number()]), "hello world"); + + itSchemaIdentity(undiscriminatedUnion([object({ hello: string() }), object({ goodbye: string() })]), { + goodbye: "foo", + }); + + itSchema( + "Correctly transforms", + undiscriminatedUnion([object({ hello: string() }), object({ helloWorld: property("hello_world", string()) })]), + { + raw: { hello_world: "foo " }, + parsed: { helloWorld: "foo " }, + } + ); + + it("Returns errors for all variants", async () => { + const result = await undiscriminatedUnion([string(), number()]).parse(true); + if (result.ok) { + throw new Error("Unexpectedly passed validation"); + } + expect(result.errors).toEqual([ + { + message: "[Variant 0] Expected string. Received true.", + path: [], + }, + { + message: "[Variant 1] Expected number. Received true.", + path: [], + }, + ]); + }); + + describe("compile", () => { + // eslint-disable-next-line jest/expect-expect + it("doesn't compile with zero members", () => { + // @ts-expect-error + () => undiscriminatedUnion([]); + }); + }); +}); diff --git a/tests/unit/zurg/union/union.test.ts b/tests/unit/zurg/union/union.test.ts new file mode 100644 index 000000000..790184603 --- /dev/null +++ b/tests/unit/zurg/union/union.test.ts @@ -0,0 +1,113 @@ +import { boolean, discriminant, number, object, string, union } from "../../../../src/core/schemas/builders"; +import { itSchema, itSchemaIdentity } from "../utils/itSchema"; +import { itValidate } from "../utils/itValidate"; + +describe("union", () => { + itSchemaIdentity( + union("type", { + lion: object({ + meows: boolean(), + }), + giraffe: object({ + heightInInches: number(), + }), + }), + { type: "lion", meows: true }, + { title: "doesn't transform discriminant when it's a string" } + ); + + itSchema( + "transforms discriminant when it's a discriminant()", + union(discriminant("type", "_type"), { + lion: object({ meows: boolean() }), + giraffe: object({ heightInInches: number() }), + }), + { + raw: { _type: "lion", meows: true }, + parsed: { type: "lion", meows: true }, + } + ); + + describe("allowUnrecognizedUnionMembers", () => { + itSchema( + "transforms discriminant & passes through values when discriminant value is unrecognized", + union(discriminant("type", "_type"), { + lion: object({ meows: boolean() }), + giraffe: object({ heightInInches: number() }), + }), + { + // @ts-expect-error + raw: { _type: "moose", isAMoose: true }, + // @ts-expect-error + parsed: { type: "moose", isAMoose: true }, + opts: { + allowUnrecognizedUnionMembers: true, + }, + } + ); + }); + + describe("withParsedProperties", () => { + it("Added property is included on parsed object", async () => { + const schema = union("type", { + lion: object({}), + tiger: object({ value: string() }), + }).withParsedProperties({ + printType: (parsed) => () => parsed.type, + }); + + const parsed = await schema.parse({ type: "lion" }); + if (!parsed.ok) { + throw new Error("Failed to parse"); + } + expect(parsed.value.printType()).toBe("lion"); + }); + }); + + itValidate( + "non-object", + union("type", { + lion: object({}), + tiger: object({ value: string() }), + }), + [], + [ + { + path: [], + message: "Expected object. Received list.", + }, + ] + ); + + itValidate( + "missing discriminant", + union("type", { + lion: object({}), + tiger: object({ value: string() }), + }), + {}, + [ + { + path: [], + message: 'Missing discriminant ("type")', + }, + ] + ); + + itValidate( + "unrecognized discriminant value", + union("type", { + lion: object({}), + tiger: object({ value: string() }), + }), + { + type: "bear", + }, + [ + { + path: ["type"], + message: 'Expected enum. Received "bear".', + }, + ] + ); +}); diff --git a/tests/unit/zurg/utils/itSchema.ts b/tests/unit/zurg/utils/itSchema.ts new file mode 100644 index 000000000..67b6c9281 --- /dev/null +++ b/tests/unit/zurg/utils/itSchema.ts @@ -0,0 +1,78 @@ +/* eslint-disable jest/no-export */ +import { Schema, SchemaOptions } from "../../../../src/core/schemas/Schema"; + +export function itSchemaIdentity( + schema: Schema, + value: T, + { title = "functions as identity", opts }: { title?: string; opts?: SchemaOptions } = {} +): void { + itSchema(title, schema, { raw: value, parsed: value, opts }); +} + +export function itSchema( + title: string, + schema: Schema, + { + raw, + parsed, + opts, + only = false, + }: { + raw: Raw; + parsed: Parsed; + opts?: SchemaOptions; + only?: boolean; + } +): void { + // eslint-disable-next-line jest/valid-title + (only ? describe.only : describe)(title, () => { + itParse("parse()", schema, { raw, parsed, opts }); + itJson("json()", schema, { raw, parsed, opts }); + }); +} + +export function itParse( + title: string, + schema: Schema, + { + raw, + parsed, + opts, + }: { + raw: Raw; + parsed: Parsed; + opts?: SchemaOptions; + } +): void { + // eslint-disable-next-line jest/valid-title + it(title, () => { + const maybeValid = schema.parse(raw, opts); + if (!maybeValid.ok) { + throw new Error("Failed to parse() " + JSON.stringify(maybeValid.errors, undefined, 4)); + } + expect(maybeValid.value).toStrictEqual(parsed); + }); +} + +export function itJson( + title: string, + schema: Schema, + { + raw, + parsed, + opts, + }: { + raw: Raw; + parsed: Parsed; + opts?: SchemaOptions; + } +): void { + // eslint-disable-next-line jest/valid-title + it(title, () => { + const maybeValid = schema.json(parsed, opts); + if (!maybeValid.ok) { + throw new Error("Failed to json() " + JSON.stringify(maybeValid.errors, undefined, 4)); + } + expect(maybeValid.value).toStrictEqual(raw); + }); +} diff --git a/tests/unit/zurg/utils/itValidate.ts b/tests/unit/zurg/utils/itValidate.ts new file mode 100644 index 000000000..75b2c08b0 --- /dev/null +++ b/tests/unit/zurg/utils/itValidate.ts @@ -0,0 +1,56 @@ +/* eslint-disable jest/no-export */ +import { Schema, SchemaOptions, ValidationError } from "../../../../src/core/schemas/Schema"; + +export function itValidate( + title: string, + schema: Schema, + input: unknown, + errors: ValidationError[], + opts?: SchemaOptions +): void { + // eslint-disable-next-line jest/valid-title + describe("parse()", () => { + itValidateParse(title, schema, input, errors, opts); + }); + describe("json()", () => { + itValidateJson(title, schema, input, errors, opts); + }); +} + +export function itValidateParse( + title: string, + schema: Schema, + raw: unknown, + errors: ValidationError[], + opts?: SchemaOptions +): void { + describe("parse", () => { + // eslint-disable-next-line jest/valid-title + it(title, async () => { + const maybeValid = await schema.parse(raw, opts); + if (maybeValid.ok) { + throw new Error("Value passed validation"); + } + expect(maybeValid.errors).toStrictEqual(errors); + }); + }); +} + +export function itValidateJson( + title: string, + schema: Schema, + parsed: unknown, + errors: ValidationError[], + opts?: SchemaOptions +): void { + describe("json", () => { + // eslint-disable-next-line jest/valid-title + it(title, async () => { + const maybeValid = await schema.json(parsed, opts); + if (maybeValid.ok) { + throw new Error("Value passed validation"); + } + expect(maybeValid.errors).toStrictEqual(errors); + }); + }); +} diff --git a/tsconfig.json b/tsconfig.json index e65fa534c..538c94fe0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,13 +8,10 @@ "esModuleInterop": true, "skipLibCheck": true, "declaration": true, - "noUnusedParameters": true, "outDir": "dist", "rootDir": "src", "baseUrl": "src" }, - "include": [ - "src" - ], + "include": ["src"], "exclude": [] -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 06139d351..208b836d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,651 @@ # yarn lockfile v1 +"@ampproject/remapping@^2.2.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" + integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0", "@babel/code-frame@^7.26.2": + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" + integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== + dependencies: + "@babel/helper-validator-identifier" "^7.25.9" + js-tokens "^4.0.0" + picocolors "^1.0.0" + +"@babel/compat-data@^7.25.9": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.3.tgz#99488264a56b2aded63983abd6a417f03b92ed02" + integrity sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g== + +"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.26.0.tgz#d78b6023cc8f3114ccf049eb219613f74a747b40" + integrity sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.26.0" + "@babel/generator" "^7.26.0" + "@babel/helper-compilation-targets" "^7.25.9" + "@babel/helper-module-transforms" "^7.26.0" + "@babel/helpers" "^7.26.0" + "@babel/parser" "^7.26.0" + "@babel/template" "^7.25.9" + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.26.0" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@^7.26.0", "@babel/generator@^7.26.3", "@babel/generator@^7.7.2": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.3.tgz#ab8d4360544a425c90c248df7059881f4b2ce019" + integrity sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ== + dependencies: + "@babel/parser" "^7.26.3" + "@babel/types" "^7.26.3" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^3.0.2" + +"@babel/helper-compilation-targets@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz#55af025ce365be3cdc0c1c1e56c6af617ce88875" + integrity sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ== + dependencies: + "@babel/compat-data" "^7.25.9" + "@babel/helper-validator-option" "^7.25.9" + browserslist "^4.24.0" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-module-imports@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz#e7f8d20602ebdbf9ebbea0a0751fb0f2a4141715" + integrity sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw== + dependencies: + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.25.9" + +"@babel/helper-module-transforms@^7.26.0": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz#8ce54ec9d592695e58d84cd884b7b5c6a2fdeeae" + integrity sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw== + dependencies: + "@babel/helper-module-imports" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" + "@babel/traverse" "^7.25.9" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.25.9", "@babel/helper-plugin-utils@^7.8.0": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz#9cbdd63a9443a2c92a725cca7ebca12cc8dd9f46" + integrity sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw== + +"@babel/helper-string-parser@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c" + integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== + +"@babel/helper-validator-identifier@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7" + integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== + +"@babel/helper-validator-option@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz#86e45bd8a49ab7e03f276577f96179653d41da72" + integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== + +"@babel/helpers@^7.26.0": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.0.tgz#30e621f1eba5aa45fe6f4868d2e9154d884119a4" + integrity sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw== + dependencies: + "@babel/template" "^7.25.9" + "@babel/types" "^7.26.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.3.tgz#8c51c5db6ddf08134af1ddbacf16aaab48bac234" + integrity sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA== + dependencies: + "@babel/types" "^7.26.3" + +"@babel/plugin-syntax-async-generators@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-bigint@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-class-static-block@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" + integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-import-attributes@^7.24.7": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz#3b1412847699eea739b4f2602c74ce36f6b0b0f7" + integrity sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/plugin-syntax-import-meta@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-jsx@^7.7.2": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz#a34313a178ea56f1951599b929c1ceacee719290" + integrity sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-private-property-in-object@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" + integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-top-level-await@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-typescript@^7.7.2": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz#67dda2b74da43727cf21d46cf9afef23f4365399" + integrity sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/template@^7.25.9", "@babel/template@^7.3.3": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.9.tgz#ecb62d81a8a6f5dc5fe8abfc3901fc52ddf15016" + integrity sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg== + dependencies: + "@babel/code-frame" "^7.25.9" + "@babel/parser" "^7.25.9" + "@babel/types" "^7.25.9" + +"@babel/traverse@^7.25.9": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.3.tgz#1ebfc75bd748d8f96b3cc63af5e82ebd4c37ba35" + integrity sha512-yTmc8J+Sj8yLzwr4PD5Xb/WF3bOYu2C2OoSZPzbuqRm4n98XirsbzaX+GloeO376UnSYIYJ4NCanwV5/ugZkwA== + dependencies: + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.3" + "@babel/parser" "^7.26.3" + "@babel/template" "^7.25.9" + "@babel/types" "^7.26.3" + debug "^4.3.1" + globals "^11.1.0" + +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.3", "@babel/types@^7.3.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.3.tgz#37e79830f04c2b5687acc77db97fbc75fb81f3c0" + integrity sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA== + dependencies: + "@babel/helper-string-parser" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" + +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + get-package-type "^0.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + +"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + +"@jest/console@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" + integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + slash "^3.0.0" + +"@jest/core@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" + integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== + dependencies: + "@jest/console" "^29.7.0" + "@jest/reporters" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + ci-info "^3.2.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-changed-files "^29.7.0" + jest-config "^29.7.0" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-resolve-dependencies "^29.7.0" + jest-runner "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + jest-watcher "^29.7.0" + micromatch "^4.0.4" + pretty-format "^29.7.0" + slash "^3.0.0" + strip-ansi "^6.0.0" + +"@jest/environment@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" + integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== + dependencies: + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.7.0" + +"@jest/expect-utils@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" + integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== + dependencies: + jest-get-type "^29.6.3" + +"@jest/expect@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" + integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== + dependencies: + expect "^29.7.0" + jest-snapshot "^29.7.0" + +"@jest/fake-timers@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" + integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== + dependencies: + "@jest/types" "^29.6.3" + "@sinonjs/fake-timers" "^10.0.2" + "@types/node" "*" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-util "^29.7.0" + +"@jest/globals@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" + integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/types" "^29.6.3" + jest-mock "^29.7.0" + +"@jest/reporters@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" + integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" + "@types/node" "*" + chalk "^4.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^6.0.0" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.1.3" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + jest-worker "^29.7.0" + slash "^3.0.0" + string-length "^4.0.1" + strip-ansi "^6.0.0" + v8-to-istanbul "^9.0.1" + +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== + dependencies: + "@sinclair/typebox" "^0.27.8" + +"@jest/source-map@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" + integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== + dependencies: + "@jridgewell/trace-mapping" "^0.3.18" + callsites "^3.0.0" + graceful-fs "^4.2.9" + +"@jest/test-result@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" + integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== + dependencies: + "@jest/console" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + +"@jest/test-sequencer@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" + integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== + dependencies: + "@jest/test-result" "^29.7.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + slash "^3.0.0" + +"@jest/transform@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" + integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== + dependencies: + "@babel/core" "^7.11.6" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" + babel-plugin-istanbul "^6.1.1" + chalk "^4.0.0" + convert-source-map "^2.0.0" + fast-json-stable-stringify "^2.1.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + micromatch "^4.0.4" + pirates "^4.0.4" + slash "^3.0.0" + write-file-atomic "^4.0.2" + +"@jest/types@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" + integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== + dependencies: + "@jest/schemas" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^17.0.8" + chalk "^4.0.0" + +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + +"@jridgewell/source-map@^0.3.3": + version "0.3.6" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.6.tgz#9d71ca886e32502eb9362c9a74a46787c36df81a" + integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== + +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== + +"@sinonjs/commons@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" + integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^10.0.2": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" + integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== + dependencies: + "@sinonjs/commons" "^3.0.0" + +"@tootallnate/once@2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" + integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== + +"@types/babel__core@^7.1.14": + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" + integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== + dependencies: + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.6.8" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.8.tgz#f836c61f48b1346e7d2b0d93c6dacc5b9535d3ab" + integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" + integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": + version "7.20.6" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.6.tgz#8dc9f0ae0f202c08d8d4dab648912c8d6038e3f7" + integrity sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg== + dependencies: + "@babel/types" "^7.20.7" + +"@types/eslint-scope@^3.7.7": + version "3.7.7" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" + integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*": + version "9.6.1" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-9.6.1.tgz#d5795ad732ce81715f27f75da913004a56751584" + integrity sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*", "@types/estree@^1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + +"@types/graceful-fs@^4.1.3": + version "4.1.9" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" + integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== + dependencies: + "@types/node" "*" + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" + integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== + +"@types/istanbul-lib-report@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz#53047614ae72e19fc0401d872de3ae2b4ce350bf" + integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== + dependencies: + "@types/istanbul-lib-coverage" "*" + +"@types/istanbul-reports@^3.0.0": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54" + integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== + dependencies: + "@types/istanbul-lib-report" "*" + +"@types/jest@29.5.5": + version "29.5.5" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.5.tgz#727204e06228fe24373df9bae76b90f3e8236a2a" + integrity sha512-ebylz2hnsWR9mYvmBFbXJXr+33UPc4+ZdxyDXh5w0FlPBTfCVN3wPL+kuOiQt3xvrK419v7XWeAs+AeOksafXg== + dependencies: + expect "^29.0.0" + pretty-format "^29.0.0" + +"@types/jsdom@^20.0.0": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-20.0.1.tgz#07c14bc19bd2f918c1929541cdaacae894744808" + integrity sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ== + dependencies: + "@types/node" "*" + "@types/tough-cookie" "*" + parse5 "^7.0.0" + +"@types/json-schema@*", "@types/json-schema@^7.0.8": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + "@types/node-fetch@2.6.9": version "2.6.9" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.9.tgz#15f529d247f1ede1824f7e7acdaa192d5f28071e" @@ -11,11 +656,11 @@ form-data "^4.0.0" "@types/node@*": - version "22.9.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.9.0.tgz#b7f16e5c3384788542c72dc3d561a7ceae2c0365" - integrity sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ== + version "22.10.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.1.tgz#41ffeee127b8975a05f8c4f83fb89bcb2987d766" + integrity sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ== dependencies: - undici-types "~6.19.8" + undici-types "~6.20.0" "@types/node@17.0.33": version "17.0.33" @@ -27,16 +672,395 @@ resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.8.tgz#f2a7de3c107b89b441e071d5472e6b726b4adf45" integrity sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg== +"@types/readable-stream@^4.0.15": + version "4.0.18" + resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-4.0.18.tgz#5d8d15d26c776500ce573cae580787d149823bfc" + integrity sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA== + dependencies: + "@types/node" "*" + safe-buffer "~5.1.1" + +"@types/stack-utils@^2.0.0": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" + integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== + +"@types/tough-cookie@*": + version "4.0.5" + resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" + integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== + "@types/url-join@4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/url-join/-/url-join-4.0.1.tgz#4989c97f969464647a8586c7252d97b449cdc045" integrity sha512-wDXw9LEEUHyV+7UWy7U315nrJGJ7p1BzaCxDpEoLr789Dk1WDVMMlf3iBfbG2F8NdWnYyFbtTxUn2ZNbm1Q4LQ== +"@types/yargs-parser@*": + version "21.0.3" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" + integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== + +"@types/yargs@^17.0.8": + version "17.0.33" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d" + integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== + dependencies: + "@types/yargs-parser" "*" + +"@webassemblyjs/ast@1.14.1", "@webassemblyjs/ast@^1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.14.1.tgz#a9f6a07f2b03c95c8d38c4536a1fdfb521ff55b6" + integrity sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ== + dependencies: + "@webassemblyjs/helper-numbers" "1.13.2" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" + +"@webassemblyjs/floating-point-hex-parser@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz#fcca1eeddb1cc4e7b6eed4fc7956d6813b21b9fb" + integrity sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA== + +"@webassemblyjs/helper-api-error@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz#e0a16152248bc38daee76dd7e21f15c5ef3ab1e7" + integrity sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ== + +"@webassemblyjs/helper-buffer@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz#822a9bc603166531f7d5df84e67b5bf99b72b96b" + integrity sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA== + +"@webassemblyjs/helper-numbers@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz#dbd932548e7119f4b8a7877fd5a8d20e63490b2d" + integrity sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.13.2" + "@webassemblyjs/helper-api-error" "1.13.2" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/helper-wasm-bytecode@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz#e556108758f448aae84c850e593ce18a0eb31e0b" + integrity sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA== + +"@webassemblyjs/helper-wasm-section@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz#9629dda9c4430eab54b591053d6dc6f3ba050348" + integrity sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw== + dependencies: + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-buffer" "1.14.1" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" + "@webassemblyjs/wasm-gen" "1.14.1" + +"@webassemblyjs/ieee754@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz#1c5eaace1d606ada2c7fd7045ea9356c59ee0dba" + integrity sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.13.2.tgz#57c5c3deb0105d02ce25fa3fd74f4ebc9fd0bbb0" + integrity sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.13.2.tgz#917a20e93f71ad5602966c2d685ae0c6c21f60f1" + integrity sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ== + +"@webassemblyjs/wasm-edit@^1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz#ac6689f502219b59198ddec42dcd496b1004d597" + integrity sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ== + dependencies: + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-buffer" "1.14.1" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" + "@webassemblyjs/helper-wasm-section" "1.14.1" + "@webassemblyjs/wasm-gen" "1.14.1" + "@webassemblyjs/wasm-opt" "1.14.1" + "@webassemblyjs/wasm-parser" "1.14.1" + "@webassemblyjs/wast-printer" "1.14.1" + +"@webassemblyjs/wasm-gen@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz#991e7f0c090cb0bb62bbac882076e3d219da9570" + integrity sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg== + dependencies: + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" + "@webassemblyjs/ieee754" "1.13.2" + "@webassemblyjs/leb128" "1.13.2" + "@webassemblyjs/utf8" "1.13.2" + +"@webassemblyjs/wasm-opt@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz#e6f71ed7ccae46781c206017d3c14c50efa8106b" + integrity sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw== + dependencies: + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-buffer" "1.14.1" + "@webassemblyjs/wasm-gen" "1.14.1" + "@webassemblyjs/wasm-parser" "1.14.1" + +"@webassemblyjs/wasm-parser@1.14.1", "@webassemblyjs/wasm-parser@^1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz#b3e13f1893605ca78b52c68e54cf6a865f90b9fb" + integrity sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ== + dependencies: + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-api-error" "1.13.2" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" + "@webassemblyjs/ieee754" "1.13.2" + "@webassemblyjs/leb128" "1.13.2" + "@webassemblyjs/utf8" "1.13.2" + +"@webassemblyjs/wast-printer@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz#3bb3e9638a8ae5fdaf9610e7a06b4d9f9aa6fe07" + integrity sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw== + dependencies: + "@webassemblyjs/ast" "1.14.1" + "@xtuc/long" "4.2.2" + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +abab@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +acorn-globals@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-7.0.1.tgz#0dbf05c44fa7c94332914c02066d5beff62c40c3" + integrity sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q== + dependencies: + acorn "^8.1.0" + acorn-walk "^8.0.2" + +acorn-walk@^8.0.2: + version "8.3.4" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== + dependencies: + acorn "^8.11.0" + +acorn@^8.1.0, acorn@^8.11.0, acorn@^8.14.0, acorn@^8.8.1, acorn@^8.8.2: + version "8.14.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" + integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv@^6.12.5: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + +anymatch@^3.0.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== +babel-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" + integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== + dependencies: + "@jest/transform" "^29.7.0" + "@types/babel__core" "^7.1.14" + babel-plugin-istanbul "^6.1.1" + babel-preset-jest "^29.6.3" + chalk "^4.0.0" + graceful-fs "^4.2.9" + slash "^3.0.0" + +babel-plugin-istanbul@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" + integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-instrument "^5.0.4" + test-exclude "^6.0.0" + +babel-plugin-jest-hoist@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" + integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.1.14" + "@types/babel__traverse" "^7.0.6" + +babel-preset-current-node-syntax@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz#9a929eafece419612ef4ae4f60b1862ebad8ef30" + integrity sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw== + dependencies: + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-bigint" "^7.8.3" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-import-attributes" "^7.24.7" + "@babel/plugin-syntax-import-meta" "^7.10.4" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" + +babel-preset-jest@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" + integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== + dependencies: + babel-plugin-jest-hoist "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +browserslist@^4.24.0: + version "4.24.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.2.tgz#f5845bc91069dbd55ee89faf9822e1d885d16580" + integrity sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg== + dependencies: + caniuse-lite "^1.0.30001669" + electron-to-chromium "^1.5.41" + node-releases "^2.0.18" + update-browserslist-db "^1.1.1" + +bs-logger@0.x: + version "0.2.6" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== + dependencies: + fast-json-stable-stringify "2.x" + +bser@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== + dependencies: + node-int64 "^0.4.0" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" @@ -48,6 +1072,85 @@ call-bind@^1.0.7: get-intrinsic "^1.2.4" set-function-length "^1.2.1" +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.2.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001669: + version "1.0.30001686" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001686.tgz#0e04b8d90de8753188e93c9989d56cb19d902670" + integrity sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA== + +chalk@^4.0.0, chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +char-regex@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== + +chrome-trace-event@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz#05bffd7ff928465093314708c93bdfa9bd1f0f5b" + integrity sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ== + +ci-info@^3.2.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== + +cjs-module-lexer@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz#707413784dbb3a72aa11c2f2b042a0bef4004170" + integrity sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA== + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== + +collect-v8-coverage@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" + integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -55,114 +1158,1154 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + +create-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" + integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-config "^29.7.0" + jest-util "^29.7.0" + prompts "^2.0.1" + +cross-spawn@^7.0.3: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +cssom@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36" + integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw== + +cssom@~0.3.6: + version "0.3.8" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + +cssstyle@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" + integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== + dependencies: + cssom "~0.3.6" + +data-urls@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143" + integrity sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ== + dependencies: + abab "^2.0.6" + whatwg-mimetype "^3.0.0" + whatwg-url "^11.0.0" + +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + dependencies: + ms "^2.1.3" + +decimal.js@^10.4.2: + version "10.4.3" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" + integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== + +dedent@^1.0.0: + version "1.5.3" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" + integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== + +deepmerge@^4.2.2: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + define-data-property@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== dependencies: - es-define-property "^1.0.0" - es-errors "^1.3.0" - gopd "^1.0.1" + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +detect-newline@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== + +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== + +domexception@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673" + integrity sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw== + dependencies: + webidl-conversions "^7.0.0" + +electron-to-chromium@^1.5.41: + version "1.5.68" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.68.tgz#4f46be4d465ef00e2100d5557b66f4af70e3ce6c" + integrity sha512-FgMdJlma0OzUYlbrtZ4AeXjKxKPk6KT8WOP8BjcqxWtlg8qyJQjRzPJzUtUn5GBg1oQ26hFs7HOOHJMYiJRnvQ== + +emittery@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" + integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.1: + version "5.17.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" + integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + +entities@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" + integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-module-lexer@^1.2.1: + version "1.5.4" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.4.tgz#a8efec3a3da991e60efa6b633a7cad6ab8d26b78" + integrity sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw== + +escalade@^3.1.1, escalade@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +escodegen@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" + integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionalDependencies: + source-map "~0.6.1" + +eslint-scope@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +esprima@^4.0.0, esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +events@^3.2.0, events@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== + +expect@^29.0.0, expect@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" + integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== + dependencies: + "@jest/expect-utils" "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fb-watchman@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" + integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== + dependencies: + bser "2.1.1" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +form-data@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.1.tgz#ba1076daaaa5bfd7e99c1a6cb02aa0a5cff90d48" + integrity sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +formdata-node@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/formdata-node/-/formdata-node-6.0.3.tgz#48f8e2206ae2befded82af621ef015f08168dc6d" + integrity sha512-8e1++BCiTzUno9v5IZ2J6bv4RU+3UKDmqWUQD0MIMVCd9AdhWkO1gw57oo1mNEX1dMq2EGI+FbWz4B92pscSQg== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@^2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + +glob@^7.1.3, glob@^7.1.4: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +gopd@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + +graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.1.0.tgz#deb10494cbbe8809bce168a3b961f42969f5ed43" + integrity sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q== + dependencies: + call-bind "^1.0.7" + +has-symbols@^1.0.3: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + +hasown@^2.0.0, hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +html-encoding-sniffer@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" + integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA== + dependencies: + whatwg-encoding "^2.0.0" + +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + +http-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" + integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== + dependencies: + "@tootallnate/once" "2" + agent-base "6" + debug "4" + +https-proxy-agent@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +iconv-lite@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +import-local@^3.0.2: + version "3.2.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" + integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-core-module@^2.13.0: + version "2.15.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" + integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== + dependencies: + hasown "^2.0.2" + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-potential-custom-element-name@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" + integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== + +istanbul-lib-instrument@^5.0.4: + version "5.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" + integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.2.0" + semver "^6.3.0" + +istanbul-lib-instrument@^6.0.0: + version "6.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== + dependencies: + "@babel/core" "^7.23.9" + "@babel/parser" "^7.23.9" + "@istanbuljs/schema" "^0.1.3" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + +istanbul-lib-report@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^4.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" + integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + source-map "^0.6.1" + +istanbul-reports@^3.1.3: + version "3.1.7" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b" + integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +jest-changed-files@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" + integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== + dependencies: + execa "^5.0.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + +jest-circus@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" + integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + dedent "^1.0.0" + is-generator-fn "^2.0.0" + jest-each "^29.7.0" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + pretty-format "^29.7.0" + pure-rand "^6.0.0" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-cli@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" + integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== + dependencies: + "@jest/core" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + chalk "^4.0.0" + create-jest "^29.7.0" + exit "^0.1.2" + import-local "^3.0.2" + jest-config "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + yargs "^17.3.1" + +jest-config@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" + integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== + dependencies: + "@babel/core" "^7.11.6" + "@jest/test-sequencer" "^29.7.0" + "@jest/types" "^29.6.3" + babel-jest "^29.7.0" + chalk "^4.0.0" + ci-info "^3.2.0" + deepmerge "^4.2.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-circus "^29.7.0" + jest-environment-node "^29.7.0" + jest-get-type "^29.6.3" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-runner "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + micromatch "^4.0.4" + parse-json "^5.2.0" + pretty-format "^29.7.0" + slash "^3.0.0" + strip-json-comments "^3.1.1" + +jest-diff@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" + integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== + dependencies: + chalk "^4.0.0" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-docblock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" + integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== + dependencies: + detect-newline "^3.0.0" + +jest-each@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" + integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + jest-get-type "^29.6.3" + jest-util "^29.7.0" + pretty-format "^29.7.0" + +jest-environment-jsdom@29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz#d206fa3551933c3fd519e5dfdb58a0f5139a837f" + integrity sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/jsdom" "^20.0.0" + "@types/node" "*" + jest-mock "^29.7.0" + jest-util "^29.7.0" + jsdom "^20.0.0" + +jest-environment-node@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" + integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.7.0" + jest-util "^29.7.0" + +jest-get-type@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" + integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== + +jest-haste-map@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" + integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== + dependencies: + "@jest/types" "^29.6.3" + "@types/graceful-fs" "^4.1.3" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.9" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + jest-worker "^29.7.0" + micromatch "^4.0.4" + walker "^1.0.8" + optionalDependencies: + fsevents "^2.3.2" + +jest-leak-detector@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" + integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== + dependencies: + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-matcher-utils@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" + integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== + dependencies: + chalk "^4.0.0" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-message-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" + integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== + dependencies: + "@babel/code-frame" "^7.12.13" + "@jest/types" "^29.6.3" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.9" + micromatch "^4.0.4" + pretty-format "^29.7.0" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-mock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" + integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-util "^29.7.0" + +jest-pnp-resolver@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" + integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== + +jest-regex-util@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" + integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== + +jest-resolve-dependencies@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" + integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== + dependencies: + jest-regex-util "^29.6.3" + jest-snapshot "^29.7.0" + +jest-resolve@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" + integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== + dependencies: + chalk "^4.0.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-pnp-resolver "^1.2.2" + jest-util "^29.7.0" + jest-validate "^29.7.0" + resolve "^1.20.0" + resolve.exports "^2.0.0" + slash "^3.0.0" + +jest-runner@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" + integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== + dependencies: + "@jest/console" "^29.7.0" + "@jest/environment" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + emittery "^0.13.1" + graceful-fs "^4.2.9" + jest-docblock "^29.7.0" + jest-environment-node "^29.7.0" + jest-haste-map "^29.7.0" + jest-leak-detector "^29.7.0" + jest-message-util "^29.7.0" + jest-resolve "^29.7.0" + jest-runtime "^29.7.0" + jest-util "^29.7.0" + jest-watcher "^29.7.0" + jest-worker "^29.7.0" + p-limit "^3.1.0" + source-map-support "0.5.13" + +jest-runtime@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" + integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/globals" "^29.7.0" + "@jest/source-map" "^29.6.3" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + cjs-module-lexer "^1.0.0" + collect-v8-coverage "^1.0.0" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + slash "^3.0.0" + strip-bom "^4.0.0" + +jest-snapshot@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" + integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== + dependencies: + "@babel/core" "^7.11.6" + "@babel/generator" "^7.7.2" + "@babel/plugin-syntax-jsx" "^7.7.2" + "@babel/plugin-syntax-typescript" "^7.7.2" + "@babel/types" "^7.3.3" + "@jest/expect-utils" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + chalk "^4.0.0" + expect "^29.7.0" + graceful-fs "^4.2.9" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + natural-compare "^1.4.0" + pretty-format "^29.7.0" + semver "^7.5.3" + +jest-util@^29.0.0, jest-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" + integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.9" + picomatch "^2.2.3" + +jest-validate@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" + integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== + dependencies: + "@jest/types" "^29.6.3" + camelcase "^6.2.0" + chalk "^4.0.0" + jest-get-type "^29.6.3" + leven "^3.1.0" + pretty-format "^29.7.0" + +jest-watcher@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" + integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== + dependencies: + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + emittery "^0.13.1" + jest-util "^29.7.0" + string-length "^4.0.1" + +jest-worker@^27.4.5: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" + integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== +jest-worker@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" + integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== + dependencies: + "@types/node" "*" + jest-util "^29.7.0" + merge-stream "^2.0.0" + supports-color "^8.0.0" -es-define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" - integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== +jest@29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" + integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== dependencies: - get-intrinsic "^1.2.4" + "@jest/core" "^29.7.0" + "@jest/types" "^29.6.3" + import-local "^3.0.2" + jest-cli "^29.7.0" -es-errors@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" - integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== +js-base64@3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.2.tgz#816d11d81a8aff241603d19ce5761e13e41d7745" + integrity sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ== -form-data@4.0.0: +js-tokens@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" + argparse "^1.0.7" + esprima "^4.0.0" -form-data@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.1.tgz#ba1076daaaa5bfd7e99c1a6cb02aa0a5cff90d48" - integrity sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw== +jsdom@^20.0.0: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-20.0.3.tgz#886a41ba1d4726f67a8858028c99489fed6ad4db" + integrity sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ== dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" + abab "^2.0.6" + acorn "^8.8.1" + acorn-globals "^7.0.0" + cssom "^0.5.0" + cssstyle "^2.3.0" + data-urls "^3.0.2" + decimal.js "^10.4.2" + domexception "^4.0.0" + escodegen "^2.0.0" + form-data "^4.0.0" + html-encoding-sniffer "^3.0.0" + http-proxy-agent "^5.0.0" + https-proxy-agent "^5.0.1" + is-potential-custom-element-name "^1.0.1" + nwsapi "^2.2.2" + parse5 "^7.1.1" + saxes "^6.0.0" + symbol-tree "^3.2.4" + tough-cookie "^4.1.2" + w3c-xmlserializer "^4.0.0" + webidl-conversions "^7.0.0" + whatwg-encoding "^2.0.0" + whatwg-mimetype "^3.0.0" + whatwg-url "^11.0.0" + ws "^8.11.0" + xml-name-validator "^4.0.0" -function-bind@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" - integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== +jsesc@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.0.2.tgz#bb8b09a6597ba426425f2e4a07245c3d00b9343e" + integrity sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g== + +json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== -get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json5@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + +lines-and-columns@^1.1.6: version "1.2.4" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" - integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== - dependencies: - es-errors "^1.3.0" - function-bind "^1.1.2" - has-proto "^1.0.1" - has-symbols "^1.0.3" - hasown "^2.0.0" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== +loader-runner@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== dependencies: - get-intrinsic "^1.1.3" + p-locate "^4.1.0" -has-property-descriptors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" - integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== +lodash.memoize@4.x: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== dependencies: - es-define-property "^1.0.0" + yallist "^3.0.2" -has-proto@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" - integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" -has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +make-error@1.x: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -hasown@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" - integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== +makeerror@1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" + integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== dependencies: - function-bind "^1.1.2" + tmpl "1.0.5" -js-base64@3.7.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.2.tgz#816d11d81a8aff241603d19ce5761e13e41d7745" - integrity sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ== +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +micromatch@^4.0.0, micromatch@^4.0.4: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12: +mime-types@^2.1.12, mime-types@^2.1.27: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +neo-async@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + node-fetch@2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" @@ -170,16 +2313,181 @@ node-fetch@2.7.0: dependencies: whatwg-url "^5.0.0" +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== + +node-releases@^2.0.18: + version "2.0.18" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" + integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== + +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +nwsapi@^2.2.2: + version "2.2.16" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.16.tgz#177760bba02c351df1d2644e220c31dfec8cdb43" + integrity sha512-F1I/bimDpj3ncaNDhfyMWuFqmQDBwDB0Fogc2qpL3BWvkQteFD/8BzWuIRl83rq0DXfm8SGt/HFhLXZyljTXcQ== + object-inspect@^1.13.1: version "1.13.3" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.3.tgz#f14c183de51130243d6d18ae149375ff50ea488a" integrity sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA== +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parse-json@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +parse5@^7.0.0, parse5@^7.1.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.2.1.tgz#8928f55915e6125f430cc44309765bf17556a33a" + integrity sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ== + dependencies: + entities "^4.5.0" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +picocolors@^1.0.0, picocolors@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + +picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pirates@^4.0.4: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + prettier@2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== +pretty-format@^29.0.0, pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== + dependencies: + "@jest/schemas" "^29.6.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + +prompts@^2.0.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + +psl@^1.1.33: + version "1.15.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.15.0.tgz#bdace31896f1d97cec6a79e8224898ce93d974c6" + integrity sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w== + dependencies: + punycode "^2.3.1" + +punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +pure-rand@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" + integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== + qs@6.11.2: version "6.11.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" @@ -187,6 +2495,118 @@ qs@6.11.2: dependencies: side-channel "^1.0.4" +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +react-is@^18.0.0: + version "18.3.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" + integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== + +readable-stream@^4.5.2: + version "4.5.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" + integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== + dependencies: + abort-controller "^3.0.0" + buffer "^6.0.3" + events "^3.3.0" + process "^0.11.10" + string_decoder "^1.3.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve.exports@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.3.tgz#41955e6f1b4013b7586f873749a635dea07ebe3f" + integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== + +resolve@^1.20.0: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +safe-buffer@^5.1.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +"safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +saxes@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5" + integrity sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA== + dependencies: + xmlchars "^2.2.0" + +schema-utils@^3.1.1, schema-utils@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" + integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.3.4, semver@^7.5.3, semver@^7.5.4: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + +serialize-javascript@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== + dependencies: + randombytes "^2.1.0" + set-function-length@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" @@ -199,6 +2619,18 @@ set-function-length@^1.2.1: gopd "^1.0.1" has-property-descriptors "^1.0.2" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + side-channel@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" @@ -209,31 +2641,371 @@ side-channel@^1.0.4: get-intrinsic "^1.2.4" object-inspect "^1.13.1" +signal-exit@^3.0.3, signal-exit@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@^0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" + integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +stack-utils@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" + integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== + dependencies: + escape-string-regexp "^2.0.0" + +string-length@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== + dependencies: + char-regex "^1.0.2" + strip-ansi "^6.0.0" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +symbol-tree@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + +tapable@^2.1.1, tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + +terser-webpack-plugin@^5.3.10: + version "5.3.10" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" + integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== + dependencies: + "@jridgewell/trace-mapping" "^0.3.20" + jest-worker "^27.4.5" + schema-utils "^3.1.1" + serialize-javascript "^6.0.1" + terser "^5.26.0" + +terser@^5.26.0: + version "5.36.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.36.0.tgz#8b0dbed459ac40ff7b4c9fd5a3a2029de105180e" + integrity sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + +tmpl@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +tough-cookie@^4.1.2: + version "4.1.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.4.tgz#945f1461b45b5a8c76821c33ea49c3ac192c1b36" + integrity sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + +tr46@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" + integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA== + dependencies: + punycode "^2.1.1" + tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +ts-jest@29.1.1: + version "29.1.1" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b" + integrity sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA== + dependencies: + bs-logger "0.x" + fast-json-stable-stringify "2.x" + jest-util "^29.0.0" + json5 "^2.2.3" + lodash.memoize "4.x" + make-error "1.x" + semver "^7.5.3" + yargs-parser "^21.0.1" + +ts-loader@^9.3.1: + version "9.5.1" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.1.tgz#63d5912a86312f1fbe32cef0859fb8b2193d9b89" + integrity sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg== + dependencies: + chalk "^4.1.0" + enhanced-resolve "^5.0.0" + micromatch "^4.0.0" + semver "^7.3.4" + source-map "^0.7.4" + +type-detect@4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + typescript@4.6.4: version "4.6.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== -undici-types@~6.19.8: - version "6.19.8" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" - integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== + +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== + +update-browserslist-db@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5" + integrity sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A== + dependencies: + escalade "^3.2.0" + picocolors "^1.1.0" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" url-join@4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7" integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA== +url-parse@^1.5.3: + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + +v8-to-istanbul@^9.0.1: + version "9.3.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" + integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== + dependencies: + "@jridgewell/trace-mapping" "^0.3.12" + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^2.0.0" + +w3c-xmlserializer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz#aebdc84920d806222936e3cdce408e32488a3073" + integrity sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw== + dependencies: + xml-name-validator "^4.0.0" + +walker@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== + dependencies: + makeerror "1.0.12" + +watchpack@^2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.2.tgz#2feeaed67412e7c33184e5a79ca738fbd38564da" + integrity sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== +webidl-conversions@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" + integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== + +webpack-sources@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + +webpack@^5.94.0: + version "5.97.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.97.0.tgz#1c5e3b9319f8c6decb19b142e776d90e629d5c40" + integrity sha512-CWT8v7ShSfj7tGs4TLRtaOLmOCPWhoKEvp+eA7FVx8Xrjb3XfT0aXdxDItnRZmE8sHcH+a8ayDrJCOjXKxVFfQ== + dependencies: + "@types/eslint-scope" "^3.7.7" + "@types/estree" "^1.0.6" + "@webassemblyjs/ast" "^1.14.1" + "@webassemblyjs/wasm-edit" "^1.14.1" + "@webassemblyjs/wasm-parser" "^1.14.1" + acorn "^8.14.0" + browserslist "^4.24.0" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.17.1" + es-module-lexer "^1.2.1" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.11" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.2.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.3.10" + watchpack "^2.4.1" + webpack-sources "^3.2.3" + +whatwg-encoding@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53" + integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg== + dependencies: + iconv-lite "0.6.3" + +whatwg-mimetype@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" + integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q== + +whatwg-url@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018" + integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ== + dependencies: + tr46 "^3.0.0" + webidl-conversions "^7.0.0" + whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -241,3 +3013,80 @@ whatwg-url@^5.0.0: dependencies: tr46 "~0.0.3" webidl-conversions "^3.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +write-file-atomic@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" + integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^3.0.7" + +ws@^8.11.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + +xml-name-validator@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" + integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== + +xmlchars@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" + integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yargs-parser@^21.0.1, yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.3.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==