From 79132037736609799c170bb370d91ef0dd5163a2 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 18:55:23 +0000 Subject: [PATCH] SDK regeneration --- jest.config.js => jest.config.mjs | 5 +- package.json | 35 +- reference.md | 3962 ++++++++--------- scripts/rename-to-esm-files.js | 115 + src/Client.ts | 37 +- src/api/resources/accounting/client/Client.ts | 153 +- .../resources/accountDetails/client/Client.ts | 43 +- .../resources/accountToken/client/Client.ts | 48 +- .../accountingPeriods/client/Client.ts | 95 +- .../resources/accounts/client/Client.ts | 194 +- .../types/AccountsListRequestRemoteFields.ts | 1 - .../AccountsListRequestShowEnumOrigins.ts | 1 - .../AccountsRetrieveRequestRemoteFields.ts | 1 - .../AccountsRetrieveRequestShowEnumOrigins.ts | 1 - .../resources/addresses/client/Client.ts | 49 +- .../asyncPassthrough/client/Client.ts | 90 +- .../resources/asyncTasks/client/Client.ts | 48 +- .../resources/attachments/client/Client.ts | 174 +- .../resources/auditTrail/client/Client.ts | 48 +- .../availableActions/client/Client.ts | 47 +- .../resources/balanceSheets/client/Client.ts | 93 +- .../bankFeedAccounts/client/Client.ts | 180 +- .../bankFeedTransactions/client/Client.ts | 180 +- .../cashFlowStatements/client/Client.ts | 95 +- .../resources/companyInfo/client/Client.ts | 103 +- .../types/CompanyInfoListRequestExpand.ts | 1 - .../types/CompanyInfoRetrieveRequestExpand.ts | 1 - .../resources/contacts/client/Client.ts | 226 +- .../types/ContactsListRequestExpand.ts | 1 - .../types/ContactsRetrieveRequestExpand.ts | 1 - .../resources/creditNotes/client/Client.ts | 204 +- .../types/CreditNotesListRequestExpand.ts | 1 - .../CreditNotesListRequestRemoteFields.ts | 1 - .../CreditNotesListRequestShowEnumOrigins.ts | 1 - .../types/CreditNotesRetrieveRequestExpand.ts | 1 - .../CreditNotesRetrieveRequestRemoteFields.ts | 1 - ...editNotesRetrieveRequestShowEnumOrigins.ts | 1 - .../resources/deleteAccount/client/Client.ts | 24 +- .../resources/employees/client/Client.ts | 91 +- .../resources/expenses/client/Client.ts | 270 +- .../types/ExpensesListRequestExpand.ts | 1 - .../types/ExpensesRetrieveRequestExpand.ts | 1 - .../resources/fieldMapping/client/Client.ts | 258 +- .../resources/forceResync/client/Client.ts | 47 +- .../client/Client.ts | 107 +- ...eralLedgerTransactionsListRequestExpand.ts | 1 - ...LedgerTransactionsRetrieveRequestExpand.ts | 1 - .../resources/generateKey/client/Client.ts | 46 +- .../incomeStatements/client/Client.ts | 95 +- .../resources/invoices/client/Client.ts | 363 +- .../types/InvoicesListRequestExpand.ts | 1 - .../types/InvoicesListRequestStatus.ts | 1 - .../invoices/types/InvoicesListRequestType.ts | 1 - .../types/InvoicesRetrieveRequestExpand.ts | 1 - .../resources/issues/client/Client.ts | 93 +- .../issues/types/IssuesListRequestStatus.ts | 1 - .../resources/items/client/Client.ts | 101 +- .../items/types/ItemsListRequestExpand.ts | 1 - .../items/types/ItemsRetrieveRequestExpand.ts | 1 - .../resources/journalEntries/client/Client.ts | 276 +- .../types/JournalEntriesListRequestExpand.ts | 1 - .../JournalEntriesRetrieveRequestExpand.ts | 1 - .../resources/linkToken/client/Client.ts | 46 +- .../resources/linkedAccounts/client/Client.ts | 54 +- .../LinkedAccountsListRequestCategory.ts | 1 - .../resources/passthrough/client/Client.ts | 46 +- .../resources/paymentMethods/client/Client.ts | 93 +- .../resources/paymentTerms/client/Client.ts | 93 +- .../resources/payments/client/Client.ts | 355 +- .../types/PaymentsListRequestExpand.ts | 1 - .../types/PaymentsRetrieveRequestExpand.ts | 1 - .../resources/phoneNumbers/client/Client.ts | 51 +- .../resources/purchaseOrders/client/Client.ts | 276 +- .../types/PurchaseOrdersListRequestExpand.ts | 1 - .../PurchaseOrdersRetrieveRequestExpand.ts | 1 - .../resources/regenerateKey/client/Client.ts | 46 +- .../resources/scopes/client/Client.ts | 128 +- .../resources/syncStatus/client/Client.ts | 48 +- .../resources/taxRates/client/Client.ts | 91 +- .../trackingCategories/client/Client.ts | 95 +- .../resources/transactions/client/Client.ts | 103 +- .../types/TransactionsListRequestExpand.ts | 1 - .../TransactionsRetrieveRequestExpand.ts | 1 - .../resources/vendorCredits/client/Client.ts | 186 +- .../types/VendorCreditsListRequestExpand.ts | 1 - .../VendorCreditsRetrieveRequestExpand.ts | 1 - .../webhookReceivers/client/Client.ts | 87 +- .../types/AccountAccountTypeEnum.ts | 1 - .../AccountDetailsAndActionsStatusEnum.ts | 1 - .../accounting/types/AccountStatusEnum.ts | 1 - .../accounting/types/AddressTypeEnum.ts | 1 - .../types/AsyncPostTaskStatusEnum.ts | 1 - .../types/BankFeedAccountAccountTypeEnum.ts | 1 - .../accounting/types/CategoriesEnum.ts | 1 - .../accounting/types/CategoryEnum.ts | 1 - .../accounting/types/CategoryTypeEnum.ts | 1 - .../accounting/types/ClassificationEnum.ts | 1 - .../accounting/types/ComponentTypeEnum.ts | 1 - .../resources/accounting/types/CountryEnum.ts | 1 - .../accounting/types/CreditNoteStatusEnum.ts | 1 - .../accounting/types/CreditOrDebitEnum.ts | 1 - .../accounting/types/EnabledActionsEnum.ts | 1 - .../accounting/types/EncodingEnum.ts | 1 - .../accounting/types/EventTypeEnum.ts | 1 - .../accounting/types/FeedStatusEnum.ts | 1 - .../accounting/types/FieldFormatEnum.ts | 1 - .../accounting/types/FieldTypeEnum.ts | 1 - .../accounting/types/InvoiceStatusEnum.ts | 1 - .../accounting/types/InvoiceTypeEnum.ts | 1 - .../accounting/types/IssueStatusEnum.ts | 1 - .../accounting/types/ItemFormatEnum.ts | 1 - .../accounting/types/ItemTypeEnum.ts | 1 - .../accounting/types/LanguageEnum.ts | 1 - .../accounting/types/LastSyncResultEnum.ts | 1 - .../resources/accounting/types/MethodEnum.ts | 1 - .../accounting/types/MethodTypeEnum.ts | 1 - .../accounting/types/PaymentTypeEnum.ts | 1 - .../accounting/types/PostingStatusEnum.ts | 1 - .../types/PurchaseOrderStatusEnum.ts | 1 - .../accounting/types/RequestFormatEnum.ts | 1 - .../accounting/types/ResponseTypeEnum.ts | 1 - .../resources/accounting/types/RoleEnum.ts | 1 - .../SelectiveSyncConfigurationsUsageEnum.ts | 1 - .../accounting/types/Status7D1Enum.ts | 1 - .../accounting/types/Status895Enum.ts | 1 - .../accounting/types/StatusFd5Enum.ts | 1 - .../types/TransactionCurrencyEnum.ts | 1 - .../types/UnderlyingTransactionTypeEnum.ts | 1 - src/api/resources/ats/client/Client.ts | 117 +- .../resources/accountDetails/client/Client.ts | 43 +- .../resources/accountToken/client/Client.ts | 48 +- .../ats/resources/activities/client/Client.ts | 192 +- .../ActivitiesListRequestRemoteFields.ts | 1 - .../ActivitiesListRequestShowEnumOrigins.ts | 1 - .../ActivitiesRetrieveRequestRemoteFields.ts | 1 - ...ctivitiesRetrieveRequestShowEnumOrigins.ts | 1 - .../resources/applications/client/Client.ts | 230 +- .../types/ApplicationsListRequestExpand.ts | 1 - .../ApplicationsRetrieveRequestExpand.ts | 1 - .../asyncPassthrough/client/Client.ts | 88 +- .../resources/attachments/client/Client.ts | 170 +- .../ats/resources/auditTrail/client/Client.ts | 48 +- .../availableActions/client/Client.ts | 43 +- .../ats/resources/candidates/client/Client.ts | 293 +- .../types/CandidatesListRequestExpand.ts | 1 - .../types/CandidatesRetrieveRequestExpand.ts | 1 - .../resources/deleteAccount/client/Client.ts | 24 +- .../resources/departments/client/Client.ts | 91 +- .../ats/resources/eeocs/client/Client.ts | 111 +- .../types/EeocsListRequestRemoteFields.ts | 1 - .../types/EeocsListRequestShowEnumOrigins.ts | 1 - .../types/EeocsRetrieveRequestRemoteFields.ts | 1 - .../EeocsRetrieveRequestShowEnumOrigins.ts | 1 - .../resources/fieldMapping/client/Client.ts | 258 +- .../resources/forceResync/client/Client.ts | 43 +- .../resources/generateKey/client/Client.ts | 46 +- .../ats/resources/interviews/client/Client.ts | 180 +- .../types/InterviewsListRequestExpand.ts | 1 - .../types/InterviewsRetrieveRequestExpand.ts | 1 - .../ats/resources/issues/client/Client.ts | 90 +- .../issues/types/IssuesListRequestStatus.ts | 1 - .../jobInterviewStages/client/Client.ts | 93 +- .../resources/jobPostings/client/Client.ts | 97 +- .../types/JobPostingsListRequestStatus.ts | 1 - .../ats/resources/jobs/client/Client.ts | 154 +- .../jobs/types/JobsListRequestExpand.ts | 1 - .../jobs/types/JobsListRequestStatus.ts | 1 - .../jobs/types/JobsRetrieveRequestExpand.ts | 1 - ...JobsScreeningQuestionsListRequestExpand.ts | 1 - .../ats/resources/linkToken/client/Client.ts | 46 +- .../resources/linkedAccounts/client/Client.ts | 54 +- .../LinkedAccountsListRequestCategory.ts | 1 - .../ats/resources/offers/client/Client.ts | 101 +- .../offers/types/OffersListRequestExpand.ts | 1 - .../types/OffersRetrieveRequestExpand.ts | 1 - .../ats/resources/offices/client/Client.ts | 91 +- .../resources/passthrough/client/Client.ts | 46 +- .../resources/regenerateKey/client/Client.ts | 46 +- .../resources/rejectReasons/client/Client.ts | 91 +- .../ats/resources/scopes/client/Client.ts | 122 +- .../ats/resources/scorecards/client/Client.ts | 101 +- .../types/ScorecardsListRequestExpand.ts | 1 - .../types/ScorecardsRetrieveRequestExpand.ts | 1 - .../ats/resources/syncStatus/client/Client.ts | 48 +- .../ats/resources/tags/client/Client.ts | 48 +- .../ats/resources/users/client/Client.ts | 91 +- .../webhookReceivers/client/Client.ts | 83 +- src/api/resources/ats/types/AccessRoleEnum.ts | 1 - .../AccountDetailsAndActionsStatusEnum.ts | 1 - .../resources/ats/types/ActivityTypeEnum.ts | 1 - .../resources/ats/types/AttachmentTypeEnum.ts | 1 - src/api/resources/ats/types/CategoriesEnum.ts | 1 - src/api/resources/ats/types/CategoryEnum.ts | 1 - .../ats/types/DisabilityStatusEnum.ts | 1 - .../ats/types/EmailAddressTypeEnum.ts | 1 - .../resources/ats/types/EnabledActionsEnum.ts | 1 - src/api/resources/ats/types/EncodingEnum.ts | 1 - src/api/resources/ats/types/EventTypeEnum.ts | 1 - src/api/resources/ats/types/GenderEnum.ts | 1 - .../resources/ats/types/IssueStatusEnum.ts | 1 - .../ats/types/JobPostingStatusEnum.ts | 1 - src/api/resources/ats/types/JobStatusEnum.ts | 1 - src/api/resources/ats/types/JobTypeEnum.ts | 1 - src/api/resources/ats/types/LanguageEnum.ts | 1 - .../resources/ats/types/LastSyncResultEnum.ts | 1 - src/api/resources/ats/types/MethodEnum.ts | 1 - .../resources/ats/types/OfferStatusEnum.ts | 1 - .../ats/types/OverallRecommendationEnum.ts | 1 - .../ats/types/PhoneNumberTypeEnum.ts | 1 - src/api/resources/ats/types/RaceEnum.ts | 1 - src/api/resources/ats/types/ReasonEnum.ts | 1 - .../resources/ats/types/RequestFormatEnum.ts | 1 - .../resources/ats/types/ResponseTypeEnum.ts | 1 - src/api/resources/ats/types/RoleEnum.ts | 1 - .../ats/types/ScheduledInterviewStatusEnum.ts | 1 - .../ats/types/ScreeningQuestionTypeEnum.ts | 1 - .../SelectiveSyncConfigurationsUsageEnum.ts | 1 - src/api/resources/ats/types/StatusFd5Enum.ts | 1 - src/api/resources/ats/types/UrlTypeEnum.ts | 1 - .../resources/ats/types/VeteranStatusEnum.ts | 1 - src/api/resources/ats/types/VisibilityEnum.ts | 1 - src/api/resources/crm/client/Client.ts | 111 +- .../resources/accountDetails/client/Client.ts | 43 +- .../resources/accountToken/client/Client.ts | 48 +- .../crm/resources/accounts/client/Client.ts | 299 +- .../associationTypes/client/Client.ts | 194 +- .../resources/associations/client/Client.ts | 124 +- .../asyncPassthrough/client/Client.ts | 88 +- .../crm/resources/auditTrail/client/Client.ts | 48 +- .../availableActions/client/Client.ts | 43 +- .../crm/resources/contacts/client/Client.ts | 337 +- .../types/ContactsListRequestExpand.ts | 1 - .../types/ContactsRetrieveRequestExpand.ts | 1 - .../customObjectClasses/client/Client.ts | 93 +- .../resources/customObjects/client/Client.ts | 240 +- .../resources/deleteAccount/client/Client.ts | 24 +- .../engagementTypes/client/Client.ts | 135 +- .../resources/engagements/client/Client.ts | 309 +- .../types/EngagementsListRequestExpand.ts | 1 - .../types/EngagementsRetrieveRequestExpand.ts | 1 - .../resources/fieldMapping/client/Client.ts | 258 +- .../resources/forceResync/client/Client.ts | 43 +- .../resources/generateKey/client/Client.ts | 46 +- .../crm/resources/issues/client/Client.ts | 90 +- .../issues/types/IssuesListRequestStatus.ts | 1 - .../crm/resources/leads/client/Client.ts | 222 +- .../leads/types/LeadsListRequestExpand.ts | 1 - .../leads/types/LeadsRetrieveRequestExpand.ts | 1 - .../crm/resources/linkToken/client/Client.ts | 46 +- .../resources/linkedAccounts/client/Client.ts | 54 +- .../LinkedAccountsListRequestCategory.ts | 1 - .../crm/resources/notes/client/Client.ts | 222 +- .../notes/types/NotesListRequestExpand.ts | 1 - .../notes/types/NotesRetrieveRequestExpand.ts | 1 - .../resources/opportunities/client/Client.ts | 315 +- .../types/OpportunitiesListRequestExpand.ts | 1 - .../types/OpportunitiesListRequestStatus.ts | 1 - .../OpportunitiesRetrieveRequestExpand.ts | 1 - .../resources/passthrough/client/Client.ts | 46 +- .../resources/regenerateKey/client/Client.ts | 46 +- .../crm/resources/scopes/client/Client.ts | 122 +- .../crm/resources/stages/client/Client.ts | 135 +- .../crm/resources/syncStatus/client/Client.ts | 48 +- .../crm/resources/tasks/client/Client.ts | 304 +- .../tasks/types/TasksListRequestExpand.ts | 1 - .../tasks/types/TasksRetrieveRequestExpand.ts | 1 - .../crm/resources/users/client/Client.ts | 163 +- .../webhookReceivers/client/Client.ts | 83 +- .../AccountDetailsAndActionsStatusEnum.ts | 1 - .../resources/crm/types/ActivityTypeEnum.ts | 1 - .../resources/crm/types/AddressTypeEnum.ts | 1 - .../resources/crm/types/CardinalityEnum.ts | 1 - src/api/resources/crm/types/CategoriesEnum.ts | 1 - src/api/resources/crm/types/CategoryEnum.ts | 1 - src/api/resources/crm/types/CountryEnum.ts | 1 - src/api/resources/crm/types/DirectionEnum.ts | 1 - .../resources/crm/types/EnabledActionsEnum.ts | 1 - src/api/resources/crm/types/EncodingEnum.ts | 1 - src/api/resources/crm/types/EventTypeEnum.ts | 1 - .../resources/crm/types/FieldFormatEnum.ts | 1 - src/api/resources/crm/types/FieldTypeEnum.ts | 1 - .../resources/crm/types/IssueStatusEnum.ts | 1 - src/api/resources/crm/types/ItemFormatEnum.ts | 1 - src/api/resources/crm/types/ItemTypeEnum.ts | 1 - src/api/resources/crm/types/LanguageEnum.ts | 1 - .../resources/crm/types/LastSyncResultEnum.ts | 1 - src/api/resources/crm/types/MethodEnum.ts | 1 - .../crm/types/OpportunityStatusEnum.ts | 1 - src/api/resources/crm/types/OriginTypeEnum.ts | 1 - src/api/resources/crm/types/ReasonEnum.ts | 1 - .../resources/crm/types/RequestFormatEnum.ts | 1 - .../resources/crm/types/ResponseTypeEnum.ts | 1 - src/api/resources/crm/types/RoleEnum.ts | 1 - .../SelectiveSyncConfigurationsUsageEnum.ts | 1 - src/api/resources/crm/types/StatusFd5Enum.ts | 1 - src/api/resources/crm/types/TaskStatusEnum.ts | 1 - .../resources/filestorage/client/Client.ts | 84 +- .../resources/accountDetails/client/Client.ts | 45 +- .../resources/accountToken/client/Client.ts | 48 +- .../asyncPassthrough/client/Client.ts | 90 +- .../resources/auditTrail/client/Client.ts | 48 +- .../availableActions/client/Client.ts | 47 +- .../resources/deleteAccount/client/Client.ts | 26 +- .../resources/drives/client/Client.ts | 91 +- .../resources/fieldMapping/client/Client.ts | 260 +- .../resources/files/client/Client.ts | 301 +- .../files/types/FilesListRequestExpand.ts | 1 - .../files/types/FilesRetrieveRequestExpand.ts | 1 - .../resources/folders/client/Client.ts | 182 +- .../folders/types/FoldersListRequestExpand.ts | 1 - .../types/FoldersRetrieveRequestExpand.ts | 1 - .../resources/forceResync/client/Client.ts | 47 +- .../resources/generateKey/client/Client.ts | 46 +- .../resources/groups/client/Client.ts | 91 +- .../resources/issues/client/Client.ts | 93 +- .../issues/types/IssuesListRequestStatus.ts | 1 - .../resources/linkToken/client/Client.ts | 46 +- .../resources/linkedAccounts/client/Client.ts | 56 +- .../LinkedAccountsListRequestCategory.ts | 1 - .../resources/passthrough/client/Client.ts | 46 +- .../resources/regenerateKey/client/Client.ts | 48 +- .../resources/scopes/client/Client.ts | 128 +- .../resources/syncStatus/client/Client.ts | 48 +- .../resources/users/client/Client.ts | 91 +- .../webhookReceivers/client/Client.ts | 87 +- .../AccountDetailsAndActionsStatusEnum.ts | 1 - .../filestorage/types/CategoriesEnum.ts | 1 - .../filestorage/types/CategoryEnum.ts | 1 - .../filestorage/types/EnabledActionsEnum.ts | 1 - .../filestorage/types/EncodingEnum.ts | 1 - .../filestorage/types/EventTypeEnum.ts | 1 - .../filestorage/types/FilePermissions.ts | 2 +- .../filestorage/types/FilePermissionsItem.ts | 2 +- .../filestorage/types/FolderPermissions.ts | 5 +- .../types/FolderPermissionsItem.ts | 2 +- .../filestorage/types/IssueStatusEnum.ts | 1 - .../filestorage/types/LanguageEnum.ts | 1 - .../filestorage/types/LastSyncResultEnum.ts | 1 - .../resources/filestorage/types/MethodEnum.ts | 1 - .../filestorage/types/RequestFormatEnum.ts | 1 - .../filestorage/types/ResponseTypeEnum.ts | 1 - .../resources/filestorage/types/RoleEnum.ts | 1 - .../resources/filestorage/types/RolesEnum.ts | 1 - .../SelectiveSyncConfigurationsUsageEnum.ts | 1 - .../filestorage/types/StatusFd5Enum.ts | 1 - .../resources/filestorage/types/TypeEnum.ts | 1 - src/api/resources/hris/client/Client.ts | 117 +- .../resources/accountDetails/client/Client.ts | 43 +- .../resources/accountToken/client/Client.ts | 48 +- .../asyncPassthrough/client/Client.ts | 88 +- .../resources/auditTrail/client/Client.ts | 48 +- .../availableActions/client/Client.ts | 43 +- .../hris/resources/bankInfo/client/Client.ts | 101 +- .../types/BankInfoListRequestAccountType.ts | 1 - .../types/BankInfoListRequestOrderBy.ts | 1 - .../hris/resources/benefits/client/Client.ts | 91 +- .../hris/resources/companies/client/Client.ts | 91 +- .../resources/deleteAccount/client/Client.ts | 24 +- .../resources/dependents/client/Client.ts | 91 +- .../employeePayrollRuns/client/Client.ts | 103 +- .../EmployeePayrollRunsListRequestExpand.ts | 1 - ...mployeePayrollRunsRetrieveRequestExpand.ts | 1 - .../hris/resources/employees/client/Client.ts | 233 +- .../EmployeesListRequestEmploymentStatus.ts | 1 - .../types/EmployeesListRequestExpand.ts | 1 - .../types/EmployeesListRequestRemoteFields.ts | 1 - .../EmployeesListRequestShowEnumOrigins.ts | 1 - .../types/EmployeesRetrieveRequestExpand.ts | 1 - .../EmployeesRetrieveRequestRemoteFields.ts | 1 - ...EmployeesRetrieveRequestShowEnumOrigins.ts | 1 - .../employerBenefits/client/Client.ts | 93 +- .../resources/employments/client/Client.ts | 125 +- .../types/EmploymentsListRequestExpand.ts | 1 - .../types/EmploymentsListRequestOrderBy.ts | 1 - .../EmploymentsListRequestRemoteFields.ts | 1 - .../EmploymentsListRequestShowEnumOrigins.ts | 1 - .../types/EmploymentsRetrieveRequestExpand.ts | 1 - .../EmploymentsRetrieveRequestRemoteFields.ts | 1 - ...ploymentsRetrieveRequestShowEnumOrigins.ts | 1 - .../resources/fieldMapping/client/Client.ts | 258 +- .../resources/forceResync/client/Client.ts | 43 +- .../resources/generateKey/client/Client.ts | 46 +- .../hris/resources/groups/client/Client.ts | 91 +- .../hris/resources/issues/client/Client.ts | 90 +- .../issues/types/IssuesListRequestStatus.ts | 1 - .../hris/resources/linkToken/client/Client.ts | 46 +- .../resources/linkedAccounts/client/Client.ts | 54 +- .../LinkedAccountsListRequestCategory.ts | 1 - .../hris/resources/locations/client/Client.ts | 118 +- .../types/LocationsListRequestLocationType.ts | 1 - .../types/LocationsListRequestRemoteFields.ts | 1 - .../LocationsListRequestShowEnumOrigins.ts | 1 - .../LocationsRetrieveRequestRemoteFields.ts | 1 - ...LocationsRetrieveRequestShowEnumOrigins.ts | 1 - .../resources/passthrough/client/Client.ts | 46 +- .../hris/resources/payGroups/client/Client.ts | 91 +- .../resources/payrollRuns/client/Client.ts | 117 +- .../PayrollRunsListRequestRemoteFields.ts | 1 - .../types/PayrollRunsListRequestRunType.ts | 1 - .../PayrollRunsListRequestShowEnumOrigins.ts | 1 - .../PayrollRunsRetrieveRequestRemoteFields.ts | 1 - ...yrollRunsRetrieveRequestShowEnumOrigins.ts | 1 - .../resources/regenerateKey/client/Client.ts | 46 +- .../hris/resources/scopes/client/Client.ts | 126 +- .../resources/syncStatus/client/Client.ts | 48 +- .../hris/resources/teams/client/Client.ts | 91 +- .../hris/resources/timeOff/client/Client.ts | 207 +- .../timeOff/types/TimeOffListRequestExpand.ts | 1 - .../types/TimeOffListRequestRemoteFields.ts | 1 - .../types/TimeOffListRequestRequestType.ts | 1 - .../TimeOffListRequestShowEnumOrigins.ts | 1 - .../timeOff/types/TimeOffListRequestStatus.ts | 1 - .../types/TimeOffRetrieveRequestExpand.ts | 1 - .../TimeOffRetrieveRequestRemoteFields.ts | 1 - .../TimeOffRetrieveRequestShowEnumOrigins.ts | 1 - .../timeOffBalances/client/Client.ts | 100 +- .../TimeOffBalancesListRequestPolicyType.ts | 1 - .../timesheetEntries/client/Client.ts | 180 +- .../TimesheetEntriesListRequestOrderBy.ts | 1 - .../webhookReceivers/client/Client.ts | 83 +- .../AccountDetailsAndActionsStatusEnum.ts | 1 - .../resources/hris/types/AccountTypeEnum.ts | 1 - .../hris/types/BenefitPlanTypeEnum.ts | 1 - .../resources/hris/types/CategoriesEnum.ts | 1 - src/api/resources/hris/types/CategoryEnum.ts | 1 - src/api/resources/hris/types/CountryEnum.ts | 1 - .../resources/hris/types/EarningTypeEnum.ts | 1 - .../hris/types/EmploymentStatusEnum.ts | 1 - .../hris/types/EmploymentTypeEnum.ts | 1 - .../hris/types/EnabledActionsEnum.ts | 1 - src/api/resources/hris/types/EncodingEnum.ts | 1 - src/api/resources/hris/types/EthnicityEnum.ts | 1 - src/api/resources/hris/types/EventTypeEnum.ts | 1 - .../resources/hris/types/FlsaStatusEnum.ts | 1 - src/api/resources/hris/types/GenderEnum.ts | 1 - src/api/resources/hris/types/GroupTypeEnum.ts | 1 - .../resources/hris/types/IssueStatusEnum.ts | 1 - src/api/resources/hris/types/LanguageEnum.ts | 1 - .../hris/types/LastSyncResultEnum.ts | 1 - .../resources/hris/types/LocationTypeEnum.ts | 1 - .../resources/hris/types/MaritalStatusEnum.ts | 1 - src/api/resources/hris/types/MethodEnum.ts | 1 - .../resources/hris/types/PayCurrencyEnum.ts | 1 - .../resources/hris/types/PayFrequencyEnum.ts | 1 - src/api/resources/hris/types/PayPeriodEnum.ts | 1 - .../resources/hris/types/PolicyTypeEnum.ts | 1 - src/api/resources/hris/types/ReasonEnum.ts | 1 - .../resources/hris/types/RelationshipEnum.ts | 1 - .../resources/hris/types/RequestFormatEnum.ts | 1 - .../resources/hris/types/RequestTypeEnum.ts | 1 - .../resources/hris/types/ResponseTypeEnum.ts | 1 - src/api/resources/hris/types/RoleEnum.ts | 1 - src/api/resources/hris/types/RunStateEnum.ts | 1 - src/api/resources/hris/types/RunTypeEnum.ts | 1 - .../SelectiveSyncConfigurationsUsageEnum.ts | 1 - src/api/resources/hris/types/StatusFd5Enum.ts | 1 - .../resources/hris/types/TimeOffStatusEnum.ts | 1 - src/api/resources/hris/types/UnitsEnum.ts | 1 - src/api/resources/index.ts | 4 +- src/api/resources/ticketing/client/Client.ts | 102 +- .../resources/accountDetails/client/Client.ts | 43 +- .../resources/accountToken/client/Client.ts | 48 +- .../resources/accounts/client/Client.ts | 91 +- .../asyncPassthrough/client/Client.ts | 90 +- .../resources/attachments/client/Client.ts | 202 +- .../resources/auditTrail/client/Client.ts | 48 +- .../availableActions/client/Client.ts | 45 +- .../resources/collections/client/Client.ts | 140 +- .../CollectionsViewersListRequestExpand.ts | 1 - .../resources/comments/client/Client.ts | 182 +- .../types/CommentsListRequestExpand.ts | 1 - .../types/CommentsRetrieveRequestExpand.ts | 1 - .../resources/contacts/client/Client.ts | 172 +- .../resources/deleteAccount/client/Client.ts | 24 +- .../resources/fieldMapping/client/Client.ts | 258 +- .../resources/forceResync/client/Client.ts | 47 +- .../resources/generateKey/client/Client.ts | 46 +- .../resources/issues/client/Client.ts | 93 +- .../issues/types/IssuesListRequestStatus.ts | 1 - .../resources/linkToken/client/Client.ts | 46 +- .../resources/linkedAccounts/client/Client.ts | 54 +- .../LinkedAccountsListRequestCategory.ts | 1 - .../resources/passthrough/client/Client.ts | 46 +- .../resources/projects/client/Client.ts | 140 +- .../types/ProjectsUsersListRequestExpand.ts | 1 - .../resources/regenerateKey/client/Client.ts | 46 +- .../resources/roles/client/Client.ts | 91 +- .../resources/scopes/client/Client.ts | 128 +- .../resources/syncStatus/client/Client.ts | 48 +- .../ticketing/resources/tags/client/Client.ts | 91 +- .../resources/teams/client/Client.ts | 91 +- .../resources/tickets/client/Client.ts | 384 +- .../tickets/types/TicketsListRequestExpand.ts | 1 - .../types/TicketsListRequestPriority.ts | 1 - .../types/TicketsListRequestRemoteFields.ts | 1 - .../TicketsListRequestShowEnumOrigins.ts | 1 - .../types/TicketsRetrieveRequestExpand.ts | 1 - .../TicketsRetrieveRequestRemoteFields.ts | 1 - .../TicketsRetrieveRequestShowEnumOrigins.ts | 1 - .../types/TicketsViewersListRequestExpand.ts | 1 - .../resources/users/client/Client.ts | 101 +- .../users/types/UsersListRequestExpand.ts | 1 - .../users/types/UsersRetrieveRequestExpand.ts | 1 - .../webhookReceivers/client/Client.ts | 87 +- .../ticketing/types/AccessLevelEnum.ts | 1 - .../AccountDetailsAndActionsStatusEnum.ts | 1 - .../ticketing/types/CategoriesEnum.ts | 1 - .../resources/ticketing/types/CategoryEnum.ts | 1 - .../ticketing/types/CollectionTypeEnum.ts | 1 - .../ticketing/types/EnabledActionsEnum.ts | 1 - .../resources/ticketing/types/EncodingEnum.ts | 1 - .../ticketing/types/EventTypeEnum.ts | 1 - .../ticketing/types/FieldFormatEnum.ts | 1 - .../ticketing/types/FieldTypeEnum.ts | 1 - .../ticketing/types/IssueStatusEnum.ts | 1 - .../ticketing/types/ItemFormatEnum.ts | 1 - .../resources/ticketing/types/ItemTypeEnum.ts | 1 - .../resources/ticketing/types/LanguageEnum.ts | 1 - .../ticketing/types/LastSyncResultEnum.ts | 1 - .../resources/ticketing/types/MethodEnum.ts | 1 - .../resources/ticketing/types/PriorityEnum.ts | 1 - .../ticketing/types/RequestFormatEnum.ts | 1 - .../ticketing/types/ResponseTypeEnum.ts | 1 - src/api/resources/ticketing/types/RoleEnum.ts | 1 - .../SelectiveSyncConfigurationsUsageEnum.ts | 1 - .../ticketing/types/StatusFd5Enum.ts | 1 - .../ticketing/types/TicketAccessEnum.ts | 1 - .../ticketing/types/TicketActionsEnum.ts | 1 - .../ticketing/types/TicketStatusEnum.ts | 1 - src/core/fetcher/APIResponse.ts | 11 + src/core/fetcher/Fetcher.ts | 20 +- src/core/fetcher/HttpResponsePromise.ts | 116 + src/core/fetcher/RawResponse.ts | 59 + src/core/fetcher/createRequestUrl.ts | 2 +- src/core/fetcher/getRequestBody.ts | 4 +- src/core/fetcher/index.ts | 3 + src/core/fetcher/makeRequest.ts | 2 +- src/core/fetcher/requestWithRetries.ts | 4 +- src/core/fetcher/signals.ts | 2 +- .../Node18UniversalStreamWrapper.ts | 5 +- .../stream-wrappers/NodePre18StreamWrapper.ts | 1 + .../stream-wrappers/UndiciStreamWrapper.ts | 4 +- .../stream-wrappers/chooseStreamWrapper.ts | 3 +- src/core/json.ts | 27 + src/core/runtime/runtime.ts | 111 +- src/core/schemas/Schema.ts | 4 +- src/core/schemas/builders/bigint/bigint.ts | 41 +- src/core/schemas/builders/enum/enum.ts | 2 +- src/core/schemas/builders/lazy/lazy.ts | 2 +- src/core/schemas/builders/lazy/lazyObject.ts | 2 +- src/core/schemas/builders/list/list.ts | 8 +- .../builders/literals/booleanLiteral.ts | 2 +- .../builders/literals/stringLiteral.ts | 2 +- .../object-like/getObjectLikeUtils.ts | 6 +- src/core/schemas/builders/object/object.ts | 35 +- .../object/objectWithoutOptionalProperties.ts | 4 +- src/core/schemas/builders/object/property.ts | 2 +- src/core/schemas/builders/object/types.ts | 33 +- .../schemas/builders/primitives/boolean.ts | 2 +- .../schemas/builders/primitives/number.ts | 2 +- .../schemas/builders/primitives/string.ts | 2 +- src/core/schemas/builders/record/record.ts | 7 +- src/core/schemas/builders/record/types.ts | 4 +- .../builders/schema-utils/getSchemaUtils.ts | 80 +- .../builders/undiscriminated-union/types.ts | 2 +- .../undiscriminatedUnion.ts | 8 +- .../schemas/builders/union/discriminant.ts | 2 +- src/core/schemas/builders/union/types.ts | 10 +- src/core/schemas/builders/union/union.ts | 12 +- .../addQuestionMarksToNullableProperties.ts | 8 +- .../utils/createIdentitySchemaCreator.ts | 4 +- src/core/schemas/utils/entries.ts | 2 +- src/core/schemas/utils/filterObject.ts | 19 +- src/core/schemas/utils/keys.ts | 2 +- src/core/schemas/utils/maybeSkipValidation.ts | 6 +- src/errors/MergeError.ts | 4 +- src/index.ts | 1 + .../client/requests/AccountEndpointRequest.ts | 2 +- .../types/AccountsListRequestRemoteFields.ts | 2 +- .../AccountsListRequestShowEnumOrigins.ts | 2 +- .../AccountsRetrieveRequestRemoteFields.ts | 2 +- .../AccountsRetrieveRequestShowEnumOrigins.ts | 2 +- .../types/AsyncPassthroughRetrieveResponse.ts | 2 +- .../AccountingAttachmentEndpointRequest.ts | 2 +- .../BankFeedAccountEndpointRequest.ts | 2 +- .../BankFeedTransactionEndpointRequest.ts | 2 +- .../types/CompanyInfoListRequestExpand.ts | 2 +- .../types/CompanyInfoRetrieveRequestExpand.ts | 2 +- .../client/requests/ContactEndpointRequest.ts | 2 +- .../types/ContactsListRequestExpand.ts | 2 +- .../types/ContactsRetrieveRequestExpand.ts | 2 +- .../requests/CreditNoteEndpointRequest.ts | 2 +- .../types/CreditNotesListRequestExpand.ts | 2 +- .../CreditNotesListRequestRemoteFields.ts | 2 +- .../CreditNotesListRequestShowEnumOrigins.ts | 2 +- .../types/CreditNotesRetrieveRequestExpand.ts | 2 +- .../CreditNotesRetrieveRequestRemoteFields.ts | 2 +- ...editNotesRetrieveRequestShowEnumOrigins.ts | 2 +- .../client/requests/ExpenseEndpointRequest.ts | 2 +- .../types/ExpensesListRequestExpand.ts | 2 +- .../types/ExpensesRetrieveRequestExpand.ts | 2 +- .../requests/CreateFieldMappingRequest.ts | 4 +- .../PatchedEditFieldMappingRequest.ts | 4 +- .../client/syncStatusResyncCreate.ts | 2 +- ...eralLedgerTransactionsListRequestExpand.ts | 2 +- ...LedgerTransactionsRetrieveRequestExpand.ts | 2 +- .../requests/GenerateRemoteKeyRequest.ts | 2 +- .../client/requests/InvoiceEndpointRequest.ts | 2 +- .../requests/PatchedInvoiceEndpointRequest.ts | 2 +- .../types/InvoicesListRequestExpand.ts | 2 +- .../types/InvoicesListRequestStatus.ts | 2 +- .../invoices/types/InvoicesListRequestType.ts | 2 +- .../types/InvoicesRetrieveRequestExpand.ts | 2 +- .../issues/types/IssuesListRequestStatus.ts | 2 +- .../items/types/ItemsListRequestExpand.ts | 2 +- .../items/types/ItemsRetrieveRequestExpand.ts | 2 +- .../requests/JournalEntryEndpointRequest.ts | 2 +- .../types/JournalEntriesListRequestExpand.ts | 2 +- .../JournalEntriesRetrieveRequestExpand.ts | 2 +- .../client/requests/EndUserDetailsRequest.ts | 12 +- .../LinkedAccountsListRequestCategory.ts | 2 +- .../requests/PatchedPaymentEndpointRequest.ts | 2 +- .../client/requests/PaymentEndpointRequest.ts | 2 +- .../types/PaymentsListRequestExpand.ts | 2 +- .../types/PaymentsRetrieveRequestExpand.ts | 2 +- .../requests/PurchaseOrderEndpointRequest.ts | 2 +- .../types/PurchaseOrdersListRequestExpand.ts | 2 +- .../PurchaseOrdersRetrieveRequestExpand.ts | 2 +- .../RemoteKeyForRegenerationRequest.ts | 2 +- ...ountCommonModelScopeDeserializerRequest.ts | 4 +- .../types/TransactionsListRequestExpand.ts | 2 +- .../TransactionsRetrieveRequestExpand.ts | 2 +- .../requests/VendorCreditEndpointRequest.ts | 2 +- .../types/VendorCreditsListRequestExpand.ts | 2 +- .../VendorCreditsRetrieveRequestExpand.ts | 2 +- .../resources/webhookReceivers/client/list.ts | 2 +- .../client/requests/WebhookReceiverRequest.ts | 2 +- .../resources/accounting/types/Account.ts | 4 +- .../accounting/types/AccountAccountType.ts | 2 +- .../types/AccountAccountTypeEnum.ts | 2 +- .../accounting/types/AccountClassification.ts | 2 +- .../accounting/types/AccountCurrency.ts | 2 +- .../accounting/types/AccountDetails.ts | 4 +- .../types/AccountDetailsAndActions.ts | 2 +- .../AccountDetailsAndActionsIntegration.ts | 4 +- .../AccountDetailsAndActionsStatusEnum.ts | 2 +- .../accounting/types/AccountIntegration.ts | 8 +- .../accounting/types/AccountRequest.ts | 6 +- .../types/AccountRequestAccountType.ts | 2 +- .../types/AccountRequestClassification.ts | 2 +- .../types/AccountRequestCurrency.ts | 2 +- .../accounting/types/AccountRequestStatus.ts | 2 +- .../accounting/types/AccountResponse.ts | 2 +- .../accounting/types/AccountStatus.ts | 2 +- .../accounting/types/AccountStatusEnum.ts | 2 +- .../accounting/types/AccountToken.ts | 2 +- .../accounting/types/AccountingAttachment.ts | 4 +- .../types/AccountingAttachmentRequest.ts | 6 +- .../types/AccountingAttachmentResponse.ts | 2 +- .../accounting/types/AccountingPeriod.ts | 4 +- .../types/AccountingPeriodStatus.ts | 2 +- .../accounting/types/AccountingPhoneNumber.ts | 2 +- .../types/AccountingPhoneNumberRequest.ts | 6 +- .../resources/accounting/types/Address.ts | 2 +- .../accounting/types/AddressCountry.ts | 2 +- .../accounting/types/AddressRequest.ts | 6 +- .../accounting/types/AddressRequestCountry.ts | 2 +- .../accounting/types/AddressRequestType.ts | 2 +- .../resources/accounting/types/AddressType.ts | 2 +- .../accounting/types/AddressTypeEnum.ts | 2 +- .../accounting/types/AdvancedMetadata.ts | 4 +- .../types/AsyncPassthroughReciept.ts | 2 +- .../accounting/types/AsyncPostTask.ts | 2 +- .../accounting/types/AsyncPostTaskResult.ts | 2 +- .../accounting/types/AsyncPostTaskStatus.ts | 2 +- .../types/AsyncPostTaskStatusEnum.ts | 2 +- .../accounting/types/AuditLogEvent.ts | 2 +- .../types/AuditLogEventEventType.ts | 2 +- .../accounting/types/AuditLogEventRole.ts | 2 +- .../accounting/types/AvailableActions.ts | 4 +- .../accounting/types/BalanceSheet.ts | 4 +- .../accounting/types/BalanceSheetCompany.ts | 2 +- .../accounting/types/BalanceSheetCurrency.ts | 2 +- .../accounting/types/BankFeedAccount.ts | 6 +- .../types/BankFeedAccountAccountType.ts | 2 +- .../types/BankFeedAccountAccountTypeEnum.ts | 2 +- .../types/BankFeedAccountCurrency.ts | 2 +- .../types/BankFeedAccountFeedStatus.ts | 2 +- .../types/BankFeedAccountRequest.ts | 6 +- .../BankFeedAccountRequestAccountType.ts | 2 +- .../types/BankFeedAccountRequestCurrency.ts | 2 +- .../types/BankFeedAccountRequestFeedStatus.ts | 2 +- .../types/BankFeedAccountResponse.ts | 2 +- .../accounting/types/BankFeedTransaction.ts | 2 +- .../BankFeedTransactionBankFeedAccount.ts | 2 +- .../types/BankFeedTransactionCreditOrDebit.ts | 2 +- .../BankFeedTransactionRequestRequest.ts | 10 +- ...ransactionRequestRequestBankFeedAccount.ts | 2 +- ...dTransactionRequestRequestCreditOrDebit.ts | 2 +- .../types/BankFeedTransactionResponse.ts | 2 +- .../accounting/types/CashFlowStatement.ts | 12 +- .../types/CashFlowStatementCompany.ts | 2 +- .../types/CashFlowStatementCurrency.ts | 2 +- .../accounting/types/CategoriesEnum.ts | 2 +- .../accounting/types/CategoryEnum.ts | 2 +- .../accounting/types/CategoryTypeEnum.ts | 2 +- .../accounting/types/ClassificationEnum.ts | 2 +- .../accounting/types/CommonModelScopeApi.ts | 4 +- .../types/CommonModelScopesBodyRequest.ts | 4 +- .../resources/accounting/types/CompanyInfo.ts | 6 +- .../accounting/types/CompanyInfoCurrency.ts | 2 +- .../accounting/types/ComponentTypeEnum.ts | 2 +- .../resources/accounting/types/Contact.ts | 6 +- .../accounting/types/ContactAddressesItem.ts | 2 +- .../accounting/types/ContactRequest.ts | 8 +- .../types/ContactRequestAddressesItem.ts | 2 +- .../accounting/types/ContactRequestStatus.ts | 2 +- .../accounting/types/ContactResponse.ts | 2 +- .../accounting/types/ContactStatus.ts | 2 +- .../resources/accounting/types/CountryEnum.ts | 2 +- .../resources/accounting/types/CreditNote.ts | 10 +- .../types/CreditNoteAccountingPeriod.ts | 2 +- .../types/CreditNoteAppliedPaymentsItem.ts | 2 +- .../types/CreditNoteApplyLineForCreditNote.ts | 2 +- ...CreditNoteApplyLineForCreditNoteInvoice.ts | 2 +- ...CreditNoteApplyLineForCreditNoteRequest.ts | 6 +- ...oteApplyLineForCreditNoteRequestInvoice.ts | 2 +- .../types/CreditNoteApplyLineForInvoice.ts | 4 +- ...CreditNoteApplyLineForInvoiceCreditNote.ts | 2 +- .../accounting/types/CreditNoteCompany.ts | 2 +- .../accounting/types/CreditNoteContact.ts | 2 +- .../accounting/types/CreditNoteCurrency.ts | 2 +- .../accounting/types/CreditNoteLineItem.ts | 4 +- .../types/CreditNoteLineItemCompany.ts | 2 +- .../types/CreditNoteLineItemItem.ts | 2 +- .../types/CreditNoteLineItemRequest.ts | 8 +- .../types/CreditNoteLineItemRequestCompany.ts | 2 +- .../types/CreditNoteLineItemRequestItem.ts | 2 +- .../types/CreditNotePaymentsItem.ts | 2 +- .../accounting/types/CreditNoteRequest.ts | 14 +- .../CreditNoteRequestAccountingPeriod.ts | 2 +- .../CreditNoteRequestAppliedPaymentsItem.ts | 2 +- .../types/CreditNoteRequestCompany.ts | 2 +- .../types/CreditNoteRequestContact.ts | 2 +- .../types/CreditNoteRequestCurrency.ts | 2 +- .../types/CreditNoteRequestLineItemsItem.ts | 2 +- .../types/CreditNoteRequestPaymentsItem.ts | 2 +- .../types/CreditNoteRequestStatus.ts | 2 +- ...CreditNoteRequestTrackingCategoriesItem.ts | 2 +- .../accounting/types/CreditNoteResponse.ts | 2 +- .../accounting/types/CreditNoteStatus.ts | 2 +- .../accounting/types/CreditNoteStatusEnum.ts | 2 +- .../types/CreditNoteTrackingCategoriesItem.ts | 2 +- .../accounting/types/CreditOrDebitEnum.ts | 2 +- .../types/DataPassthroughRequest.ts | 4 +- .../accounting/types/DebugModeLog.ts | 2 +- .../accounting/types/DebugModelLogSummary.ts | 2 +- .../resources/accounting/types/Employee.ts | 4 +- .../accounting/types/EmployeeCompany.ts | 2 +- .../accounting/types/EmployeeStatus.ts | 2 +- .../accounting/types/EnabledActionsEnum.ts | 2 +- .../accounting/types/EncodingEnum.ts | 2 +- .../types/ErrorValidationProblem.ts | 2 +- .../accounting/types/EventTypeEnum.ts | 2 +- .../resources/accounting/types/Expense.ts | 6 +- .../accounting/types/ExpenseAccount.ts | 2 +- .../types/ExpenseAccountingPeriod.ts | 2 +- .../accounting/types/ExpenseCompany.ts | 2 +- .../accounting/types/ExpenseContact.ts | 2 +- .../accounting/types/ExpenseCurrency.ts | 2 +- .../accounting/types/ExpenseEmployee.ts | 2 +- .../resources/accounting/types/ExpenseLine.ts | 4 +- .../accounting/types/ExpenseLineAccount.ts | 2 +- .../accounting/types/ExpenseLineContact.ts | 2 +- .../accounting/types/ExpenseLineCurrency.ts | 2 +- .../accounting/types/ExpenseLineEmployee.ts | 2 +- .../accounting/types/ExpenseLineItem.ts | 2 +- .../accounting/types/ExpenseLineRequest.ts | 8 +- .../types/ExpenseLineRequestAccount.ts | 2 +- .../types/ExpenseLineRequestContact.ts | 2 +- .../types/ExpenseLineRequestCurrency.ts | 2 +- .../types/ExpenseLineRequestEmployee.ts | 2 +- .../types/ExpenseLineRequestItem.ts | 2 +- ...xpenseLineRequestTrackingCategoriesItem.ts | 2 +- .../ExpenseLineRequestTrackingCategory.ts | 2 +- .../ExpenseLineTrackingCategoriesItem.ts | 2 +- .../types/ExpenseLineTrackingCategory.ts | 2 +- .../accounting/types/ExpenseRequest.ts | 8 +- .../accounting/types/ExpenseRequestAccount.ts | 2 +- .../types/ExpenseRequestAccountingPeriod.ts | 2 +- .../accounting/types/ExpenseRequestCompany.ts | 2 +- .../accounting/types/ExpenseRequestContact.ts | 2 +- .../types/ExpenseRequestCurrency.ts | 2 +- .../types/ExpenseRequestEmployee.ts | 2 +- .../ExpenseRequestTrackingCategoriesItem.ts | 2 +- .../accounting/types/ExpenseResponse.ts | 2 +- .../types/ExpenseTrackingCategoriesItem.ts | 2 +- .../types/ExternalTargetFieldApi.ts | 2 +- .../types/ExternalTargetFieldApiResponse.ts | 26 +- .../accounting/types/FeedStatusEnum.ts | 2 +- .../accounting/types/FieldFormatEnum.ts | 2 +- .../types/FieldMappingApiInstance.ts | 2 +- .../FieldMappingApiInstanceRemoteField.ts | 4 +- ...piInstanceRemoteFieldRemoteEndpointInfo.ts | 4 +- .../types/FieldMappingApiInstanceResponse.ts | 32 +- .../FieldMappingApiInstanceTargetField.ts | 2 +- .../types/FieldMappingInstanceResponse.ts | 2 +- .../types/FieldPermissionDeserializer.ts | 6 +- .../FieldPermissionDeserializerRequest.ts | 6 +- .../accounting/types/FieldTypeEnum.ts | 2 +- .../types/GeneralLedgerTransaction.ts | 14 +- ...eneralLedgerTransactionAccountingPeriod.ts | 2 +- .../types/GeneralLedgerTransactionCompany.ts | 2 +- ...actionGeneralLedgerTransactionLinesItem.ts | 2 +- .../types/GeneralLedgerTransactionLine.ts | 8 +- .../GeneralLedgerTransactionLineAccount.ts | 2 +- ...eneralLedgerTransactionLineBaseCurrency.ts | 2 +- .../GeneralLedgerTransactionLineCompany.ts | 2 +- .../GeneralLedgerTransactionLineContact.ts | 2 +- .../GeneralLedgerTransactionLineEmployee.ts | 2 +- .../types/GeneralLedgerTransactionLineItem.ts | 2 +- ...erTransactionLineTrackingCategoriesItem.ts | 2 +- ...edgerTransactionLineTransactionCurrency.ts | 2 +- ...LedgerTransactionTrackingCategoriesItem.ts | 2 +- ...gerTransactionUnderlyingTransactionType.ts | 2 +- .../accounting/types/IncomeStatement.ts | 8 +- .../types/IncomeStatementCompany.ts | 2 +- .../types/IncomeStatementCurrency.ts | 2 +- .../IndividualCommonModelScopeDeserializer.ts | 4 +- ...dualCommonModelScopeDeserializerRequest.ts | 4 +- .../resources/accounting/types/Invoice.ts | 14 +- .../types/InvoiceAccountingPeriod.ts | 2 +- .../types/InvoiceAppliedCreditNotesItem.ts | 2 +- .../types/InvoiceAppliedPaymentsItem.ts | 2 +- .../types/InvoiceAppliedVendorCreditsItem.ts | 2 +- .../accounting/types/InvoiceCompany.ts | 2 +- .../accounting/types/InvoiceContact.ts | 2 +- .../accounting/types/InvoiceCurrency.ts | 2 +- .../accounting/types/InvoiceEmployee.ts | 2 +- .../accounting/types/InvoiceLineItem.ts | 6 +- .../types/InvoiceLineItemAccount.ts | 2 +- .../types/InvoiceLineItemCurrency.ts | 2 +- .../types/InvoiceLineItemEmployee.ts | 2 +- .../accounting/types/InvoiceLineItemItem.ts | 2 +- .../types/InvoiceLineItemRequest.ts | 10 +- .../types/InvoiceLineItemRequestAccount.ts | 2 +- .../types/InvoiceLineItemRequestCurrency.ts | 2 +- .../types/InvoiceLineItemRequestEmployee.ts | 2 +- .../types/InvoiceLineItemRequestItem.ts | 2 +- ...ceLineItemRequestTrackingCategoriesItem.ts | 2 +- .../InvoiceLineItemRequestTrackingCategory.ts | 2 +- .../InvoiceLineItemTrackingCategoriesItem.ts | 2 +- .../types/InvoiceLineItemTrackingCategory.ts | 2 +- .../accounting/types/InvoicePaymentTerm.ts | 2 +- .../accounting/types/InvoicePaymentsItem.ts | 2 +- .../types/InvoicePurchaseOrdersItem.ts | 2 +- .../accounting/types/InvoiceRequest.ts | 10 +- .../accounting/types/InvoiceRequestCompany.ts | 2 +- .../accounting/types/InvoiceRequestContact.ts | 2 +- .../types/InvoiceRequestCurrency.ts | 2 +- .../types/InvoiceRequestEmployee.ts | 2 +- .../types/InvoiceRequestPaymentTerm.ts | 2 +- .../types/InvoiceRequestPaymentsItem.ts | 2 +- .../types/InvoiceRequestPurchaseOrdersItem.ts | 2 +- .../accounting/types/InvoiceRequestStatus.ts | 2 +- .../InvoiceRequestTrackingCategoriesItem.ts | 2 +- .../accounting/types/InvoiceRequestType.ts | 2 +- .../accounting/types/InvoiceResponse.ts | 2 +- .../accounting/types/InvoiceStatus.ts | 2 +- .../accounting/types/InvoiceStatusEnum.ts | 2 +- .../types/InvoiceTrackingCategoriesItem.ts | 2 +- .../resources/accounting/types/InvoiceType.ts | 2 +- .../accounting/types/InvoiceTypeEnum.ts | 2 +- .../resources/accounting/types/Issue.ts | 6 +- .../resources/accounting/types/IssueStatus.ts | 2 +- .../accounting/types/IssueStatusEnum.ts | 2 +- .../resources/accounting/types/Item.ts | 4 +- .../resources/accounting/types/ItemCompany.ts | 2 +- .../accounting/types/ItemFormatEnum.ts | 2 +- .../accounting/types/ItemPurchaseAccount.ts | 2 +- .../accounting/types/ItemPurchaseTaxRate.ts | 2 +- .../accounting/types/ItemSalesAccount.ts | 2 +- .../accounting/types/ItemSalesTaxRate.ts | 2 +- .../resources/accounting/types/ItemSchema.ts | 4 +- .../resources/accounting/types/ItemStatus.ts | 2 +- .../accounting/types/ItemTypeEnum.ts | 2 +- .../accounting/types/JournalEntry.ts | 8 +- .../types/JournalEntryAccountingPeriod.ts | 2 +- .../types/JournalEntryAppliedPaymentsItem.ts | 2 +- .../accounting/types/JournalEntryCompany.ts | 2 +- .../accounting/types/JournalEntryCurrency.ts | 2 +- .../types/JournalEntryPaymentsItem.ts | 2 +- .../types/JournalEntryPostingStatus.ts | 2 +- .../accounting/types/JournalEntryRequest.ts | 8 +- .../types/JournalEntryRequestCompany.ts | 2 +- .../types/JournalEntryRequestCurrency.ts | 2 +- .../types/JournalEntryRequestPaymentsItem.ts | 2 +- .../types/JournalEntryRequestPostingStatus.ts | 2 +- ...urnalEntryRequestTrackingCategoriesItem.ts | 2 +- .../accounting/types/JournalEntryResponse.ts | 2 +- .../JournalEntryTrackingCategoriesItem.ts | 2 +- .../resources/accounting/types/JournalLine.ts | 4 +- .../accounting/types/JournalLineAccount.ts | 2 +- .../accounting/types/JournalLineCurrency.ts | 2 +- .../accounting/types/JournalLineRequest.ts | 8 +- .../types/JournalLineRequestAccount.ts | 2 +- .../types/JournalLineRequestCurrency.ts | 2 +- ...ournalLineRequestTrackingCategoriesItem.ts | 2 +- .../JournalLineRequestTrackingCategory.ts | 2 +- .../JournalLineTrackingCategoriesItem.ts | 2 +- .../types/JournalLineTrackingCategory.ts | 2 +- .../accounting/types/LanguageEnum.ts | 2 +- .../accounting/types/LastSyncResultEnum.ts | 2 +- .../resources/accounting/types/LinkToken.ts | 2 +- .../accounting/types/LinkedAccountStatus.ts | 2 +- .../accounting/types/MetaResponse.ts | 8 +- .../resources/accounting/types/MethodEnum.ts | 2 +- .../accounting/types/MethodTypeEnum.ts | 2 +- .../accounting/types/ModelOperation.ts | 8 +- .../types/ModelPermissionDeserializer.ts | 2 +- .../ModelPermissionDeserializerRequest.ts | 2 +- .../types/MultipartFormFieldRequest.ts | 2 +- .../MultipartFormFieldRequestEncoding.ts | 2 +- .../PaginatedAccountDetailsAndActionsList.ts | 2 +- .../accounting/types/PaginatedAccountList.ts | 2 +- .../PaginatedAccountingAttachmentList.ts | 2 +- .../types/PaginatedAccountingPeriodList.ts | 2 +- .../types/PaginatedAuditLogEventList.ts | 2 +- .../types/PaginatedBalanceSheetList.ts | 2 +- .../types/PaginatedBankFeedAccountList.ts | 2 +- .../types/PaginatedBankFeedTransactionList.ts | 2 +- .../types/PaginatedCashFlowStatementList.ts | 2 +- .../types/PaginatedCompanyInfoList.ts | 2 +- .../accounting/types/PaginatedContactList.ts | 2 +- .../types/PaginatedCreditNoteList.ts | 2 +- .../accounting/types/PaginatedEmployeeList.ts | 2 +- .../accounting/types/PaginatedExpenseList.ts | 2 +- .../PaginatedGeneralLedgerTransactionList.ts | 2 +- .../types/PaginatedIncomeStatementList.ts | 2 +- .../accounting/types/PaginatedInvoiceList.ts | 2 +- .../accounting/types/PaginatedIssueList.ts | 2 +- .../accounting/types/PaginatedItemList.ts | 2 +- .../types/PaginatedJournalEntryList.ts | 2 +- .../accounting/types/PaginatedPaymentList.ts | 2 +- .../types/PaginatedPaymentMethodList.ts | 2 +- .../types/PaginatedPaymentTermList.ts | 2 +- .../types/PaginatedPurchaseOrderList.ts | 2 +- .../types/PaginatedRemoteFieldClassList.ts | 2 +- .../types/PaginatedSyncStatusList.ts | 2 +- .../accounting/types/PaginatedTaxRateList.ts | 2 +- .../types/PaginatedTrackingCategoryList.ts | 2 +- .../types/PaginatedTransactionList.ts | 2 +- .../types/PaginatedVendorCreditList.ts | 2 +- .../accounting/types/PatchedPaymentRequest.ts | 12 +- .../types/PatchedPaymentRequestAccount.ts | 2 +- .../PatchedPaymentRequestAccountingPeriod.ts | 2 +- ...PatchedPaymentRequestAppliedToLinesItem.ts | 2 +- .../types/PatchedPaymentRequestCompany.ts | 2 +- .../types/PatchedPaymentRequestContact.ts | 2 +- .../types/PatchedPaymentRequestCurrency.ts | 2 +- .../PatchedPaymentRequestPaymentMethod.ts | 2 +- ...hedPaymentRequestTrackingCategoriesItem.ts | 2 +- .../types/PatchedPaymentRequestType.ts | 2 +- .../resources/accounting/types/Payment.ts | 8 +- .../accounting/types/PaymentAccount.ts | 2 +- .../types/PaymentAccountingPeriod.ts | 2 +- .../types/PaymentAppliedToLinesItem.ts | 2 +- .../accounting/types/PaymentCompany.ts | 2 +- .../accounting/types/PaymentContact.ts | 2 +- .../accounting/types/PaymentCurrency.ts | 2 +- .../accounting/types/PaymentLineItem.ts | 2 +- .../types/PaymentLineItemRequest.ts | 6 +- .../accounting/types/PaymentMethod.ts | 4 +- .../types/PaymentMethodMethodType.ts | 2 +- .../accounting/types/PaymentPaymentMethod.ts | 2 +- .../accounting/types/PaymentRequest.ts | 10 +- .../accounting/types/PaymentRequestAccount.ts | 2 +- .../types/PaymentRequestAccountingPeriod.ts | 2 +- .../types/PaymentRequestAppliedToLinesItem.ts | 2 +- .../accounting/types/PaymentRequestCompany.ts | 2 +- .../accounting/types/PaymentRequestContact.ts | 2 +- .../types/PaymentRequestCurrency.ts | 2 +- .../types/PaymentRequestPaymentMethod.ts | 2 +- .../PaymentRequestTrackingCategoriesItem.ts | 2 +- .../accounting/types/PaymentRequestType.ts | 2 +- .../accounting/types/PaymentResponse.ts | 2 +- .../resources/accounting/types/PaymentTerm.ts | 4 +- .../accounting/types/PaymentTermCompany.ts | 2 +- .../types/PaymentTrackingCategoriesItem.ts | 2 +- .../resources/accounting/types/PaymentType.ts | 2 +- .../accounting/types/PaymentTypeEnum.ts | 2 +- .../accounting/types/PostingStatusEnum.ts | 2 +- .../accounting/types/PurchaseOrder.ts | 6 +- .../types/PurchaseOrderAccountingPeriod.ts | 2 +- .../accounting/types/PurchaseOrderCompany.ts | 2 +- .../accounting/types/PurchaseOrderCurrency.ts | 2 +- .../types/PurchaseOrderDeliveryAddress.ts | 2 +- .../accounting/types/PurchaseOrderLineItem.ts | 4 +- .../types/PurchaseOrderLineItemCurrency.ts | 2 +- .../types/PurchaseOrderLineItemItem.ts | 2 +- .../types/PurchaseOrderLineItemRequest.ts | 8 +- .../PurchaseOrderLineItemRequestCurrency.ts | 2 +- .../types/PurchaseOrderLineItemRequestItem.ts | 2 +- .../types/PurchaseOrderPaymentTerm.ts | 2 +- .../accounting/types/PurchaseOrderRequest.ts | 10 +- .../types/PurchaseOrderRequestCompany.ts | 2 +- .../types/PurchaseOrderRequestCurrency.ts | 2 +- .../PurchaseOrderRequestDeliveryAddress.ts | 2 +- .../types/PurchaseOrderRequestPaymentTerm.ts | 2 +- .../types/PurchaseOrderRequestStatus.ts | 2 +- ...chaseOrderRequestTrackingCategoriesItem.ts | 2 +- .../types/PurchaseOrderRequestVendor.ts | 2 +- .../accounting/types/PurchaseOrderResponse.ts | 2 +- .../accounting/types/PurchaseOrderStatus.ts | 2 +- .../types/PurchaseOrderStatusEnum.ts | 2 +- .../PurchaseOrderTrackingCategoriesItem.ts | 2 +- .../accounting/types/PurchaseOrderVendor.ts | 2 +- .../resources/accounting/types/RemoteData.ts | 2 +- .../accounting/types/RemoteEndpointInfo.ts | 4 +- .../resources/accounting/types/RemoteField.ts | 2 +- .../accounting/types/RemoteFieldApi.ts | 4 +- .../types/RemoteFieldApiCoverage.ts | 2 +- .../types/RemoteFieldApiResponse.ts | 12 +- .../accounting/types/RemoteFieldClass.ts | 4 +- .../types/RemoteFieldRemoteFieldClass.ts | 2 +- .../accounting/types/RemoteFieldRequest.ts | 2 +- .../RemoteFieldRequestRemoteFieldClass.ts | 2 +- .../resources/accounting/types/RemoteKey.ts | 2 +- .../accounting/types/RemoteResponse.ts | 4 +- .../resources/accounting/types/ReportItem.ts | 4 +- .../accounting/types/RequestFormatEnum.ts | 2 +- .../accounting/types/ResponseTypeEnum.ts | 2 +- .../resources/accounting/types/RoleEnum.ts | 2 +- .../SelectiveSyncConfigurationsUsageEnum.ts | 2 +- .../accounting/types/Status7D1Enum.ts | 2 +- .../accounting/types/Status895Enum.ts | 2 +- .../accounting/types/StatusFd5Enum.ts | 2 +- .../resources/accounting/types/SyncStatus.ts | 4 +- .../accounting/types/TaxComponent.ts | 2 +- .../types/TaxComponentComponentType.ts | 2 +- .../resources/accounting/types/TaxRate.ts | 6 +- .../accounting/types/TaxRateCompany.ts | 2 +- .../accounting/types/TaxRateStatus.ts | 2 +- .../types/TaxRateTaxComponentsItem.ts | 2 +- .../accounting/types/TrackingCategory.ts | 4 +- .../types/TrackingCategoryCategoryType.ts | 2 +- .../types/TrackingCategoryCompany.ts | 2 +- .../types/TrackingCategoryStatus.ts | 2 +- .../resources/accounting/types/Transaction.ts | 6 +- .../accounting/types/TransactionAccount.ts | 2 +- .../types/TransactionAccountingPeriod.ts | 2 +- .../accounting/types/TransactionContact.ts | 2 +- .../accounting/types/TransactionCurrency.ts | 2 +- .../types/TransactionCurrencyEnum.ts | 2 +- .../accounting/types/TransactionLineItem.ts | 4 +- .../types/TransactionLineItemCurrency.ts | 2 +- .../types/TransactionLineItemItem.ts | 2 +- .../TransactionTrackingCategoriesItem.ts | 2 +- .../types/UnderlyingTransactionTypeEnum.ts | 9 +- .../types/ValidationProblemSource.ts | 2 +- .../accounting/types/VendorCredit.ts | 8 +- .../types/VendorCreditAccountingPeriod.ts | 2 +- .../types/VendorCreditApplyLineForInvoice.ts | 4 +- ...orCreditApplyLineForInvoiceVendorCredit.ts | 2 +- .../VendorCreditApplyLineForVendorCredit.ts | 2 +- ...orCreditApplyLineForVendorCreditInvoice.ts | 2 +- ...orCreditApplyLineForVendorCreditRequest.ts | 6 +- ...tApplyLineForVendorCreditRequestInvoice.ts | 2 +- .../accounting/types/VendorCreditCompany.ts | 2 +- .../accounting/types/VendorCreditCurrency.ts | 2 +- .../accounting/types/VendorCreditLine.ts | 4 +- .../types/VendorCreditLineAccount.ts | 2 +- .../types/VendorCreditLineRequest.ts | 8 +- .../types/VendorCreditLineRequestAccount.ts | 2 +- .../accounting/types/VendorCreditRequest.ts | 10 +- .../VendorCreditRequestAccountingPeriod.ts | 2 +- .../types/VendorCreditRequestCompany.ts | 2 +- .../types/VendorCreditRequestCurrency.ts | 2 +- ...ndorCreditRequestTrackingCategoriesItem.ts | 2 +- .../types/VendorCreditRequestVendor.ts | 2 +- .../accounting/types/VendorCreditResponse.ts | 2 +- .../VendorCreditTrackingCategoriesItem.ts | 2 +- .../accounting/types/VendorCreditVendor.ts | 2 +- .../types/WarningValidationProblem.ts | 2 +- .../accounting/types/WebhookReceiver.ts | 2 +- .../requests/ActivityEndpointRequest.ts | 2 +- .../ActivitiesListRequestRemoteFields.ts | 2 +- .../ActivitiesListRequestShowEnumOrigins.ts | 2 +- .../ActivitiesRetrieveRequestRemoteFields.ts | 2 +- ...ctivitiesRetrieveRequestShowEnumOrigins.ts | 2 +- .../requests/ApplicationEndpointRequest.ts | 2 +- .../requests/UpdateApplicationStageRequest.ts | 2 +- .../types/ApplicationsListRequestExpand.ts | 2 +- .../ApplicationsRetrieveRequestExpand.ts | 2 +- .../types/AsyncPassthroughRetrieveResponse.ts | 2 +- .../requests/AttachmentEndpointRequest.ts | 2 +- .../requests/CandidateEndpointRequest.ts | 2 +- .../requests/IgnoreCommonModelRequest.ts | 2 +- .../PatchedCandidateEndpointRequest.ts | 2 +- .../types/CandidatesListRequestExpand.ts | 2 +- .../types/CandidatesRetrieveRequestExpand.ts | 2 +- .../types/EeocsListRequestRemoteFields.ts | 2 +- .../types/EeocsListRequestShowEnumOrigins.ts | 2 +- .../types/EeocsRetrieveRequestRemoteFields.ts | 2 +- .../EeocsRetrieveRequestShowEnumOrigins.ts | 2 +- .../requests/CreateFieldMappingRequest.ts | 4 +- .../PatchedEditFieldMappingRequest.ts | 4 +- .../client/syncStatusResyncCreate.ts | 2 +- .../requests/GenerateRemoteKeyRequest.ts | 2 +- .../ScheduledInterviewEndpointRequest.ts | 2 +- .../types/InterviewsListRequestExpand.ts | 2 +- .../types/InterviewsRetrieveRequestExpand.ts | 2 +- .../issues/types/IssuesListRequestStatus.ts | 2 +- .../types/JobPostingsListRequestStatus.ts | 2 +- .../jobs/types/JobsListRequestExpand.ts | 2 +- .../jobs/types/JobsListRequestStatus.ts | 2 +- .../jobs/types/JobsRetrieveRequestExpand.ts | 2 +- ...JobsScreeningQuestionsListRequestExpand.ts | 2 +- .../client/requests/EndUserDetailsRequest.ts | 12 +- .../LinkedAccountsListRequestCategory.ts | 2 +- .../offers/types/OffersListRequestExpand.ts | 2 +- .../types/OffersRetrieveRequestExpand.ts | 2 +- .../RemoteKeyForRegenerationRequest.ts | 2 +- ...ountCommonModelScopeDeserializerRequest.ts | 4 +- .../types/ScorecardsListRequestExpand.ts | 2 +- .../types/ScorecardsRetrieveRequestExpand.ts | 2 +- .../resources/webhookReceivers/client/list.ts | 2 +- .../client/requests/WebhookReceiverRequest.ts | 2 +- .../resources/ats/types/AccessRoleEnum.ts | 2 +- .../resources/ats/types/AccountDetails.ts | 4 +- .../ats/types/AccountDetailsAndActions.ts | 2 +- .../AccountDetailsAndActionsIntegration.ts | 4 +- .../AccountDetailsAndActionsStatusEnum.ts | 2 +- .../resources/ats/types/AccountIntegration.ts | 8 +- .../resources/ats/types/AccountToken.ts | 2 +- .../resources/ats/types/Activity.ts | 4 +- .../ats/types/ActivityActivityType.ts | 2 +- .../resources/ats/types/ActivityRequest.ts | 6 +- .../ats/types/ActivityRequestActivityType.ts | 2 +- .../ats/types/ActivityRequestUser.ts | 2 +- .../ats/types/ActivityRequestVisibility.ts | 2 +- .../resources/ats/types/ActivityResponse.ts | 2 +- .../resources/ats/types/ActivityTypeEnum.ts | 2 +- .../resources/ats/types/ActivityUser.ts | 2 +- .../resources/ats/types/ActivityVisibility.ts | 2 +- .../resources/ats/types/AdvancedMetadata.ts | 4 +- .../resources/ats/types/Application.ts | 6 +- .../ats/types/ApplicationCandidate.ts | 2 +- .../ats/types/ApplicationCreditedTo.ts | 2 +- .../ats/types/ApplicationCurrentStage.ts | 2 +- .../resources/ats/types/ApplicationJob.ts | 2 +- .../ats/types/ApplicationOffersItem.ts | 2 +- .../ats/types/ApplicationRejectReason.ts | 2 +- .../resources/ats/types/ApplicationRequest.ts | 8 +- .../ats/types/ApplicationRequestCandidate.ts | 2 +- .../ats/types/ApplicationRequestCreditedTo.ts | 2 +- .../types/ApplicationRequestCurrentStage.ts | 2 +- .../ats/types/ApplicationRequestJob.ts | 2 +- .../ats/types/ApplicationRequestOffersItem.ts | 2 +- .../types/ApplicationRequestRejectReason.ts | 2 +- ...tionRequestScreeningQuestionAnswersItem.ts | 2 +- .../ats/types/ApplicationResponse.ts | 2 +- ...ApplicationScreeningQuestionAnswersItem.ts | 2 +- .../ats/types/AsyncPassthroughReciept.ts | 2 +- .../resources/ats/types/Attachment.ts | 4 +- .../ats/types/AttachmentAttachmentType.ts | 2 +- .../resources/ats/types/AttachmentRequest.ts | 6 +- .../types/AttachmentRequestAttachmentType.ts | 2 +- .../resources/ats/types/AttachmentResponse.ts | 2 +- .../resources/ats/types/AttachmentTypeEnum.ts | 2 +- .../resources/ats/types/AuditLogEvent.ts | 2 +- .../ats/types/AuditLogEventEventType.ts | 2 +- .../resources/ats/types/AuditLogEventRole.ts | 2 +- .../resources/ats/types/AvailableActions.ts | 4 +- .../resources/ats/types/Candidate.ts | 6 +- .../ats/types/CandidateApplicationsItem.ts | 2 +- .../ats/types/CandidateAttachmentsItem.ts | 2 +- .../resources/ats/types/CandidateRequest.ts | 8 +- .../types/CandidateRequestApplicationsItem.ts | 2 +- .../types/CandidateRequestAttachmentsItem.ts | 2 +- .../resources/ats/types/CandidateResponse.ts | 2 +- .../resources/ats/types/CategoriesEnum.ts | 2 +- .../resources/ats/types/CategoryEnum.ts | 2 +- .../ats/types/CommonModelScopeApi.ts | 4 +- .../ats/types/CommonModelScopesBodyRequest.ts | 4 +- .../ats/types/DataPassthroughRequest.ts | 4 +- .../resources/ats/types/DebugModeLog.ts | 2 +- .../ats/types/DebugModelLogSummary.ts | 2 +- .../resources/ats/types/Department.ts | 4 +- .../ats/types/DisabilityStatusEnum.ts | 2 +- src/serialization/resources/ats/types/Eeoc.ts | 4 +- .../resources/ats/types/EeocCandidate.ts | 2 +- .../ats/types/EeocDisabilityStatus.ts | 2 +- .../resources/ats/types/EeocGender.ts | 2 +- .../resources/ats/types/EeocRace.ts | 2 +- .../resources/ats/types/EeocVeteranStatus.ts | 2 +- .../resources/ats/types/EmailAddress.ts | 2 +- .../ats/types/EmailAddressEmailAddressType.ts | 2 +- .../ats/types/EmailAddressRequest.ts | 6 +- .../EmailAddressRequestEmailAddressType.ts | 2 +- .../ats/types/EmailAddressTypeEnum.ts | 2 +- .../resources/ats/types/EnabledActionsEnum.ts | 2 +- .../resources/ats/types/EncodingEnum.ts | 2 +- .../ats/types/ErrorValidationProblem.ts | 2 +- .../resources/ats/types/EventTypeEnum.ts | 2 +- .../ats/types/ExternalTargetFieldApi.ts | 2 +- .../types/ExternalTargetFieldApiResponse.ts | 8 +- .../ats/types/FieldMappingApiInstance.ts | 2 +- .../FieldMappingApiInstanceRemoteField.ts | 4 +- ...piInstanceRemoteFieldRemoteEndpointInfo.ts | 4 +- .../types/FieldMappingApiInstanceResponse.ts | 10 +- .../FieldMappingApiInstanceTargetField.ts | 2 +- .../ats/types/FieldMappingInstanceResponse.ts | 2 +- .../ats/types/FieldPermissionDeserializer.ts | 6 +- .../FieldPermissionDeserializerRequest.ts | 6 +- .../resources/ats/types/GenderEnum.ts | 2 +- .../IndividualCommonModelScopeDeserializer.ts | 4 +- ...dualCommonModelScopeDeserializerRequest.ts | 4 +- .../resources/ats/types/Issue.ts | 6 +- .../resources/ats/types/IssueStatus.ts | 2 +- .../resources/ats/types/IssueStatusEnum.ts | 2 +- src/serialization/resources/ats/types/Job.ts | 8 +- .../resources/ats/types/JobDepartmentsItem.ts | 2 +- .../ats/types/JobHiringManagersItem.ts | 2 +- .../resources/ats/types/JobInterviewStage.ts | 4 +- .../ats/types/JobInterviewStageJob.ts | 2 +- .../resources/ats/types/JobOfficesItem.ts | 2 +- .../resources/ats/types/JobPosting.ts | 6 +- .../resources/ats/types/JobPostingJob.ts | 2 +- .../ats/types/JobPostingJobPostingUrlsItem.ts | 2 +- .../ats/types/JobPostingStatusEnum.ts | 2 +- .../resources/ats/types/JobRecruitersItem.ts | 2 +- .../resources/ats/types/JobStatus.ts | 2 +- .../resources/ats/types/JobStatusEnum.ts | 2 +- .../resources/ats/types/JobTypeEnum.ts | 2 +- .../resources/ats/types/LanguageEnum.ts | 2 +- .../resources/ats/types/LastSyncResultEnum.ts | 2 +- .../resources/ats/types/LinkToken.ts | 2 +- .../ats/types/LinkedAccountStatus.ts | 2 +- .../resources/ats/types/MetaResponse.ts | 8 +- .../resources/ats/types/MethodEnum.ts | 2 +- .../resources/ats/types/ModelOperation.ts | 8 +- .../ats/types/ModelPermissionDeserializer.ts | 2 +- .../ModelPermissionDeserializerRequest.ts | 2 +- .../ats/types/MultipartFormFieldRequest.ts | 2 +- .../MultipartFormFieldRequestEncoding.ts | 2 +- .../resources/ats/types/Offer.ts | 4 +- .../resources/ats/types/OfferApplication.ts | 2 +- .../resources/ats/types/OfferCreator.ts | 2 +- .../resources/ats/types/OfferStatus.ts | 2 +- .../resources/ats/types/OfferStatusEnum.ts | 2 +- .../resources/ats/types/Office.ts | 4 +- .../ats/types/OverallRecommendationEnum.ts | 2 +- .../PaginatedAccountDetailsAndActionsList.ts | 2 +- .../ats/types/PaginatedActivityList.ts | 2 +- .../ats/types/PaginatedApplicationList.ts | 2 +- .../ats/types/PaginatedAttachmentList.ts | 2 +- .../ats/types/PaginatedAuditLogEventList.ts | 2 +- .../ats/types/PaginatedCandidateList.ts | 2 +- .../ats/types/PaginatedDepartmentList.ts | 2 +- .../resources/ats/types/PaginatedEeocList.ts | 2 +- .../resources/ats/types/PaginatedIssueList.ts | 2 +- .../types/PaginatedJobInterviewStageList.ts | 2 +- .../resources/ats/types/PaginatedJobList.ts | 2 +- .../ats/types/PaginatedJobPostingList.ts | 2 +- .../resources/ats/types/PaginatedOfferList.ts | 2 +- .../ats/types/PaginatedOfficeList.ts | 2 +- .../ats/types/PaginatedRejectReasonList.ts | 2 +- .../ats/types/PaginatedRemoteUserList.ts | 2 +- .../types/PaginatedScheduledInterviewList.ts | 2 +- .../ats/types/PaginatedScorecardList.ts | 2 +- .../types/PaginatedScreeningQuestionList.ts | 2 +- .../ats/types/PaginatedSyncStatusList.ts | 2 +- .../resources/ats/types/PaginatedTagList.ts | 2 +- .../ats/types/PatchedCandidateRequest.ts | 8 +- .../resources/ats/types/PhoneNumber.ts | 2 +- .../ats/types/PhoneNumberPhoneNumberType.ts | 2 +- .../resources/ats/types/PhoneNumberRequest.ts | 6 +- .../PhoneNumberRequestPhoneNumberType.ts | 2 +- .../ats/types/PhoneNumberTypeEnum.ts | 2 +- .../resources/ats/types/RaceEnum.ts | 2 +- .../resources/ats/types/ReasonEnum.ts | 2 +- .../resources/ats/types/RejectReason.ts | 4 +- .../resources/ats/types/RemoteData.ts | 2 +- .../resources/ats/types/RemoteEndpointInfo.ts | 4 +- .../resources/ats/types/RemoteFieldApi.ts | 4 +- .../ats/types/RemoteFieldApiCoverage.ts | 2 +- .../ats/types/RemoteFieldApiResponse.ts | 6 +- .../resources/ats/types/RemoteKey.ts | 2 +- .../resources/ats/types/RemoteResponse.ts | 4 +- .../ats/types/RemoteResponseResponseType.ts | 2 +- .../resources/ats/types/RemoteUser.ts | 4 +- .../ats/types/RemoteUserAccessRole.ts | 2 +- .../resources/ats/types/RequestFormatEnum.ts | 2 +- .../resources/ats/types/ResponseTypeEnum.ts | 2 +- .../resources/ats/types/RoleEnum.ts | 2 +- .../resources/ats/types/ScheduledInterview.ts | 6 +- .../types/ScheduledInterviewApplication.ts | 2 +- .../ScheduledInterviewInterviewersItem.ts | 2 +- .../ScheduledInterviewJobInterviewStage.ts | 2 +- .../ats/types/ScheduledInterviewOrganizer.ts | 2 +- .../ats/types/ScheduledInterviewRequest.ts | 8 +- .../ScheduledInterviewRequestApplication.ts | 2 +- ...heduledInterviewRequestInterviewersItem.ts | 2 +- ...eduledInterviewRequestJobInterviewStage.ts | 2 +- .../ScheduledInterviewRequestOrganizer.ts | 2 +- .../types/ScheduledInterviewRequestStatus.ts | 2 +- .../ats/types/ScheduledInterviewResponse.ts | 2 +- .../ats/types/ScheduledInterviewStatus.ts | 2 +- .../ats/types/ScheduledInterviewStatusEnum.ts | 2 +- .../resources/ats/types/Scorecard.ts | 6 +- .../ats/types/ScorecardApplication.ts | 2 +- .../resources/ats/types/ScorecardInterview.ts | 2 +- .../ats/types/ScorecardInterviewer.ts | 2 +- .../types/ScorecardOverallRecommendation.ts | 2 +- .../resources/ats/types/ScreeningQuestion.ts | 2 +- .../ats/types/ScreeningQuestionAnswer.ts | 2 +- .../types/ScreeningQuestionAnswerQuestion.ts | 2 +- .../types/ScreeningQuestionAnswerRequest.ts | 6 +- .../ScreeningQuestionAnswerRequestQuestion.ts | 2 +- .../ats/types/ScreeningQuestionJob.ts | 2 +- .../ats/types/ScreeningQuestionOption.ts | 2 +- .../ats/types/ScreeningQuestionType.ts | 2 +- .../ats/types/ScreeningQuestionTypeEnum.ts | 2 +- .../SelectiveSyncConfigurationsUsageEnum.ts | 2 +- .../resources/ats/types/StatusFd5Enum.ts | 2 +- .../resources/ats/types/SyncStatus.ts | 4 +- src/serialization/resources/ats/types/Tag.ts | 6 +- src/serialization/resources/ats/types/Url.ts | 2 +- .../resources/ats/types/UrlRequest.ts | 6 +- .../resources/ats/types/UrlRequestUrlType.ts | 2 +- .../resources/ats/types/UrlTypeEnum.ts | 2 +- .../resources/ats/types/UrlUrlType.ts | 2 +- .../ats/types/ValidationProblemSource.ts | 2 +- .../resources/ats/types/VeteranStatusEnum.ts | 2 +- .../resources/ats/types/VisibilityEnum.ts | 2 +- .../ats/types/WarningValidationProblem.ts | 2 +- .../resources/ats/types/WebhookReceiver.ts | 2 +- .../requests/CrmAccountEndpointRequest.ts | 2 +- .../PatchedCrmAccountEndpointRequest.ts | 2 +- .../CrmAssociationTypeEndpointRequest.ts | 2 +- .../types/AsyncPassthroughRetrieveResponse.ts | 2 +- .../requests/CrmContactEndpointRequest.ts | 2 +- .../PatchedCrmContactEndpointRequest.ts | 2 +- .../types/ContactsListRequestExpand.ts | 2 +- .../types/ContactsRetrieveRequestExpand.ts | 2 +- .../CrmCustomObjectEndpointRequest.ts | 2 +- .../requests/EngagementEndpointRequest.ts | 2 +- .../PatchedEngagementEndpointRequest.ts | 2 +- .../types/EngagementsListRequestExpand.ts | 2 +- .../types/EngagementsRetrieveRequestExpand.ts | 2 +- .../requests/CreateFieldMappingRequest.ts | 4 +- .../PatchedEditFieldMappingRequest.ts | 4 +- .../client/syncStatusResyncCreate.ts | 2 +- .../requests/GenerateRemoteKeyRequest.ts | 2 +- .../issues/types/IssuesListRequestStatus.ts | 2 +- .../client/requests/LeadEndpointRequest.ts | 2 +- .../leads/types/LeadsListRequestExpand.ts | 2 +- .../leads/types/LeadsRetrieveRequestExpand.ts | 2 +- .../client/requests/EndUserDetailsRequest.ts | 12 +- .../LinkedAccountsListRequestCategory.ts | 2 +- .../client/requests/NoteEndpointRequest.ts | 2 +- .../notes/types/NotesListRequestExpand.ts | 2 +- .../notes/types/NotesRetrieveRequestExpand.ts | 2 +- .../requests/OpportunityEndpointRequest.ts | 2 +- .../PatchedOpportunityEndpointRequest.ts | 2 +- .../types/OpportunitiesListRequestExpand.ts | 2 +- .../types/OpportunitiesListRequestStatus.ts | 2 +- .../OpportunitiesRetrieveRequestExpand.ts | 2 +- .../RemoteKeyForRegenerationRequest.ts | 2 +- ...ountCommonModelScopeDeserializerRequest.ts | 4 +- .../requests/PatchedTaskEndpointRequest.ts | 2 +- .../client/requests/TaskEndpointRequest.ts | 2 +- .../tasks/types/TasksListRequestExpand.ts | 2 +- .../tasks/types/TasksRetrieveRequestExpand.ts | 2 +- .../resources/webhookReceivers/client/list.ts | 2 +- .../client/requests/WebhookReceiverRequest.ts | 2 +- .../resources/crm/types/Account.ts | 4 +- .../resources/crm/types/AccountDetails.ts | 4 +- .../crm/types/AccountDetailsAndActions.ts | 2 +- .../AccountDetailsAndActionsIntegration.ts | 4 +- .../AccountDetailsAndActionsStatusEnum.ts | 2 +- .../resources/crm/types/AccountIntegration.ts | 8 +- .../resources/crm/types/AccountOwner.ts | 2 +- .../resources/crm/types/AccountRequest.ts | 6 +- .../crm/types/AccountRequestOwner.ts | 2 +- .../resources/crm/types/AccountToken.ts | 2 +- .../resources/crm/types/ActivityTypeEnum.ts | 2 +- .../resources/crm/types/Address.ts | 2 +- .../resources/crm/types/AddressAddressType.ts | 2 +- .../resources/crm/types/AddressCountry.ts | 2 +- .../resources/crm/types/AddressRequest.ts | 6 +- .../crm/types/AddressRequestAddressType.ts | 2 +- .../crm/types/AddressRequestCountry.ts | 2 +- .../resources/crm/types/AddressTypeEnum.ts | 2 +- .../resources/crm/types/AdvancedMetadata.ts | 4 +- .../resources/crm/types/Association.ts | 2 +- .../crm/types/AssociationAssociationType.ts | 2 +- .../resources/crm/types/AssociationSubType.ts | 2 +- .../resources/crm/types/AssociationType.ts | 6 +- .../crm/types/AssociationTypeCardinality.ts | 2 +- .../types/AssociationTypeRequestRequest.ts | 4 +- .../crm/types/AsyncPassthroughReciept.ts | 2 +- .../resources/crm/types/AuditLogEvent.ts | 2 +- .../crm/types/AuditLogEventEventType.ts | 2 +- .../resources/crm/types/AuditLogEventRole.ts | 2 +- .../resources/crm/types/AvailableActions.ts | 4 +- .../resources/crm/types/CardinalityEnum.ts | 2 +- .../resources/crm/types/CategoriesEnum.ts | 2 +- .../resources/crm/types/CategoryEnum.ts | 2 +- .../crm/types/CommonModelScopeApi.ts | 4 +- .../crm/types/CommonModelScopesBodyRequest.ts | 4 +- .../resources/crm/types/Contact.ts | 6 +- .../resources/crm/types/ContactAccount.ts | 2 +- .../resources/crm/types/ContactOwner.ts | 2 +- .../resources/crm/types/ContactRequest.ts | 8 +- .../crm/types/ContactRequestAccount.ts | 2 +- .../crm/types/ContactRequestOwner.ts | 2 +- .../resources/crm/types/CountryEnum.ts | 2 +- .../resources/crm/types/CrmAccountResponse.ts | 2 +- .../crm/types/CrmAssociationTypeResponse.ts | 2 +- .../resources/crm/types/CrmContactResponse.ts | 2 +- .../crm/types/CrmCustomObjectResponse.ts | 2 +- .../resources/crm/types/CustomObject.ts | 2 +- .../resources/crm/types/CustomObjectClass.ts | 4 +- .../crm/types/CustomObjectRequest.ts | 2 +- .../crm/types/DataPassthroughRequest.ts | 4 +- .../resources/crm/types/DebugModeLog.ts | 2 +- .../crm/types/DebugModelLogSummary.ts | 2 +- .../resources/crm/types/DirectionEnum.ts | 2 +- .../resources/crm/types/EmailAddress.ts | 2 +- .../crm/types/EmailAddressRequest.ts | 6 +- .../resources/crm/types/EnabledActionsEnum.ts | 2 +- .../resources/crm/types/EncodingEnum.ts | 2 +- .../resources/crm/types/Engagement.ts | 4 +- .../resources/crm/types/EngagementAccount.ts | 2 +- .../crm/types/EngagementContactsItem.ts | 2 +- .../crm/types/EngagementDirection.ts | 2 +- .../crm/types/EngagementEngagementType.ts | 2 +- .../resources/crm/types/EngagementOwner.ts | 2 +- .../resources/crm/types/EngagementRequest.ts | 6 +- .../crm/types/EngagementRequestAccount.ts | 2 +- .../types/EngagementRequestContactsItem.ts | 2 +- .../crm/types/EngagementRequestDirection.ts | 2 +- .../types/EngagementRequestEngagementType.ts | 2 +- .../crm/types/EngagementRequestOwner.ts | 2 +- .../resources/crm/types/EngagementResponse.ts | 2 +- .../resources/crm/types/EngagementType.ts | 2 +- .../crm/types/EngagementTypeActivityType.ts | 2 +- .../crm/types/ErrorValidationProblem.ts | 2 +- .../resources/crm/types/EventTypeEnum.ts | 2 +- .../crm/types/ExternalTargetFieldApi.ts | 2 +- .../types/ExternalTargetFieldApiResponse.ts | 2 +- .../resources/crm/types/FieldFormatEnum.ts | 2 +- .../crm/types/FieldMappingApiInstance.ts | 2 +- .../FieldMappingApiInstanceRemoteField.ts | 4 +- ...piInstanceRemoteFieldRemoteEndpointInfo.ts | 4 +- .../types/FieldMappingApiInstanceResponse.ts | 4 +- .../FieldMappingApiInstanceTargetField.ts | 2 +- .../crm/types/FieldMappingInstanceResponse.ts | 2 +- .../crm/types/FieldPermissionDeserializer.ts | 6 +- .../FieldPermissionDeserializerRequest.ts | 6 +- .../resources/crm/types/FieldTypeEnum.ts | 2 +- .../crm/types/IgnoreCommonModelRequest.ts | 2 +- .../IndividualCommonModelScopeDeserializer.ts | 4 +- ...dualCommonModelScopeDeserializerRequest.ts | 4 +- .../resources/crm/types/Issue.ts | 6 +- .../resources/crm/types/IssueStatus.ts | 2 +- .../resources/crm/types/IssueStatusEnum.ts | 2 +- .../resources/crm/types/ItemFormatEnum.ts | 2 +- .../resources/crm/types/ItemSchema.ts | 4 +- .../resources/crm/types/ItemTypeEnum.ts | 2 +- .../resources/crm/types/LanguageEnum.ts | 2 +- .../resources/crm/types/LastSyncResultEnum.ts | 2 +- src/serialization/resources/crm/types/Lead.ts | 6 +- .../crm/types/LeadConvertedAccount.ts | 2 +- .../crm/types/LeadConvertedContact.ts | 2 +- .../resources/crm/types/LeadOwner.ts | 2 +- .../resources/crm/types/LeadRequest.ts | 12 +- .../crm/types/LeadRequestConvertedAccount.ts | 2 +- .../crm/types/LeadRequestConvertedContact.ts | 2 +- .../resources/crm/types/LeadRequestOwner.ts | 2 +- .../resources/crm/types/LeadResponse.ts | 2 +- .../resources/crm/types/LinkToken.ts | 2 +- .../crm/types/LinkedAccountStatus.ts | 2 +- .../resources/crm/types/MetaResponse.ts | 8 +- .../resources/crm/types/MethodEnum.ts | 2 +- .../resources/crm/types/ModelOperation.ts | 8 +- .../crm/types/ModelPermissionDeserializer.ts | 2 +- .../ModelPermissionDeserializerRequest.ts | 2 +- .../crm/types/MultipartFormFieldRequest.ts | 2 +- .../MultipartFormFieldRequestEncoding.ts | 2 +- src/serialization/resources/crm/types/Note.ts | 4 +- .../resources/crm/types/NoteAccount.ts | 2 +- .../resources/crm/types/NoteContact.ts | 2 +- .../resources/crm/types/NoteOpportunity.ts | 2 +- .../resources/crm/types/NoteOwner.ts | 2 +- .../resources/crm/types/NoteRequest.ts | 8 +- .../resources/crm/types/NoteRequestAccount.ts | 2 +- .../resources/crm/types/NoteRequestContact.ts | 2 +- .../crm/types/NoteRequestOpportunity.ts | 2 +- .../resources/crm/types/NoteRequestOwner.ts | 2 +- .../resources/crm/types/NoteResponse.ts | 2 +- .../types/ObjectClassDescriptionRequest.ts | 2 +- .../resources/crm/types/Opportunity.ts | 4 +- .../resources/crm/types/OpportunityAccount.ts | 2 +- .../resources/crm/types/OpportunityOwner.ts | 2 +- .../resources/crm/types/OpportunityRequest.ts | 6 +- .../crm/types/OpportunityRequestAccount.ts | 2 +- .../crm/types/OpportunityRequestOwner.ts | 2 +- .../crm/types/OpportunityRequestStage.ts | 2 +- .../crm/types/OpportunityRequestStatus.ts | 2 +- .../crm/types/OpportunityResponse.ts | 2 +- .../resources/crm/types/OpportunityStage.ts | 2 +- .../resources/crm/types/OpportunityStatus.ts | 2 +- .../crm/types/OpportunityStatusEnum.ts | 2 +- .../resources/crm/types/OriginTypeEnum.ts | 2 +- .../PaginatedAccountDetailsAndActionsList.ts | 2 +- .../crm/types/PaginatedAccountList.ts | 2 +- .../crm/types/PaginatedAssociationList.ts | 2 +- .../crm/types/PaginatedAssociationTypeList.ts | 2 +- .../crm/types/PaginatedAuditLogEventList.ts | 2 +- .../crm/types/PaginatedContactList.ts | 2 +- .../types/PaginatedCustomObjectClassList.ts | 2 +- .../crm/types/PaginatedCustomObjectList.ts | 2 +- .../crm/types/PaginatedEngagementList.ts | 2 +- .../crm/types/PaginatedEngagementTypeList.ts | 2 +- .../resources/crm/types/PaginatedIssueList.ts | 2 +- .../resources/crm/types/PaginatedLeadList.ts | 2 +- .../resources/crm/types/PaginatedNoteList.ts | 2 +- .../crm/types/PaginatedOpportunityList.ts | 2 +- .../types/PaginatedRemoteFieldClassList.ts | 2 +- .../resources/crm/types/PaginatedStageList.ts | 2 +- .../crm/types/PaginatedSyncStatusList.ts | 2 +- .../resources/crm/types/PaginatedTaskList.ts | 2 +- .../resources/crm/types/PaginatedUserList.ts | 2 +- .../crm/types/PatchedAccountRequest.ts | 6 +- .../crm/types/PatchedContactRequest.ts | 8 +- .../crm/types/PatchedContactRequestOwner.ts | 2 +- .../crm/types/PatchedEngagementRequest.ts | 6 +- .../PatchedEngagementRequestDirection.ts | 2 +- .../crm/types/PatchedOpportunityRequest.ts | 6 +- .../types/PatchedOpportunityRequestStatus.ts | 2 +- .../resources/crm/types/PatchedTaskRequest.ts | 6 +- .../crm/types/PatchedTaskRequestStatus.ts | 2 +- .../resources/crm/types/PhoneNumber.ts | 2 +- .../resources/crm/types/PhoneNumberRequest.ts | 6 +- .../resources/crm/types/ReasonEnum.ts | 2 +- .../resources/crm/types/RemoteData.ts | 2 +- .../resources/crm/types/RemoteEndpointInfo.ts | 4 +- .../resources/crm/types/RemoteField.ts | 2 +- .../resources/crm/types/RemoteFieldApi.ts | 4 +- .../crm/types/RemoteFieldApiCoverage.ts | 2 +- .../crm/types/RemoteFieldApiResponse.ts | 2 +- .../resources/crm/types/RemoteFieldClass.ts | 4 +- .../types/RemoteFieldClassFieldChoicesItem.ts | 2 +- .../crm/types/RemoteFieldClassFieldFormat.ts | 2 +- .../crm/types/RemoteFieldClassFieldType.ts | 2 +- .../RemoteFieldClassForCustomObjectClass.ts | 6 +- ...assForCustomObjectClassFieldChoicesItem.ts | 2 +- ...eldClassForCustomObjectClassFieldFormat.ts | 2 +- ...FieldClassForCustomObjectClassFieldType.ts | 2 +- ...ieldClassForCustomObjectClassItemSchema.ts | 4 +- .../crm/types/RemoteFieldRemoteFieldClass.ts | 2 +- .../resources/crm/types/RemoteFieldRequest.ts | 2 +- .../RemoteFieldRequestRemoteFieldClass.ts | 2 +- .../resources/crm/types/RemoteKey.ts | 2 +- .../resources/crm/types/RemoteResponse.ts | 4 +- .../resources/crm/types/RequestFormatEnum.ts | 2 +- .../resources/crm/types/ResponseTypeEnum.ts | 2 +- .../resources/crm/types/RoleEnum.ts | 2 +- .../SelectiveSyncConfigurationsUsageEnum.ts | 2 +- .../resources/crm/types/Stage.ts | 4 +- .../resources/crm/types/StatusFd5Enum.ts | 2 +- .../resources/crm/types/SyncStatus.ts | 4 +- .../crm/types/SyncStatusLastSyncResult.ts | 2 +- src/serialization/resources/crm/types/Task.ts | 4 +- .../resources/crm/types/TaskAccount.ts | 2 +- .../resources/crm/types/TaskOpportunity.ts | 2 +- .../resources/crm/types/TaskOwner.ts | 2 +- .../resources/crm/types/TaskRequest.ts | 8 +- .../resources/crm/types/TaskRequestAccount.ts | 2 +- .../crm/types/TaskRequestOpportunity.ts | 2 +- .../resources/crm/types/TaskRequestOwner.ts | 2 +- .../resources/crm/types/TaskRequestStatus.ts | 2 +- .../resources/crm/types/TaskResponse.ts | 2 +- .../resources/crm/types/TaskStatus.ts | 2 +- .../resources/crm/types/TaskStatusEnum.ts | 2 +- src/serialization/resources/crm/types/User.ts | 4 +- .../crm/types/ValidationProblemSource.ts | 2 +- .../crm/types/WarningValidationProblem.ts | 2 +- .../resources/crm/types/WebhookReceiver.ts | 2 +- .../types/AsyncPassthroughRetrieveResponse.ts | 2 +- .../requests/CreateFieldMappingRequest.ts | 4 +- .../PatchedEditFieldMappingRequest.ts | 4 +- .../FileStorageFileEndpointRequest.ts | 2 +- .../files/types/FilesListRequestExpand.ts | 2 +- .../files/types/FilesRetrieveRequestExpand.ts | 2 +- .../FileStorageFolderEndpointRequest.ts | 2 +- .../folders/types/FoldersListRequestExpand.ts | 2 +- .../types/FoldersRetrieveRequestExpand.ts | 2 +- .../client/syncStatusResyncCreate.ts | 2 +- .../requests/GenerateRemoteKeyRequest.ts | 2 +- .../issues/types/IssuesListRequestStatus.ts | 2 +- .../client/requests/EndUserDetailsRequest.ts | 12 +- .../LinkedAccountsListRequestCategory.ts | 2 +- .../RemoteKeyForRegenerationRequest.ts | 2 +- ...ountCommonModelScopeDeserializerRequest.ts | 4 +- .../resources/webhookReceivers/client/list.ts | 2 +- .../client/requests/WebhookReceiverRequest.ts | 2 +- .../filestorage/types/AccountDetails.ts | 4 +- .../types/AccountDetailsAndActions.ts | 2 +- .../AccountDetailsAndActionsIntegration.ts | 4 +- .../AccountDetailsAndActionsStatusEnum.ts | 2 +- .../filestorage/types/AccountIntegration.ts | 8 +- .../filestorage/types/AccountToken.ts | 2 +- .../filestorage/types/AdvancedMetadata.ts | 4 +- .../types/AsyncPassthroughReciept.ts | 2 +- .../filestorage/types/AuditLogEvent.ts | 2 +- .../types/AuditLogEventEventType.ts | 2 +- .../filestorage/types/AuditLogEventRole.ts | 2 +- .../filestorage/types/AvailableActions.ts | 4 +- .../filestorage/types/CategoriesEnum.ts | 2 +- .../filestorage/types/CategoryEnum.ts | 2 +- .../filestorage/types/CommonModelScopeApi.ts | 4 +- .../types/CommonModelScopesBodyRequest.ts | 4 +- .../types/DataPassthroughRequest.ts | 4 +- .../filestorage/types/DebugModeLog.ts | 2 +- .../filestorage/types/DebugModelLogSummary.ts | 2 +- .../filestorage/types/DownloadRequestMeta.ts | 2 +- .../resources/filestorage/types/Drive.ts | 4 +- .../filestorage/types/EnabledActionsEnum.ts | 2 +- .../filestorage/types/EncodingEnum.ts | 2 +- .../types/ErrorValidationProblem.ts | 2 +- .../filestorage/types/EventTypeEnum.ts | 2 +- .../types/ExternalTargetFieldApi.ts | 2 +- .../types/ExternalTargetFieldApiResponse.ts | 2 +- .../types/FieldMappingApiInstance.ts | 2 +- .../FieldMappingApiInstanceRemoteField.ts | 4 +- ...piInstanceRemoteFieldRemoteEndpointInfo.ts | 4 +- .../types/FieldMappingApiInstanceResponse.ts | 2 +- .../FieldMappingApiInstanceTargetField.ts | 2 +- .../types/FieldMappingInstanceResponse.ts | 2 +- .../types/FieldPermissionDeserializer.ts | 6 +- .../FieldPermissionDeserializerRequest.ts | 6 +- .../resources/filestorage/types/FileDrive.ts | 2 +- .../resources/filestorage/types/FileFolder.ts | 2 +- .../filestorage/types/FilePermissions.ts | 6 +- .../filestorage/types/FilePermissionsItem.ts | 6 +- .../filestorage/types/FileRequest.ts | 6 +- .../filestorage/types/FileRequestDrive.ts | 2 +- .../filestorage/types/FileRequestFolder.ts | 2 +- .../types/FileRequestPermissions.ts | 2 +- .../types/FileRequestPermissionsItem.ts | 2 +- .../types/FileStorageFileResponse.ts | 2 +- .../types/FileStorageFolderResponse.ts | 2 +- .../resources/filestorage/types/File_.ts | 4 +- .../resources/filestorage/types/Folder.ts | 6 +- .../filestorage/types/FolderDrive.ts | 2 +- .../filestorage/types/FolderParentFolder.ts | 2 +- .../filestorage/types/FolderPermissions.ts | 6 +- .../types/FolderPermissionsItem.ts | 6 +- .../filestorage/types/FolderRequest.ts | 6 +- .../filestorage/types/FolderRequestDrive.ts | 2 +- .../types/FolderRequestParentFolder.ts | 2 +- .../types/FolderRequestPermissions.ts | 2 +- .../types/FolderRequestPermissionsItem.ts | 2 +- .../resources/filestorage/types/Group.ts | 6 +- .../filestorage/types/GroupChildGroupsItem.ts | 2 +- .../IndividualCommonModelScopeDeserializer.ts | 4 +- ...dualCommonModelScopeDeserializerRequest.ts | 4 +- .../resources/filestorage/types/Issue.ts | 6 +- .../filestorage/types/IssueStatus.ts | 2 +- .../filestorage/types/IssueStatusEnum.ts | 2 +- .../filestorage/types/LanguageEnum.ts | 2 +- .../filestorage/types/LastSyncResultEnum.ts | 2 +- .../resources/filestorage/types/LinkToken.ts | 2 +- .../filestorage/types/LinkedAccountStatus.ts | 2 +- .../filestorage/types/MetaResponse.ts | 8 +- .../resources/filestorage/types/MethodEnum.ts | 2 +- .../filestorage/types/ModelOperation.ts | 8 +- .../types/ModelPermissionDeserializer.ts | 2 +- .../ModelPermissionDeserializerRequest.ts | 2 +- .../types/MultipartFormFieldRequest.ts | 2 +- .../MultipartFormFieldRequestEncoding.ts | 2 +- .../PaginatedAccountDetailsAndActionsList.ts | 2 +- .../types/PaginatedAuditLogEventList.ts | 2 +- .../types/PaginatedDownloadRequestMetaList.ts | 2 +- .../filestorage/types/PaginatedDriveList.ts | 2 +- .../filestorage/types/PaginatedFileList.ts | 2 +- .../filestorage/types/PaginatedFolderList.ts | 2 +- .../filestorage/types/PaginatedGroupList.ts | 2 +- .../filestorage/types/PaginatedIssueList.ts | 2 +- .../types/PaginatedSyncStatusList.ts | 2 +- .../filestorage/types/PaginatedUserList.ts | 2 +- .../resources/filestorage/types/Permission.ts | 2 +- .../filestorage/types/PermissionGroup.ts | 2 +- .../filestorage/types/PermissionRequest.ts | 6 +- .../types/PermissionRequestGroup.ts | 2 +- .../types/PermissionRequestRolesItem.ts | 2 +- .../types/PermissionRequestType.ts | 2 +- .../types/PermissionRequestUser.ts | 2 +- .../filestorage/types/PermissionRolesItem.ts | 2 +- .../filestorage/types/PermissionType.ts | 2 +- .../filestorage/types/PermissionUser.ts | 2 +- .../resources/filestorage/types/RemoteData.ts | 2 +- .../filestorage/types/RemoteEndpointInfo.ts | 4 +- .../filestorage/types/RemoteFieldApi.ts | 4 +- .../types/RemoteFieldApiCoverage.ts | 2 +- .../types/RemoteFieldApiResponse.ts | 2 +- .../resources/filestorage/types/RemoteKey.ts | 2 +- .../filestorage/types/RemoteResponse.ts | 4 +- .../filestorage/types/RequestFormatEnum.ts | 2 +- .../filestorage/types/ResponseTypeEnum.ts | 2 +- .../resources/filestorage/types/RoleEnum.ts | 2 +- .../resources/filestorage/types/RolesEnum.ts | 2 +- .../SelectiveSyncConfigurationsUsageEnum.ts | 2 +- .../filestorage/types/StatusFd5Enum.ts | 2 +- .../resources/filestorage/types/SyncStatus.ts | 4 +- .../types/SyncStatusLastSyncResult.ts | 2 +- .../resources/filestorage/types/TypeEnum.ts | 2 +- .../resources/filestorage/types/User.ts | 4 +- .../types/ValidationProblemSource.ts | 2 +- .../types/WarningValidationProblem.ts | 2 +- .../filestorage/types/WebhookReceiver.ts | 2 +- .../types/AsyncPassthroughRetrieveResponse.ts | 2 +- .../types/BankInfoListRequestAccountType.ts | 2 +- .../types/BankInfoListRequestOrderBy.ts | 2 +- .../EmployeePayrollRunsListRequestExpand.ts | 2 +- ...mployeePayrollRunsRetrieveRequestExpand.ts | 2 +- .../requests/EmployeeEndpointRequest.ts | 2 +- .../requests/IgnoreCommonModelRequest.ts | 2 +- .../EmployeesListRequestEmploymentStatus.ts | 2 +- .../types/EmployeesListRequestExpand.ts | 2 +- .../types/EmployeesListRequestRemoteFields.ts | 2 +- .../EmployeesListRequestShowEnumOrigins.ts | 2 +- .../types/EmployeesRetrieveRequestExpand.ts | 2 +- .../EmployeesRetrieveRequestRemoteFields.ts | 2 +- ...EmployeesRetrieveRequestShowEnumOrigins.ts | 2 +- .../types/IgnoreCommonModelRequestReason.ts | 2 +- .../types/EmploymentsListRequestExpand.ts | 2 +- .../types/EmploymentsListRequestOrderBy.ts | 2 +- .../EmploymentsListRequestRemoteFields.ts | 2 +- .../EmploymentsListRequestShowEnumOrigins.ts | 2 +- .../types/EmploymentsRetrieveRequestExpand.ts | 2 +- .../EmploymentsRetrieveRequestRemoteFields.ts | 2 +- ...ploymentsRetrieveRequestShowEnumOrigins.ts | 2 +- .../requests/CreateFieldMappingRequest.ts | 4 +- .../PatchedEditFieldMappingRequest.ts | 4 +- .../client/syncStatusResyncCreate.ts | 2 +- .../requests/GenerateRemoteKeyRequest.ts | 2 +- .../issues/types/IssuesListRequestStatus.ts | 2 +- .../client/requests/EndUserDetailsRequest.ts | 12 +- .../LinkedAccountsListRequestCategory.ts | 2 +- .../types/LocationsListRequestLocationType.ts | 2 +- .../types/LocationsListRequestRemoteFields.ts | 2 +- .../LocationsListRequestShowEnumOrigins.ts | 2 +- .../LocationsRetrieveRequestRemoteFields.ts | 2 +- ...LocationsRetrieveRequestShowEnumOrigins.ts | 2 +- .../PayrollRunsListRequestRemoteFields.ts | 2 +- .../types/PayrollRunsListRequestRunType.ts | 2 +- .../PayrollRunsListRequestShowEnumOrigins.ts | 2 +- .../PayrollRunsRetrieveRequestRemoteFields.ts | 2 +- ...yrollRunsRetrieveRequestShowEnumOrigins.ts | 2 +- .../RemoteKeyForRegenerationRequest.ts | 2 +- ...ountCommonModelScopeDeserializerRequest.ts | 4 +- .../client/requests/TimeOffEndpointRequest.ts | 2 +- .../timeOff/types/TimeOffListRequestExpand.ts | 2 +- .../types/TimeOffListRequestRemoteFields.ts | 2 +- .../types/TimeOffListRequestRequestType.ts | 2 +- .../TimeOffListRequestShowEnumOrigins.ts | 2 +- .../timeOff/types/TimeOffListRequestStatus.ts | 2 +- .../types/TimeOffRetrieveRequestExpand.ts | 2 +- .../TimeOffRetrieveRequestRemoteFields.ts | 2 +- .../TimeOffRetrieveRequestShowEnumOrigins.ts | 2 +- .../TimeOffBalancesListRequestPolicyType.ts | 2 +- .../requests/TimesheetEntryEndpointRequest.ts | 2 +- .../TimesheetEntriesListRequestOrderBy.ts | 2 +- .../resources/webhookReceivers/client/list.ts | 2 +- .../client/requests/WebhookReceiverRequest.ts | 2 +- .../resources/hris/types/AccountDetails.ts | 4 +- .../hris/types/AccountDetailsAndActions.ts | 2 +- .../AccountDetailsAndActionsIntegration.ts | 4 +- .../AccountDetailsAndActionsStatusEnum.ts | 2 +- .../hris/types/AccountIntegration.ts | 8 +- .../resources/hris/types/AccountToken.ts | 2 +- .../resources/hris/types/AccountTypeEnum.ts | 2 +- .../resources/hris/types/AdvancedMetadata.ts | 4 +- .../hris/types/AsyncPassthroughReciept.ts | 2 +- .../resources/hris/types/AuditLogEvent.ts | 2 +- .../hris/types/AuditLogEventEventType.ts | 2 +- .../resources/hris/types/AuditLogEventRole.ts | 2 +- .../resources/hris/types/AvailableActions.ts | 4 +- .../resources/hris/types/BankInfo.ts | 4 +- .../hris/types/BankInfoAccountType.ts | 2 +- .../resources/hris/types/BankInfoEmployee.ts | 2 +- .../resources/hris/types/Benefit.ts | 8 +- .../resources/hris/types/BenefitEmployee.ts | 2 +- .../hris/types/BenefitPlanTypeEnum.ts | 2 +- .../resources/hris/types/CategoriesEnum.ts | 2 +- .../resources/hris/types/CategoryEnum.ts | 2 +- .../hris/types/CommonModelScopeApi.ts | 4 +- .../types/CommonModelScopesBodyRequest.ts | 4 +- .../resources/hris/types/Company.ts | 4 +- .../resources/hris/types/CountryEnum.ts | 2 +- .../hris/types/DataPassthroughRequest.ts | 4 +- .../resources/hris/types/DebugModeLog.ts | 2 +- .../hris/types/DebugModelLogSummary.ts | 2 +- .../resources/hris/types/Deduction.ts | 4 +- .../resources/hris/types/Dependent.ts | 4 +- .../resources/hris/types/DependentGender.ts | 2 +- .../hris/types/DependentRelationship.ts | 2 +- .../resources/hris/types/Earning.ts | 4 +- .../resources/hris/types/EarningType.ts | 2 +- .../resources/hris/types/EarningTypeEnum.ts | 2 +- .../resources/hris/types/Employee.ts | 6 +- .../resources/hris/types/EmployeeCompany.ts | 2 +- .../hris/types/EmployeeEmploymentStatus.ts | 2 +- .../hris/types/EmployeeEmploymentsItem.ts | 2 +- .../resources/hris/types/EmployeeEthnicity.ts | 2 +- .../resources/hris/types/EmployeeGender.ts | 2 +- .../hris/types/EmployeeGroupsItem.ts | 2 +- .../hris/types/EmployeeHomeLocation.ts | 2 +- .../resources/hris/types/EmployeeManager.ts | 2 +- .../hris/types/EmployeeMaritalStatus.ts | 2 +- .../resources/hris/types/EmployeePayGroup.ts | 2 +- .../hris/types/EmployeePayrollRun.ts | 4 +- .../hris/types/EmployeePayrollRunEmployee.ts | 2 +- .../types/EmployeePayrollRunPayrollRun.ts | 2 +- .../resources/hris/types/EmployeeRequest.ts | 6 +- .../hris/types/EmployeeRequestCompany.ts | 2 +- .../types/EmployeeRequestEmploymentStatus.ts | 2 +- .../types/EmployeeRequestEmploymentsItem.ts | 2 +- .../hris/types/EmployeeRequestEthnicity.ts | 2 +- .../hris/types/EmployeeRequestGender.ts | 2 +- .../hris/types/EmployeeRequestGroupsItem.ts | 2 +- .../hris/types/EmployeeRequestHomeLocation.ts | 2 +- .../hris/types/EmployeeRequestManager.ts | 2 +- .../types/EmployeeRequestMaritalStatus.ts | 2 +- .../hris/types/EmployeeRequestPayGroup.ts | 2 +- .../hris/types/EmployeeRequestTeam.ts | 2 +- .../hris/types/EmployeeRequestWorkLocation.ts | 2 +- .../resources/hris/types/EmployeeResponse.ts | 2 +- .../resources/hris/types/EmployeeTeam.ts | 2 +- .../hris/types/EmployeeWorkLocation.ts | 2 +- .../resources/hris/types/EmployerBenefit.ts | 4 +- .../types/EmployerBenefitBenefitPlanType.ts | 2 +- .../resources/hris/types/Employment.ts | 4 +- .../hris/types/EmploymentEmployee.ts | 2 +- .../hris/types/EmploymentEmploymentType.ts | 2 +- .../hris/types/EmploymentFlsaStatus.ts | 2 +- .../hris/types/EmploymentPayCurrency.ts | 2 +- .../hris/types/EmploymentPayFrequency.ts | 2 +- .../hris/types/EmploymentPayGroup.ts | 2 +- .../hris/types/EmploymentPayPeriod.ts | 2 +- .../hris/types/EmploymentStatusEnum.ts | 2 +- .../hris/types/EmploymentTypeEnum.ts | 2 +- .../hris/types/EnabledActionsEnum.ts | 2 +- .../resources/hris/types/EncodingEnum.ts | 2 +- .../hris/types/ErrorValidationProblem.ts | 2 +- .../resources/hris/types/EthnicityEnum.ts | 2 +- .../resources/hris/types/EventTypeEnum.ts | 2 +- .../hris/types/ExternalTargetFieldApi.ts | 2 +- .../types/ExternalTargetFieldApiResponse.ts | 10 +- .../hris/types/FieldMappingApiInstance.ts | 2 +- .../FieldMappingApiInstanceRemoteField.ts | 4 +- ...piInstanceRemoteFieldRemoteEndpointInfo.ts | 4 +- .../types/FieldMappingApiInstanceResponse.ts | 10 +- .../FieldMappingApiInstanceTargetField.ts | 2 +- .../types/FieldMappingInstanceResponse.ts | 2 +- .../hris/types/FieldPermissionDeserializer.ts | 6 +- .../FieldPermissionDeserializerRequest.ts | 6 +- .../resources/hris/types/FlsaStatusEnum.ts | 2 +- .../resources/hris/types/GenderEnum.ts | 2 +- .../resources/hris/types/Group.ts | 6 +- .../resources/hris/types/GroupType.ts | 2 +- .../resources/hris/types/GroupTypeEnum.ts | 2 +- .../IndividualCommonModelScopeDeserializer.ts | 4 +- ...dualCommonModelScopeDeserializerRequest.ts | 4 +- .../resources/hris/types/Issue.ts | 6 +- .../resources/hris/types/IssueStatus.ts | 2 +- .../resources/hris/types/IssueStatusEnum.ts | 2 +- .../resources/hris/types/LanguageEnum.ts | 2 +- .../hris/types/LastSyncResultEnum.ts | 2 +- .../resources/hris/types/LinkToken.ts | 2 +- .../hris/types/LinkedAccountStatus.ts | 2 +- .../resources/hris/types/Location.ts | 4 +- .../resources/hris/types/LocationCountry.ts | 2 +- .../hris/types/LocationLocationType.ts | 2 +- .../resources/hris/types/LocationTypeEnum.ts | 2 +- .../resources/hris/types/MaritalStatusEnum.ts | 2 +- .../resources/hris/types/MetaResponse.ts | 8 +- .../resources/hris/types/MethodEnum.ts | 2 +- .../resources/hris/types/ModelOperation.ts | 8 +- .../hris/types/ModelPermissionDeserializer.ts | 2 +- .../ModelPermissionDeserializerRequest.ts | 2 +- .../hris/types/MultipartFormFieldRequest.ts | 2 +- .../MultipartFormFieldRequestEncoding.ts | 2 +- .../PaginatedAccountDetailsAndActionsList.ts | 2 +- .../hris/types/PaginatedAuditLogEventList.ts | 2 +- .../hris/types/PaginatedBankInfoList.ts | 2 +- .../hris/types/PaginatedBenefitList.ts | 2 +- .../hris/types/PaginatedCompanyList.ts | 2 +- .../hris/types/PaginatedDependentList.ts | 2 +- .../hris/types/PaginatedEmployeeList.ts | 2 +- .../types/PaginatedEmployeePayrollRunList.ts | 2 +- .../types/PaginatedEmployerBenefitList.ts | 2 +- .../hris/types/PaginatedEmploymentList.ts | 2 +- .../hris/types/PaginatedGroupList.ts | 2 +- .../hris/types/PaginatedIssueList.ts | 2 +- .../hris/types/PaginatedLocationList.ts | 2 +- .../hris/types/PaginatedPayGroupList.ts | 2 +- .../hris/types/PaginatedPayrollRunList.ts | 2 +- .../hris/types/PaginatedSyncStatusList.ts | 2 +- .../resources/hris/types/PaginatedTeamList.ts | 2 +- .../hris/types/PaginatedTimeOffBalanceList.ts | 2 +- .../hris/types/PaginatedTimeOffList.ts | 2 +- .../hris/types/PaginatedTimesheetEntryList.ts | 2 +- .../resources/hris/types/PayCurrencyEnum.ts | 2 +- .../resources/hris/types/PayFrequencyEnum.ts | 2 +- .../resources/hris/types/PayGroup.ts | 4 +- .../resources/hris/types/PayPeriodEnum.ts | 2 +- .../resources/hris/types/PayrollRun.ts | 4 +- .../hris/types/PayrollRunRunState.ts | 2 +- .../resources/hris/types/PayrollRunRunType.ts | 2 +- .../resources/hris/types/PolicyTypeEnum.ts | 2 +- .../resources/hris/types/ReasonEnum.ts | 2 +- .../resources/hris/types/RelationshipEnum.ts | 2 +- .../resources/hris/types/RemoteData.ts | 2 +- .../hris/types/RemoteEndpointInfo.ts | 4 +- .../resources/hris/types/RemoteFieldApi.ts | 4 +- .../hris/types/RemoteFieldApiCoverage.ts | 2 +- .../hris/types/RemoteFieldApiResponse.ts | 4 +- .../resources/hris/types/RemoteKey.ts | 2 +- .../resources/hris/types/RemoteResponse.ts | 4 +- .../hris/types/RemoteResponseResponseType.ts | 2 +- .../resources/hris/types/RequestFormatEnum.ts | 2 +- .../resources/hris/types/RequestTypeEnum.ts | 2 +- .../resources/hris/types/ResponseTypeEnum.ts | 2 +- .../resources/hris/types/RoleEnum.ts | 2 +- .../resources/hris/types/RunStateEnum.ts | 2 +- .../resources/hris/types/RunTypeEnum.ts | 2 +- .../SelectiveSyncConfigurationsUsageEnum.ts | 2 +- .../resources/hris/types/StatusFd5Enum.ts | 2 +- .../resources/hris/types/SyncStatus.ts | 4 +- .../hris/types/SyncStatusLastSyncResult.ts | 2 +- src/serialization/resources/hris/types/Tax.ts | 6 +- .../resources/hris/types/Team.ts | 6 +- .../resources/hris/types/TeamParentTeam.ts | 2 +- .../resources/hris/types/TimeOff.ts | 4 +- .../resources/hris/types/TimeOffApprover.ts | 2 +- .../resources/hris/types/TimeOffBalance.ts | 4 +- .../hris/types/TimeOffBalanceEmployee.ts | 2 +- .../hris/types/TimeOffBalancePolicyType.ts | 2 +- .../resources/hris/types/TimeOffEmployee.ts | 2 +- .../resources/hris/types/TimeOffRequest.ts | 6 +- .../hris/types/TimeOffRequestApprover.ts | 2 +- .../hris/types/TimeOffRequestEmployee.ts | 2 +- .../hris/types/TimeOffRequestRequestType.ts | 2 +- .../hris/types/TimeOffRequestStatus.ts | 2 +- .../hris/types/TimeOffRequestType.ts | 2 +- .../hris/types/TimeOffRequestUnits.ts | 2 +- .../resources/hris/types/TimeOffResponse.ts | 2 +- .../resources/hris/types/TimeOffStatus.ts | 2 +- .../resources/hris/types/TimeOffStatusEnum.ts | 2 +- .../resources/hris/types/TimeOffUnits.ts | 2 +- .../resources/hris/types/TimesheetEntry.ts | 4 +- .../hris/types/TimesheetEntryEmployee.ts | 2 +- .../hris/types/TimesheetEntryRequest.ts | 6 +- .../types/TimesheetEntryRequestEmployee.ts | 2 +- .../hris/types/TimesheetEntryResponse.ts | 2 +- .../resources/hris/types/UnitsEnum.ts | 2 +- .../hris/types/ValidationProblemSource.ts | 2 +- .../hris/types/WarningValidationProblem.ts | 2 +- .../resources/hris/types/WebhookReceiver.ts | 2 +- src/serialization/resources/index.ts | 4 +- .../types/AsyncPassthroughRetrieveResponse.ts | 2 +- .../TicketingAttachmentEndpointRequest.ts | 2 +- .../CollectionsViewersListRequestExpand.ts | 2 +- .../client/requests/CommentEndpointRequest.ts | 2 +- .../types/CommentsListRequestExpand.ts | 2 +- .../types/CommentsRetrieveRequestExpand.ts | 2 +- .../TicketingContactEndpointRequest.ts | 2 +- .../requests/CreateFieldMappingRequest.ts | 4 +- .../PatchedEditFieldMappingRequest.ts | 4 +- .../client/syncStatusResyncCreate.ts | 2 +- .../requests/GenerateRemoteKeyRequest.ts | 2 +- .../issues/types/IssuesListRequestStatus.ts | 2 +- .../client/requests/EndUserDetailsRequest.ts | 12 +- .../LinkedAccountsListRequestCategory.ts | 2 +- .../types/ProjectsUsersListRequestExpand.ts | 2 +- .../RemoteKeyForRegenerationRequest.ts | 2 +- ...ountCommonModelScopeDeserializerRequest.ts | 4 +- .../requests/PatchedTicketEndpointRequest.ts | 2 +- .../client/requests/TicketEndpointRequest.ts | 2 +- .../tickets/types/TicketsListRequestExpand.ts | 2 +- .../types/TicketsListRequestPriority.ts | 2 +- .../types/TicketsListRequestRemoteFields.ts | 2 +- .../TicketsListRequestShowEnumOrigins.ts | 2 +- .../types/TicketsRetrieveRequestExpand.ts | 2 +- .../TicketsRetrieveRequestRemoteFields.ts | 2 +- .../TicketsRetrieveRequestShowEnumOrigins.ts | 2 +- .../types/TicketsViewersListRequestExpand.ts | 2 +- .../users/types/UsersListRequestExpand.ts | 2 +- .../users/types/UsersRetrieveRequestExpand.ts | 2 +- .../resources/webhookReceivers/client/list.ts | 2 +- .../client/requests/WebhookReceiverRequest.ts | 2 +- .../ticketing/types/AccessLevelEnum.ts | 2 +- .../resources/ticketing/types/Account.ts | 4 +- .../ticketing/types/AccountDetails.ts | 4 +- .../types/AccountDetailsAndActions.ts | 2 +- .../AccountDetailsAndActionsIntegration.ts | 4 +- .../AccountDetailsAndActionsStatusEnum.ts | 2 +- .../ticketing/types/AccountIntegration.ts | 8 +- .../resources/ticketing/types/AccountToken.ts | 2 +- .../ticketing/types/AdvancedMetadata.ts | 4 +- .../types/AsyncPassthroughReciept.ts | 2 +- .../resources/ticketing/types/Attachment.ts | 4 +- .../ticketing/types/AttachmentRequest.ts | 6 +- .../types/AttachmentRequestTicket.ts | 2 +- .../ticketing/types/AttachmentTicket.ts | 2 +- .../ticketing/types/AuditLogEvent.ts | 2 +- .../ticketing/types/AuditLogEventEventType.ts | 2 +- .../ticketing/types/AuditLogEventRole.ts | 2 +- .../ticketing/types/AvailableActions.ts | 4 +- .../ticketing/types/CategoriesEnum.ts | 2 +- .../resources/ticketing/types/CategoryEnum.ts | 2 +- .../resources/ticketing/types/Collection.ts | 6 +- .../ticketing/types/CollectionAccessLevel.ts | 2 +- .../types/CollectionCollectionType.ts | 2 +- .../types/CollectionParentCollection.ts | 2 +- .../ticketing/types/CollectionTypeEnum.ts | 2 +- .../resources/ticketing/types/Comment.ts | 4 +- .../ticketing/types/CommentContact.ts | 2 +- .../ticketing/types/CommentRequest.ts | 6 +- .../ticketing/types/CommentRequestContact.ts | 2 +- .../ticketing/types/CommentRequestTicket.ts | 2 +- .../ticketing/types/CommentRequestUser.ts | 2 +- .../ticketing/types/CommentResponse.ts | 2 +- .../ticketing/types/CommentTicket.ts | 2 +- .../resources/ticketing/types/CommentUser.ts | 2 +- .../ticketing/types/CommonModelScopeApi.ts | 4 +- .../types/CommonModelScopesBodyRequest.ts | 4 +- .../resources/ticketing/types/Contact.ts | 4 +- .../ticketing/types/ContactAccount.ts | 2 +- .../ticketing/types/ContactRequest.ts | 6 +- .../ticketing/types/ContactRequestAccount.ts | 2 +- .../ticketing/types/DataPassthroughRequest.ts | 4 +- .../resources/ticketing/types/DebugModeLog.ts | 2 +- .../ticketing/types/DebugModelLogSummary.ts | 2 +- .../ticketing/types/EnabledActionsEnum.ts | 2 +- .../resources/ticketing/types/EncodingEnum.ts | 2 +- .../ticketing/types/ErrorValidationProblem.ts | 2 +- .../ticketing/types/EventTypeEnum.ts | 2 +- .../ticketing/types/ExternalTargetFieldApi.ts | 2 +- .../types/ExternalTargetFieldApiResponse.ts | 2 +- .../ticketing/types/FieldFormatEnum.ts | 2 +- .../types/FieldMappingApiInstance.ts | 2 +- .../FieldMappingApiInstanceRemoteField.ts | 4 +- ...piInstanceRemoteFieldRemoteEndpointInfo.ts | 4 +- .../types/FieldMappingApiInstanceResponse.ts | 2 +- .../FieldMappingApiInstanceTargetField.ts | 2 +- .../types/FieldMappingInstanceResponse.ts | 2 +- .../types/FieldPermissionDeserializer.ts | 6 +- .../FieldPermissionDeserializerRequest.ts | 6 +- .../ticketing/types/FieldTypeEnum.ts | 2 +- .../IndividualCommonModelScopeDeserializer.ts | 4 +- ...dualCommonModelScopeDeserializerRequest.ts | 4 +- .../resources/ticketing/types/Issue.ts | 6 +- .../resources/ticketing/types/IssueStatus.ts | 2 +- .../ticketing/types/IssueStatusEnum.ts | 2 +- .../ticketing/types/ItemFormatEnum.ts | 2 +- .../resources/ticketing/types/ItemSchema.ts | 4 +- .../resources/ticketing/types/ItemTypeEnum.ts | 2 +- .../resources/ticketing/types/LanguageEnum.ts | 2 +- .../ticketing/types/LastSyncResultEnum.ts | 2 +- .../resources/ticketing/types/LinkToken.ts | 2 +- .../ticketing/types/LinkedAccountStatus.ts | 2 +- .../resources/ticketing/types/MetaResponse.ts | 8 +- .../resources/ticketing/types/MethodEnum.ts | 2 +- .../ticketing/types/ModelOperation.ts | 8 +- .../types/ModelPermissionDeserializer.ts | 2 +- .../ModelPermissionDeserializerRequest.ts | 2 +- .../types/MultipartFormFieldRequest.ts | 2 +- .../MultipartFormFieldRequestEncoding.ts | 2 +- .../PaginatedAccountDetailsAndActionsList.ts | 2 +- .../ticketing/types/PaginatedAccountList.ts | 2 +- .../types/PaginatedAttachmentList.ts | 2 +- .../types/PaginatedAuditLogEventList.ts | 2 +- .../types/PaginatedCollectionList.ts | 2 +- .../ticketing/types/PaginatedCommentList.ts | 2 +- .../ticketing/types/PaginatedContactList.ts | 2 +- .../ticketing/types/PaginatedIssueList.ts | 2 +- .../ticketing/types/PaginatedProjectList.ts | 2 +- .../types/PaginatedRemoteFieldClassList.ts | 2 +- .../ticketing/types/PaginatedRoleList.ts | 2 +- .../types/PaginatedSyncStatusList.ts | 2 +- .../ticketing/types/PaginatedTagList.ts | 2 +- .../ticketing/types/PaginatedTeamList.ts | 2 +- .../ticketing/types/PaginatedTicketList.ts | 2 +- .../ticketing/types/PaginatedUserList.ts | 2 +- .../ticketing/types/PaginatedViewerList.ts | 2 +- .../ticketing/types/PatchedTicketRequest.ts | 8 +- .../types/PatchedTicketRequestPriority.ts | 2 +- .../types/PatchedTicketRequestStatus.ts | 2 +- .../resources/ticketing/types/PriorityEnum.ts | 2 +- .../resources/ticketing/types/Project.ts | 4 +- .../resources/ticketing/types/RemoteData.ts | 2 +- .../ticketing/types/RemoteEndpointInfo.ts | 4 +- .../resources/ticketing/types/RemoteField.ts | 2 +- .../ticketing/types/RemoteFieldApi.ts | 4 +- .../ticketing/types/RemoteFieldApiCoverage.ts | 2 +- .../ticketing/types/RemoteFieldApiResponse.ts | 2 +- .../ticketing/types/RemoteFieldClass.ts | 4 +- .../types/RemoteFieldClassFieldChoicesItem.ts | 2 +- .../types/RemoteFieldClassFieldFormat.ts | 2 +- .../types/RemoteFieldClassFieldType.ts | 2 +- .../types/RemoteFieldRemoteFieldClass.ts | 2 +- .../ticketing/types/RemoteFieldRequest.ts | 2 +- .../RemoteFieldRequestRemoteFieldClass.ts | 2 +- .../resources/ticketing/types/RemoteKey.ts | 2 +- .../ticketing/types/RemoteResponse.ts | 4 +- .../ticketing/types/RequestFormatEnum.ts | 2 +- .../ticketing/types/ResponseTypeEnum.ts | 2 +- .../resources/ticketing/types/Role.ts | 6 +- .../resources/ticketing/types/RoleEnum.ts | 2 +- .../ticketing/types/RoleTicketAccess.ts | 2 +- .../ticketing/types/RoleTicketActionsItem.ts | 2 +- .../SelectiveSyncConfigurationsUsageEnum.ts | 2 +- .../ticketing/types/StatusFd5Enum.ts | 2 +- .../resources/ticketing/types/SyncStatus.ts | 4 +- .../resources/ticketing/types/Tag.ts | 4 +- .../resources/ticketing/types/Team.ts | 4 +- .../resources/ticketing/types/Ticket.ts | 8 +- .../ticketing/types/TicketAccessEnum.ts | 2 +- .../ticketing/types/TicketAccount.ts | 2 +- .../ticketing/types/TicketActionsEnum.ts | 2 +- .../types/TicketAssignedTeamsItem.ts | 2 +- .../ticketing/types/TicketAssigneesItem.ts | 2 +- .../ticketing/types/TicketAttachmentsItem.ts | 2 +- .../ticketing/types/TicketCollectionsItem.ts | 2 +- .../ticketing/types/TicketContact.ts | 2 +- .../ticketing/types/TicketCreator.ts | 2 +- .../ticketing/types/TicketParentTicket.ts | 2 +- .../ticketing/types/TicketPriority.ts | 2 +- .../ticketing/types/TicketRequest.ts | 8 +- .../ticketing/types/TicketRequestAccount.ts | 2 +- .../types/TicketRequestAssignedTeamsItem.ts | 2 +- .../types/TicketRequestAssigneesItem.ts | 2 +- .../types/TicketRequestAttachmentsItem.ts | 2 +- .../types/TicketRequestCollectionsItem.ts | 2 +- .../ticketing/types/TicketRequestContact.ts | 2 +- .../ticketing/types/TicketRequestCreator.ts | 2 +- .../types/TicketRequestParentTicket.ts | 2 +- .../ticketing/types/TicketRequestPriority.ts | 2 +- .../ticketing/types/TicketRequestStatus.ts | 2 +- .../ticketing/types/TicketResponse.ts | 2 +- .../resources/ticketing/types/TicketStatus.ts | 2 +- .../ticketing/types/TicketStatusEnum.ts | 2 +- .../types/TicketingAttachmentResponse.ts | 2 +- .../types/TicketingContactResponse.ts | 2 +- .../resources/ticketing/types/User.ts | 4 +- .../ticketing/types/UserRolesItem.ts | 2 +- .../ticketing/types/UserTeamsItem.ts | 2 +- .../types/ValidationProblemSource.ts | 2 +- .../resources/ticketing/types/Viewer.ts | 2 +- .../resources/ticketing/types/ViewerTeam.ts | 2 +- .../resources/ticketing/types/ViewerUser.ts | 2 +- .../types/WarningValidationProblem.ts | 2 +- .../ticketing/types/WebhookReceiver.ts | 2 +- src/version.ts | 2 +- tests/unit/auth/BasicAuth.test.ts | 2 +- tests/unit/fetcher/Fetcher.test.ts | 7 +- .../unit/fetcher/HttpResponsePromise.test.ts | 143 + tests/unit/fetcher/RawResponse.test.ts | 34 + tests/unit/fetcher/createRequestUrl.test.ts | 4 +- tests/unit/fetcher/makeRequest.test.ts | 5 +- tests/unit/fetcher/requestWithRetries.test.ts | 13 +- .../Node18UniversalStreamWrapper.test.ts | 2 +- .../NodePre18StreamWrapper.test.ts | 2 +- .../UndiciStreamWrapper.test.ts | 2 +- .../chooseStreamWrapper.test.ts | 2 +- .../fetcher/stream-wrappers/webpack.test.ts | 10 +- tests/unit/zurg/bigint/bigint.test.ts | 38 +- tests/unit/zurg/enum/enum.test.ts | 2 +- tests/unit/zurg/lazy/lazy.test.ts | 4 +- tests/unit/zurg/lazy/lazyObject.test.ts | 4 +- tests/unit/zurg/list/list.test.ts | 6 +- tests/unit/zurg/object/extend.test.ts | 18 +- tests/unit/zurg/object/object.test.ts | 28 +- .../objectWithoutOptionalProperties.test.ts | 2 +- tests/unit/zurg/object/passthrough.test.ts | 4 +- tests/unit/zurg/record/record.test.ts | 2 +- .../zurg/schema-utils/getSchemaUtils.test.ts | 6 +- tests/unit/zurg/schema.test.ts | 6 +- tests/unit/zurg/set/set.test.ts | 4 +- tests/unit/zurg/skipValidation.test.ts | 3 +- .../undiscriminatedUnion.test.ts | 2 +- tests/unit/zurg/union/union.test.ts | 12 +- tests/unit/zurg/utils/itSchema.ts | 8 +- tests/unit/zurg/utils/itValidate.ts | 6 +- tsconfig.json | 4 +- yarn.lock | 311 +- 2203 files changed, 19245 insertions(+), 12754 deletions(-) rename jest.config.js => jest.config.mjs (55%) create mode 100644 scripts/rename-to-esm-files.js create mode 100644 src/core/fetcher/HttpResponsePromise.ts create mode 100644 src/core/fetcher/RawResponse.ts create mode 100644 src/core/json.ts create mode 100644 tests/unit/fetcher/HttpResponsePromise.test.ts create mode 100644 tests/unit/fetcher/RawResponse.test.ts diff --git a/jest.config.js b/jest.config.mjs similarity index 55% rename from jest.config.js rename to jest.config.mjs index 35d6e65bf..c7248211d 100644 --- a/jest.config.js +++ b/jest.config.mjs @@ -1,5 +1,8 @@ /** @type {import('jest').Config} */ -module.exports = { +export default { preset: "ts-jest", testEnvironment: "node", + moduleNameMapper: { + "(.+)\.js$": "$1", + }, }; diff --git a/package.json b/package.json index 8c8a2f176..b1cf2ddf4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mergeapi/merge-node-client", - "version": "1.1.6", + "version": "1.1.7", "private": false, "repository": "https://github.com/merge-api/merge-node-client", "main": "./index.js", @@ -15,29 +15,30 @@ "url-join": "4.0.1", "form-data": "^4.0.0", "formdata-node": "^6.0.3", - "node-fetch": "2.7.0", - "qs": "6.11.2", + "node-fetch": "^2.7.0", + "qs": "^6.13.1", "readable-stream": "^4.5.2", - "js-base64": "3.7.2" + "js-base64": "3.7.7" }, "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" + "@types/qs": "^6.9.17", + "@types/node-fetch": "^2.6.12", + "@types/readable-stream": "^4.0.18", + "webpack": "^5.97.1", + "ts-loader": "^9.5.1", + "jest": "^29.7.0", + "@types/jest": "^29.5.14", + "ts-jest": "^29.1.1", + "jest-environment-jsdom": "^29.7.0", + "@types/node": "^18.19.70", + "prettier": "^3.4.2", + "typescript": "~5.7.2" }, "browser": { "fs": false, "os": false, "path": false - } + }, + "packageManager": "yarn@1.22.22" } diff --git a/reference.md b/reference.md index 369024095..a086afbdb 100644 --- a/reference.md +++ b/reference.md @@ -1,8 +1,8 @@ # Reference -## Crm AccountDetails +## Filestorage AccountDetails -
client.crm.accountDetails.retrieve() -> Merge.AccountDetails +
client.filestorage.accountDetails.retrieve() -> Merge.AccountDetails
@@ -30,7 +30,7 @@ Get details for a linked account.
```typescript -await client.crm.accountDetails.retrieve(); +await client.filestorage.accountDetails.retrieve(); ```
@@ -57,9 +57,9 @@ await client.crm.accountDetails.retrieve();
-## Crm AccountToken +## Filestorage AccountToken -
client.crm.accountToken.retrieve(publicToken) -> Merge.AccountToken +
client.filestorage.accountToken.retrieve(publicToken) -> Merge.AccountToken
@@ -87,7 +87,7 @@ Returns the account token for the end user with the provided public token.
```typescript -await client.crm.accountToken.retrieve("public_token"); +await client.filestorage.accountToken.retrieve("public_token"); ```
@@ -122,9 +122,9 @@ await client.crm.accountToken.retrieve("public_token");
-## Crm Accounts +## Filestorage AsyncPassthrough -
client.crm.accounts.list({ ...params }) -> Merge.PaginatedAccountList +
client.filestorage.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept
@@ -136,7 +136,7 @@ await client.crm.accountToken.retrieve("public_token");
-Returns a list of `Account` objects. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -152,7 +152,10 @@ Returns a list of `Account` objects.
```typescript -await client.crm.accounts.list(); +await client.filestorage.asyncPassthrough.create({ + method: "GET", + path: "/scooters", +}); ```
@@ -168,7 +171,7 @@ await client.crm.accounts.list();
-**request:** `Merge.crm.AccountsListRequest` +**request:** `Merge.DataPassthroughRequest`
@@ -176,7 +179,7 @@ await client.crm.accounts.list();
-**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -187,7 +190,7 @@ await client.crm.accounts.list();
-
client.crm.accounts.create({ ...params }) -> Merge.CrmAccountResponse +
client.filestorage.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse
@@ -199,7 +202,7 @@ await client.crm.accounts.list();
-Creates an `Account` object with the given values. +Retrieves data from earlier async-passthrough POST request
@@ -215,9 +218,7 @@ Creates an `Account` object with the given values.
```typescript -await client.crm.accounts.create({ - model: {}, -}); +await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id"); ```
@@ -233,7 +234,7 @@ await client.crm.accounts.create({
-**request:** `Merge.crm.CrmAccountEndpointRequest` +**asyncPassthroughReceiptId:** `string`
@@ -241,7 +242,7 @@ await client.crm.accounts.create({
-**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -252,7 +253,9 @@ await client.crm.accounts.create({
-
client.crm.accounts.retrieve(id, { ...params }) -> Merge.Account +## Filestorage AuditTrail + +
client.filestorage.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList
@@ -264,7 +267,7 @@ await client.crm.accounts.create({
-Returns an `Account` object with the given `id`. +Gets a list of audit trail events.
@@ -280,7 +283,7 @@ Returns an `Account` object with the given `id`.
```typescript -await client.crm.accounts.retrieve("id"); +await client.filestorage.auditTrail.list(); ```
@@ -296,15 +299,7 @@ await client.crm.accounts.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.AccountsRetrieveRequest` +**request:** `Merge.filestorage.AuditTrailListRequest`
@@ -312,7 +307,7 @@ await client.crm.accounts.retrieve("id");
-**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `AuditTrail.RequestOptions`
@@ -323,7 +318,9 @@ await client.crm.accounts.retrieve("id");
-
client.crm.accounts.partialUpdate(id, { ...params }) -> Merge.CrmAccountResponse +## Filestorage AvailableActions + +
client.filestorage.availableActions.retrieve() -> Merge.AvailableActions
@@ -335,7 +332,7 @@ await client.crm.accounts.retrieve("id");
-Updates an `Account` object with the given `id`. +Returns a list of models and actions available for an account.
@@ -351,9 +348,7 @@ Updates an `Account` object with the given `id`.
```typescript -await client.crm.accounts.partialUpdate("id", { - model: {}, -}); +await client.filestorage.availableActions.retrieve(); ```
@@ -369,23 +364,7 @@ await client.crm.accounts.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedCrmAccountEndpointRequest` - -
-
- -
-
- -**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `AvailableActions.RequestOptions`
@@ -396,7 +375,9 @@ await client.crm.accounts.partialUpdate("id", {
-
client.crm.accounts.metaPatchRetrieve(id) -> Merge.MetaResponse +## Filestorage Scopes + +
client.filestorage.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -408,7 +389,7 @@ await client.crm.accounts.partialUpdate("id", {
-Returns metadata for `CRMAccount` PATCHs. +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).
@@ -424,7 +405,7 @@ Returns metadata for `CRMAccount` PATCHs.
```typescript -await client.crm.accounts.metaPatchRetrieve("id"); +await client.filestorage.scopes.defaultScopesRetrieve(); ```
@@ -440,15 +421,7 @@ await client.crm.accounts.metaPatchRetrieve("id");
-**id:** `string` - -
-
- -
-
- -**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -459,7 +432,7 @@ await client.crm.accounts.metaPatchRetrieve("id");
-
client.crm.accounts.metaPostRetrieve() -> Merge.MetaResponse +
client.filestorage.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -471,7 +444,7 @@ await client.crm.accounts.metaPatchRetrieve("id");
-Returns metadata for `CRMAccount` POSTs. +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).
@@ -487,7 +460,7 @@ Returns metadata for `CRMAccount` POSTs.
```typescript -await client.crm.accounts.metaPostRetrieve(); +await client.filestorage.scopes.linkedAccountScopesRetrieve(); ```
@@ -503,7 +476,7 @@ await client.crm.accounts.metaPostRetrieve();
-**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -514,7 +487,7 @@ await client.crm.accounts.metaPostRetrieve();
-
client.crm.accounts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.filestorage.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi
@@ -526,7 +499,7 @@ await client.crm.accounts.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +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)
@@ -542,7 +515,33 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.accounts.remoteFieldClassesList(); +await client.filestorage.scopes.linkedAccountScopesCreate({ + commonModels: [ + { + modelName: "Employee", + modelPermissions: { + READ: { + isEnabled: true, + }, + WRITE: { + isEnabled: false, + }, + }, + fieldPermissions: { + enabledFields: ["avatar", "home_location"], + disabledFields: ["work_location"], + }, + }, + { + modelName: "Benefit", + modelPermissions: { + WRITE: { + isEnabled: false, + }, + }, + }, + ], +}); ```
@@ -558,7 +557,7 @@ await client.crm.accounts.remoteFieldClassesList();
-**request:** `Merge.crm.AccountsRemoteFieldClassesListRequest` +**request:** `Merge.filestorage.LinkedAccountCommonModelScopeDeserializerRequest`
@@ -566,7 +565,7 @@ await client.crm.accounts.remoteFieldClassesList();
-**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -577,9 +576,9 @@ await client.crm.accounts.remoteFieldClassesList();
-## Crm AsyncPassthrough +## Filestorage DeleteAccount -
client.crm.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept +
client.filestorage.deleteAccount.delete() -> void
@@ -591,7 +590,7 @@ await client.crm.accounts.remoteFieldClassesList();
-Asynchronously pull data from an endpoint not currently supported by Merge. +Delete a linked account.
@@ -607,10 +606,7 @@ Asynchronously pull data from an endpoint not currently supported by Merge.
```typescript -await client.crm.asyncPassthrough.create({ - method: "GET", - path: "/scooters", -}); +await client.filestorage.deleteAccount.delete(); ```
@@ -626,15 +622,7 @@ await client.crm.asyncPassthrough.create({
-**request:** `Merge.DataPassthroughRequest` - -
-
- -
-
- -**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `DeleteAccount.RequestOptions`
@@ -645,7 +633,9 @@ await client.crm.asyncPassthrough.create({
-
client.crm.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse +## Filestorage Drives + +
client.filestorage.drives.list({ ...params }) -> Merge.PaginatedDriveList
@@ -657,7 +647,7 @@ await client.crm.asyncPassthrough.create({
-Retrieves data from earlier async-passthrough POST request +Returns a list of `Drive` objects.
@@ -673,7 +663,7 @@ Retrieves data from earlier async-passthrough POST request
```typescript -await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id"); +await client.filestorage.drives.list(); ```
@@ -689,7 +679,7 @@ await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-**asyncPassthroughReceiptId:** `string` +**request:** `Merge.filestorage.DrivesListRequest`
@@ -697,7 +687,7 @@ await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `Drives.RequestOptions`
@@ -708,9 +698,7 @@ await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-## Crm AuditTrail - -
client.crm.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList +
client.filestorage.drives.retrieve(id, { ...params }) -> Merge.Drive
@@ -722,7 +710,7 @@ await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-Gets a list of audit trail events. +Returns a `Drive` object with the given `id`.
@@ -738,7 +726,7 @@ Gets a list of audit trail events.
```typescript -await client.crm.auditTrail.list(); +await client.filestorage.drives.retrieve("id"); ```
@@ -754,7 +742,7 @@ await client.crm.auditTrail.list();
-**request:** `Merge.crm.AuditTrailListRequest` +**id:** `string`
@@ -762,7 +750,15 @@ await client.crm.auditTrail.list();
-**requestOptions:** `AuditTrail.RequestOptions` +**request:** `Merge.filestorage.DrivesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Drives.RequestOptions`
@@ -773,9 +769,9 @@ await client.crm.auditTrail.list();
-## Crm AvailableActions +## Filestorage FieldMapping -
client.crm.availableActions.retrieve() -> Merge.AvailableActions +
client.filestorage.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse
@@ -787,7 +783,7 @@ await client.crm.auditTrail.list();
-Returns a list of models and actions available for an account. +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/).
@@ -803,7 +799,7 @@ Returns a list of models and actions available for an account.
```typescript -await client.crm.availableActions.retrieve(); +await client.filestorage.fieldMapping.fieldMappingsRetrieve(); ```
@@ -819,7 +815,15 @@ await client.crm.availableActions.retrieve();
-**requestOptions:** `AvailableActions.RequestOptions` +**request:** `Merge.filestorage.FieldMappingsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions`
@@ -830,9 +834,7 @@ await client.crm.availableActions.retrieve();
-## Crm Contacts - -
client.crm.contacts.list({ ...params }) -> Merge.PaginatedContactList +
client.filestorage.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse
@@ -844,7 +846,7 @@ await client.crm.availableActions.retrieve();
-Returns a list of `Contact` objects. +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.
@@ -860,7 +862,14 @@ Returns a list of `Contact` objects.
```typescript -await client.crm.contacts.list(); +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", +}); ```
@@ -876,7 +885,7 @@ await client.crm.contacts.list();
-**request:** `Merge.crm.ContactsListRequest` +**request:** `Merge.filestorage.CreateFieldMappingRequest`
@@ -884,7 +893,7 @@ await client.crm.contacts.list();
-**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -895,7 +904,7 @@ await client.crm.contacts.list();
-
client.crm.contacts.create({ ...params }) -> Merge.CrmContactResponse +
client.filestorage.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse
@@ -907,7 +916,7 @@ await client.crm.contacts.list();
-Creates a `Contact` object with the given values. +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.
@@ -923,9 +932,7 @@ Creates a `Contact` object with the given values.
```typescript -await client.crm.contacts.create({ - model: {}, -}); +await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id"); ```
@@ -941,7 +948,7 @@ await client.crm.contacts.create({
-**request:** `Merge.crm.CrmContactEndpointRequest` +**fieldMappingId:** `string`
@@ -949,7 +956,7 @@ await client.crm.contacts.create({
-**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -960,7 +967,7 @@ await client.crm.contacts.create({
-
client.crm.contacts.retrieve(id, { ...params }) -> Merge.Contact +
client.filestorage.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse
@@ -972,7 +979,7 @@ await client.crm.contacts.create({
-Returns a `Contact` object with the given `id`. +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.
@@ -988,7 +995,7 @@ Returns a `Contact` object with the given `id`.
```typescript -await client.crm.contacts.retrieve("id"); +await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); ```
@@ -1004,7 +1011,7 @@ await client.crm.contacts.retrieve("id");
-**id:** `string` +**fieldMappingId:** `string`
@@ -1012,7 +1019,7 @@ await client.crm.contacts.retrieve("id");
-**request:** `Merge.crm.ContactsRetrieveRequest` +**request:** `Merge.filestorage.PatchedEditFieldMappingRequest`
@@ -1020,7 +1027,7 @@ await client.crm.contacts.retrieve("id");
-**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -1031,7 +1038,7 @@ await client.crm.contacts.retrieve("id");
-
client.crm.contacts.partialUpdate(id, { ...params }) -> Merge.CrmContactResponse +
client.filestorage.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse
@@ -1043,7 +1050,7 @@ await client.crm.contacts.retrieve("id");
-Updates a `Contact` object with the given `id`. +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/).
@@ -1059,9 +1066,7 @@ Updates a `Contact` object with the given `id`.
```typescript -await client.crm.contacts.partialUpdate("id", { - model: {}, -}); +await client.filestorage.fieldMapping.remoteFieldsRetrieve(); ```
@@ -1077,15 +1082,7 @@ await client.crm.contacts.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedCrmContactEndpointRequest` +**request:** `Merge.filestorage.RemoteFieldsRetrieveRequest`
@@ -1093,7 +1090,7 @@ await client.crm.contacts.partialUpdate("id", {
-**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -1104,7 +1101,7 @@ await client.crm.contacts.partialUpdate("id", {
-
client.crm.contacts.ignoreCreate(modelId, { ...params }) -> void +
client.filestorage.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse
@@ -1116,7 +1113,7 @@ await client.crm.contacts.partialUpdate("id", {
-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. +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/).
@@ -1132,9 +1129,7 @@ Ignores a specific row based on the `model_id` in the url. These records will ha
```typescript -await client.crm.contacts.ignoreCreate("model_id", { - reason: "GENERAL_CUSTOMER_REQUEST", -}); +await client.filestorage.fieldMapping.targetFieldsRetrieve(); ```
@@ -1150,23 +1145,7 @@ await client.crm.contacts.ignoreCreate("model_id", {
-**modelId:** `string` - -
-
- -
-
- -**request:** `Merge.IgnoreCommonModelRequest` - -
-
- -
-
- -**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -1177,7 +1156,9 @@ await client.crm.contacts.ignoreCreate("model_id", {
-
client.crm.contacts.metaPatchRetrieve(id) -> Merge.MetaResponse +## Filestorage Files + +
client.filestorage.files.list({ ...params }) -> Merge.PaginatedFileList
@@ -1189,7 +1170,7 @@ await client.crm.contacts.ignoreCreate("model_id", {
-Returns metadata for `CRMContact` PATCHs. +Returns a list of `File` objects.
@@ -1205,7 +1186,7 @@ Returns metadata for `CRMContact` PATCHs.
```typescript -await client.crm.contacts.metaPatchRetrieve("id"); +await client.filestorage.files.list(); ```
@@ -1221,7 +1202,7 @@ await client.crm.contacts.metaPatchRetrieve("id");
-**id:** `string` +**request:** `Merge.filestorage.FilesListRequest`
@@ -1229,7 +1210,7 @@ await client.crm.contacts.metaPatchRetrieve("id");
-**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `Files.RequestOptions`
@@ -1240,7 +1221,7 @@ await client.crm.contacts.metaPatchRetrieve("id");
-
client.crm.contacts.metaPostRetrieve() -> Merge.MetaResponse +
client.filestorage.files.create({ ...params }) -> Merge.FileStorageFileResponse
@@ -1252,7 +1233,7 @@ await client.crm.contacts.metaPatchRetrieve("id");
-Returns metadata for `CRMContact` POSTs. +Creates a `File` object with the given values.
@@ -1268,7 +1249,9 @@ Returns metadata for `CRMContact` POSTs.
```typescript -await client.crm.contacts.metaPostRetrieve(); +await client.filestorage.files.create({ + model: {}, +}); ```
@@ -1284,7 +1267,15 @@ await client.crm.contacts.metaPostRetrieve();
-**requestOptions:** `Contacts.RequestOptions` +**request:** `Merge.filestorage.FileStorageFileEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions`
@@ -1295,7 +1286,7 @@ await client.crm.contacts.metaPostRetrieve();
-
client.crm.contacts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.filestorage.files.retrieve(id, { ...params }) -> Merge.File_
@@ -1307,7 +1298,7 @@ await client.crm.contacts.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Returns a `File` object with the given `id`.
@@ -1323,7 +1314,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.contacts.remoteFieldClassesList(); +await client.filestorage.files.retrieve("id"); ```
@@ -1339,7 +1330,7 @@ await client.crm.contacts.remoteFieldClassesList();
-**request:** `Merge.crm.ContactsRemoteFieldClassesListRequest` +**id:** `string`
@@ -1347,7 +1338,15 @@ await client.crm.contacts.remoteFieldClassesList();
-**requestOptions:** `Contacts.RequestOptions` +**request:** `Merge.filestorage.FilesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions`
@@ -1358,9 +1357,7 @@ await client.crm.contacts.remoteFieldClassesList();
-## Crm CustomObjectClasses - -
client.crm.customObjectClasses.list({ ...params }) -> Merge.PaginatedCustomObjectClassList +
client.filestorage.files.downloadRetrieve(id, { ...params }) -> stream.Readable
@@ -1372,7 +1369,7 @@ await client.crm.contacts.remoteFieldClassesList();
-Returns a list of `CustomObjectClass` objects. +Returns the `File` content with the given `id` as a stream of bytes.
@@ -1388,7 +1385,10 @@ Returns a list of `CustomObjectClass` objects.
```typescript -await client.crm.customObjectClasses.list(); +await client.filestorage.files.downloadRetrieve("string", { + includeShellData: true, + mimeType: "string", +}); ```
@@ -1404,7 +1404,7 @@ await client.crm.customObjectClasses.list();
-**request:** `Merge.crm.CustomObjectClassesListRequest` +**id:** `string`
@@ -1412,7 +1412,15 @@ await client.crm.customObjectClasses.list();
-**requestOptions:** `CustomObjectClasses.RequestOptions` +**request:** `Merge.filestorage.FilesDownloadRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions`
@@ -1423,7 +1431,7 @@ await client.crm.customObjectClasses.list();
-
client.crm.customObjectClasses.retrieve(id, { ...params }) -> Merge.CustomObjectClass +
client.filestorage.files.downloadRequestMetaRetrieve(id, { ...params }) -> Merge.DownloadRequestMeta
@@ -1435,7 +1443,7 @@ await client.crm.customObjectClasses.list();
-Returns a `CustomObjectClass` object with the given `id`. +Returns metadata to construct an authenticated file download request for a singular file, allowing you to download file directly from the third-party.
@@ -1451,7 +1459,7 @@ Returns a `CustomObjectClass` object with the given `id`.
```typescript -await client.crm.customObjectClasses.retrieve("id"); +await client.filestorage.files.downloadRequestMetaRetrieve("id"); ```
@@ -1475,7 +1483,7 @@ await client.crm.customObjectClasses.retrieve("id");
-**request:** `Merge.crm.CustomObjectClassesRetrieveRequest` +**request:** `Merge.filestorage.FilesDownloadRequestMetaRetrieveRequest`
@@ -1483,7 +1491,7 @@ await client.crm.customObjectClasses.retrieve("id");
-**requestOptions:** `CustomObjectClasses.RequestOptions` +**requestOptions:** `Files.RequestOptions`
@@ -1494,9 +1502,7 @@ await client.crm.customObjectClasses.retrieve("id");
-## Crm AssociationTypes - -
client.crm.associationTypes.customObjectClassesAssociationTypesList(customObjectClassId, { ...params }) -> Merge.PaginatedAssociationTypeList +
client.filestorage.files.downloadRequestMetaList({ ...params }) -> Merge.PaginatedDownloadRequestMetaList
@@ -1508,7 +1514,7 @@ await client.crm.customObjectClasses.retrieve("id");
-Returns a list of `AssociationType` objects. +Returns metadata to construct authenticated file download requests, allowing you to download files directly from the third-party.
@@ -1524,7 +1530,7 @@ Returns a list of `AssociationType` objects.
```typescript -await client.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id"); +await client.filestorage.files.downloadRequestMetaList(); ```
@@ -1540,15 +1546,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesList("custo
-**customObjectClassId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesAssociationTypesListRequest` +**request:** `Merge.filestorage.FilesDownloadRequestMetaListRequest`
@@ -1556,7 +1554,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesList("custo
-**requestOptions:** `AssociationTypes.RequestOptions` +**requestOptions:** `Files.RequestOptions`
@@ -1567,7 +1565,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesList("custo
-
client.crm.associationTypes.customObjectClassesAssociationTypesCreate(customObjectClassId, { ...params }) -> Merge.CrmAssociationTypeResponse +
client.filestorage.files.metaPostRetrieve() -> Merge.MetaResponse
@@ -1579,7 +1577,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesList("custo
-Creates an `AssociationType` object with the given values. +Returns metadata for `FileStorageFile` POSTs.
@@ -1595,21 +1593,7 @@ Creates an `AssociationType` object with the given values.
```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", - }, -}); +await client.filestorage.files.metaPostRetrieve(); ```
@@ -1625,23 +1609,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesCreate("cus
-**customObjectClassId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CrmAssociationTypeEndpointRequest` - -
-
- -
-
- -**requestOptions:** `AssociationTypes.RequestOptions` +**requestOptions:** `Files.RequestOptions`
@@ -1652,7 +1620,9 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesCreate("cus
-
client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve(customObjectClassId, id, { ...params }) -> Merge.AssociationType +## Filestorage Folders + +
client.filestorage.folders.list({ ...params }) -> Merge.PaginatedFolderList
@@ -1664,7 +1634,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesCreate("cus
-Returns an `AssociationType` object with the given `id`. +Returns a list of `Folder` objects.
@@ -1680,7 +1650,7 @@ Returns an `AssociationType` object with the given `id`.
```typescript -await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("custom_object_class_id", "id"); +await client.filestorage.folders.list(); ```
@@ -1696,23 +1666,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("c
-**customObjectClassId:** `string` - -
-
- -
-
- -**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesAssociationTypesRetrieveRequest` +**request:** `Merge.filestorage.FoldersListRequest`
@@ -1720,7 +1674,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("c
-**requestOptions:** `AssociationTypes.RequestOptions` +**requestOptions:** `Folders.RequestOptions`
@@ -1731,7 +1685,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("c
-
client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve(customObjectClassId) -> Merge.MetaResponse +
client.filestorage.folders.create({ ...params }) -> Merge.FileStorageFolderResponse
@@ -1743,7 +1697,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("c
-Returns metadata for `CRMAssociationType` POSTs. +Creates a `Folder` object with the given values.
@@ -1759,7 +1713,9 @@ Returns metadata for `CRMAssociationType` POSTs.
```typescript -await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve("custom_object_class_id"); +await client.filestorage.folders.create({ + model: {}, +}); ```
@@ -1775,7 +1731,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRet
-**customObjectClassId:** `string` +**request:** `Merge.filestorage.FileStorageFolderEndpointRequest`
@@ -1783,7 +1739,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRet
-**requestOptions:** `AssociationTypes.RequestOptions` +**requestOptions:** `Folders.RequestOptions`
@@ -1794,9 +1750,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRet
-## Crm CustomObjects - -
client.crm.customObjects.customObjectClassesCustomObjectsList(customObjectClassId, { ...params }) -> Merge.PaginatedCustomObjectList +
client.filestorage.folders.retrieve(id, { ...params }) -> Merge.Folder
@@ -1808,7 +1762,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRet
-Returns a list of `CustomObject` objects. +Returns a `Folder` object with the given `id`.
@@ -1824,7 +1778,7 @@ Returns a list of `CustomObject` objects.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id"); +await client.filestorage.folders.retrieve("id"); ```
@@ -1840,7 +1794,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_obje
-**customObjectClassId:** `string` +**id:** `string`
@@ -1848,7 +1802,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_obje
-**request:** `Merge.crm.CustomObjectClassesCustomObjectsListRequest` +**request:** `Merge.filestorage.FoldersRetrieveRequest`
@@ -1856,7 +1810,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_obje
-**requestOptions:** `CustomObjects.RequestOptions` +**requestOptions:** `Folders.RequestOptions`
@@ -1867,7 +1821,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_obje
-
client.crm.customObjects.customObjectClassesCustomObjectsCreate(customObjectClassId, { ...params }) -> Merge.CrmCustomObjectResponse +
client.filestorage.folders.metaPostRetrieve() -> Merge.MetaResponse
@@ -1879,7 +1833,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_obje
-Creates a `CustomObject` object with the given values. +Returns metadata for `FileStorageFolder` POSTs.
@@ -1895,13 +1849,7 @@ Creates a `CustomObject` object with the given values.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_object_class_id", { - model: { - fields: { - test_field: "hello", - }, - }, -}); +await client.filestorage.folders.metaPostRetrieve(); ```
@@ -1917,23 +1865,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_ob
-**customObjectClassId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CrmCustomObjectEndpointRequest` - -
-
- -
-
- -**requestOptions:** `CustomObjects.RequestOptions` +**requestOptions:** `Folders.RequestOptions`
@@ -1944,7 +1876,9 @@ await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_ob
-
client.crm.customObjects.customObjectClassesCustomObjectsRetrieve(customObjectClassId, id, { ...params }) -> Merge.CustomObject +## Filestorage GenerateKey + +
client.filestorage.generateKey.create({ ...params }) -> Merge.RemoteKey
@@ -1956,7 +1890,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_ob
-Returns a `CustomObject` object with the given `id`. +Create a remote key.
@@ -1972,7 +1906,9 @@ Returns a `CustomObject` object with the given `id`.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_object_class_id", "id"); +await client.filestorage.generateKey.create({ + name: "Remote Deployment Key 1", +}); ```
@@ -1988,23 +1924,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_
-**customObjectClassId:** `string` - -
-
- -
-
- -**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesCustomObjectsRetrieveRequest` +**request:** `Merge.filestorage.GenerateRemoteKeyRequest`
@@ -2012,7 +1932,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_
-**requestOptions:** `CustomObjects.RequestOptions` +**requestOptions:** `GenerateKey.RequestOptions`
@@ -2023,7 +1943,9 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_
-
client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(customObjectClassId) -> Merge.MetaResponse +## Filestorage Groups + +
client.filestorage.groups.list({ ...params }) -> Merge.PaginatedGroupList
@@ -2035,7 +1957,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_
-Returns metadata for `CRMCustomObject` POSTs. +Returns a list of `Group` objects.
@@ -2051,7 +1973,7 @@ Returns metadata for `CRMCustomObject` POSTs.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve("custom_object_class_id"); +await client.filestorage.groups.list(); ```
@@ -2067,7 +1989,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(
-**customObjectClassId:** `string` +**request:** `Merge.filestorage.GroupsListRequest`
@@ -2075,7 +1997,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(
-**requestOptions:** `CustomObjects.RequestOptions` +**requestOptions:** `Groups.RequestOptions`
@@ -2086,7 +2008,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(
-
client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.filestorage.groups.retrieve(id, { ...params }) -> Merge.Group
@@ -2098,7 +2020,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(
-Returns a list of `RemoteFieldClass` objects. +Returns a `Group` object with the given `id`.
@@ -2114,7 +2036,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList(); +await client.filestorage.groups.retrieve("id"); ```
@@ -2130,7 +2052,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClasse
-**request:** `Merge.crm.CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest` +**id:** `string`
@@ -2138,7 +2060,15 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClasse
-**requestOptions:** `CustomObjects.RequestOptions` +**request:** `Merge.filestorage.GroupsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Groups.RequestOptions`
@@ -2149,9 +2079,9 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClasse
-## Crm Associations +## Filestorage Issues -
client.crm.associations.customObjectClassesCustomObjectsAssociationsList(customObjectClassId, objectId, { ...params }) -> Merge.PaginatedAssociationList +
client.filestorage.issues.list({ ...params }) -> Merge.PaginatedIssueList
@@ -2163,7 +2093,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClasse
-Returns a list of `Association` objects. +Gets all issues for Organization.
@@ -2179,7 +2109,7 @@ Returns a list of `Association` objects.
```typescript -await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("custom_object_class_id", "object_id"); +await client.filestorage.issues.list(); ```
@@ -2195,23 +2125,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("
-**customObjectClassId:** `string` - -
-
- -
-
- -**objectId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesCustomObjectsAssociationsListRequest` +**request:** `Merge.filestorage.IssuesListRequest`
@@ -2219,7 +2133,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("
-**requestOptions:** `Associations.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -2230,7 +2144,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("
-
client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate(associationTypeId, sourceClassId, sourceObjectId, targetClassId, targetObjectId, { ...params }) -> Merge.Association +
client.filestorage.issues.retrieve(id) -> Merge.Issue
@@ -2242,7 +2156,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("
-Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`. +Get a specific issue.
@@ -2258,13 +2172,7 @@ Creates an Association between `source_object_id` and `target_object_id` of type
```typescript -await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate( - "association_type_id", - "source_class_id", - "source_object_id", - "target_class_id", - "target_object_id" -); +await client.filestorage.issues.retrieve("id"); ```
@@ -2280,47 +2188,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate
-**associationTypeId:** `string` - -
-
- -
-
- -**sourceClassId:** `string` - -
-
- -
-
- -**sourceObjectId:** `string` - -
-
- -
-
- -**targetClassId:** `string` - -
-
- -
-
- -**targetObjectId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesCustomObjectsAssociationsUpdateRequest` +**id:** `string`
@@ -2328,7 +2196,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate
-**requestOptions:** `Associations.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -2339,9 +2207,9 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate
-## Crm Scopes +## Filestorage LinkToken -
client.crm.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
client.filestorage.linkToken.create({ ...params }) -> Merge.LinkToken
@@ -2353,7 +2221,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate
-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). +Creates a link token to be used when linking a new end user.
@@ -2369,7 +2237,12 @@ Get the default permissions for Merge Common Models and fields across all Linked
```typescript -await client.crm.scopes.defaultScopesRetrieve(); +await client.filestorage.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], +}); ```
@@ -2385,7 +2258,15 @@ await client.crm.scopes.defaultScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**request:** `Merge.filestorage.EndUserDetailsRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkToken.RequestOptions`
@@ -2396,7 +2277,9 @@ await client.crm.scopes.defaultScopesRetrieve();
-
client.crm.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +## Filestorage LinkedAccounts + +
client.filestorage.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList
@@ -2408,7 +2291,7 @@ await client.crm.scopes.defaultScopesRetrieve();
-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). +List linked accounts for your organization.
@@ -2424,7 +2307,7 @@ Get all available permissions for Merge Common Models and fields for a single Li
```typescript -await client.crm.scopes.linkedAccountScopesRetrieve(); +await client.filestorage.linkedAccounts.list(); ```
@@ -2440,7 +2323,15 @@ await client.crm.scopes.linkedAccountScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**request:** `Merge.filestorage.LinkedAccountsListRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkedAccounts.RequestOptions`
@@ -2451,7 +2342,9 @@ await client.crm.scopes.linkedAccountScopesRetrieve();
-
client.crm.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +## Filestorage Passthrough + +
client.filestorage.passthrough.create({ ...params }) -> Merge.RemoteResponse
@@ -2463,7 +2356,7 @@ await client.crm.scopes.linkedAccountScopesRetrieve();
-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) +Pull data from an endpoint not currently supported by Merge.
@@ -2479,32 +2372,9 @@ Update permissions for any Common Model or field for a single Linked Account. An
```typescript -await client.crm.scopes.linkedAccountScopesCreate({ - commonModels: [ - { - modelName: "Employee", - modelPermissions: { - READ: { - isEnabled: true, - }, - WRITE: { - isEnabled: false, - }, - }, - fieldPermissions: { - enabledFields: ["avatar", "home_location"], - disabledFields: ["work_location"], - }, - }, - { - modelName: "Benefit", - modelPermissions: { - WRITE: { - isEnabled: false, - }, - }, - }, - ], +await client.filestorage.passthrough.create({ + method: "GET", + path: "/scooters", }); ``` @@ -2521,7 +2391,7 @@ await client.crm.scopes.linkedAccountScopesCreate({
-**request:** `Merge.crm.LinkedAccountCommonModelScopeDeserializerRequest` +**request:** `Merge.DataPassthroughRequest`
@@ -2529,7 +2399,7 @@ await client.crm.scopes.linkedAccountScopesCreate({
-**requestOptions:** `Scopes.RequestOptions` +**requestOptions:** `Passthrough.RequestOptions`
@@ -2540,9 +2410,9 @@ await client.crm.scopes.linkedAccountScopesCreate({
-## Crm DeleteAccount +## Filestorage RegenerateKey -
client.crm.deleteAccount.delete() -> void +
client.filestorage.regenerateKey.create({ ...params }) -> Merge.RemoteKey
@@ -2554,7 +2424,7 @@ await client.crm.scopes.linkedAccountScopesCreate({
-Delete a linked account. +Exchange remote keys.
@@ -2570,7 +2440,9 @@ Delete a linked account.
```typescript -await client.crm.deleteAccount.delete(); +await client.filestorage.regenerateKey.create({ + name: "Remote Deployment Key 1", +}); ```
@@ -2586,7 +2458,15 @@ await client.crm.deleteAccount.delete();
-**requestOptions:** `DeleteAccount.RequestOptions` +**request:** `Merge.filestorage.RemoteKeyForRegenerationRequest` + +
+
+ +
+
+ +**requestOptions:** `RegenerateKey.RequestOptions`
@@ -2597,9 +2477,9 @@ await client.crm.deleteAccount.delete();
-## Crm EngagementTypes +## Filestorage SyncStatus -
client.crm.engagementTypes.list({ ...params }) -> Merge.PaginatedEngagementTypeList +
client.filestorage.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList
@@ -2611,7 +2491,7 @@ await client.crm.deleteAccount.delete();
-Returns a list of `EngagementType` objects. +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).
@@ -2627,7 +2507,7 @@ Returns a list of `EngagementType` objects.
```typescript -await client.crm.engagementTypes.list(); +await client.filestorage.syncStatus.list(); ```
@@ -2643,7 +2523,7 @@ await client.crm.engagementTypes.list();
-**request:** `Merge.crm.EngagementTypesListRequest` +**request:** `Merge.filestorage.SyncStatusListRequest`
@@ -2651,7 +2531,7 @@ await client.crm.engagementTypes.list();
-**requestOptions:** `EngagementTypes.RequestOptions` +**requestOptions:** `SyncStatus.RequestOptions`
@@ -2662,7 +2542,9 @@ await client.crm.engagementTypes.list();
-
client.crm.engagementTypes.retrieve(id, { ...params }) -> Merge.EngagementType +## Filestorage ForceResync + +
client.filestorage.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[]
@@ -2674,7 +2556,7 @@ await client.crm.engagementTypes.list();
-Returns an `EngagementType` object with the given `id`. +Force re-sync of all models. This endpoint is available 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. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers.
@@ -2690,7 +2572,7 @@ Returns an `EngagementType` object with the given `id`.
```typescript -await client.crm.engagementTypes.retrieve("id"); +await client.filestorage.forceResync.syncStatusResyncCreate(); ```
@@ -2706,23 +2588,7 @@ await client.crm.engagementTypes.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.EngagementTypesRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `EngagementTypes.RequestOptions` +**requestOptions:** `ForceResync.RequestOptions`
@@ -2733,7 +2599,9 @@ await client.crm.engagementTypes.retrieve("id");
-
client.crm.engagementTypes.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +## Filestorage Users + +
client.filestorage.users.list({ ...params }) -> Merge.PaginatedUserList
@@ -2745,7 +2613,7 @@ await client.crm.engagementTypes.retrieve("id");
-Returns a list of `RemoteFieldClass` objects. +Returns a list of `User` objects.
@@ -2761,7 +2629,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.engagementTypes.remoteFieldClassesList(); +await client.filestorage.users.list(); ```
@@ -2777,7 +2645,7 @@ await client.crm.engagementTypes.remoteFieldClassesList();
-**request:** `Merge.crm.EngagementTypesRemoteFieldClassesListRequest` +**request:** `Merge.filestorage.UsersListRequest`
@@ -2785,7 +2653,7 @@ await client.crm.engagementTypes.remoteFieldClassesList();
-**requestOptions:** `EngagementTypes.RequestOptions` +**requestOptions:** `Users.RequestOptions`
@@ -2796,9 +2664,7 @@ await client.crm.engagementTypes.remoteFieldClassesList();
-## Crm Engagements - -
client.crm.engagements.list({ ...params }) -> Merge.PaginatedEngagementList +
client.filestorage.users.retrieve(id, { ...params }) -> Merge.User
@@ -2810,7 +2676,7 @@ await client.crm.engagementTypes.remoteFieldClassesList();
-Returns a list of `Engagement` objects. +Returns a `User` object with the given `id`.
@@ -2826,7 +2692,7 @@ Returns a list of `Engagement` objects.
```typescript -await client.crm.engagements.list(); +await client.filestorage.users.retrieve("id"); ```
@@ -2842,7 +2708,7 @@ await client.crm.engagements.list();
-**request:** `Merge.crm.EngagementsListRequest` +**id:** `string`
@@ -2850,7 +2716,15 @@ await client.crm.engagements.list();
-**requestOptions:** `Engagements.RequestOptions` +**request:** `Merge.filestorage.UsersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions`
@@ -2861,7 +2735,9 @@ await client.crm.engagements.list();
-
client.crm.engagements.create({ ...params }) -> Merge.EngagementResponse +## Filestorage WebhookReceivers + +
client.filestorage.webhookReceivers.list() -> Merge.WebhookReceiver[]
@@ -2873,7 +2749,7 @@ await client.crm.engagements.list();
-Creates an `Engagement` object with the given values. +Returns a list of `WebhookReceiver` objects.
@@ -2889,9 +2765,7 @@ Creates an `Engagement` object with the given values.
```typescript -await client.crm.engagements.create({ - model: {}, -}); +await client.filestorage.webhookReceivers.list(); ```
@@ -2907,15 +2781,7 @@ await client.crm.engagements.create({
-**request:** `Merge.crm.EngagementEndpointRequest` - -
-
- -
-
- -**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `WebhookReceivers.RequestOptions`
@@ -2926,7 +2792,7 @@ await client.crm.engagements.create({
-
client.crm.engagements.retrieve(id, { ...params }) -> Merge.Engagement +
client.filestorage.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver
@@ -2938,7 +2804,7 @@ await client.crm.engagements.create({
-Returns an `Engagement` object with the given `id`. +Creates a `WebhookReceiver` object with the given values.
@@ -2954,7 +2820,10 @@ Returns an `Engagement` object with the given `id`.
```typescript -await client.crm.engagements.retrieve("id"); +await client.filestorage.webhookReceivers.create({ + event: "event", + isActive: true, +}); ```
@@ -2970,15 +2839,7 @@ await client.crm.engagements.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.EngagementsRetrieveRequest` +**request:** `Merge.filestorage.WebhookReceiverRequest`
@@ -2986,7 +2847,7 @@ await client.crm.engagements.retrieve("id");
-**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `WebhookReceivers.RequestOptions`
@@ -2997,7 +2858,9 @@ await client.crm.engagements.retrieve("id");
-
client.crm.engagements.partialUpdate(id, { ...params }) -> Merge.EngagementResponse +## Ats AccountDetails + +
client.ats.accountDetails.retrieve() -> Merge.AccountDetails
@@ -3009,7 +2872,7 @@ await client.crm.engagements.retrieve("id");
-Updates an `Engagement` object with the given `id`. +Get details for a linked account.
@@ -3025,9 +2888,7 @@ Updates an `Engagement` object with the given `id`.
```typescript -await client.crm.engagements.partialUpdate("id", { - model: {}, -}); +await client.ats.accountDetails.retrieve(); ```
@@ -3043,23 +2904,7 @@ await client.crm.engagements.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedEngagementEndpointRequest` - -
-
- -
-
- -**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `AccountDetails.RequestOptions`
@@ -3070,7 +2915,9 @@ await client.crm.engagements.partialUpdate("id", {
-
client.crm.engagements.metaPatchRetrieve(id) -> Merge.MetaResponse +## Ats AccountToken + +
client.ats.accountToken.retrieve(publicToken) -> Merge.AccountToken
@@ -3082,7 +2929,7 @@ await client.crm.engagements.partialUpdate("id", {
-Returns metadata for `Engagement` PATCHs. +Returns the account token for the end user with the provided public token.
@@ -3098,7 +2945,7 @@ Returns metadata for `Engagement` PATCHs.
```typescript -await client.crm.engagements.metaPatchRetrieve("id"); +await client.ats.accountToken.retrieve("public_token"); ```
@@ -3114,7 +2961,7 @@ await client.crm.engagements.metaPatchRetrieve("id");
-**id:** `string` +**publicToken:** `string`
@@ -3122,7 +2969,7 @@ await client.crm.engagements.metaPatchRetrieve("id");
-**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `AccountToken.RequestOptions`
@@ -3133,7 +2980,9 @@ await client.crm.engagements.metaPatchRetrieve("id");
-
client.crm.engagements.metaPostRetrieve() -> Merge.MetaResponse +## Ats Activities + +
client.ats.activities.list({ ...params }) -> Merge.PaginatedActivityList
@@ -3145,7 +2994,7 @@ await client.crm.engagements.metaPatchRetrieve("id");
-Returns metadata for `Engagement` POSTs. +Returns a list of `Activity` objects.
@@ -3161,7 +3010,7 @@ Returns metadata for `Engagement` POSTs.
```typescript -await client.crm.engagements.metaPostRetrieve(); +await client.ats.activities.list(); ```
@@ -3177,7 +3026,15 @@ await client.crm.engagements.metaPostRetrieve();
-**requestOptions:** `Engagements.RequestOptions` +**request:** `Merge.ats.ActivitiesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Activities.RequestOptions`
@@ -3188,7 +3045,7 @@ await client.crm.engagements.metaPostRetrieve();
-
client.crm.engagements.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.ats.activities.create({ ...params }) -> Merge.ActivityResponse
@@ -3200,7 +3057,7 @@ await client.crm.engagements.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Creates an `Activity` object with the given values.
@@ -3216,7 +3073,10 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.engagements.remoteFieldClassesList(); +await client.ats.activities.create({ + model: {}, + remoteUserId: "remote_user_id", +}); ```
@@ -3232,7 +3092,7 @@ await client.crm.engagements.remoteFieldClassesList();
-**request:** `Merge.crm.EngagementsRemoteFieldClassesListRequest` +**request:** `Merge.ats.ActivityEndpointRequest`
@@ -3240,7 +3100,7 @@ await client.crm.engagements.remoteFieldClassesList();
-**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `Activities.RequestOptions`
@@ -3251,9 +3111,7 @@ await client.crm.engagements.remoteFieldClassesList();
-## Crm FieldMapping - -
client.crm.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse +
client.ats.activities.retrieve(id, { ...params }) -> Merge.Activity
@@ -3265,7 +3123,7 @@ await client.crm.engagements.remoteFieldClassesList();
-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/). +Returns an `Activity` object with the given `id`.
@@ -3281,7 +3139,7 @@ Get all Field Mappings for this Linked Account. Field Mappings are mappings betw
```typescript -await client.crm.fieldMapping.fieldMappingsRetrieve(); +await client.ats.activities.retrieve("id"); ```
@@ -3297,7 +3155,7 @@ await client.crm.fieldMapping.fieldMappingsRetrieve();
-**request:** `Merge.crm.FieldMappingsRetrieveRequest` +**id:** `string`
@@ -3305,7 +3163,15 @@ await client.crm.fieldMapping.fieldMappingsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**request:** `Merge.ats.ActivitiesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Activities.RequestOptions`
@@ -3316,7 +3182,7 @@ await client.crm.fieldMapping.fieldMappingsRetrieve();
-
client.crm.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +
client.ats.activities.metaPostRetrieve() -> Merge.MetaResponse
@@ -3328,7 +3194,7 @@ await client.crm.fieldMapping.fieldMappingsRetrieve();
-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. +Returns metadata for `Activity` POSTs.
@@ -3344,14 +3210,7 @@ Create new Field Mappings that will be available after the next scheduled sync.
```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", -}); +await client.ats.activities.metaPostRetrieve(); ```
@@ -3367,15 +3226,7 @@ await client.crm.fieldMapping.fieldMappingsCreate({
-**request:** `Merge.crm.CreateFieldMappingRequest` - -
-
- -
-
- -**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Activities.RequestOptions`
@@ -3386,7 +3237,9 @@ await client.crm.fieldMapping.fieldMappingsCreate({
-
client.crm.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +## Ats Applications + +
client.ats.applications.list({ ...params }) -> Merge.PaginatedApplicationList
@@ -3398,7 +3251,7 @@ await client.crm.fieldMapping.fieldMappingsCreate({
-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. +Returns a list of `Application` objects.
@@ -3414,7 +3267,7 @@ Deletes Field Mappings for a Linked Account. All data related to this Field Mapp
```typescript -await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id"); +await client.ats.applications.list(); ```
@@ -3430,7 +3283,7 @@ await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**fieldMappingId:** `string` +**request:** `Merge.ats.ApplicationsListRequest`
@@ -3438,7 +3291,7 @@ await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Applications.RequestOptions`
@@ -3449,7 +3302,7 @@ await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-
client.crm.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +
client.ats.applications.create({ ...params }) -> Merge.ApplicationResponse
@@ -3461,7 +3314,10 @@ await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-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. +Creates an `Application` object with the given values. +For certain integrations, but not all, our API detects duplicate candidates and will associate applications with existing records in the third-party. New candidates are created and automatically linked to the application. + +See our [Help Center article](https://help.merge.dev/en/articles/10012366-updates-to-post-applications-oct-2024) for detailed support per integration.
@@ -3477,7 +3333,10 @@ Create or update existing Field Mappings for a Linked Account. Changes will be r
```typescript -await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); +await client.ats.applications.create({ + model: {}, + remoteUserId: "remote_user_id", +}); ```
@@ -3493,15 +3352,7 @@ await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-**fieldMappingId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedEditFieldMappingRequest` +**request:** `Merge.ats.ApplicationEndpointRequest`
@@ -3509,7 +3360,7 @@ await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Applications.RequestOptions`
@@ -3520,7 +3371,7 @@ await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-
client.crm.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +
client.ats.applications.retrieve(id, { ...params }) -> Merge.Application
@@ -3532,7 +3383,7 @@ await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-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/). +Returns an `Application` object with the given `id`.
@@ -3548,7 +3399,7 @@ Get all remote fields for a Linked Account. Remote fields are third-party fields
```typescript -await client.crm.fieldMapping.remoteFieldsRetrieve(); +await client.ats.applications.retrieve("id"); ```
@@ -3564,7 +3415,7 @@ await client.crm.fieldMapping.remoteFieldsRetrieve();
-**request:** `Merge.crm.RemoteFieldsRetrieveRequest` +**id:** `string`
@@ -3572,7 +3423,15 @@ await client.crm.fieldMapping.remoteFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**request:** `Merge.ats.ApplicationsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Applications.RequestOptions`
@@ -3583,7 +3442,7 @@ await client.crm.fieldMapping.remoteFieldsRetrieve();
-
client.crm.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +
client.ats.applications.changeStageCreate(id, { ...params }) -> Merge.ApplicationResponse
@@ -3595,7 +3454,7 @@ await client.crm.fieldMapping.remoteFieldsRetrieve();
-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/). +Updates the `current_stage` field of an `Application` object
@@ -3611,7 +3470,7 @@ Get all organization-wide Target Fields, this will not include any Linked Accoun
```typescript -await client.crm.fieldMapping.targetFieldsRetrieve(); +await client.ats.applications.changeStageCreate("id"); ```
@@ -3627,7 +3486,23 @@ await client.crm.fieldMapping.targetFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.UpdateApplicationStageRequest` + +
+
+ +
+
+ +**requestOptions:** `Applications.RequestOptions`
@@ -3638,9 +3513,7 @@ await client.crm.fieldMapping.targetFieldsRetrieve();
-## Crm GenerateKey - -
client.crm.generateKey.create({ ...params }) -> Merge.RemoteKey +
client.ats.applications.metaPostRetrieve({ ...params }) -> Merge.MetaResponse
@@ -3652,7 +3525,7 @@ await client.crm.fieldMapping.targetFieldsRetrieve();
-Create a remote key. +Returns metadata for `Application` POSTs.
@@ -3668,9 +3541,7 @@ Create a remote key.
```typescript -await client.crm.generateKey.create({ - name: "Remote Deployment Key 1", -}); +await client.ats.applications.metaPostRetrieve(); ```
@@ -3686,7 +3557,7 @@ await client.crm.generateKey.create({
-**request:** `Merge.crm.GenerateRemoteKeyRequest` +**request:** `Merge.ats.ApplicationsMetaPostRetrieveRequest`
@@ -3694,7 +3565,7 @@ await client.crm.generateKey.create({
-**requestOptions:** `GenerateKey.RequestOptions` +**requestOptions:** `Applications.RequestOptions`
@@ -3705,9 +3576,9 @@ await client.crm.generateKey.create({
-## Crm Issues +## Ats AsyncPassthrough -
client.crm.issues.list({ ...params }) -> Merge.PaginatedIssueList +
client.ats.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept
@@ -3719,7 +3590,7 @@ await client.crm.generateKey.create({
-Gets all issues for Organization. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -3735,7 +3606,10 @@ Gets all issues for Organization.
```typescript -await client.crm.issues.list(); +await client.ats.asyncPassthrough.create({ + method: "GET", + path: "/scooters", +}); ```
@@ -3751,7 +3625,7 @@ await client.crm.issues.list();
-**request:** `Merge.crm.IssuesListRequest` +**request:** `Merge.DataPassthroughRequest`
@@ -3759,7 +3633,7 @@ await client.crm.issues.list();
-**requestOptions:** `Issues.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -3770,7 +3644,7 @@ await client.crm.issues.list();
-
client.crm.issues.retrieve(id) -> Merge.Issue +
client.ats.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse
@@ -3782,7 +3656,7 @@ await client.crm.issues.list();
-Get a specific issue. +Retrieves data from earlier async-passthrough POST request
@@ -3798,7 +3672,7 @@ Get a specific issue.
```typescript -await client.crm.issues.retrieve("id"); +await client.ats.asyncPassthrough.retrieve("async_passthrough_receipt_id"); ```
@@ -3814,7 +3688,7 @@ await client.crm.issues.retrieve("id");
-**id:** `string` +**asyncPassthroughReceiptId:** `string`
@@ -3822,7 +3696,7 @@ await client.crm.issues.retrieve("id");
-**requestOptions:** `Issues.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -3833,9 +3707,9 @@ await client.crm.issues.retrieve("id");
-## Crm Leads +## Ats Attachments -
client.crm.leads.list({ ...params }) -> Merge.PaginatedLeadList +
client.ats.attachments.list({ ...params }) -> Merge.PaginatedAttachmentList
@@ -3847,7 +3721,7 @@ await client.crm.issues.retrieve("id");
-Returns a list of `Lead` objects. +Returns a list of `Attachment` objects.
@@ -3863,7 +3737,7 @@ Returns a list of `Lead` objects.
```typescript -await client.crm.leads.list(); +await client.ats.attachments.list(); ```
@@ -3879,7 +3753,7 @@ await client.crm.leads.list();
-**request:** `Merge.crm.LeadsListRequest` +**request:** `Merge.ats.AttachmentsListRequest`
@@ -3887,7 +3761,7 @@ await client.crm.leads.list();
-**requestOptions:** `Leads.RequestOptions` +**requestOptions:** `Attachments.RequestOptions`
@@ -3898,7 +3772,7 @@ await client.crm.leads.list();
-
client.crm.leads.create({ ...params }) -> Merge.LeadResponse +
client.ats.attachments.create({ ...params }) -> Merge.AttachmentResponse
@@ -3910,7 +3784,7 @@ await client.crm.leads.list();
-Creates a `Lead` object with the given values. +Creates an `Attachment` object with the given values.
@@ -3926,8 +3800,9 @@ Creates a `Lead` object with the given values.
```typescript -await client.crm.leads.create({ +await client.ats.attachments.create({ model: {}, + remoteUserId: "remote_user_id", }); ``` @@ -3944,7 +3819,7 @@ await client.crm.leads.create({
-**request:** `Merge.crm.LeadEndpointRequest` +**request:** `Merge.ats.AttachmentEndpointRequest`
@@ -3952,7 +3827,7 @@ await client.crm.leads.create({
-**requestOptions:** `Leads.RequestOptions` +**requestOptions:** `Attachments.RequestOptions`
@@ -3963,7 +3838,7 @@ await client.crm.leads.create({
-
client.crm.leads.retrieve(id, { ...params }) -> Merge.Lead +
client.ats.attachments.retrieve(id, { ...params }) -> Merge.Attachment
@@ -3975,7 +3850,7 @@ await client.crm.leads.create({
-Returns a `Lead` object with the given `id`. +Returns an `Attachment` object with the given `id`.
@@ -3991,7 +3866,7 @@ Returns a `Lead` object with the given `id`.
```typescript -await client.crm.leads.retrieve("id"); +await client.ats.attachments.retrieve("id"); ```
@@ -4015,7 +3890,7 @@ await client.crm.leads.retrieve("id");
-**request:** `Merge.crm.LeadsRetrieveRequest` +**request:** `Merge.ats.AttachmentsRetrieveRequest`
@@ -4023,7 +3898,7 @@ await client.crm.leads.retrieve("id");
-**requestOptions:** `Leads.RequestOptions` +**requestOptions:** `Attachments.RequestOptions`
@@ -4034,7 +3909,7 @@ await client.crm.leads.retrieve("id");
-
client.crm.leads.metaPostRetrieve() -> Merge.MetaResponse +
client.ats.attachments.metaPostRetrieve() -> Merge.MetaResponse
@@ -4046,7 +3921,7 @@ await client.crm.leads.retrieve("id");
-Returns metadata for `Lead` POSTs. +Returns metadata for `Attachment` POSTs.
@@ -4062,7 +3937,7 @@ Returns metadata for `Lead` POSTs.
```typescript -await client.crm.leads.metaPostRetrieve(); +await client.ats.attachments.metaPostRetrieve(); ```
@@ -4078,7 +3953,7 @@ await client.crm.leads.metaPostRetrieve();
-**requestOptions:** `Leads.RequestOptions` +**requestOptions:** `Attachments.RequestOptions`
@@ -4089,7 +3964,9 @@ await client.crm.leads.metaPostRetrieve();
-
client.crm.leads.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +## Ats AuditTrail + +
client.ats.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList
@@ -4101,7 +3978,7 @@ await client.crm.leads.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Gets a list of audit trail events.
@@ -4117,7 +3994,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.leads.remoteFieldClassesList(); +await client.ats.auditTrail.list(); ```
@@ -4133,7 +4010,7 @@ await client.crm.leads.remoteFieldClassesList();
-**request:** `Merge.crm.LeadsRemoteFieldClassesListRequest` +**request:** `Merge.ats.AuditTrailListRequest`
@@ -4141,7 +4018,7 @@ await client.crm.leads.remoteFieldClassesList();
-**requestOptions:** `Leads.RequestOptions` +**requestOptions:** `AuditTrail.RequestOptions`
@@ -4152,9 +4029,9 @@ await client.crm.leads.remoteFieldClassesList();
-## Crm LinkToken +## Ats AvailableActions -
client.crm.linkToken.create({ ...params }) -> Merge.LinkToken +
client.ats.availableActions.retrieve() -> Merge.AvailableActions
@@ -4166,7 +4043,7 @@ await client.crm.leads.remoteFieldClassesList();
-Creates a link token to be used when linking a new end user. +Returns a list of models and actions available for an account.
@@ -4182,12 +4059,7 @@ Creates a link token to be used when linking a new end user.
```typescript -await client.crm.linkToken.create({ - endUserEmailAddress: "example@gmail.com", - endUserOrganizationName: "Test Organization", - endUserOriginId: "12345", - categories: ["hris", "ats"], -}); +await client.ats.availableActions.retrieve(); ```
@@ -4203,15 +4075,7 @@ await client.crm.linkToken.create({
-**request:** `Merge.crm.EndUserDetailsRequest` - -
-
- -
-
- -**requestOptions:** `LinkToken.RequestOptions` +**requestOptions:** `AvailableActions.RequestOptions`
@@ -4222,9 +4086,9 @@ await client.crm.linkToken.create({
-## Crm LinkedAccounts +## Ats Candidates -
client.crm.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList +
client.ats.candidates.list({ ...params }) -> Merge.PaginatedCandidateList
@@ -4236,7 +4100,7 @@ await client.crm.linkToken.create({
-List linked accounts for your organization. +Returns a list of `Candidate` objects.
@@ -4252,7 +4116,7 @@ List linked accounts for your organization.
```typescript -await client.crm.linkedAccounts.list(); +await client.ats.candidates.list(); ```
@@ -4268,7 +4132,7 @@ await client.crm.linkedAccounts.list();
-**request:** `Merge.crm.LinkedAccountsListRequest` +**request:** `Merge.ats.CandidatesListRequest`
@@ -4276,7 +4140,7 @@ await client.crm.linkedAccounts.list();
-**requestOptions:** `LinkedAccounts.RequestOptions` +**requestOptions:** `Candidates.RequestOptions`
@@ -4287,9 +4151,7 @@ await client.crm.linkedAccounts.list();
-## Crm Notes - -
client.crm.notes.list({ ...params }) -> Merge.PaginatedNoteList +
client.ats.candidates.create({ ...params }) -> Merge.CandidateResponse
@@ -4301,7 +4163,7 @@ await client.crm.linkedAccounts.list();
-Returns a list of `Note` objects. +Creates a `Candidate` object with the given values.
@@ -4317,7 +4179,10 @@ Returns a list of `Note` objects.
```typescript -await client.crm.notes.list(); +await client.ats.candidates.create({ + model: {}, + remoteUserId: "remote_user_id", +}); ```
@@ -4333,7 +4198,7 @@ await client.crm.notes.list();
-**request:** `Merge.crm.NotesListRequest` +**request:** `Merge.ats.CandidateEndpointRequest`
@@ -4341,7 +4206,7 @@ await client.crm.notes.list();
-**requestOptions:** `Notes.RequestOptions` +**requestOptions:** `Candidates.RequestOptions`
@@ -4352,7 +4217,7 @@ await client.crm.notes.list();
-
client.crm.notes.create({ ...params }) -> Merge.NoteResponse +
client.ats.candidates.retrieve(id, { ...params }) -> Merge.Candidate
@@ -4364,7 +4229,7 @@ await client.crm.notes.list();
-Creates a `Note` object with the given values. +Returns a `Candidate` object with the given `id`.
@@ -4380,9 +4245,7 @@ Creates a `Note` object with the given values.
```typescript -await client.crm.notes.create({ - model: {}, -}); +await client.ats.candidates.retrieve("id"); ```
@@ -4398,7 +4261,7 @@ await client.crm.notes.create({
-**request:** `Merge.crm.NoteEndpointRequest` +**id:** `string`
@@ -4406,7 +4269,15 @@ await client.crm.notes.create({
-**requestOptions:** `Notes.RequestOptions` +**request:** `Merge.ats.CandidatesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Candidates.RequestOptions`
@@ -4417,7 +4288,7 @@ await client.crm.notes.create({
-
client.crm.notes.retrieve(id, { ...params }) -> Merge.Note +
client.ats.candidates.partialUpdate(id, { ...params }) -> Merge.CandidateResponse
@@ -4429,7 +4300,7 @@ await client.crm.notes.create({
-Returns a `Note` object with the given `id`. +Updates a `Candidate` object with the given `id`.
@@ -4445,7 +4316,10 @@ Returns a `Note` object with the given `id`.
```typescript -await client.crm.notes.retrieve("id"); +await client.ats.candidates.partialUpdate("id", { + model: {}, + remoteUserId: "remote_user_id", +}); ```
@@ -4469,7 +4343,7 @@ await client.crm.notes.retrieve("id");
-**request:** `Merge.crm.NotesRetrieveRequest` +**request:** `Merge.ats.PatchedCandidateEndpointRequest`
@@ -4477,7 +4351,7 @@ await client.crm.notes.retrieve("id");
-**requestOptions:** `Notes.RequestOptions` +**requestOptions:** `Candidates.RequestOptions`
@@ -4488,7 +4362,7 @@ await client.crm.notes.retrieve("id");
-
client.crm.notes.metaPostRetrieve() -> Merge.MetaResponse +
client.ats.candidates.ignoreCreate(modelId, { ...params }) -> void
@@ -4500,7 +4374,7 @@ await client.crm.notes.retrieve("id");
-Returns metadata for `Note` POSTs. +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.
@@ -4516,7 +4390,9 @@ Returns metadata for `Note` POSTs.
```typescript -await client.crm.notes.metaPostRetrieve(); +await client.ats.candidates.ignoreCreate("model_id", { + reason: "GENERAL_CUSTOMER_REQUEST", +}); ```
@@ -4532,7 +4408,23 @@ await client.crm.notes.metaPostRetrieve();
-**requestOptions:** `Notes.RequestOptions` +**modelId:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.IgnoreCommonModelRequest` + +
+
+ +
+
+ +**requestOptions:** `Candidates.RequestOptions`
@@ -4543,7 +4435,7 @@ await client.crm.notes.metaPostRetrieve();
-
client.crm.notes.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.ats.candidates.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -4555,7 +4447,7 @@ await client.crm.notes.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Returns metadata for `Candidate` PATCHs.
@@ -4571,7 +4463,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.notes.remoteFieldClassesList(); +await client.ats.candidates.metaPatchRetrieve("id"); ```
@@ -4587,7 +4479,7 @@ await client.crm.notes.remoteFieldClassesList();
-**request:** `Merge.crm.NotesRemoteFieldClassesListRequest` +**id:** `string`
@@ -4595,7 +4487,7 @@ await client.crm.notes.remoteFieldClassesList();
-**requestOptions:** `Notes.RequestOptions` +**requestOptions:** `Candidates.RequestOptions`
@@ -4606,9 +4498,7 @@ await client.crm.notes.remoteFieldClassesList();
-## Crm Opportunities - -
client.crm.opportunities.list({ ...params }) -> Merge.PaginatedOpportunityList +
client.ats.candidates.metaPostRetrieve() -> Merge.MetaResponse
@@ -4620,7 +4510,7 @@ await client.crm.notes.remoteFieldClassesList();
-Returns a list of `Opportunity` objects. +Returns metadata for `Candidate` POSTs.
@@ -4636,7 +4526,7 @@ Returns a list of `Opportunity` objects.
```typescript -await client.crm.opportunities.list(); +await client.ats.candidates.metaPostRetrieve(); ```
@@ -4652,15 +4542,7 @@ await client.crm.opportunities.list();
-**request:** `Merge.crm.OpportunitiesListRequest` - -
-
- -
-
- -**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `Candidates.RequestOptions`
@@ -4671,7 +4553,9 @@ await client.crm.opportunities.list();
-
client.crm.opportunities.create({ ...params }) -> Merge.OpportunityResponse +## Ats Scopes + +
client.ats.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -4683,7 +4567,7 @@ await client.crm.opportunities.list();
-Creates an `Opportunity` object with the given values. +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).
@@ -4699,9 +4583,7 @@ Creates an `Opportunity` object with the given values.
```typescript -await client.crm.opportunities.create({ - model: {}, -}); +await client.ats.scopes.defaultScopesRetrieve(); ```
@@ -4717,15 +4599,7 @@ await client.crm.opportunities.create({
-**request:** `Merge.crm.OpportunityEndpointRequest` - -
-
- -
-
- -**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -4736,7 +4610,7 @@ await client.crm.opportunities.create({
-
client.crm.opportunities.retrieve(id, { ...params }) -> Merge.Opportunity +
client.ats.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -4748,7 +4622,7 @@ await client.crm.opportunities.create({
-Returns an `Opportunity` object with the given `id`. +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).
@@ -4764,7 +4638,7 @@ Returns an `Opportunity` object with the given `id`.
```typescript -await client.crm.opportunities.retrieve("id"); +await client.ats.scopes.linkedAccountScopesRetrieve(); ```
@@ -4780,23 +4654,7 @@ await client.crm.opportunities.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.OpportunitiesRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -4807,7 +4665,7 @@ await client.crm.opportunities.retrieve("id");
-
client.crm.opportunities.partialUpdate(id, { ...params }) -> Merge.OpportunityResponse +
client.ats.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi
@@ -4819,7 +4677,7 @@ await client.crm.opportunities.retrieve("id");
-Updates an `Opportunity` object with the given `id`. +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)
@@ -4835,8 +4693,32 @@ Updates an `Opportunity` object with the given `id`.
```typescript -await client.crm.opportunities.partialUpdate("id", { - model: {}, +await client.ats.scopes.linkedAccountScopesCreate({ + commonModels: [ + { + modelName: "Employee", + modelPermissions: { + READ: { + isEnabled: true, + }, + WRITE: { + isEnabled: false, + }, + }, + fieldPermissions: { + enabledFields: ["avatar", "home_location"], + disabledFields: ["work_location"], + }, + }, + { + modelName: "Benefit", + modelPermissions: { + WRITE: { + isEnabled: false, + }, + }, + }, + ], }); ``` @@ -4853,15 +4735,7 @@ await client.crm.opportunities.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedOpportunityEndpointRequest` +**request:** `Merge.ats.LinkedAccountCommonModelScopeDeserializerRequest`
@@ -4869,7 +4743,7 @@ await client.crm.opportunities.partialUpdate("id", {
-**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -4880,7 +4754,9 @@ await client.crm.opportunities.partialUpdate("id", {
-
client.crm.opportunities.metaPatchRetrieve(id) -> Merge.MetaResponse +## Ats DeleteAccount + +
client.ats.deleteAccount.delete() -> void
@@ -4892,7 +4768,7 @@ await client.crm.opportunities.partialUpdate("id", {
-Returns metadata for `Opportunity` PATCHs. +Delete a linked account.
@@ -4908,7 +4784,7 @@ Returns metadata for `Opportunity` PATCHs.
```typescript -await client.crm.opportunities.metaPatchRetrieve("id"); +await client.ats.deleteAccount.delete(); ```
@@ -4924,15 +4800,7 @@ await client.crm.opportunities.metaPatchRetrieve("id");
-**id:** `string` - -
-
- -
-
- -**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `DeleteAccount.RequestOptions`
@@ -4943,7 +4811,9 @@ await client.crm.opportunities.metaPatchRetrieve("id");
-
client.crm.opportunities.metaPostRetrieve() -> Merge.MetaResponse +## Ats Departments + +
client.ats.departments.list({ ...params }) -> Merge.PaginatedDepartmentList
@@ -4955,7 +4825,7 @@ await client.crm.opportunities.metaPatchRetrieve("id");
-Returns metadata for `Opportunity` POSTs. +Returns a list of `Department` objects.
@@ -4971,7 +4841,7 @@ Returns metadata for `Opportunity` POSTs.
```typescript -await client.crm.opportunities.metaPostRetrieve(); +await client.ats.departments.list(); ```
@@ -4987,7 +4857,15 @@ await client.crm.opportunities.metaPostRetrieve();
-**requestOptions:** `Opportunities.RequestOptions` +**request:** `Merge.ats.DepartmentsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Departments.RequestOptions`
@@ -4998,7 +4876,7 @@ await client.crm.opportunities.metaPostRetrieve();
-
client.crm.opportunities.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.ats.departments.retrieve(id, { ...params }) -> Merge.Department
@@ -5010,7 +4888,7 @@ await client.crm.opportunities.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Returns a `Department` object with the given `id`.
@@ -5026,7 +4904,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.opportunities.remoteFieldClassesList(); +await client.ats.departments.retrieve("id"); ```
@@ -5042,7 +4920,7 @@ await client.crm.opportunities.remoteFieldClassesList();
-**request:** `Merge.crm.OpportunitiesRemoteFieldClassesListRequest` +**id:** `string`
@@ -5050,7 +4928,15 @@ await client.crm.opportunities.remoteFieldClassesList();
-**requestOptions:** `Opportunities.RequestOptions` +**request:** `Merge.ats.DepartmentsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Departments.RequestOptions`
@@ -5061,9 +4947,9 @@ await client.crm.opportunities.remoteFieldClassesList();
-## Crm Passthrough +## Ats Eeocs -
client.crm.passthrough.create({ ...params }) -> Merge.RemoteResponse +
client.ats.eeocs.list({ ...params }) -> Merge.PaginatedEeocList
@@ -5075,7 +4961,7 @@ await client.crm.opportunities.remoteFieldClassesList();
-Pull data from an endpoint not currently supported by Merge. +Returns a list of `EEOC` objects.
@@ -5091,10 +4977,7 @@ Pull data from an endpoint not currently supported by Merge.
```typescript -await client.crm.passthrough.create({ - method: "GET", - path: "/scooters", -}); +await client.ats.eeocs.list(); ```
@@ -5110,7 +4993,7 @@ await client.crm.passthrough.create({
-**request:** `Merge.DataPassthroughRequest` +**request:** `Merge.ats.EeocsListRequest`
@@ -5118,7 +5001,7 @@ await client.crm.passthrough.create({
-**requestOptions:** `Passthrough.RequestOptions` +**requestOptions:** `Eeocs.RequestOptions`
@@ -5129,9 +5012,7 @@ await client.crm.passthrough.create({
-## Crm RegenerateKey - -
client.crm.regenerateKey.create({ ...params }) -> Merge.RemoteKey +
client.ats.eeocs.retrieve(id, { ...params }) -> Merge.Eeoc
@@ -5143,7 +5024,7 @@ await client.crm.passthrough.create({
-Exchange remote keys. +Returns an `EEOC` object with the given `id`.
@@ -5159,9 +5040,7 @@ Exchange remote keys.
```typescript -await client.crm.regenerateKey.create({ - name: "Remote Deployment Key 1", -}); +await client.ats.eeocs.retrieve("id"); ```
@@ -5177,7 +5056,7 @@ await client.crm.regenerateKey.create({
-**request:** `Merge.crm.RemoteKeyForRegenerationRequest` +**id:** `string`
@@ -5185,7 +5064,15 @@ await client.crm.regenerateKey.create({
-**requestOptions:** `RegenerateKey.RequestOptions` +**request:** `Merge.ats.EeocsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Eeocs.RequestOptions`
@@ -5196,9 +5083,9 @@ await client.crm.regenerateKey.create({
-## Crm Stages +## Ats FieldMapping -
client.crm.stages.list({ ...params }) -> Merge.PaginatedStageList +
client.ats.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse
@@ -5210,7 +5097,7 @@ await client.crm.regenerateKey.create({
-Returns a list of `Stage` objects. +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/).
@@ -5226,7 +5113,7 @@ Returns a list of `Stage` objects.
```typescript -await client.crm.stages.list(); +await client.ats.fieldMapping.fieldMappingsRetrieve(); ```
@@ -5242,7 +5129,7 @@ await client.crm.stages.list();
-**request:** `Merge.crm.StagesListRequest` +**request:** `Merge.ats.FieldMappingsRetrieveRequest`
@@ -5250,7 +5137,7 @@ await client.crm.stages.list();
-**requestOptions:** `Stages.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -5261,7 +5148,7 @@ await client.crm.stages.list();
-
client.crm.stages.retrieve(id, { ...params }) -> Merge.Stage +
client.ats.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse
@@ -5273,7 +5160,7 @@ await client.crm.stages.list();
-Returns a `Stage` object with the given `id`. +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.
@@ -5289,7 +5176,14 @@ Returns a `Stage` object with the given `id`.
```typescript -await client.crm.stages.retrieve("id"); +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", +}); ```
@@ -5305,15 +5199,7 @@ await client.crm.stages.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.StagesRetrieveRequest` +**request:** `Merge.ats.CreateFieldMappingRequest`
@@ -5321,7 +5207,7 @@ await client.crm.stages.retrieve("id");
-**requestOptions:** `Stages.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -5332,7 +5218,7 @@ await client.crm.stages.retrieve("id");
-
client.crm.stages.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.ats.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse
@@ -5344,7 +5230,7 @@ await client.crm.stages.retrieve("id");
-Returns a list of `RemoteFieldClass` objects. +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.
@@ -5360,7 +5246,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.stages.remoteFieldClassesList(); +await client.ats.fieldMapping.fieldMappingsDestroy("field_mapping_id"); ```
@@ -5376,7 +5262,7 @@ await client.crm.stages.remoteFieldClassesList();
-**request:** `Merge.crm.StagesRemoteFieldClassesListRequest` +**fieldMappingId:** `string`
@@ -5384,7 +5270,7 @@ await client.crm.stages.remoteFieldClassesList();
-**requestOptions:** `Stages.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -5395,9 +5281,7 @@ await client.crm.stages.remoteFieldClassesList();
-## Crm SyncStatus - -
client.crm.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList +
client.ats.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse
@@ -5409,7 +5293,7 @@ await client.crm.stages.remoteFieldClassesList();
-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). +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.
@@ -5425,7 +5309,7 @@ Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SY
```typescript -await client.crm.syncStatus.list(); +await client.ats.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); ```
@@ -5441,7 +5325,7 @@ await client.crm.syncStatus.list();
-**request:** `Merge.crm.SyncStatusListRequest` +**fieldMappingId:** `string`
@@ -5449,7 +5333,15 @@ await client.crm.syncStatus.list();
-**requestOptions:** `SyncStatus.RequestOptions` +**request:** `Merge.ats.PatchedEditFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions`
@@ -5460,9 +5352,7 @@ await client.crm.syncStatus.list();
-## Crm ForceResync - -
client.crm.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[] +
client.ats.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse
@@ -5474,7 +5364,7 @@ await client.crm.syncStatus.list();
-Force re-sync of all models. This endpoint is available 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. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +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/).
@@ -5490,7 +5380,7 @@ Force re-sync of all models. This endpoint is available for monthly, quarterly,
```typescript -await client.crm.forceResync.syncStatusResyncCreate(); +await client.ats.fieldMapping.remoteFieldsRetrieve(); ```
@@ -5506,7 +5396,15 @@ await client.crm.forceResync.syncStatusResyncCreate();
-**requestOptions:** `ForceResync.RequestOptions` +**request:** `Merge.ats.RemoteFieldsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions`
@@ -5517,9 +5415,7 @@ await client.crm.forceResync.syncStatusResyncCreate();
-## Crm Tasks - -
client.crm.tasks.list({ ...params }) -> Merge.PaginatedTaskList +
client.ats.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse
@@ -5531,7 +5427,7 @@ await client.crm.forceResync.syncStatusResyncCreate();
-Returns a list of `Task` objects. +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/).
@@ -5547,7 +5443,7 @@ Returns a list of `Task` objects.
```typescript -await client.crm.tasks.list(); +await client.ats.fieldMapping.targetFieldsRetrieve(); ```
@@ -5563,15 +5459,7 @@ await client.crm.tasks.list();
-**request:** `Merge.crm.TasksListRequest` - -
-
- -
-
- -**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -5582,7 +5470,9 @@ await client.crm.tasks.list();
-
client.crm.tasks.create({ ...params }) -> Merge.TaskResponse +## Ats GenerateKey + +
client.ats.generateKey.create({ ...params }) -> Merge.RemoteKey
@@ -5594,7 +5484,7 @@ await client.crm.tasks.list();
-Creates a `Task` object with the given values. +Create a remote key.
@@ -5610,8 +5500,8 @@ Creates a `Task` object with the given values.
```typescript -await client.crm.tasks.create({ - model: {}, +await client.ats.generateKey.create({ + name: "Remote Deployment Key 1", }); ``` @@ -5628,7 +5518,7 @@ await client.crm.tasks.create({
-**request:** `Merge.crm.TaskEndpointRequest` +**request:** `Merge.ats.GenerateRemoteKeyRequest`
@@ -5636,7 +5526,7 @@ await client.crm.tasks.create({
-**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `GenerateKey.RequestOptions`
@@ -5647,7 +5537,9 @@ await client.crm.tasks.create({
-
client.crm.tasks.retrieve(id, { ...params }) -> Merge.Task +## Ats Interviews + +
client.ats.interviews.list({ ...params }) -> Merge.PaginatedScheduledInterviewList
@@ -5659,7 +5551,7 @@ await client.crm.tasks.create({
-Returns a `Task` object with the given `id`. +Returns a list of `ScheduledInterview` objects.
@@ -5675,7 +5567,7 @@ Returns a `Task` object with the given `id`.
```typescript -await client.crm.tasks.retrieve("id"); +await client.ats.interviews.list(); ```
@@ -5691,15 +5583,7 @@ await client.crm.tasks.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.TasksRetrieveRequest` +**request:** `Merge.ats.InterviewsListRequest`
@@ -5707,7 +5591,7 @@ await client.crm.tasks.retrieve("id");
-**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `Interviews.RequestOptions`
@@ -5718,7 +5602,7 @@ await client.crm.tasks.retrieve("id");
-
client.crm.tasks.partialUpdate(id, { ...params }) -> Merge.TaskResponse +
client.ats.interviews.create({ ...params }) -> Merge.ScheduledInterviewResponse
@@ -5730,7 +5614,7 @@ await client.crm.tasks.retrieve("id");
-Updates a `Task` object with the given `id`. +Creates a `ScheduledInterview` object with the given values.
@@ -5746,8 +5630,9 @@ Updates a `Task` object with the given `id`.
```typescript -await client.crm.tasks.partialUpdate("id", { +await client.ats.interviews.create({ model: {}, + remoteUserId: "remote_user_id", }); ``` @@ -5764,15 +5649,7 @@ await client.crm.tasks.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedTaskEndpointRequest` +**request:** `Merge.ats.ScheduledInterviewEndpointRequest`
@@ -5780,7 +5657,7 @@ await client.crm.tasks.partialUpdate("id", {
-**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `Interviews.RequestOptions`
@@ -5791,7 +5668,7 @@ await client.crm.tasks.partialUpdate("id", {
-
client.crm.tasks.metaPatchRetrieve(id) -> Merge.MetaResponse +
client.ats.interviews.retrieve(id, { ...params }) -> Merge.ScheduledInterview
@@ -5803,7 +5680,7 @@ await client.crm.tasks.partialUpdate("id", {
-Returns metadata for `Task` PATCHs. +Returns a `ScheduledInterview` object with the given `id`.
@@ -5819,7 +5696,7 @@ Returns metadata for `Task` PATCHs.
```typescript -await client.crm.tasks.metaPatchRetrieve("id"); +await client.ats.interviews.retrieve("id"); ```
@@ -5829,13 +5706,21 @@ await client.crm.tasks.metaPatchRetrieve("id"); #### ⚙️ Parameters -
-
+
+
+ +
+
+ +**id:** `string` + +
+
-**id:** `string` +**request:** `Merge.ats.InterviewsRetrieveRequest`
@@ -5843,7 +5728,7 @@ await client.crm.tasks.metaPatchRetrieve("id");
-**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `Interviews.RequestOptions`
@@ -5854,7 +5739,7 @@ await client.crm.tasks.metaPatchRetrieve("id");
-
client.crm.tasks.metaPostRetrieve() -> Merge.MetaResponse +
client.ats.interviews.metaPostRetrieve() -> Merge.MetaResponse
@@ -5866,7 +5751,7 @@ await client.crm.tasks.metaPatchRetrieve("id");
-Returns metadata for `Task` POSTs. +Returns metadata for `ScheduledInterview` POSTs.
@@ -5882,7 +5767,7 @@ Returns metadata for `Task` POSTs.
```typescript -await client.crm.tasks.metaPostRetrieve(); +await client.ats.interviews.metaPostRetrieve(); ```
@@ -5898,7 +5783,7 @@ await client.crm.tasks.metaPostRetrieve();
-**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `Interviews.RequestOptions`
@@ -5909,7 +5794,9 @@ await client.crm.tasks.metaPostRetrieve();
-
client.crm.tasks.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +## Ats Issues + +
client.ats.issues.list({ ...params }) -> Merge.PaginatedIssueList
@@ -5921,7 +5808,7 @@ await client.crm.tasks.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Gets all issues for Organization.
@@ -5937,7 +5824,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.tasks.remoteFieldClassesList(); +await client.ats.issues.list(); ```
@@ -5953,7 +5840,7 @@ await client.crm.tasks.remoteFieldClassesList();
-**request:** `Merge.crm.TasksRemoteFieldClassesListRequest` +**request:** `Merge.ats.IssuesListRequest`
@@ -5961,7 +5848,7 @@ await client.crm.tasks.remoteFieldClassesList();
-**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -5972,9 +5859,7 @@ await client.crm.tasks.remoteFieldClassesList();
-## Crm Users - -
client.crm.users.list({ ...params }) -> Merge.PaginatedUserList +
client.ats.issues.retrieve(id) -> Merge.Issue
@@ -5986,7 +5871,7 @@ await client.crm.tasks.remoteFieldClassesList();
-Returns a list of `User` objects. +Get a specific issue.
@@ -6002,7 +5887,7 @@ Returns a list of `User` objects.
```typescript -await client.crm.users.list(); +await client.ats.issues.retrieve("id"); ```
@@ -6018,7 +5903,7 @@ await client.crm.users.list();
-**request:** `Merge.crm.UsersListRequest` +**id:** `string`
@@ -6026,7 +5911,7 @@ await client.crm.users.list();
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -6037,7 +5922,9 @@ await client.crm.users.list();
-
client.crm.users.retrieve(id, { ...params }) -> Merge.User +## Ats JobInterviewStages + +
client.ats.jobInterviewStages.list({ ...params }) -> Merge.PaginatedJobInterviewStageList
@@ -6049,7 +5936,7 @@ await client.crm.users.list();
-Returns a `User` object with the given `id`. +Returns a list of `JobInterviewStage` objects.
@@ -6065,7 +5952,7 @@ Returns a `User` object with the given `id`.
```typescript -await client.crm.users.retrieve("id"); +await client.ats.jobInterviewStages.list(); ```
@@ -6081,15 +5968,7 @@ await client.crm.users.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.UsersRetrieveRequest` +**request:** `Merge.ats.JobInterviewStagesListRequest`
@@ -6097,7 +5976,7 @@ await client.crm.users.retrieve("id");
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `JobInterviewStages.RequestOptions`
@@ -6108,7 +5987,7 @@ await client.crm.users.retrieve("id");
-
client.crm.users.ignoreCreate(modelId, { ...params }) -> void +
client.ats.jobInterviewStages.retrieve(id, { ...params }) -> Merge.JobInterviewStage
@@ -6120,7 +5999,7 @@ await client.crm.users.retrieve("id");
-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. +Returns a `JobInterviewStage` object with the given `id`.
@@ -6136,9 +6015,7 @@ Ignores a specific row based on the `model_id` in the url. These records will ha
```typescript -await client.crm.users.ignoreCreate("model_id", { - reason: "GENERAL_CUSTOMER_REQUEST", -}); +await client.ats.jobInterviewStages.retrieve("id"); ```
@@ -6154,7 +6031,7 @@ await client.crm.users.ignoreCreate("model_id", {
-**modelId:** `string` +**id:** `string`
@@ -6162,7 +6039,7 @@ await client.crm.users.ignoreCreate("model_id", {
-**request:** `Merge.IgnoreCommonModelRequest` +**request:** `Merge.ats.JobInterviewStagesRetrieveRequest`
@@ -6170,7 +6047,7 @@ await client.crm.users.ignoreCreate("model_id", {
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `JobInterviewStages.RequestOptions`
@@ -6181,7 +6058,9 @@ await client.crm.users.ignoreCreate("model_id", {
-
client.crm.users.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +## Ats JobPostings + +
client.ats.jobPostings.list({ ...params }) -> Merge.PaginatedJobPostingList
@@ -6193,7 +6072,7 @@ await client.crm.users.ignoreCreate("model_id", {
-Returns a list of `RemoteFieldClass` objects. +Returns a list of `JobPosting` objects.
@@ -6209,7 +6088,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.users.remoteFieldClassesList(); +await client.ats.jobPostings.list(); ```
@@ -6225,7 +6104,7 @@ await client.crm.users.remoteFieldClassesList();
-**request:** `Merge.crm.UsersRemoteFieldClassesListRequest` +**request:** `Merge.ats.JobPostingsListRequest`
@@ -6233,7 +6112,7 @@ await client.crm.users.remoteFieldClassesList();
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `JobPostings.RequestOptions`
@@ -6244,9 +6123,7 @@ await client.crm.users.remoteFieldClassesList();
-## Crm WebhookReceivers - -
client.crm.webhookReceivers.list() -> Merge.WebhookReceiver[] +
client.ats.jobPostings.retrieve(id, { ...params }) -> Merge.JobPosting
@@ -6258,7 +6135,7 @@ await client.crm.users.remoteFieldClassesList();
-Returns a list of `WebhookReceiver` objects. +Returns a `JobPosting` object with the given `id`.
@@ -6274,7 +6151,7 @@ Returns a list of `WebhookReceiver` objects.
```typescript -await client.crm.webhookReceivers.list(); +await client.ats.jobPostings.retrieve("id"); ```
@@ -6290,7 +6167,23 @@ await client.crm.webhookReceivers.list();
-**requestOptions:** `WebhookReceivers.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.JobPostingsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `JobPostings.RequestOptions`
@@ -6301,7 +6194,9 @@ await client.crm.webhookReceivers.list();
-
client.crm.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver +## Ats Jobs + +
client.ats.jobs.list({ ...params }) -> Merge.PaginatedJobList
@@ -6313,7 +6208,7 @@ await client.crm.webhookReceivers.list();
-Creates a `WebhookReceiver` object with the given values. +Returns a list of `Job` objects.
@@ -6329,10 +6224,7 @@ Creates a `WebhookReceiver` object with the given values.
```typescript -await client.crm.webhookReceivers.create({ - event: "event", - isActive: true, -}); +await client.ats.jobs.list(); ```
@@ -6348,7 +6240,7 @@ await client.crm.webhookReceivers.create({
-**request:** `Merge.crm.WebhookReceiverRequest` +**request:** `Merge.ats.JobsListRequest`
@@ -6356,7 +6248,7 @@ await client.crm.webhookReceivers.create({
-**requestOptions:** `WebhookReceivers.RequestOptions` +**requestOptions:** `Jobs.RequestOptions`
@@ -6367,9 +6259,7 @@ await client.crm.webhookReceivers.create({
-## Ats AccountDetails - -
client.ats.accountDetails.retrieve() -> Merge.AccountDetails +
client.ats.jobs.retrieve(id, { ...params }) -> Merge.Job
@@ -6381,7 +6271,7 @@ await client.crm.webhookReceivers.create({
-Get details for a linked account. +Returns a `Job` object with the given `id`.
@@ -6397,7 +6287,7 @@ Get details for a linked account.
```typescript -await client.ats.accountDetails.retrieve(); +await client.ats.jobs.retrieve("id"); ```
@@ -6413,7 +6303,23 @@ await client.ats.accountDetails.retrieve();
-**requestOptions:** `AccountDetails.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.JobsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Jobs.RequestOptions`
@@ -6424,9 +6330,7 @@ await client.ats.accountDetails.retrieve();
-## Ats AccountToken - -
client.ats.accountToken.retrieve(publicToken) -> Merge.AccountToken +
client.ats.jobs.screeningQuestionsList(jobId, { ...params }) -> Merge.PaginatedScreeningQuestionList
@@ -6438,7 +6342,7 @@ await client.ats.accountDetails.retrieve();
-Returns the account token for the end user with the provided public token. +Returns a list of `ScreeningQuestion` objects.
@@ -6454,7 +6358,7 @@ Returns the account token for the end user with the provided public token.
```typescript -await client.ats.accountToken.retrieve("public_token"); +await client.ats.jobs.screeningQuestionsList("job_id"); ```
@@ -6470,7 +6374,7 @@ await client.ats.accountToken.retrieve("public_token");
-**publicToken:** `string` +**jobId:** `string`
@@ -6478,7 +6382,15 @@ await client.ats.accountToken.retrieve("public_token");
-**requestOptions:** `AccountToken.RequestOptions` +**request:** `Merge.ats.JobsScreeningQuestionsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Jobs.RequestOptions`
@@ -6489,9 +6401,9 @@ await client.ats.accountToken.retrieve("public_token");
-## Ats Activities +## Ats LinkToken -
client.ats.activities.list({ ...params }) -> Merge.PaginatedActivityList +
client.ats.linkToken.create({ ...params }) -> Merge.LinkToken
@@ -6503,7 +6415,7 @@ await client.ats.accountToken.retrieve("public_token");
-Returns a list of `Activity` objects. +Creates a link token to be used when linking a new end user.
@@ -6519,7 +6431,12 @@ Returns a list of `Activity` objects.
```typescript -await client.ats.activities.list(); +await client.ats.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], +}); ```
@@ -6535,7 +6452,7 @@ await client.ats.activities.list();
-**request:** `Merge.ats.ActivitiesListRequest` +**request:** `Merge.ats.EndUserDetailsRequest`
@@ -6543,7 +6460,7 @@ await client.ats.activities.list();
-**requestOptions:** `Activities.RequestOptions` +**requestOptions:** `LinkToken.RequestOptions`
@@ -6554,7 +6471,9 @@ await client.ats.activities.list();
-
client.ats.activities.create({ ...params }) -> Merge.ActivityResponse +## Ats LinkedAccounts + +
client.ats.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList
@@ -6566,7 +6485,7 @@ await client.ats.activities.list();
-Creates an `Activity` object with the given values. +List linked accounts for your organization.
@@ -6582,10 +6501,7 @@ Creates an `Activity` object with the given values.
```typescript -await client.ats.activities.create({ - model: {}, - remoteUserId: "remote_user_id", -}); +await client.ats.linkedAccounts.list(); ```
@@ -6601,7 +6517,7 @@ await client.ats.activities.create({
-**request:** `Merge.ats.ActivityEndpointRequest` +**request:** `Merge.ats.LinkedAccountsListRequest`
@@ -6609,7 +6525,7 @@ await client.ats.activities.create({
-**requestOptions:** `Activities.RequestOptions` +**requestOptions:** `LinkedAccounts.RequestOptions`
@@ -6620,7 +6536,9 @@ await client.ats.activities.create({
-
client.ats.activities.retrieve(id, { ...params }) -> Merge.Activity +## Ats Offers + +
client.ats.offers.list({ ...params }) -> Merge.PaginatedOfferList
@@ -6632,7 +6550,7 @@ await client.ats.activities.create({
-Returns an `Activity` object with the given `id`. +Returns a list of `Offer` objects.
@@ -6648,7 +6566,7 @@ Returns an `Activity` object with the given `id`.
```typescript -await client.ats.activities.retrieve("id"); +await client.ats.offers.list(); ```
@@ -6664,15 +6582,7 @@ await client.ats.activities.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.ats.ActivitiesRetrieveRequest` +**request:** `Merge.ats.OffersListRequest`
@@ -6680,7 +6590,7 @@ await client.ats.activities.retrieve("id");
-**requestOptions:** `Activities.RequestOptions` +**requestOptions:** `Offers.RequestOptions`
@@ -6691,7 +6601,7 @@ await client.ats.activities.retrieve("id");
-
client.ats.activities.metaPostRetrieve() -> Merge.MetaResponse +
client.ats.offers.retrieve(id, { ...params }) -> Merge.Offer
@@ -6703,7 +6613,7 @@ await client.ats.activities.retrieve("id");
-Returns metadata for `Activity` POSTs. +Returns an `Offer` object with the given `id`.
@@ -6719,7 +6629,7 @@ Returns metadata for `Activity` POSTs.
```typescript -await client.ats.activities.metaPostRetrieve(); +await client.ats.offers.retrieve("id"); ```
@@ -6735,7 +6645,23 @@ await client.ats.activities.metaPostRetrieve();
-**requestOptions:** `Activities.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.OffersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Offers.RequestOptions`
@@ -6746,9 +6672,9 @@ await client.ats.activities.metaPostRetrieve();
-## Ats Applications +## Ats Offices -
client.ats.applications.list({ ...params }) -> Merge.PaginatedApplicationList +
client.ats.offices.list({ ...params }) -> Merge.PaginatedOfficeList
@@ -6760,7 +6686,7 @@ await client.ats.activities.metaPostRetrieve();
-Returns a list of `Application` objects. +Returns a list of `Office` objects.
@@ -6776,7 +6702,7 @@ Returns a list of `Application` objects.
```typescript -await client.ats.applications.list(); +await client.ats.offices.list(); ```
@@ -6792,7 +6718,7 @@ await client.ats.applications.list();
-**request:** `Merge.ats.ApplicationsListRequest` +**request:** `Merge.ats.OfficesListRequest`
@@ -6800,7 +6726,7 @@ await client.ats.applications.list();
-**requestOptions:** `Applications.RequestOptions` +**requestOptions:** `Offices.RequestOptions`
@@ -6811,7 +6737,7 @@ await client.ats.applications.list();
-
client.ats.applications.create({ ...params }) -> Merge.ApplicationResponse +
client.ats.offices.retrieve(id, { ...params }) -> Merge.Office
@@ -6823,10 +6749,7 @@ await client.ats.applications.list();
-Creates an `Application` object with the given values. -For certain integrations, but not all, our API detects duplicate candidates and will associate applications with existing records in the third-party. New candidates are created and automatically linked to the application. - -See our [Help Center article](https://help.merge.dev/en/articles/10012366-updates-to-post-applications-oct-2024) for detailed support per integration. +Returns an `Office` object with the given `id`.
@@ -6842,10 +6765,7 @@ See our [Help Center article](https://help.merge.dev/en/articles/10012366-update
```typescript -await client.ats.applications.create({ - model: {}, - remoteUserId: "remote_user_id", -}); +await client.ats.offices.retrieve("id"); ```
@@ -6861,7 +6781,7 @@ await client.ats.applications.create({
-**request:** `Merge.ats.ApplicationEndpointRequest` +**id:** `string`
@@ -6869,7 +6789,15 @@ await client.ats.applications.create({
-**requestOptions:** `Applications.RequestOptions` +**request:** `Merge.ats.OfficesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Offices.RequestOptions`
@@ -6880,7 +6808,9 @@ await client.ats.applications.create({
-
client.ats.applications.retrieve(id, { ...params }) -> Merge.Application +## Ats Passthrough + +
client.ats.passthrough.create({ ...params }) -> Merge.RemoteResponse
@@ -6892,7 +6822,7 @@ await client.ats.applications.create({
-Returns an `Application` object with the given `id`. +Pull data from an endpoint not currently supported by Merge.
@@ -6908,7 +6838,10 @@ Returns an `Application` object with the given `id`.
```typescript -await client.ats.applications.retrieve("id"); +await client.ats.passthrough.create({ + method: "GET", + path: "/scooters", +}); ```
@@ -6924,15 +6857,7 @@ await client.ats.applications.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.ats.ApplicationsRetrieveRequest` +**request:** `Merge.DataPassthroughRequest`
@@ -6940,7 +6865,7 @@ await client.ats.applications.retrieve("id");
-**requestOptions:** `Applications.RequestOptions` +**requestOptions:** `Passthrough.RequestOptions`
@@ -6951,7 +6876,9 @@ await client.ats.applications.retrieve("id");
-
client.ats.applications.changeStageCreate(id, { ...params }) -> Merge.ApplicationResponse +## Ats RegenerateKey + +
client.ats.regenerateKey.create({ ...params }) -> Merge.RemoteKey
@@ -6963,7 +6890,7 @@ await client.ats.applications.retrieve("id");
-Updates the `current_stage` field of an `Application` object +Exchange remote keys.
@@ -6979,7 +6906,9 @@ Updates the `current_stage` field of an `Application` object
```typescript -await client.ats.applications.changeStageCreate("id"); +await client.ats.regenerateKey.create({ + name: "Remote Deployment Key 1", +}); ```
@@ -6995,15 +6924,7 @@ await client.ats.applications.changeStageCreate("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.ats.UpdateApplicationStageRequest` +**request:** `Merge.ats.RemoteKeyForRegenerationRequest`
@@ -7011,7 +6932,7 @@ await client.ats.applications.changeStageCreate("id");
-**requestOptions:** `Applications.RequestOptions` +**requestOptions:** `RegenerateKey.RequestOptions`
@@ -7022,7 +6943,9 @@ await client.ats.applications.changeStageCreate("id");
-
client.ats.applications.metaPostRetrieve({ ...params }) -> Merge.MetaResponse +## Ats RejectReasons + +
client.ats.rejectReasons.list({ ...params }) -> Merge.PaginatedRejectReasonList
@@ -7034,7 +6957,7 @@ await client.ats.applications.changeStageCreate("id");
-Returns metadata for `Application` POSTs. +Returns a list of `RejectReason` objects.
@@ -7050,7 +6973,7 @@ Returns metadata for `Application` POSTs.
```typescript -await client.ats.applications.metaPostRetrieve(); +await client.ats.rejectReasons.list(); ```
@@ -7066,7 +6989,7 @@ await client.ats.applications.metaPostRetrieve();
-**request:** `Merge.ats.ApplicationsMetaPostRetrieveRequest` +**request:** `Merge.ats.RejectReasonsListRequest`
@@ -7074,7 +6997,7 @@ await client.ats.applications.metaPostRetrieve();
-**requestOptions:** `Applications.RequestOptions` +**requestOptions:** `RejectReasons.RequestOptions`
@@ -7085,9 +7008,7 @@ await client.ats.applications.metaPostRetrieve();
-## Ats AsyncPassthrough - -
client.ats.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept +
client.ats.rejectReasons.retrieve(id, { ...params }) -> Merge.RejectReason
@@ -7099,7 +7020,7 @@ await client.ats.applications.metaPostRetrieve();
-Asynchronously pull data from an endpoint not currently supported by Merge. +Returns a `RejectReason` object with the given `id`.
@@ -7115,10 +7036,7 @@ Asynchronously pull data from an endpoint not currently supported by Merge.
```typescript -await client.ats.asyncPassthrough.create({ - method: "GET", - path: "/scooters", -}); +await client.ats.rejectReasons.retrieve("id"); ```
@@ -7134,7 +7052,7 @@ await client.ats.asyncPassthrough.create({
-**request:** `Merge.DataPassthroughRequest` +**id:** `string`
@@ -7142,7 +7060,15 @@ await client.ats.asyncPassthrough.create({
-**requestOptions:** `AsyncPassthrough.RequestOptions` +**request:** `Merge.ats.RejectReasonsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `RejectReasons.RequestOptions`
@@ -7153,7 +7079,9 @@ await client.ats.asyncPassthrough.create({
-
client.ats.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse +## Ats Scorecards + +
client.ats.scorecards.list({ ...params }) -> Merge.PaginatedScorecardList
@@ -7165,7 +7093,7 @@ await client.ats.asyncPassthrough.create({
-Retrieves data from earlier async-passthrough POST request +Returns a list of `Scorecard` objects.
@@ -7181,7 +7109,7 @@ Retrieves data from earlier async-passthrough POST request
```typescript -await client.ats.asyncPassthrough.retrieve("async_passthrough_receipt_id"); +await client.ats.scorecards.list(); ```
@@ -7197,7 +7125,7 @@ await client.ats.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-**asyncPassthroughReceiptId:** `string` +**request:** `Merge.ats.ScorecardsListRequest`
@@ -7205,7 +7133,7 @@ await client.ats.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `Scorecards.RequestOptions`
@@ -7216,9 +7144,7 @@ await client.ats.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-## Ats Attachments - -
client.ats.attachments.list({ ...params }) -> Merge.PaginatedAttachmentList +
client.ats.scorecards.retrieve(id, { ...params }) -> Merge.Scorecard
@@ -7230,7 +7156,7 @@ await client.ats.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-Returns a list of `Attachment` objects. +Returns a `Scorecard` object with the given `id`.
@@ -7246,7 +7172,7 @@ Returns a list of `Attachment` objects.
```typescript -await client.ats.attachments.list(); +await client.ats.scorecards.retrieve("id"); ```
@@ -7262,7 +7188,7 @@ await client.ats.attachments.list();
-**request:** `Merge.ats.AttachmentsListRequest` +**id:** `string`
@@ -7270,7 +7196,15 @@ await client.ats.attachments.list();
-**requestOptions:** `Attachments.RequestOptions` +**request:** `Merge.ats.ScorecardsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Scorecards.RequestOptions`
@@ -7281,7 +7215,9 @@ await client.ats.attachments.list();
-
client.ats.attachments.create({ ...params }) -> Merge.AttachmentResponse +## Ats SyncStatus + +
client.ats.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList
@@ -7293,7 +7229,7 @@ await client.ats.attachments.list();
-Creates an `Attachment` object with the given values. +Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `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).
@@ -7309,10 +7245,7 @@ Creates an `Attachment` object with the given values.
```typescript -await client.ats.attachments.create({ - model: {}, - remoteUserId: "remote_user_id", -}); +await client.ats.syncStatus.list(); ```
@@ -7328,7 +7261,7 @@ await client.ats.attachments.create({
-**request:** `Merge.ats.AttachmentEndpointRequest` +**request:** `Merge.ats.SyncStatusListRequest`
@@ -7336,7 +7269,7 @@ await client.ats.attachments.create({
-**requestOptions:** `Attachments.RequestOptions` +**requestOptions:** `SyncStatus.RequestOptions`
@@ -7347,7 +7280,9 @@ await client.ats.attachments.create({
-
client.ats.attachments.retrieve(id, { ...params }) -> Merge.Attachment +## Ats ForceResync + +
client.ats.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[]
@@ -7359,7 +7294,7 @@ await client.ats.attachments.create({
-Returns an `Attachment` object with the given `id`. +Force re-sync of all models. This endpoint is available 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. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers.
@@ -7375,7 +7310,7 @@ Returns an `Attachment` object with the given `id`.
```typescript -await client.ats.attachments.retrieve("id"); +await client.ats.forceResync.syncStatusResyncCreate(); ```
@@ -7391,23 +7326,7 @@ await client.ats.attachments.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.ats.AttachmentsRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `Attachments.RequestOptions` +**requestOptions:** `ForceResync.RequestOptions`
@@ -7418,7 +7337,9 @@ await client.ats.attachments.retrieve("id");
-
client.ats.attachments.metaPostRetrieve() -> Merge.MetaResponse +## Ats Tags + +
client.ats.tags.list({ ...params }) -> Merge.PaginatedTagList
@@ -7430,7 +7351,7 @@ await client.ats.attachments.retrieve("id");
-Returns metadata for `Attachment` POSTs. +Returns a list of `Tag` objects.
@@ -7446,7 +7367,7 @@ Returns metadata for `Attachment` POSTs.
```typescript -await client.ats.attachments.metaPostRetrieve(); +await client.ats.tags.list(); ```
@@ -7462,7 +7383,15 @@ await client.ats.attachments.metaPostRetrieve();
-**requestOptions:** `Attachments.RequestOptions` +**request:** `Merge.ats.TagsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Tags.RequestOptions`
@@ -7473,9 +7402,9 @@ await client.ats.attachments.metaPostRetrieve();
-## Ats AuditTrail +## Ats Users -
client.ats.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList +
client.ats.users.list({ ...params }) -> Merge.PaginatedRemoteUserList
@@ -7487,7 +7416,7 @@ await client.ats.attachments.metaPostRetrieve();
-Gets a list of audit trail events. +Returns a list of `RemoteUser` objects.
@@ -7503,7 +7432,7 @@ Gets a list of audit trail events.
```typescript -await client.ats.auditTrail.list(); +await client.ats.users.list(); ```
@@ -7519,7 +7448,7 @@ await client.ats.auditTrail.list();
-**request:** `Merge.ats.AuditTrailListRequest` +**request:** `Merge.ats.UsersListRequest`
@@ -7527,7 +7456,7 @@ await client.ats.auditTrail.list();
-**requestOptions:** `AuditTrail.RequestOptions` +**requestOptions:** `Users.RequestOptions`
@@ -7538,9 +7467,7 @@ await client.ats.auditTrail.list();
-## Ats AvailableActions - -
client.ats.availableActions.retrieve() -> Merge.AvailableActions +
client.ats.users.retrieve(id, { ...params }) -> Merge.RemoteUser
@@ -7552,7 +7479,7 @@ await client.ats.auditTrail.list();
-Returns a list of models and actions available for an account. +Returns a `RemoteUser` object with the given `id`.
@@ -7568,7 +7495,7 @@ Returns a list of models and actions available for an account.
```typescript -await client.ats.availableActions.retrieve(); +await client.ats.users.retrieve("id"); ```
@@ -7584,7 +7511,23 @@ await client.ats.availableActions.retrieve();
-**requestOptions:** `AvailableActions.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.ats.UsersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions`
@@ -7595,9 +7538,9 @@ await client.ats.availableActions.retrieve();
-## Ats Candidates +## Ats WebhookReceivers -
client.ats.candidates.list({ ...params }) -> Merge.PaginatedCandidateList +
client.ats.webhookReceivers.list() -> Merge.WebhookReceiver[]
@@ -7609,7 +7552,7 @@ await client.ats.availableActions.retrieve();
-Returns a list of `Candidate` objects. +Returns a list of `WebhookReceiver` objects.
@@ -7625,7 +7568,7 @@ Returns a list of `Candidate` objects.
```typescript -await client.ats.candidates.list(); +await client.ats.webhookReceivers.list(); ```
@@ -7641,15 +7584,7 @@ await client.ats.candidates.list();
-**request:** `Merge.ats.CandidatesListRequest` - -
-
- -
-
- -**requestOptions:** `Candidates.RequestOptions` +**requestOptions:** `WebhookReceivers.RequestOptions`
@@ -7660,7 +7595,7 @@ await client.ats.candidates.list();
-
client.ats.candidates.create({ ...params }) -> Merge.CandidateResponse +
client.ats.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver
@@ -7672,7 +7607,7 @@ await client.ats.candidates.list();
-Creates a `Candidate` object with the given values. +Creates a `WebhookReceiver` object with the given values.
@@ -7688,9 +7623,9 @@ Creates a `Candidate` object with the given values.
```typescript -await client.ats.candidates.create({ - model: {}, - remoteUserId: "remote_user_id", +await client.ats.webhookReceivers.create({ + event: "event", + isActive: true, }); ``` @@ -7707,7 +7642,7 @@ await client.ats.candidates.create({
-**request:** `Merge.ats.CandidateEndpointRequest` +**request:** `Merge.ats.WebhookReceiverRequest`
@@ -7715,7 +7650,7 @@ await client.ats.candidates.create({
-**requestOptions:** `Candidates.RequestOptions` +**requestOptions:** `WebhookReceivers.RequestOptions`
@@ -7726,7 +7661,9 @@ await client.ats.candidates.create({
-
client.ats.candidates.retrieve(id, { ...params }) -> Merge.Candidate +## Crm AccountDetails + +
client.crm.accountDetails.retrieve() -> Merge.AccountDetails
@@ -7738,7 +7675,7 @@ await client.ats.candidates.create({
-Returns a `Candidate` object with the given `id`. +Get details for a linked account.
@@ -7754,7 +7691,7 @@ Returns a `Candidate` object with the given `id`.
```typescript -await client.ats.candidates.retrieve("id"); +await client.crm.accountDetails.retrieve(); ```
@@ -7770,23 +7707,7 @@ await client.ats.candidates.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.ats.CandidatesRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `Candidates.RequestOptions` +**requestOptions:** `AccountDetails.RequestOptions`
@@ -7797,7 +7718,9 @@ await client.ats.candidates.retrieve("id");
-
client.ats.candidates.partialUpdate(id, { ...params }) -> Merge.CandidateResponse +## Crm AccountToken + +
client.crm.accountToken.retrieve(publicToken) -> Merge.AccountToken
@@ -7809,7 +7732,7 @@ await client.ats.candidates.retrieve("id");
-Updates a `Candidate` object with the given `id`. +Returns the account token for the end user with the provided public token.
@@ -7825,10 +7748,7 @@ Updates a `Candidate` object with the given `id`.
```typescript -await client.ats.candidates.partialUpdate("id", { - model: {}, - remoteUserId: "remote_user_id", -}); +await client.crm.accountToken.retrieve("public_token"); ```
@@ -7844,15 +7764,7 @@ await client.ats.candidates.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.ats.PatchedCandidateEndpointRequest` +**publicToken:** `string`
@@ -7860,7 +7772,7 @@ await client.ats.candidates.partialUpdate("id", {
-**requestOptions:** `Candidates.RequestOptions` +**requestOptions:** `AccountToken.RequestOptions`
@@ -7871,7 +7783,9 @@ await client.ats.candidates.partialUpdate("id", {
-
client.ats.candidates.ignoreCreate(modelId, { ...params }) -> void +## Crm Accounts + +
client.crm.accounts.list({ ...params }) -> Merge.PaginatedAccountList
@@ -7883,7 +7797,7 @@ await client.ats.candidates.partialUpdate("id", {
-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. +Returns a list of `Account` objects.
@@ -7899,9 +7813,7 @@ Ignores a specific row based on the `model_id` in the url. These records will ha
```typescript -await client.ats.candidates.ignoreCreate("model_id", { - reason: "GENERAL_CUSTOMER_REQUEST", -}); +await client.crm.accounts.list(); ```
@@ -7917,15 +7829,7 @@ await client.ats.candidates.ignoreCreate("model_id", {
-**modelId:** `string` - -
-
- -
-
- -**request:** `Merge.ats.IgnoreCommonModelRequest` +**request:** `Merge.crm.AccountsListRequest`
@@ -7933,7 +7837,7 @@ await client.ats.candidates.ignoreCreate("model_id", {
-**requestOptions:** `Candidates.RequestOptions` +**requestOptions:** `Accounts.RequestOptions`
@@ -7944,7 +7848,7 @@ await client.ats.candidates.ignoreCreate("model_id", {
-
client.ats.candidates.metaPatchRetrieve(id) -> Merge.MetaResponse +
client.crm.accounts.create({ ...params }) -> Merge.CrmAccountResponse
@@ -7956,7 +7860,7 @@ await client.ats.candidates.ignoreCreate("model_id", {
-Returns metadata for `Candidate` PATCHs. +Creates an `Account` object with the given values.
@@ -7972,7 +7876,9 @@ Returns metadata for `Candidate` PATCHs.
```typescript -await client.ats.candidates.metaPatchRetrieve("id"); +await client.crm.accounts.create({ + model: {}, +}); ```
@@ -7988,7 +7894,7 @@ await client.ats.candidates.metaPatchRetrieve("id");
-**id:** `string` +**request:** `Merge.crm.CrmAccountEndpointRequest`
@@ -7996,7 +7902,7 @@ await client.ats.candidates.metaPatchRetrieve("id");
-**requestOptions:** `Candidates.RequestOptions` +**requestOptions:** `Accounts.RequestOptions`
@@ -8007,7 +7913,7 @@ await client.ats.candidates.metaPatchRetrieve("id");
-
client.ats.candidates.metaPostRetrieve() -> Merge.MetaResponse +
client.crm.accounts.retrieve(id, { ...params }) -> Merge.Account
@@ -8019,7 +7925,7 @@ await client.ats.candidates.metaPatchRetrieve("id");
-Returns metadata for `Candidate` POSTs. +Returns an `Account` object with the given `id`.
@@ -8035,7 +7941,7 @@ Returns metadata for `Candidate` POSTs.
```typescript -await client.ats.candidates.metaPostRetrieve(); +await client.crm.accounts.retrieve("id"); ```
@@ -8051,7 +7957,23 @@ await client.ats.candidates.metaPostRetrieve();
-**requestOptions:** `Candidates.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.AccountsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions`
@@ -8062,9 +7984,7 @@ await client.ats.candidates.metaPostRetrieve();
-## Ats Scopes - -
client.ats.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
client.crm.accounts.partialUpdate(id, { ...params }) -> Merge.CrmAccountResponse
@@ -8076,7 +7996,7 @@ await client.ats.candidates.metaPostRetrieve();
-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). +Updates an `Account` object with the given `id`.
@@ -8092,7 +8012,9 @@ Get the default permissions for Merge Common Models and fields across all Linked
```typescript -await client.ats.scopes.defaultScopesRetrieve(); +await client.crm.accounts.partialUpdate("id", { + model: {}, +}); ```
@@ -8108,7 +8030,23 @@ await client.ats.scopes.defaultScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.PatchedCrmAccountEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions`
@@ -8119,7 +8057,7 @@ await client.ats.scopes.defaultScopesRetrieve();
-
client.ats.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +
client.crm.accounts.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -8131,7 +8069,7 @@ await client.ats.scopes.defaultScopesRetrieve();
-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). +Returns metadata for `CRMAccount` PATCHs.
@@ -8147,7 +8085,7 @@ Get all available permissions for Merge Common Models and fields for a single Li
```typescript -await client.ats.scopes.linkedAccountScopesRetrieve(); +await client.crm.accounts.metaPatchRetrieve("id"); ```
@@ -8163,7 +8101,15 @@ await client.ats.scopes.linkedAccountScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions`
@@ -8174,7 +8120,7 @@ await client.ats.scopes.linkedAccountScopesRetrieve();
-
client.ats.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +
client.crm.accounts.metaPostRetrieve() -> Merge.MetaResponse
@@ -8186,7 +8132,7 @@ await client.ats.scopes.linkedAccountScopesRetrieve();
-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) +Returns metadata for `CRMAccount` POSTs.
@@ -8202,33 +8148,7 @@ Update permissions for any Common Model or field for a single Linked Account. An
```typescript -await client.ats.scopes.linkedAccountScopesCreate({ - commonModels: [ - { - modelName: "Employee", - modelPermissions: { - READ: { - isEnabled: true, - }, - WRITE: { - isEnabled: false, - }, - }, - fieldPermissions: { - enabledFields: ["avatar", "home_location"], - disabledFields: ["work_location"], - }, - }, - { - modelName: "Benefit", - modelPermissions: { - WRITE: { - isEnabled: false, - }, - }, - }, - ], -}); +await client.crm.accounts.metaPostRetrieve(); ```
@@ -8244,15 +8164,7 @@ await client.ats.scopes.linkedAccountScopesCreate({
-**request:** `Merge.ats.LinkedAccountCommonModelScopeDeserializerRequest` - -
-
- -
-
- -**requestOptions:** `Scopes.RequestOptions` +**requestOptions:** `Accounts.RequestOptions`
@@ -8263,9 +8175,7 @@ await client.ats.scopes.linkedAccountScopesCreate({
-## Ats DeleteAccount - -
client.ats.deleteAccount.delete() -> void +
client.crm.accounts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -8277,7 +8187,7 @@ await client.ats.scopes.linkedAccountScopesCreate({
-Delete a linked account. +Returns a list of `RemoteFieldClass` objects.
@@ -8293,7 +8203,7 @@ Delete a linked account.
```typescript -await client.ats.deleteAccount.delete(); +await client.crm.accounts.remoteFieldClassesList(); ```
@@ -8309,7 +8219,15 @@ await client.ats.deleteAccount.delete();
-**requestOptions:** `DeleteAccount.RequestOptions` +**request:** `Merge.crm.AccountsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions`
@@ -8320,9 +8238,9 @@ await client.ats.deleteAccount.delete();
-## Ats Departments +## Crm AsyncPassthrough -
client.ats.departments.list({ ...params }) -> Merge.PaginatedDepartmentList +
client.crm.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept
@@ -8334,7 +8252,7 @@ await client.ats.deleteAccount.delete();
-Returns a list of `Department` objects. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -8350,7 +8268,10 @@ Returns a list of `Department` objects.
```typescript -await client.ats.departments.list(); +await client.crm.asyncPassthrough.create({ + method: "GET", + path: "/scooters", +}); ```
@@ -8366,7 +8287,7 @@ await client.ats.departments.list();
-**request:** `Merge.ats.DepartmentsListRequest` +**request:** `Merge.DataPassthroughRequest`
@@ -8374,7 +8295,7 @@ await client.ats.departments.list();
-**requestOptions:** `Departments.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -8385,7 +8306,7 @@ await client.ats.departments.list();
-
client.ats.departments.retrieve(id, { ...params }) -> Merge.Department +
client.crm.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse
@@ -8397,7 +8318,7 @@ await client.ats.departments.list();
-Returns a `Department` object with the given `id`. +Retrieves data from earlier async-passthrough POST request
@@ -8413,7 +8334,7 @@ Returns a `Department` object with the given `id`.
```typescript -await client.ats.departments.retrieve("id"); +await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id"); ```
@@ -8423,21 +8344,13 @@ await client.ats.departments.retrieve("id"); #### ⚙️ Parameters -
-
- -
-
- -**id:** `string` - -
-
+
+
-**request:** `Merge.ats.DepartmentsRetrieveRequest` +**asyncPassthroughReceiptId:** `string`
@@ -8445,7 +8358,7 @@ await client.ats.departments.retrieve("id");
-**requestOptions:** `Departments.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -8456,9 +8369,9 @@ await client.ats.departments.retrieve("id");
-## Ats Eeocs +## Crm AuditTrail -
client.ats.eeocs.list({ ...params }) -> Merge.PaginatedEeocList +
client.crm.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList
@@ -8470,7 +8383,7 @@ await client.ats.departments.retrieve("id");
-Returns a list of `EEOC` objects. +Gets a list of audit trail events.
@@ -8486,7 +8399,7 @@ Returns a list of `EEOC` objects.
```typescript -await client.ats.eeocs.list(); +await client.crm.auditTrail.list(); ```
@@ -8502,7 +8415,7 @@ await client.ats.eeocs.list();
-**request:** `Merge.ats.EeocsListRequest` +**request:** `Merge.crm.AuditTrailListRequest`
@@ -8510,7 +8423,7 @@ await client.ats.eeocs.list();
-**requestOptions:** `Eeocs.RequestOptions` +**requestOptions:** `AuditTrail.RequestOptions`
@@ -8521,7 +8434,9 @@ await client.ats.eeocs.list();
-
client.ats.eeocs.retrieve(id, { ...params }) -> Merge.Eeoc +## Crm AvailableActions + +
client.crm.availableActions.retrieve() -> Merge.AvailableActions
@@ -8533,7 +8448,7 @@ await client.ats.eeocs.list();
-Returns an `EEOC` object with the given `id`. +Returns a list of models and actions available for an account.
@@ -8549,7 +8464,7 @@ Returns an `EEOC` object with the given `id`.
```typescript -await client.ats.eeocs.retrieve("id"); +await client.crm.availableActions.retrieve(); ```
@@ -8565,23 +8480,7 @@ await client.ats.eeocs.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.ats.EeocsRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `Eeocs.RequestOptions` +**requestOptions:** `AvailableActions.RequestOptions`
@@ -8592,9 +8491,9 @@ await client.ats.eeocs.retrieve("id");
-## Ats FieldMapping +## Crm Contacts -
client.ats.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse +
client.crm.contacts.list({ ...params }) -> Merge.PaginatedContactList
@@ -8606,7 +8505,7 @@ await client.ats.eeocs.retrieve("id");
-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/). +Returns a list of `Contact` objects.
@@ -8622,7 +8521,7 @@ Get all Field Mappings for this Linked Account. Field Mappings are mappings betw
```typescript -await client.ats.fieldMapping.fieldMappingsRetrieve(); +await client.crm.contacts.list(); ```
@@ -8638,7 +8537,7 @@ await client.ats.fieldMapping.fieldMappingsRetrieve();
-**request:** `Merge.ats.FieldMappingsRetrieveRequest` +**request:** `Merge.crm.ContactsListRequest`
@@ -8646,7 +8545,7 @@ await client.ats.fieldMapping.fieldMappingsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -8657,7 +8556,7 @@ await client.ats.fieldMapping.fieldMappingsRetrieve();
-
client.ats.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +
client.crm.contacts.create({ ...params }) -> Merge.CrmContactResponse
@@ -8669,7 +8568,7 @@ await client.ats.fieldMapping.fieldMappingsRetrieve();
-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. +Creates a `Contact` object with the given values.
@@ -8685,13 +8584,8 @@ Create new Field Mappings that will be available after the next scheduled sync.
```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", +await client.crm.contacts.create({ + model: {}, }); ``` @@ -8708,7 +8602,7 @@ await client.ats.fieldMapping.fieldMappingsCreate({
-**request:** `Merge.ats.CreateFieldMappingRequest` +**request:** `Merge.crm.CrmContactEndpointRequest`
@@ -8716,7 +8610,7 @@ await client.ats.fieldMapping.fieldMappingsCreate({
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -8727,7 +8621,7 @@ await client.ats.fieldMapping.fieldMappingsCreate({
-
client.ats.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +
client.crm.contacts.retrieve(id, { ...params }) -> Merge.Contact
@@ -8739,7 +8633,7 @@ await client.ats.fieldMapping.fieldMappingsCreate({
-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. +Returns a `Contact` object with the given `id`.
@@ -8755,7 +8649,7 @@ Deletes Field Mappings for a Linked Account. All data related to this Field Mapp
```typescript -await client.ats.fieldMapping.fieldMappingsDestroy("field_mapping_id"); +await client.crm.contacts.retrieve("id"); ```
@@ -8771,7 +8665,7 @@ await client.ats.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**fieldMappingId:** `string` +**id:** `string`
@@ -8779,7 +8673,15 @@ await client.ats.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**requestOptions:** `FieldMapping.RequestOptions` +**request:** `Merge.crm.ContactsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions`
@@ -8790,7 +8692,7 @@ await client.ats.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-
client.ats.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +
client.crm.contacts.partialUpdate(id, { ...params }) -> Merge.CrmContactResponse
@@ -8802,7 +8704,7 @@ await client.ats.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-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. +Updates a `Contact` object with the given `id`.
@@ -8818,7 +8720,9 @@ Create or update existing Field Mappings for a Linked Account. Changes will be r
```typescript -await client.ats.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); +await client.crm.contacts.partialUpdate("id", { + model: {}, +}); ```
@@ -8834,7 +8738,7 @@ await client.ats.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-**fieldMappingId:** `string` +**id:** `string`
@@ -8842,7 +8746,7 @@ await client.ats.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-**request:** `Merge.ats.PatchedEditFieldMappingRequest` +**request:** `Merge.crm.PatchedCrmContactEndpointRequest`
@@ -8850,7 +8754,7 @@ await client.ats.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -8861,7 +8765,7 @@ await client.ats.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-
client.ats.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +
client.crm.contacts.ignoreCreate(modelId, { ...params }) -> void
@@ -8873,7 +8777,7 @@ await client.ats.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-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/). +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.
@@ -8889,7 +8793,9 @@ Get all remote fields for a Linked Account. Remote fields are third-party fields
```typescript -await client.ats.fieldMapping.remoteFieldsRetrieve(); +await client.crm.contacts.ignoreCreate("model_id", { + reason: "GENERAL_CUSTOMER_REQUEST", +}); ```
@@ -8905,7 +8811,7 @@ await client.ats.fieldMapping.remoteFieldsRetrieve();
-**request:** `Merge.ats.RemoteFieldsRetrieveRequest` +**modelId:** `string`
@@ -8913,7 +8819,15 @@ await client.ats.fieldMapping.remoteFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**request:** `Merge.IgnoreCommonModelRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions`
@@ -8924,7 +8838,7 @@ await client.ats.fieldMapping.remoteFieldsRetrieve();
-
client.ats.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +
client.crm.contacts.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -8936,7 +8850,7 @@ await client.ats.fieldMapping.remoteFieldsRetrieve();
-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/). +Returns metadata for `CRMContact` PATCHs.
@@ -8952,7 +8866,7 @@ Get all organization-wide Target Fields, this will not include any Linked Accoun
```typescript -await client.ats.fieldMapping.targetFieldsRetrieve(); +await client.crm.contacts.metaPatchRetrieve("id"); ```
@@ -8968,7 +8882,15 @@ await client.ats.fieldMapping.targetFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions`
@@ -8979,9 +8901,7 @@ await client.ats.fieldMapping.targetFieldsRetrieve();
-## Ats GenerateKey - -
client.ats.generateKey.create({ ...params }) -> Merge.RemoteKey +
client.crm.contacts.metaPostRetrieve() -> Merge.MetaResponse
@@ -8993,7 +8913,7 @@ await client.ats.fieldMapping.targetFieldsRetrieve();
-Create a remote key. +Returns metadata for `CRMContact` POSTs.
@@ -9009,9 +8929,7 @@ Create a remote key.
```typescript -await client.ats.generateKey.create({ - name: "Remote Deployment Key 1", -}); +await client.crm.contacts.metaPostRetrieve(); ```
@@ -9027,15 +8945,7 @@ await client.ats.generateKey.create({
-**request:** `Merge.ats.GenerateRemoteKeyRequest` - -
-
- -
-
- -**requestOptions:** `GenerateKey.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -9046,9 +8956,7 @@ await client.ats.generateKey.create({
-## Ats Interviews - -
client.ats.interviews.list({ ...params }) -> Merge.PaginatedScheduledInterviewList +
client.crm.contacts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -9060,7 +8968,7 @@ await client.ats.generateKey.create({
-Returns a list of `ScheduledInterview` objects. +Returns a list of `RemoteFieldClass` objects.
@@ -9076,7 +8984,7 @@ Returns a list of `ScheduledInterview` objects.
```typescript -await client.ats.interviews.list(); +await client.crm.contacts.remoteFieldClassesList(); ```
@@ -9092,7 +9000,7 @@ await client.ats.interviews.list();
-**request:** `Merge.ats.InterviewsListRequest` +**request:** `Merge.crm.ContactsRemoteFieldClassesListRequest`
@@ -9100,7 +9008,7 @@ await client.ats.interviews.list();
-**requestOptions:** `Interviews.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -9111,7 +9019,9 @@ await client.ats.interviews.list();
-
client.ats.interviews.create({ ...params }) -> Merge.ScheduledInterviewResponse +## Crm CustomObjectClasses + +
client.crm.customObjectClasses.list({ ...params }) -> Merge.PaginatedCustomObjectClassList
@@ -9123,7 +9033,7 @@ await client.ats.interviews.list();
-Creates a `ScheduledInterview` object with the given values. +Returns a list of `CustomObjectClass` objects.
@@ -9139,10 +9049,7 @@ Creates a `ScheduledInterview` object with the given values.
```typescript -await client.ats.interviews.create({ - model: {}, - remoteUserId: "remote_user_id", -}); +await client.crm.customObjectClasses.list(); ```
@@ -9158,7 +9065,7 @@ await client.ats.interviews.create({
-**request:** `Merge.ats.ScheduledInterviewEndpointRequest` +**request:** `Merge.crm.CustomObjectClassesListRequest`
@@ -9166,7 +9073,7 @@ await client.ats.interviews.create({
-**requestOptions:** `Interviews.RequestOptions` +**requestOptions:** `CustomObjectClasses.RequestOptions`
@@ -9177,7 +9084,7 @@ await client.ats.interviews.create({
-
client.ats.interviews.retrieve(id, { ...params }) -> Merge.ScheduledInterview +
client.crm.customObjectClasses.retrieve(id, { ...params }) -> Merge.CustomObjectClass
@@ -9189,7 +9096,7 @@ await client.ats.interviews.create({
-Returns a `ScheduledInterview` object with the given `id`. +Returns a `CustomObjectClass` object with the given `id`.
@@ -9205,7 +9112,7 @@ Returns a `ScheduledInterview` object with the given `id`.
```typescript -await client.ats.interviews.retrieve("id"); +await client.crm.customObjectClasses.retrieve("id"); ```
@@ -9229,7 +9136,7 @@ await client.ats.interviews.retrieve("id");
-**request:** `Merge.ats.InterviewsRetrieveRequest` +**request:** `Merge.crm.CustomObjectClassesRetrieveRequest`
@@ -9237,7 +9144,7 @@ await client.ats.interviews.retrieve("id");
-**requestOptions:** `Interviews.RequestOptions` +**requestOptions:** `CustomObjectClasses.RequestOptions`
@@ -9248,7 +9155,9 @@ await client.ats.interviews.retrieve("id");
-
client.ats.interviews.metaPostRetrieve() -> Merge.MetaResponse +## Crm AssociationTypes + +
client.crm.associationTypes.customObjectClassesAssociationTypesList(customObjectClassId, { ...params }) -> Merge.PaginatedAssociationTypeList
@@ -9260,7 +9169,7 @@ await client.ats.interviews.retrieve("id");
-Returns metadata for `ScheduledInterview` POSTs. +Returns a list of `AssociationType` objects.
@@ -9276,7 +9185,7 @@ Returns metadata for `ScheduledInterview` POSTs.
```typescript -await client.ats.interviews.metaPostRetrieve(); +await client.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id"); ```
@@ -9292,20 +9201,34 @@ await client.ats.interviews.metaPostRetrieve();
-**requestOptions:** `Interviews.RequestOptions` +**customObjectClassId:** `string`
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesAssociationTypesListRequest` +
+
+
+ +**requestOptions:** `AssociationTypes.RequestOptions` + +
+
-
-## Ats Issues + + +
-
client.ats.issues.list({ ...params }) -> Merge.PaginatedIssueList +
client.crm.associationTypes.customObjectClassesAssociationTypesCreate(customObjectClassId, { ...params }) -> Merge.CrmAssociationTypeResponse
@@ -9317,7 +9240,7 @@ await client.ats.interviews.metaPostRetrieve();
-Gets all issues for Organization. +Creates an `AssociationType` object with the given values.
@@ -9333,7 +9256,21 @@ Gets all issues for Organization.
```typescript -await client.ats.issues.list(); +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", + }, +}); ```
@@ -9349,7 +9286,15 @@ await client.ats.issues.list();
-**request:** `Merge.ats.IssuesListRequest` +**customObjectClassId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CrmAssociationTypeEndpointRequest`
@@ -9357,7 +9302,7 @@ await client.ats.issues.list();
-**requestOptions:** `Issues.RequestOptions` +**requestOptions:** `AssociationTypes.RequestOptions`
@@ -9368,7 +9313,7 @@ await client.ats.issues.list();
-
client.ats.issues.retrieve(id) -> Merge.Issue +
client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve(customObjectClassId, id, { ...params }) -> Merge.AssociationType
@@ -9380,7 +9325,7 @@ await client.ats.issues.list();
-Get a specific issue. +Returns an `AssociationType` object with the given `id`.
@@ -9396,7 +9341,7 @@ Get a specific issue.
```typescript -await client.ats.issues.retrieve("id"); +await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("custom_object_class_id", "id"); ```
@@ -9412,6 +9357,14 @@ await client.ats.issues.retrieve("id");
+**customObjectClassId:** `string` + +
+
+ +
+
+ **id:** `string`
@@ -9420,7 +9373,15 @@ await client.ats.issues.retrieve("id");
-**requestOptions:** `Issues.RequestOptions` +**request:** `Merge.crm.CustomObjectClassesAssociationTypesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `AssociationTypes.RequestOptions`
@@ -9431,9 +9392,7 @@ await client.ats.issues.retrieve("id");
-## Ats JobInterviewStages - -
client.ats.jobInterviewStages.list({ ...params }) -> Merge.PaginatedJobInterviewStageList +
client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve(customObjectClassId) -> Merge.MetaResponse
@@ -9445,7 +9404,7 @@ await client.ats.issues.retrieve("id");
-Returns a list of `JobInterviewStage` objects. +Returns metadata for `CRMAssociationType` POSTs.
@@ -9461,7 +9420,7 @@ Returns a list of `JobInterviewStage` objects.
```typescript -await client.ats.jobInterviewStages.list(); +await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve("custom_object_class_id"); ```
@@ -9477,7 +9436,7 @@ await client.ats.jobInterviewStages.list();
-**request:** `Merge.ats.JobInterviewStagesListRequest` +**customObjectClassId:** `string`
@@ -9485,7 +9444,7 @@ await client.ats.jobInterviewStages.list();
-**requestOptions:** `JobInterviewStages.RequestOptions` +**requestOptions:** `AssociationTypes.RequestOptions`
@@ -9496,7 +9455,9 @@ await client.ats.jobInterviewStages.list();
-
client.ats.jobInterviewStages.retrieve(id, { ...params }) -> Merge.JobInterviewStage +## Crm CustomObjects + +
client.crm.customObjects.customObjectClassesCustomObjectsList(customObjectClassId, { ...params }) -> Merge.PaginatedCustomObjectList
@@ -9508,7 +9469,7 @@ await client.ats.jobInterviewStages.list();
-Returns a `JobInterviewStage` object with the given `id`. +Returns a list of `CustomObject` objects.
@@ -9524,7 +9485,7 @@ Returns a `JobInterviewStage` object with the given `id`.
```typescript -await client.ats.jobInterviewStages.retrieve("id"); +await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id"); ```
@@ -9540,7 +9501,7 @@ await client.ats.jobInterviewStages.retrieve("id");
-**id:** `string` +**customObjectClassId:** `string`
@@ -9548,7 +9509,7 @@ await client.ats.jobInterviewStages.retrieve("id");
-**request:** `Merge.ats.JobInterviewStagesRetrieveRequest` +**request:** `Merge.crm.CustomObjectClassesCustomObjectsListRequest`
@@ -9556,7 +9517,7 @@ await client.ats.jobInterviewStages.retrieve("id");
-**requestOptions:** `JobInterviewStages.RequestOptions` +**requestOptions:** `CustomObjects.RequestOptions`
@@ -9567,9 +9528,7 @@ await client.ats.jobInterviewStages.retrieve("id");
-## Ats JobPostings - -
client.ats.jobPostings.list({ ...params }) -> Merge.PaginatedJobPostingList +
client.crm.customObjects.customObjectClassesCustomObjectsCreate(customObjectClassId, { ...params }) -> Merge.CrmCustomObjectResponse
@@ -9581,7 +9540,7 @@ await client.ats.jobInterviewStages.retrieve("id");
-Returns a list of `JobPosting` objects. +Creates a `CustomObject` object with the given values.
@@ -9597,7 +9556,13 @@ Returns a list of `JobPosting` objects.
```typescript -await client.ats.jobPostings.list(); +await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_object_class_id", { + model: { + fields: { + test_field: "hello", + }, + }, +}); ```
@@ -9613,7 +9578,7 @@ await client.ats.jobPostings.list();
-**request:** `Merge.ats.JobPostingsListRequest` +**customObjectClassId:** `string`
@@ -9621,7 +9586,15 @@ await client.ats.jobPostings.list();
-**requestOptions:** `JobPostings.RequestOptions` +**request:** `Merge.crm.CrmCustomObjectEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjects.RequestOptions`
@@ -9632,7 +9605,7 @@ await client.ats.jobPostings.list();
-
client.ats.jobPostings.retrieve(id, { ...params }) -> Merge.JobPosting +
client.crm.customObjects.customObjectClassesCustomObjectsRetrieve(customObjectClassId, id, { ...params }) -> Merge.CustomObject
@@ -9644,7 +9617,7 @@ await client.ats.jobPostings.list();
-Returns a `JobPosting` object with the given `id`. +Returns a `CustomObject` object with the given `id`.
@@ -9660,7 +9633,7 @@ Returns a `JobPosting` object with the given `id`.
```typescript -await client.ats.jobPostings.retrieve("id"); +await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_object_class_id", "id"); ```
@@ -9676,6 +9649,14 @@ await client.ats.jobPostings.retrieve("id");
+**customObjectClassId:** `string` + +
+
+ +
+
+ **id:** `string`
@@ -9684,7 +9665,7 @@ await client.ats.jobPostings.retrieve("id");
-**request:** `Merge.ats.JobPostingsRetrieveRequest` +**request:** `Merge.crm.CustomObjectClassesCustomObjectsRetrieveRequest`
@@ -9692,7 +9673,7 @@ await client.ats.jobPostings.retrieve("id");
-**requestOptions:** `JobPostings.RequestOptions` +**requestOptions:** `CustomObjects.RequestOptions`
@@ -9703,9 +9684,7 @@ await client.ats.jobPostings.retrieve("id");
-## Ats Jobs - -
client.ats.jobs.list({ ...params }) -> Merge.PaginatedJobList +
client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(customObjectClassId) -> Merge.MetaResponse
@@ -9717,7 +9696,7 @@ await client.ats.jobPostings.retrieve("id");
-Returns a list of `Job` objects. +Returns metadata for `CRMCustomObject` POSTs.
@@ -9733,7 +9712,7 @@ Returns a list of `Job` objects.
```typescript -await client.ats.jobs.list(); +await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve("custom_object_class_id"); ```
@@ -9749,7 +9728,7 @@ await client.ats.jobs.list();
-**request:** `Merge.ats.JobsListRequest` +**customObjectClassId:** `string`
@@ -9757,7 +9736,7 @@ await client.ats.jobs.list();
-**requestOptions:** `Jobs.RequestOptions` +**requestOptions:** `CustomObjects.RequestOptions`
@@ -9768,7 +9747,7 @@ await client.ats.jobs.list();
-
client.ats.jobs.retrieve(id, { ...params }) -> Merge.Job +
client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -9780,7 +9759,7 @@ await client.ats.jobs.list();
-Returns a `Job` object with the given `id`. +Returns a list of `RemoteFieldClass` objects.
@@ -9796,7 +9775,7 @@ Returns a `Job` object with the given `id`.
```typescript -await client.ats.jobs.retrieve("id"); +await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList(); ```
@@ -9812,15 +9791,7 @@ await client.ats.jobs.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.ats.JobsRetrieveRequest` +**request:** `Merge.crm.CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest`
@@ -9828,7 +9799,7 @@ await client.ats.jobs.retrieve("id");
-**requestOptions:** `Jobs.RequestOptions` +**requestOptions:** `CustomObjects.RequestOptions`
@@ -9839,7 +9810,9 @@ await client.ats.jobs.retrieve("id");
-
client.ats.jobs.screeningQuestionsList(jobId, { ...params }) -> Merge.PaginatedScreeningQuestionList +## Crm Associations + +
client.crm.associations.customObjectClassesCustomObjectsAssociationsList(customObjectClassId, objectId, { ...params }) -> Merge.PaginatedAssociationList
@@ -9851,7 +9824,7 @@ await client.ats.jobs.retrieve("id");
-Returns a list of `ScreeningQuestion` objects. +Returns a list of `Association` objects.
@@ -9867,7 +9840,7 @@ Returns a list of `ScreeningQuestion` objects.
```typescript -await client.ats.jobs.screeningQuestionsList("job_id"); +await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("custom_object_class_id", "object_id"); ```
@@ -9883,7 +9856,7 @@ await client.ats.jobs.screeningQuestionsList("job_id");
-**jobId:** `string` +**customObjectClassId:** `string`
@@ -9891,7 +9864,7 @@ await client.ats.jobs.screeningQuestionsList("job_id");
-**request:** `Merge.ats.JobsScreeningQuestionsListRequest` +**objectId:** `string`
@@ -9899,7 +9872,15 @@ await client.ats.jobs.screeningQuestionsList("job_id");
-**requestOptions:** `Jobs.RequestOptions` +**request:** `Merge.crm.CustomObjectClassesCustomObjectsAssociationsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Associations.RequestOptions`
@@ -9910,9 +9891,7 @@ await client.ats.jobs.screeningQuestionsList("job_id");
-## Ats LinkToken - -
client.ats.linkToken.create({ ...params }) -> Merge.LinkToken +
client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate(associationTypeId, sourceClassId, sourceObjectId, targetClassId, targetObjectId, { ...params }) -> Merge.Association
@@ -9924,7 +9903,7 @@ await client.ats.jobs.screeningQuestionsList("job_id");
-Creates a link token to be used when linking a new end user. +Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`.
@@ -9940,12 +9919,13 @@ Creates a link token to be used when linking a new end user.
```typescript -await client.ats.linkToken.create({ - endUserEmailAddress: "example@gmail.com", - endUserOrganizationName: "Test Organization", - endUserOriginId: "12345", - categories: ["hris", "ats"], -}); +await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate( + "association_type_id", + "source_class_id", + "source_object_id", + "target_class_id", + "target_object_id", +); ```
@@ -9961,7 +9941,7 @@ await client.ats.linkToken.create({
-**request:** `Merge.ats.EndUserDetailsRequest` +**associationTypeId:** `string`
@@ -9969,64 +9949,39 @@ await client.ats.linkToken.create({
-**requestOptions:** `LinkToken.RequestOptions` - -
-
- -
+**sourceClassId:** `string` -
-## Ats LinkedAccounts - -
client.ats.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList
-#### 📝 Description +**sourceObjectId:** `string` -
-
+
+
-List linked accounts for your organization. +**targetClassId:** `string`
-
-
- -#### 🔌 Usage - -
-
-```typescript -await client.ats.linkedAccounts.list(); -``` +**targetObjectId:** `string` -
-
-#### ⚙️ Parameters - -
-
-
-**request:** `Merge.ats.LinkedAccountsListRequest` +**request:** `Merge.crm.CustomObjectClassesCustomObjectsAssociationsUpdateRequest`
@@ -10034,7 +9989,7 @@ await client.ats.linkedAccounts.list();
-**requestOptions:** `LinkedAccounts.RequestOptions` +**requestOptions:** `Associations.RequestOptions`
@@ -10045,9 +10000,9 @@ await client.ats.linkedAccounts.list();
-## Ats Offers +## Crm Scopes -
client.ats.offers.list({ ...params }) -> Merge.PaginatedOfferList +
client.crm.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -10059,7 +10014,7 @@ await client.ats.linkedAccounts.list();
-Returns a list of `Offer` objects. +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).
@@ -10075,7 +10030,7 @@ Returns a list of `Offer` objects.
```typescript -await client.ats.offers.list(); +await client.crm.scopes.defaultScopesRetrieve(); ```
@@ -10091,15 +10046,7 @@ await client.ats.offers.list();
-**request:** `Merge.ats.OffersListRequest` - -
-
- -
-
- -**requestOptions:** `Offers.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -10110,7 +10057,7 @@ await client.ats.offers.list();
-
client.ats.offers.retrieve(id, { ...params }) -> Merge.Offer +
client.crm.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -10122,7 +10069,7 @@ await client.ats.offers.list();
-Returns an `Offer` object with the given `id`. +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).
@@ -10138,7 +10085,7 @@ Returns an `Offer` object with the given `id`.
```typescript -await client.ats.offers.retrieve("id"); +await client.crm.scopes.linkedAccountScopesRetrieve(); ```
@@ -10154,23 +10101,7 @@ await client.ats.offers.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.ats.OffersRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `Offers.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -10181,9 +10112,7 @@ await client.ats.offers.retrieve("id");
-## Ats Offices - -
client.ats.offices.list({ ...params }) -> Merge.PaginatedOfficeList +
client.crm.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi
@@ -10195,7 +10124,7 @@ await client.ats.offers.retrieve("id");
-Returns a list of `Office` objects. +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)
@@ -10211,7 +10140,33 @@ Returns a list of `Office` objects.
```typescript -await client.ats.offices.list(); +await client.crm.scopes.linkedAccountScopesCreate({ + commonModels: [ + { + modelName: "Employee", + modelPermissions: { + READ: { + isEnabled: true, + }, + WRITE: { + isEnabled: false, + }, + }, + fieldPermissions: { + enabledFields: ["avatar", "home_location"], + disabledFields: ["work_location"], + }, + }, + { + modelName: "Benefit", + modelPermissions: { + WRITE: { + isEnabled: false, + }, + }, + }, + ], +}); ```
@@ -10227,7 +10182,7 @@ await client.ats.offices.list();
-**request:** `Merge.ats.OfficesListRequest` +**request:** `Merge.crm.LinkedAccountCommonModelScopeDeserializerRequest`
@@ -10235,7 +10190,7 @@ await client.ats.offices.list();
-**requestOptions:** `Offices.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -10246,7 +10201,9 @@ await client.ats.offices.list();
-
client.ats.offices.retrieve(id, { ...params }) -> Merge.Office +## Crm DeleteAccount + +
client.crm.deleteAccount.delete() -> void
@@ -10258,7 +10215,7 @@ await client.ats.offices.list();
-Returns an `Office` object with the given `id`. +Delete a linked account.
@@ -10274,7 +10231,7 @@ Returns an `Office` object with the given `id`.
```typescript -await client.ats.offices.retrieve("id"); +await client.crm.deleteAccount.delete(); ```
@@ -10290,23 +10247,7 @@ await client.ats.offices.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.ats.OfficesRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `Offices.RequestOptions` +**requestOptions:** `DeleteAccount.RequestOptions`
@@ -10317,9 +10258,9 @@ await client.ats.offices.retrieve("id");
-## Ats Passthrough +## Crm EngagementTypes -
client.ats.passthrough.create({ ...params }) -> Merge.RemoteResponse +
client.crm.engagementTypes.list({ ...params }) -> Merge.PaginatedEngagementTypeList
@@ -10331,7 +10272,7 @@ await client.ats.offices.retrieve("id");
-Pull data from an endpoint not currently supported by Merge. +Returns a list of `EngagementType` objects.
@@ -10347,10 +10288,7 @@ Pull data from an endpoint not currently supported by Merge.
```typescript -await client.ats.passthrough.create({ - method: "GET", - path: "/scooters", -}); +await client.crm.engagementTypes.list(); ```
@@ -10366,7 +10304,7 @@ await client.ats.passthrough.create({
-**request:** `Merge.DataPassthroughRequest` +**request:** `Merge.crm.EngagementTypesListRequest`
@@ -10374,7 +10312,7 @@ await client.ats.passthrough.create({
-**requestOptions:** `Passthrough.RequestOptions` +**requestOptions:** `EngagementTypes.RequestOptions`
@@ -10385,9 +10323,7 @@ await client.ats.passthrough.create({
-## Ats RegenerateKey - -
client.ats.regenerateKey.create({ ...params }) -> Merge.RemoteKey +
client.crm.engagementTypes.retrieve(id, { ...params }) -> Merge.EngagementType
@@ -10399,7 +10335,7 @@ await client.ats.passthrough.create({
-Exchange remote keys. +Returns an `EngagementType` object with the given `id`.
@@ -10415,9 +10351,7 @@ Exchange remote keys.
```typescript -await client.ats.regenerateKey.create({ - name: "Remote Deployment Key 1", -}); +await client.crm.engagementTypes.retrieve("id"); ```
@@ -10433,7 +10367,7 @@ await client.ats.regenerateKey.create({
-**request:** `Merge.ats.RemoteKeyForRegenerationRequest` +**id:** `string`
@@ -10441,7 +10375,15 @@ await client.ats.regenerateKey.create({
-**requestOptions:** `RegenerateKey.RequestOptions` +**request:** `Merge.crm.EngagementTypesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `EngagementTypes.RequestOptions`
@@ -10452,9 +10394,7 @@ await client.ats.regenerateKey.create({
-## Ats RejectReasons - -
client.ats.rejectReasons.list({ ...params }) -> Merge.PaginatedRejectReasonList +
client.crm.engagementTypes.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -10466,7 +10406,7 @@ await client.ats.regenerateKey.create({
-Returns a list of `RejectReason` objects. +Returns a list of `RemoteFieldClass` objects.
@@ -10482,7 +10422,7 @@ Returns a list of `RejectReason` objects.
```typescript -await client.ats.rejectReasons.list(); +await client.crm.engagementTypes.remoteFieldClassesList(); ```
@@ -10498,7 +10438,7 @@ await client.ats.rejectReasons.list();
-**request:** `Merge.ats.RejectReasonsListRequest` +**request:** `Merge.crm.EngagementTypesRemoteFieldClassesListRequest`
@@ -10506,7 +10446,7 @@ await client.ats.rejectReasons.list();
-**requestOptions:** `RejectReasons.RequestOptions` +**requestOptions:** `EngagementTypes.RequestOptions`
@@ -10517,7 +10457,9 @@ await client.ats.rejectReasons.list();
-
client.ats.rejectReasons.retrieve(id, { ...params }) -> Merge.RejectReason +## Crm Engagements + +
client.crm.engagements.list({ ...params }) -> Merge.PaginatedEngagementList
@@ -10529,7 +10471,7 @@ await client.ats.rejectReasons.list();
-Returns a `RejectReason` object with the given `id`. +Returns a list of `Engagement` objects.
@@ -10545,7 +10487,7 @@ Returns a `RejectReason` object with the given `id`.
```typescript -await client.ats.rejectReasons.retrieve("id"); +await client.crm.engagements.list(); ```
@@ -10561,15 +10503,7 @@ await client.ats.rejectReasons.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.ats.RejectReasonsRetrieveRequest` +**request:** `Merge.crm.EngagementsListRequest`
@@ -10577,7 +10511,7 @@ await client.ats.rejectReasons.retrieve("id");
-**requestOptions:** `RejectReasons.RequestOptions` +**requestOptions:** `Engagements.RequestOptions`
@@ -10588,9 +10522,7 @@ await client.ats.rejectReasons.retrieve("id");
-## Ats Scorecards - -
client.ats.scorecards.list({ ...params }) -> Merge.PaginatedScorecardList +
client.crm.engagements.create({ ...params }) -> Merge.EngagementResponse
@@ -10602,7 +10534,7 @@ await client.ats.rejectReasons.retrieve("id");
-Returns a list of `Scorecard` objects. +Creates an `Engagement` object with the given values.
@@ -10618,7 +10550,9 @@ Returns a list of `Scorecard` objects.
```typescript -await client.ats.scorecards.list(); +await client.crm.engagements.create({ + model: {}, +}); ```
@@ -10634,7 +10568,7 @@ await client.ats.scorecards.list();
-**request:** `Merge.ats.ScorecardsListRequest` +**request:** `Merge.crm.EngagementEndpointRequest`
@@ -10642,7 +10576,7 @@ await client.ats.scorecards.list();
-**requestOptions:** `Scorecards.RequestOptions` +**requestOptions:** `Engagements.RequestOptions`
@@ -10653,7 +10587,7 @@ await client.ats.scorecards.list();
-
client.ats.scorecards.retrieve(id, { ...params }) -> Merge.Scorecard +
client.crm.engagements.retrieve(id, { ...params }) -> Merge.Engagement
@@ -10665,7 +10599,7 @@ await client.ats.scorecards.list();
-Returns a `Scorecard` object with the given `id`. +Returns an `Engagement` object with the given `id`.
@@ -10681,7 +10615,7 @@ Returns a `Scorecard` object with the given `id`.
```typescript -await client.ats.scorecards.retrieve("id"); +await client.crm.engagements.retrieve("id"); ```
@@ -10705,7 +10639,7 @@ await client.ats.scorecards.retrieve("id");
-**request:** `Merge.ats.ScorecardsRetrieveRequest` +**request:** `Merge.crm.EngagementsRetrieveRequest`
@@ -10713,7 +10647,7 @@ await client.ats.scorecards.retrieve("id");
-**requestOptions:** `Scorecards.RequestOptions` +**requestOptions:** `Engagements.RequestOptions`
@@ -10724,9 +10658,7 @@ await client.ats.scorecards.retrieve("id");
-## Ats SyncStatus - -
client.ats.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList +
client.crm.engagements.partialUpdate(id, { ...params }) -> Merge.EngagementResponse
@@ -10738,7 +10670,7 @@ await client.ats.scorecards.retrieve("id");
-Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `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). +Updates an `Engagement` object with the given `id`.
@@ -10754,7 +10686,9 @@ Get sync status for the current sync and the most recently finished sync. `last_
```typescript -await client.ats.syncStatus.list(); +await client.crm.engagements.partialUpdate("id", { + model: {}, +}); ```
@@ -10770,7 +10704,7 @@ await client.ats.syncStatus.list();
-**request:** `Merge.ats.SyncStatusListRequest` +**id:** `string`
@@ -10778,7 +10712,15 @@ await client.ats.syncStatus.list();
-**requestOptions:** `SyncStatus.RequestOptions` +**request:** `Merge.crm.PatchedEngagementEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions`
@@ -10789,9 +10731,7 @@ await client.ats.syncStatus.list();
-## Ats ForceResync - -
client.ats.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[] +
client.crm.engagements.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -10803,7 +10743,7 @@ await client.ats.syncStatus.list();
-Force re-sync of all models. This endpoint is available 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. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +Returns metadata for `Engagement` PATCHs.
@@ -10819,7 +10759,7 @@ Force re-sync of all models. This endpoint is available for monthly, quarterly,
```typescript -await client.ats.forceResync.syncStatusResyncCreate(); +await client.crm.engagements.metaPatchRetrieve("id"); ```
@@ -10835,7 +10775,15 @@ await client.ats.forceResync.syncStatusResyncCreate();
-**requestOptions:** `ForceResync.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions`
@@ -10846,9 +10794,7 @@ await client.ats.forceResync.syncStatusResyncCreate();
-## Ats Tags - -
client.ats.tags.list({ ...params }) -> Merge.PaginatedTagList +
client.crm.engagements.metaPostRetrieve() -> Merge.MetaResponse
@@ -10860,7 +10806,7 @@ await client.ats.forceResync.syncStatusResyncCreate();
-Returns a list of `Tag` objects. +Returns metadata for `Engagement` POSTs.
@@ -10876,7 +10822,7 @@ Returns a list of `Tag` objects.
```typescript -await client.ats.tags.list(); +await client.crm.engagements.metaPostRetrieve(); ```
@@ -10892,15 +10838,7 @@ await client.ats.tags.list();
-**request:** `Merge.ats.TagsListRequest` - -
-
- -
-
- -**requestOptions:** `Tags.RequestOptions` +**requestOptions:** `Engagements.RequestOptions`
@@ -10911,9 +10849,7 @@ await client.ats.tags.list();
-## Ats Users - -
client.ats.users.list({ ...params }) -> Merge.PaginatedRemoteUserList +
client.crm.engagements.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -10925,7 +10861,7 @@ await client.ats.tags.list();
-Returns a list of `RemoteUser` objects. +Returns a list of `RemoteFieldClass` objects.
@@ -10941,7 +10877,7 @@ Returns a list of `RemoteUser` objects.
```typescript -await client.ats.users.list(); +await client.crm.engagements.remoteFieldClassesList(); ```
@@ -10957,7 +10893,7 @@ await client.ats.users.list();
-**request:** `Merge.ats.UsersListRequest` +**request:** `Merge.crm.EngagementsRemoteFieldClassesListRequest`
@@ -10965,7 +10901,7 @@ await client.ats.users.list();
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `Engagements.RequestOptions`
@@ -10976,7 +10912,9 @@ await client.ats.users.list();
-
client.ats.users.retrieve(id, { ...params }) -> Merge.RemoteUser +## Crm FieldMapping + +
client.crm.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse
@@ -10988,7 +10926,7 @@ await client.ats.users.list();
-Returns a `RemoteUser` object with the given `id`. +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/).
@@ -11004,7 +10942,7 @@ Returns a `RemoteUser` object with the given `id`.
```typescript -await client.ats.users.retrieve("id"); +await client.crm.fieldMapping.fieldMappingsRetrieve(); ```
@@ -11020,15 +10958,7 @@ await client.ats.users.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.ats.UsersRetrieveRequest` +**request:** `Merge.crm.FieldMappingsRetrieveRequest`
@@ -11036,7 +10966,7 @@ await client.ats.users.retrieve("id");
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -11047,9 +10977,7 @@ await client.ats.users.retrieve("id");
-## Ats WebhookReceivers - -
client.ats.webhookReceivers.list() -> Merge.WebhookReceiver[] +
client.crm.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse
@@ -11061,7 +10989,7 @@ await client.ats.users.retrieve("id");
-Returns a list of `WebhookReceiver` objects. +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.
@@ -11077,7 +11005,14 @@ Returns a list of `WebhookReceiver` objects.
```typescript -await client.ats.webhookReceivers.list(); +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", +}); ```
@@ -11093,7 +11028,15 @@ await client.ats.webhookReceivers.list();
-**requestOptions:** `WebhookReceivers.RequestOptions` +**request:** `Merge.crm.CreateFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions`
@@ -11104,7 +11047,7 @@ await client.ats.webhookReceivers.list();
-
client.ats.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver +
client.crm.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse
@@ -11116,7 +11059,7 @@ await client.ats.webhookReceivers.list();
-Creates a `WebhookReceiver` object with the given values. +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.
@@ -11132,10 +11075,7 @@ Creates a `WebhookReceiver` object with the given values.
```typescript -await client.ats.webhookReceivers.create({ - event: "event", - isActive: true, -}); +await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id"); ```
@@ -11151,7 +11091,7 @@ await client.ats.webhookReceivers.create({
-**request:** `Merge.ats.WebhookReceiverRequest` +**fieldMappingId:** `string`
@@ -11159,7 +11099,7 @@ await client.ats.webhookReceivers.create({
-**requestOptions:** `WebhookReceivers.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -11170,9 +11110,7 @@ await client.ats.webhookReceivers.create({
-## Filestorage AccountDetails - -
client.filestorage.accountDetails.retrieve() -> Merge.AccountDetails +
client.crm.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse
@@ -11184,7 +11122,7 @@ await client.ats.webhookReceivers.create({
-Get details for a linked account. +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.
@@ -11200,7 +11138,7 @@ Get details for a linked account.
```typescript -await client.filestorage.accountDetails.retrieve(); +await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); ```
@@ -11216,20 +11154,34 @@ await client.filestorage.accountDetails.retrieve();
-**requestOptions:** `AccountDetails.RequestOptions` +**fieldMappingId:** `string`
+ +
+
+ +**request:** `Merge.crm.PatchedEditFieldMappingRequest` +
+
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
-
-## Filestorage AccountToken + + +
-
client.filestorage.accountToken.retrieve(publicToken) -> Merge.AccountToken +
client.crm.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse
@@ -11241,7 +11193,7 @@ await client.filestorage.accountDetails.retrieve();
-Returns the account token for the end user with the provided public token. +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/).
@@ -11257,7 +11209,7 @@ Returns the account token for the end user with the provided public token.
```typescript -await client.filestorage.accountToken.retrieve("public_token"); +await client.crm.fieldMapping.remoteFieldsRetrieve(); ```
@@ -11273,7 +11225,7 @@ await client.filestorage.accountToken.retrieve("public_token");
-**publicToken:** `string` +**request:** `Merge.crm.RemoteFieldsRetrieveRequest`
@@ -11281,7 +11233,7 @@ await client.filestorage.accountToken.retrieve("public_token");
-**requestOptions:** `AccountToken.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -11292,9 +11244,7 @@ await client.filestorage.accountToken.retrieve("public_token");
-## Filestorage AsyncPassthrough - -
client.filestorage.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept +
client.crm.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse
@@ -11306,7 +11256,7 @@ await client.filestorage.accountToken.retrieve("public_token");
-Asynchronously pull data from an endpoint not currently supported by Merge. +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/).
@@ -11322,10 +11272,7 @@ Asynchronously pull data from an endpoint not currently supported by Merge.
```typescript -await client.filestorage.asyncPassthrough.create({ - method: "GET", - path: "/scooters", -}); +await client.crm.fieldMapping.targetFieldsRetrieve(); ```
@@ -11341,15 +11288,7 @@ await client.filestorage.asyncPassthrough.create({
-**request:** `Merge.DataPassthroughRequest` - -
-
- -
-
- -**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -11360,7 +11299,9 @@ await client.filestorage.asyncPassthrough.create({
-
client.filestorage.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse +## Crm GenerateKey + +
client.crm.generateKey.create({ ...params }) -> Merge.RemoteKey
@@ -11372,7 +11313,7 @@ await client.filestorage.asyncPassthrough.create({
-Retrieves data from earlier async-passthrough POST request +Create a remote key.
@@ -11388,7 +11329,9 @@ Retrieves data from earlier async-passthrough POST request
```typescript -await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id"); +await client.crm.generateKey.create({ + name: "Remote Deployment Key 1", +}); ```
@@ -11404,7 +11347,7 @@ await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id
-**asyncPassthroughReceiptId:** `string` +**request:** `Merge.crm.GenerateRemoteKeyRequest`
@@ -11412,7 +11355,7 @@ await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id
-**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `GenerateKey.RequestOptions`
@@ -11423,9 +11366,9 @@ await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id
-## Filestorage AuditTrail +## Crm Issues -
client.filestorage.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList +
client.crm.issues.list({ ...params }) -> Merge.PaginatedIssueList
@@ -11437,7 +11380,7 @@ await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id
-Gets a list of audit trail events. +Gets all issues for Organization.
@@ -11453,7 +11396,7 @@ Gets a list of audit trail events.
```typescript -await client.filestorage.auditTrail.list(); +await client.crm.issues.list(); ```
@@ -11469,7 +11412,7 @@ await client.filestorage.auditTrail.list();
-**request:** `Merge.filestorage.AuditTrailListRequest` +**request:** `Merge.crm.IssuesListRequest`
@@ -11477,7 +11420,7 @@ await client.filestorage.auditTrail.list();
-**requestOptions:** `AuditTrail.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -11488,9 +11431,7 @@ await client.filestorage.auditTrail.list();
-## Filestorage AvailableActions - -
client.filestorage.availableActions.retrieve() -> Merge.AvailableActions +
client.crm.issues.retrieve(id) -> Merge.Issue
@@ -11502,7 +11443,7 @@ await client.filestorage.auditTrail.list();
-Returns a list of models and actions available for an account. +Get a specific issue.
@@ -11518,7 +11459,7 @@ Returns a list of models and actions available for an account.
```typescript -await client.filestorage.availableActions.retrieve(); +await client.crm.issues.retrieve("id"); ```
@@ -11534,7 +11475,15 @@ await client.filestorage.availableActions.retrieve();
-**requestOptions:** `AvailableActions.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions`
@@ -11545,9 +11494,9 @@ await client.filestorage.availableActions.retrieve();
-## Filestorage Scopes +## Crm Leads -
client.filestorage.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
client.crm.leads.list({ ...params }) -> Merge.PaginatedLeadList
@@ -11559,7 +11508,7 @@ await client.filestorage.availableActions.retrieve();
-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). +Returns a list of `Lead` objects.
@@ -11575,7 +11524,7 @@ Get the default permissions for Merge Common Models and fields across all Linked
```typescript -await client.filestorage.scopes.defaultScopesRetrieve(); +await client.crm.leads.list(); ```
@@ -11591,7 +11540,15 @@ await client.filestorage.scopes.defaultScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**request:** `Merge.crm.LeadsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Leads.RequestOptions`
@@ -11602,7 +11559,7 @@ await client.filestorage.scopes.defaultScopesRetrieve();
-
client.filestorage.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +
client.crm.leads.create({ ...params }) -> Merge.LeadResponse
@@ -11614,7 +11571,7 @@ await client.filestorage.scopes.defaultScopesRetrieve();
-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). +Creates a `Lead` object with the given values.
@@ -11630,7 +11587,9 @@ Get all available permissions for Merge Common Models and fields for a single Li
```typescript -await client.filestorage.scopes.linkedAccountScopesRetrieve(); +await client.crm.leads.create({ + model: {}, +}); ```
@@ -11646,7 +11605,15 @@ await client.filestorage.scopes.linkedAccountScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**request:** `Merge.crm.LeadEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Leads.RequestOptions`
@@ -11657,7 +11624,7 @@ await client.filestorage.scopes.linkedAccountScopesRetrieve();
-
client.filestorage.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +
client.crm.leads.retrieve(id, { ...params }) -> Merge.Lead
@@ -11669,7 +11636,7 @@ await client.filestorage.scopes.linkedAccountScopesRetrieve();
-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) +Returns a `Lead` object with the given `id`.
@@ -11685,33 +11652,7 @@ Update permissions for any Common Model or field for a single Linked Account. An
```typescript -await client.filestorage.scopes.linkedAccountScopesCreate({ - commonModels: [ - { - modelName: "Employee", - modelPermissions: { - READ: { - isEnabled: true, - }, - WRITE: { - isEnabled: false, - }, - }, - fieldPermissions: { - enabledFields: ["avatar", "home_location"], - disabledFields: ["work_location"], - }, - }, - { - modelName: "Benefit", - modelPermissions: { - WRITE: { - isEnabled: false, - }, - }, - }, - ], -}); +await client.crm.leads.retrieve("id"); ```
@@ -11727,7 +11668,7 @@ await client.filestorage.scopes.linkedAccountScopesCreate({
-**request:** `Merge.filestorage.LinkedAccountCommonModelScopeDeserializerRequest` +**id:** `string`
@@ -11735,7 +11676,15 @@ await client.filestorage.scopes.linkedAccountScopesCreate({
-**requestOptions:** `Scopes.RequestOptions` +**request:** `Merge.crm.LeadsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Leads.RequestOptions`
@@ -11746,9 +11695,7 @@ await client.filestorage.scopes.linkedAccountScopesCreate({
-## Filestorage DeleteAccount - -
client.filestorage.deleteAccount.delete() -> void +
client.crm.leads.metaPostRetrieve() -> Merge.MetaResponse
@@ -11760,7 +11707,7 @@ await client.filestorage.scopes.linkedAccountScopesCreate({
-Delete a linked account. +Returns metadata for `Lead` POSTs.
@@ -11776,7 +11723,7 @@ Delete a linked account.
```typescript -await client.filestorage.deleteAccount.delete(); +await client.crm.leads.metaPostRetrieve(); ```
@@ -11792,7 +11739,7 @@ await client.filestorage.deleteAccount.delete();
-**requestOptions:** `DeleteAccount.RequestOptions` +**requestOptions:** `Leads.RequestOptions`
@@ -11803,9 +11750,7 @@ await client.filestorage.deleteAccount.delete();
-## Filestorage Drives - -
client.filestorage.drives.list({ ...params }) -> Merge.PaginatedDriveList +
client.crm.leads.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -11817,7 +11762,7 @@ await client.filestorage.deleteAccount.delete();
-Returns a list of `Drive` objects. +Returns a list of `RemoteFieldClass` objects.
@@ -11833,7 +11778,7 @@ Returns a list of `Drive` objects.
```typescript -await client.filestorage.drives.list(); +await client.crm.leads.remoteFieldClassesList(); ```
@@ -11849,7 +11794,7 @@ await client.filestorage.drives.list();
-**request:** `Merge.filestorage.DrivesListRequest` +**request:** `Merge.crm.LeadsRemoteFieldClassesListRequest`
@@ -11857,7 +11802,7 @@ await client.filestorage.drives.list();
-**requestOptions:** `Drives.RequestOptions` +**requestOptions:** `Leads.RequestOptions`
@@ -11868,7 +11813,9 @@ await client.filestorage.drives.list();
-
client.filestorage.drives.retrieve(id, { ...params }) -> Merge.Drive +## Crm LinkToken + +
client.crm.linkToken.create({ ...params }) -> Merge.LinkToken
@@ -11880,7 +11827,7 @@ await client.filestorage.drives.list();
-Returns a `Drive` object with the given `id`. +Creates a link token to be used when linking a new end user.
@@ -11896,7 +11843,12 @@ Returns a `Drive` object with the given `id`.
```typescript -await client.filestorage.drives.retrieve("id"); +await client.crm.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], +}); ```
@@ -11912,15 +11864,7 @@ await client.filestorage.drives.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.filestorage.DrivesRetrieveRequest` +**request:** `Merge.crm.EndUserDetailsRequest`
@@ -11928,7 +11872,7 @@ await client.filestorage.drives.retrieve("id");
-**requestOptions:** `Drives.RequestOptions` +**requestOptions:** `LinkToken.RequestOptions`
@@ -11939,9 +11883,9 @@ await client.filestorage.drives.retrieve("id");
-## Filestorage FieldMapping +## Crm LinkedAccounts -
client.filestorage.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse +
client.crm.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList
@@ -11953,7 +11897,7 @@ await client.filestorage.drives.retrieve("id");
-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/). +List linked accounts for your organization.
@@ -11969,7 +11913,7 @@ Get all Field Mappings for this Linked Account. Field Mappings are mappings betw
```typescript -await client.filestorage.fieldMapping.fieldMappingsRetrieve(); +await client.crm.linkedAccounts.list(); ```
@@ -11985,7 +11929,7 @@ await client.filestorage.fieldMapping.fieldMappingsRetrieve();
-**request:** `Merge.filestorage.FieldMappingsRetrieveRequest` +**request:** `Merge.crm.LinkedAccountsListRequest`
@@ -11993,7 +11937,7 @@ await client.filestorage.fieldMapping.fieldMappingsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `LinkedAccounts.RequestOptions`
@@ -12004,7 +11948,9 @@ await client.filestorage.fieldMapping.fieldMappingsRetrieve();
-
client.filestorage.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +## Crm Notes + +
client.crm.notes.list({ ...params }) -> Merge.PaginatedNoteList
@@ -12016,7 +11962,7 @@ await client.filestorage.fieldMapping.fieldMappingsRetrieve();
-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. +Returns a list of `Note` objects.
@@ -12032,14 +11978,7 @@ Create new Field Mappings that will be available after the next scheduled sync.
```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", -}); +await client.crm.notes.list(); ```
@@ -12055,7 +11994,7 @@ await client.filestorage.fieldMapping.fieldMappingsCreate({
-**request:** `Merge.filestorage.CreateFieldMappingRequest` +**request:** `Merge.crm.NotesListRequest`
@@ -12063,7 +12002,7 @@ await client.filestorage.fieldMapping.fieldMappingsCreate({
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Notes.RequestOptions`
@@ -12074,7 +12013,7 @@ await client.filestorage.fieldMapping.fieldMappingsCreate({
-
client.filestorage.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +
client.crm.notes.create({ ...params }) -> Merge.NoteResponse
@@ -12086,7 +12025,7 @@ await client.filestorage.fieldMapping.fieldMappingsCreate({
-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. +Creates a `Note` object with the given values.
@@ -12102,7 +12041,9 @@ Deletes Field Mappings for a Linked Account. All data related to this Field Mapp
```typescript -await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id"); +await client.crm.notes.create({ + model: {}, +}); ```
@@ -12118,7 +12059,7 @@ await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**fieldMappingId:** `string` +**request:** `Merge.crm.NoteEndpointRequest`
@@ -12126,7 +12067,7 @@ await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Notes.RequestOptions`
@@ -12137,7 +12078,7 @@ await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-
client.filestorage.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +
client.crm.notes.retrieve(id, { ...params }) -> Merge.Note
@@ -12149,7 +12090,7 @@ await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-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. +Returns a `Note` object with the given `id`.
@@ -12165,7 +12106,7 @@ Create or update existing Field Mappings for a Linked Account. Changes will be r
```typescript -await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); +await client.crm.notes.retrieve("id"); ```
@@ -12181,7 +12122,7 @@ await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_
-**fieldMappingId:** `string` +**id:** `string`
@@ -12189,7 +12130,7 @@ await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_
-**request:** `Merge.filestorage.PatchedEditFieldMappingRequest` +**request:** `Merge.crm.NotesRetrieveRequest`
@@ -12197,7 +12138,7 @@ await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Notes.RequestOptions`
@@ -12208,7 +12149,7 @@ await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_
-
client.filestorage.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +
client.crm.notes.metaPostRetrieve() -> Merge.MetaResponse
@@ -12220,7 +12161,7 @@ await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_
-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/). +Returns metadata for `Note` POSTs.
@@ -12236,7 +12177,7 @@ Get all remote fields for a Linked Account. Remote fields are third-party fields
```typescript -await client.filestorage.fieldMapping.remoteFieldsRetrieve(); +await client.crm.notes.metaPostRetrieve(); ```
@@ -12252,15 +12193,7 @@ await client.filestorage.fieldMapping.remoteFieldsRetrieve();
-**request:** `Merge.filestorage.RemoteFieldsRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Notes.RequestOptions`
@@ -12271,7 +12204,7 @@ await client.filestorage.fieldMapping.remoteFieldsRetrieve();
-
client.filestorage.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +
client.crm.notes.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -12283,7 +12216,7 @@ await client.filestorage.fieldMapping.remoteFieldsRetrieve();
-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/). +Returns a list of `RemoteFieldClass` objects.
@@ -12299,7 +12232,7 @@ Get all organization-wide Target Fields, this will not include any Linked Accoun
```typescript -await client.filestorage.fieldMapping.targetFieldsRetrieve(); +await client.crm.notes.remoteFieldClassesList(); ```
@@ -12315,7 +12248,15 @@ await client.filestorage.fieldMapping.targetFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**request:** `Merge.crm.NotesRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Notes.RequestOptions`
@@ -12326,9 +12267,9 @@ await client.filestorage.fieldMapping.targetFieldsRetrieve();
-## Filestorage Files +## Crm Opportunities -
client.filestorage.files.list({ ...params }) -> Merge.PaginatedFileList +
client.crm.opportunities.list({ ...params }) -> Merge.PaginatedOpportunityList
@@ -12340,7 +12281,7 @@ await client.filestorage.fieldMapping.targetFieldsRetrieve();
-Returns a list of `File` objects. +Returns a list of `Opportunity` objects.
@@ -12356,7 +12297,7 @@ Returns a list of `File` objects.
```typescript -await client.filestorage.files.list(); +await client.crm.opportunities.list(); ```
@@ -12372,7 +12313,7 @@ await client.filestorage.files.list();
-**request:** `Merge.filestorage.FilesListRequest` +**request:** `Merge.crm.OpportunitiesListRequest`
@@ -12380,7 +12321,7 @@ await client.filestorage.files.list();
-**requestOptions:** `Files.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -12391,7 +12332,7 @@ await client.filestorage.files.list();
-
client.filestorage.files.create({ ...params }) -> Merge.FileStorageFileResponse +
client.crm.opportunities.create({ ...params }) -> Merge.OpportunityResponse
@@ -12403,7 +12344,7 @@ await client.filestorage.files.list();
-Creates a `File` object with the given values. +Creates an `Opportunity` object with the given values.
@@ -12419,7 +12360,7 @@ Creates a `File` object with the given values.
```typescript -await client.filestorage.files.create({ +await client.crm.opportunities.create({ model: {}, }); ``` @@ -12437,7 +12378,7 @@ await client.filestorage.files.create({
-**request:** `Merge.filestorage.FileStorageFileEndpointRequest` +**request:** `Merge.crm.OpportunityEndpointRequest`
@@ -12445,7 +12386,7 @@ await client.filestorage.files.create({
-**requestOptions:** `Files.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -12456,7 +12397,7 @@ await client.filestorage.files.create({
-
client.filestorage.files.retrieve(id, { ...params }) -> Merge.File_ +
client.crm.opportunities.retrieve(id, { ...params }) -> Merge.Opportunity
@@ -12468,7 +12409,7 @@ await client.filestorage.files.create({
-Returns a `File` object with the given `id`. +Returns an `Opportunity` object with the given `id`.
@@ -12484,7 +12425,7 @@ Returns a `File` object with the given `id`.
```typescript -await client.filestorage.files.retrieve("id"); +await client.crm.opportunities.retrieve("id"); ```
@@ -12508,7 +12449,7 @@ await client.filestorage.files.retrieve("id");
-**request:** `Merge.filestorage.FilesRetrieveRequest` +**request:** `Merge.crm.OpportunitiesRetrieveRequest`
@@ -12516,7 +12457,7 @@ await client.filestorage.files.retrieve("id");
-**requestOptions:** `Files.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -12527,7 +12468,7 @@ await client.filestorage.files.retrieve("id");
-
client.filestorage.files.downloadRetrieve(id, { ...params }) -> stream.Readable +
client.crm.opportunities.partialUpdate(id, { ...params }) -> Merge.OpportunityResponse
@@ -12539,7 +12480,7 @@ await client.filestorage.files.retrieve("id");
-Returns the `File` content with the given `id` as a stream of bytes. +Updates an `Opportunity` object with the given `id`.
@@ -12555,9 +12496,8 @@ Returns the `File` content with the given `id` as a stream of bytes.
```typescript -await client.filestorage.files.downloadRetrieve("string", { - includeShellData: true, - mimeType: "string", +await client.crm.opportunities.partialUpdate("id", { + model: {}, }); ``` @@ -12582,7 +12522,7 @@ await client.filestorage.files.downloadRetrieve("string", {
-**request:** `Merge.filestorage.FilesDownloadRetrieveRequest` +**request:** `Merge.crm.PatchedOpportunityEndpointRequest`
@@ -12590,7 +12530,7 @@ await client.filestorage.files.downloadRetrieve("string", {
-**requestOptions:** `Files.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -12601,7 +12541,7 @@ await client.filestorage.files.downloadRetrieve("string", {
-
client.filestorage.files.downloadRequestMetaRetrieve(id, { ...params }) -> Merge.DownloadRequestMeta +
client.crm.opportunities.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -12613,7 +12553,7 @@ await client.filestorage.files.downloadRetrieve("string", {
-Returns metadata to construct an authenticated file download request for a singular file, allowing you to download file directly from the third-party. +Returns metadata for `Opportunity` PATCHs.
@@ -12629,7 +12569,7 @@ Returns metadata to construct an authenticated file download request for a singu
```typescript -await client.filestorage.files.downloadRequestMetaRetrieve("id"); +await client.crm.opportunities.metaPatchRetrieve("id"); ```
@@ -12653,15 +12593,62 @@ await client.filestorage.files.downloadRequestMetaRetrieve("id");
-**request:** `Merge.filestorage.FilesDownloadRequestMetaRetrieveRequest` +**requestOptions:** `Opportunities.RequestOptions` + +
+
+ +
+
+
client.crm.opportunities.metaPostRetrieve() -> Merge.MetaResponse
-**requestOptions:** `Files.RequestOptions` +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Opportunity` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.opportunities.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Opportunities.RequestOptions`
@@ -12672,7 +12659,7 @@ await client.filestorage.files.downloadRequestMetaRetrieve("id");
-
client.filestorage.files.downloadRequestMetaList({ ...params }) -> Merge.PaginatedDownloadRequestMetaList +
client.crm.opportunities.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -12684,7 +12671,7 @@ await client.filestorage.files.downloadRequestMetaRetrieve("id");
-Returns metadata to construct authenticated file download requests, allowing you to download files directly from the third-party. +Returns a list of `RemoteFieldClass` objects.
@@ -12700,7 +12687,7 @@ Returns metadata to construct authenticated file download requests, allowing you
```typescript -await client.filestorage.files.downloadRequestMetaList(); +await client.crm.opportunities.remoteFieldClassesList(); ```
@@ -12716,7 +12703,7 @@ await client.filestorage.files.downloadRequestMetaList();
-**request:** `Merge.filestorage.FilesDownloadRequestMetaListRequest` +**request:** `Merge.crm.OpportunitiesRemoteFieldClassesListRequest`
@@ -12724,7 +12711,7 @@ await client.filestorage.files.downloadRequestMetaList();
-**requestOptions:** `Files.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -12735,7 +12722,9 @@ await client.filestorage.files.downloadRequestMetaList();
-
client.filestorage.files.metaPostRetrieve() -> Merge.MetaResponse +## Crm Passthrough + +
client.crm.passthrough.create({ ...params }) -> Merge.RemoteResponse
@@ -12747,7 +12736,7 @@ await client.filestorage.files.downloadRequestMetaList();
-Returns metadata for `FileStorageFile` POSTs. +Pull data from an endpoint not currently supported by Merge.
@@ -12763,7 +12752,10 @@ Returns metadata for `FileStorageFile` POSTs.
```typescript -await client.filestorage.files.metaPostRetrieve(); +await client.crm.passthrough.create({ + method: "GET", + path: "/scooters", +}); ```
@@ -12779,7 +12771,15 @@ await client.filestorage.files.metaPostRetrieve();
-**requestOptions:** `Files.RequestOptions` +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `Passthrough.RequestOptions`
@@ -12790,9 +12790,9 @@ await client.filestorage.files.metaPostRetrieve();
-## Filestorage Folders +## Crm RegenerateKey -
client.filestorage.folders.list({ ...params }) -> Merge.PaginatedFolderList +
client.crm.regenerateKey.create({ ...params }) -> Merge.RemoteKey
@@ -12804,7 +12804,7 @@ await client.filestorage.files.metaPostRetrieve();
-Returns a list of `Folder` objects. +Exchange remote keys.
@@ -12820,7 +12820,9 @@ Returns a list of `Folder` objects.
```typescript -await client.filestorage.folders.list(); +await client.crm.regenerateKey.create({ + name: "Remote Deployment Key 1", +}); ```
@@ -12836,7 +12838,7 @@ await client.filestorage.folders.list();
-**request:** `Merge.filestorage.FoldersListRequest` +**request:** `Merge.crm.RemoteKeyForRegenerationRequest`
@@ -12844,7 +12846,7 @@ await client.filestorage.folders.list();
-**requestOptions:** `Folders.RequestOptions` +**requestOptions:** `RegenerateKey.RequestOptions`
@@ -12855,7 +12857,9 @@ await client.filestorage.folders.list();
-
client.filestorage.folders.create({ ...params }) -> Merge.FileStorageFolderResponse +## Crm Stages + +
client.crm.stages.list({ ...params }) -> Merge.PaginatedStageList
@@ -12867,7 +12871,7 @@ await client.filestorage.folders.list();
-Creates a `Folder` object with the given values. +Returns a list of `Stage` objects.
@@ -12883,9 +12887,7 @@ Creates a `Folder` object with the given values.
```typescript -await client.filestorage.folders.create({ - model: {}, -}); +await client.crm.stages.list(); ```
@@ -12901,7 +12903,7 @@ await client.filestorage.folders.create({
-**request:** `Merge.filestorage.FileStorageFolderEndpointRequest` +**request:** `Merge.crm.StagesListRequest`
@@ -12909,7 +12911,7 @@ await client.filestorage.folders.create({
-**requestOptions:** `Folders.RequestOptions` +**requestOptions:** `Stages.RequestOptions`
@@ -12920,7 +12922,7 @@ await client.filestorage.folders.create({
-
client.filestorage.folders.retrieve(id, { ...params }) -> Merge.Folder +
client.crm.stages.retrieve(id, { ...params }) -> Merge.Stage
@@ -12932,7 +12934,7 @@ await client.filestorage.folders.create({
-Returns a `Folder` object with the given `id`. +Returns a `Stage` object with the given `id`.
@@ -12948,7 +12950,7 @@ Returns a `Folder` object with the given `id`.
```typescript -await client.filestorage.folders.retrieve("id"); +await client.crm.stages.retrieve("id"); ```
@@ -12972,7 +12974,7 @@ await client.filestorage.folders.retrieve("id");
-**request:** `Merge.filestorage.FoldersRetrieveRequest` +**request:** `Merge.crm.StagesRetrieveRequest`
@@ -12980,7 +12982,7 @@ await client.filestorage.folders.retrieve("id");
-**requestOptions:** `Folders.RequestOptions` +**requestOptions:** `Stages.RequestOptions`
@@ -12991,7 +12993,7 @@ await client.filestorage.folders.retrieve("id");
-
client.filestorage.folders.metaPostRetrieve() -> Merge.MetaResponse +
client.crm.stages.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -13003,7 +13005,7 @@ await client.filestorage.folders.retrieve("id");
-Returns metadata for `FileStorageFolder` POSTs. +Returns a list of `RemoteFieldClass` objects.
@@ -13019,7 +13021,7 @@ Returns metadata for `FileStorageFolder` POSTs.
```typescript -await client.filestorage.folders.metaPostRetrieve(); +await client.crm.stages.remoteFieldClassesList(); ```
@@ -13035,7 +13037,15 @@ await client.filestorage.folders.metaPostRetrieve();
-**requestOptions:** `Folders.RequestOptions` +**request:** `Merge.crm.StagesRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Stages.RequestOptions`
@@ -13046,9 +13056,9 @@ await client.filestorage.folders.metaPostRetrieve();
-## Filestorage GenerateKey +## Crm SyncStatus -
client.filestorage.generateKey.create({ ...params }) -> Merge.RemoteKey +
client.crm.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList
@@ -13060,7 +13070,7 @@ await client.filestorage.folders.metaPostRetrieve();
-Create a remote key. +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).
@@ -13076,9 +13086,7 @@ Create a remote key.
```typescript -await client.filestorage.generateKey.create({ - name: "Remote Deployment Key 1", -}); +await client.crm.syncStatus.list(); ```
@@ -13094,7 +13102,7 @@ await client.filestorage.generateKey.create({
-**request:** `Merge.filestorage.GenerateRemoteKeyRequest` +**request:** `Merge.crm.SyncStatusListRequest`
@@ -13102,7 +13110,7 @@ await client.filestorage.generateKey.create({
-**requestOptions:** `GenerateKey.RequestOptions` +**requestOptions:** `SyncStatus.RequestOptions`
@@ -13113,9 +13121,9 @@ await client.filestorage.generateKey.create({
-## Filestorage Groups +## Crm ForceResync -
client.filestorage.groups.list({ ...params }) -> Merge.PaginatedGroupList +
client.crm.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[]
@@ -13127,7 +13135,7 @@ await client.filestorage.generateKey.create({
-Returns a list of `Group` objects. +Force re-sync of all models. This endpoint is available 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. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers.
@@ -13143,7 +13151,7 @@ Returns a list of `Group` objects.
```typescript -await client.filestorage.groups.list(); +await client.crm.forceResync.syncStatusResyncCreate(); ```
@@ -13159,15 +13167,7 @@ await client.filestorage.groups.list();
-**request:** `Merge.filestorage.GroupsListRequest` - -
-
- -
-
- -**requestOptions:** `Groups.RequestOptions` +**requestOptions:** `ForceResync.RequestOptions`
@@ -13178,7 +13178,9 @@ await client.filestorage.groups.list();
-
client.filestorage.groups.retrieve(id, { ...params }) -> Merge.Group +## Crm Tasks + +
client.crm.tasks.list({ ...params }) -> Merge.PaginatedTaskList
@@ -13190,7 +13192,7 @@ await client.filestorage.groups.list();
-Returns a `Group` object with the given `id`. +Returns a list of `Task` objects.
@@ -13206,7 +13208,7 @@ Returns a `Group` object with the given `id`.
```typescript -await client.filestorage.groups.retrieve("id"); +await client.crm.tasks.list(); ```
@@ -13222,15 +13224,7 @@ await client.filestorage.groups.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.filestorage.GroupsRetrieveRequest` +**request:** `Merge.crm.TasksListRequest`
@@ -13238,7 +13232,7 @@ await client.filestorage.groups.retrieve("id");
-**requestOptions:** `Groups.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -13249,9 +13243,7 @@ await client.filestorage.groups.retrieve("id");
-## Filestorage Issues - -
client.filestorage.issues.list({ ...params }) -> Merge.PaginatedIssueList +
client.crm.tasks.create({ ...params }) -> Merge.TaskResponse
@@ -13263,7 +13255,7 @@ await client.filestorage.groups.retrieve("id");
-Gets all issues for Organization. +Creates a `Task` object with the given values.
@@ -13279,7 +13271,9 @@ Gets all issues for Organization.
```typescript -await client.filestorage.issues.list(); +await client.crm.tasks.create({ + model: {}, +}); ```
@@ -13295,7 +13289,7 @@ await client.filestorage.issues.list();
-**request:** `Merge.filestorage.IssuesListRequest` +**request:** `Merge.crm.TaskEndpointRequest`
@@ -13303,7 +13297,7 @@ await client.filestorage.issues.list();
-**requestOptions:** `Issues.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -13314,7 +13308,7 @@ await client.filestorage.issues.list();
-
client.filestorage.issues.retrieve(id) -> Merge.Issue +
client.crm.tasks.retrieve(id, { ...params }) -> Merge.Task
@@ -13326,7 +13320,7 @@ await client.filestorage.issues.list();
-Get a specific issue. +Returns a `Task` object with the given `id`.
@@ -13342,7 +13336,7 @@ Get a specific issue.
```typescript -await client.filestorage.issues.retrieve("id"); +await client.crm.tasks.retrieve("id"); ```
@@ -13366,7 +13360,15 @@ await client.filestorage.issues.retrieve("id");
-**requestOptions:** `Issues.RequestOptions` +**request:** `Merge.crm.TasksRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Tasks.RequestOptions`
@@ -13377,9 +13379,7 @@ await client.filestorage.issues.retrieve("id");
-## Filestorage LinkToken - -
client.filestorage.linkToken.create({ ...params }) -> Merge.LinkToken +
client.crm.tasks.partialUpdate(id, { ...params }) -> Merge.TaskResponse
@@ -13391,7 +13391,7 @@ await client.filestorage.issues.retrieve("id");
-Creates a link token to be used when linking a new end user. +Updates a `Task` object with the given `id`.
@@ -13407,11 +13407,8 @@ Creates a link token to be used when linking a new end user.
```typescript -await client.filestorage.linkToken.create({ - endUserEmailAddress: "example@gmail.com", - endUserOrganizationName: "Test Organization", - endUserOriginId: "12345", - categories: ["hris", "ats"], +await client.crm.tasks.partialUpdate("id", { + model: {}, }); ``` @@ -13428,7 +13425,7 @@ await client.filestorage.linkToken.create({
-**request:** `Merge.filestorage.EndUserDetailsRequest` +**id:** `string`
@@ -13436,7 +13433,15 @@ await client.filestorage.linkToken.create({
-**requestOptions:** `LinkToken.RequestOptions` +**request:** `Merge.crm.PatchedTaskEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Tasks.RequestOptions`
@@ -13447,9 +13452,7 @@ await client.filestorage.linkToken.create({
-## Filestorage LinkedAccounts - -
client.filestorage.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList +
client.crm.tasks.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -13461,7 +13464,7 @@ await client.filestorage.linkToken.create({
-List linked accounts for your organization. +Returns metadata for `Task` PATCHs.
@@ -13477,7 +13480,7 @@ List linked accounts for your organization.
```typescript -await client.filestorage.linkedAccounts.list(); +await client.crm.tasks.metaPatchRetrieve("id"); ```
@@ -13493,7 +13496,7 @@ await client.filestorage.linkedAccounts.list();
-**request:** `Merge.filestorage.LinkedAccountsListRequest` +**id:** `string`
@@ -13501,7 +13504,7 @@ await client.filestorage.linkedAccounts.list();
-**requestOptions:** `LinkedAccounts.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -13512,9 +13515,7 @@ await client.filestorage.linkedAccounts.list();
-## Filestorage Passthrough - -
client.filestorage.passthrough.create({ ...params }) -> Merge.RemoteResponse +
client.crm.tasks.metaPostRetrieve() -> Merge.MetaResponse
@@ -13526,7 +13527,7 @@ await client.filestorage.linkedAccounts.list();
-Pull data from an endpoint not currently supported by Merge. +Returns metadata for `Task` POSTs.
@@ -13542,10 +13543,7 @@ Pull data from an endpoint not currently supported by Merge.
```typescript -await client.filestorage.passthrough.create({ - method: "GET", - path: "/scooters", -}); +await client.crm.tasks.metaPostRetrieve(); ```
@@ -13561,15 +13559,7 @@ await client.filestorage.passthrough.create({
-**request:** `Merge.DataPassthroughRequest` - -
-
- -
-
- -**requestOptions:** `Passthrough.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -13580,9 +13570,7 @@ await client.filestorage.passthrough.create({
-## Filestorage RegenerateKey - -
client.filestorage.regenerateKey.create({ ...params }) -> Merge.RemoteKey +
client.crm.tasks.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -13594,7 +13582,7 @@ await client.filestorage.passthrough.create({
-Exchange remote keys. +Returns a list of `RemoteFieldClass` objects.
@@ -13610,9 +13598,7 @@ Exchange remote keys.
```typescript -await client.filestorage.regenerateKey.create({ - name: "Remote Deployment Key 1", -}); +await client.crm.tasks.remoteFieldClassesList(); ```
@@ -13628,7 +13614,7 @@ await client.filestorage.regenerateKey.create({
-**request:** `Merge.filestorage.RemoteKeyForRegenerationRequest` +**request:** `Merge.crm.TasksRemoteFieldClassesListRequest`
@@ -13636,7 +13622,7 @@ await client.filestorage.regenerateKey.create({
-**requestOptions:** `RegenerateKey.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -13647,9 +13633,9 @@ await client.filestorage.regenerateKey.create({
-## Filestorage SyncStatus +## Crm Users -
client.filestorage.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList +
client.crm.users.list({ ...params }) -> Merge.PaginatedUserList
@@ -13661,7 +13647,7 @@ await client.filestorage.regenerateKey.create({
-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). +Returns a list of `User` objects.
@@ -13677,7 +13663,7 @@ Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SY
```typescript -await client.filestorage.syncStatus.list(); +await client.crm.users.list(); ```
@@ -13693,7 +13679,7 @@ await client.filestorage.syncStatus.list();
-**request:** `Merge.filestorage.SyncStatusListRequest` +**request:** `Merge.crm.UsersListRequest`
@@ -13701,7 +13687,7 @@ await client.filestorage.syncStatus.list();
-**requestOptions:** `SyncStatus.RequestOptions` +**requestOptions:** `Users.RequestOptions`
@@ -13712,9 +13698,7 @@ await client.filestorage.syncStatus.list();
-## Filestorage ForceResync - -
client.filestorage.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[] +
client.crm.users.retrieve(id, { ...params }) -> Merge.User
@@ -13726,7 +13710,7 @@ await client.filestorage.syncStatus.list();
-Force re-sync of all models. This endpoint is available 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. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +Returns a `User` object with the given `id`.
@@ -13742,7 +13726,7 @@ Force re-sync of all models. This endpoint is available for monthly, quarterly,
```typescript -await client.filestorage.forceResync.syncStatusResyncCreate(); +await client.crm.users.retrieve("id"); ```
@@ -13758,20 +13742,34 @@ await client.filestorage.forceResync.syncStatusResyncCreate();
-**requestOptions:** `ForceResync.RequestOptions` +**id:** `string`
+ +
+
+ +**request:** `Merge.crm.UsersRetrieveRequest` +
+
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
-
-## Filestorage Users + + +
-
client.filestorage.users.list({ ...params }) -> Merge.PaginatedUserList +
client.crm.users.ignoreCreate(modelId, { ...params }) -> void
@@ -13783,7 +13781,7 @@ await client.filestorage.forceResync.syncStatusResyncCreate();
-Returns a list of `User` objects. +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.
@@ -13799,7 +13797,9 @@ Returns a list of `User` objects.
```typescript -await client.filestorage.users.list(); +await client.crm.users.ignoreCreate("model_id", { + reason: "GENERAL_CUSTOMER_REQUEST", +}); ```
@@ -13815,7 +13815,15 @@ await client.filestorage.users.list();
-**request:** `Merge.filestorage.UsersListRequest` +**modelId:** `string` + +
+
+ +
+
+ +**request:** `Merge.IgnoreCommonModelRequest`
@@ -13834,7 +13842,7 @@ await client.filestorage.users.list();
-
client.filestorage.users.retrieve(id, { ...params }) -> Merge.User +
client.crm.users.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -13846,7 +13854,7 @@ await client.filestorage.users.list();
-Returns a `User` object with the given `id`. +Returns a list of `RemoteFieldClass` objects.
@@ -13862,7 +13870,7 @@ Returns a `User` object with the given `id`.
```typescript -await client.filestorage.users.retrieve("id"); +await client.crm.users.remoteFieldClassesList(); ```
@@ -13878,15 +13886,7 @@ await client.filestorage.users.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.filestorage.UsersRetrieveRequest` +**request:** `Merge.crm.UsersRemoteFieldClassesListRequest`
@@ -13905,9 +13905,9 @@ await client.filestorage.users.retrieve("id");
-## Filestorage WebhookReceivers +## Crm WebhookReceivers -
client.filestorage.webhookReceivers.list() -> Merge.WebhookReceiver[] +
client.crm.webhookReceivers.list() -> Merge.WebhookReceiver[]
@@ -13935,7 +13935,7 @@ Returns a list of `WebhookReceiver` objects.
```typescript -await client.filestorage.webhookReceivers.list(); +await client.crm.webhookReceivers.list(); ```
@@ -13962,7 +13962,7 @@ await client.filestorage.webhookReceivers.list();
-
client.filestorage.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver +
client.crm.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver
@@ -13990,7 +13990,7 @@ Creates a `WebhookReceiver` object with the given values.
```typescript -await client.filestorage.webhookReceivers.create({ +await client.crm.webhookReceivers.create({ event: "event", isActive: true, }); @@ -14009,7 +14009,7 @@ await client.filestorage.webhookReceivers.create({
-**request:** `Merge.filestorage.WebhookReceiverRequest` +**request:** `Merge.crm.WebhookReceiverRequest`
diff --git a/scripts/rename-to-esm-files.js b/scripts/rename-to-esm-files.js new file mode 100644 index 000000000..81dac6a75 --- /dev/null +++ b/scripts/rename-to-esm-files.js @@ -0,0 +1,115 @@ +#!/usr/bin/env node + +const fs = require("fs").promises; +const path = require("path"); + +const extensionMap = { + ".js": ".mjs", + ".d.ts": ".d.mts", +}; +const oldExtensions = Object.keys(extensionMap); + +async function findFiles(rootPath) { + const files = []; + + async function scan(directory) { + const entries = await fs.readdir(directory, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(directory, entry.name); + + if (entry.isDirectory()) { + if (entry.name !== "node_modules" && !entry.name.startsWith(".")) { + await scan(fullPath); + } + } else if (entry.isFile()) { + if (oldExtensions.some((ext) => entry.name.endsWith(ext))) { + files.push(fullPath); + } + } + } + } + + await scan(rootPath); + return files; +} + +async function updateFiles(files) { + const updatedFiles = []; + for (const file of files) { + const updated = await updateFileContents(file); + updatedFiles.push(updated); + } + + console.log(`Updated imports in ${updatedFiles.length} files.`); +} + +async function updateFileContents(file) { + const content = await fs.readFile(file, "utf8"); + + let newContent = content; + // Update each extension type defined in the map + for (const [oldExt, newExt] of Object.entries(extensionMap)) { + const regex = new RegExp(`(import|export)(.+from\\s+['"])(\\.\\.?\\/[^'"]+)(\\${oldExt})(['"])`, "g"); + newContent = newContent.replace(regex, `$1$2$3${newExt}$5`); + } + + if (content !== newContent) { + await fs.writeFile(file, newContent, "utf8"); + return true; + } + return false; +} + +async function renameFiles(files) { + let counter = 0; + for (const file of files) { + const ext = oldExtensions.find((ext) => file.endsWith(ext)); + const newExt = extensionMap[ext]; + + if (newExt) { + const newPath = file.slice(0, -ext.length) + newExt; + await fs.rename(file, newPath); + counter++; + } + } + + console.log(`Renamed ${counter} files.`); +} + +async function main() { + try { + const targetDir = process.argv[2]; + if (!targetDir) { + console.error("Please provide a target directory"); + process.exit(1); + } + + const targetPath = path.resolve(targetDir); + const targetStats = await fs.stat(targetPath); + + if (!targetStats.isDirectory()) { + console.error("The provided path is not a directory"); + process.exit(1); + } + + console.log(`Scanning directory: ${targetDir}`); + + const files = await findFiles(targetDir); + + if (files.length === 0) { + console.log("No matching files found."); + process.exit(0); + } + + console.log(`Found ${files.length} files.`); + await updateFiles(files); + await renameFiles(files); + console.log("\nDone!"); + } catch (error) { + console.error("An error occurred:", error.message); + process.exit(1); + } +} + +main(); diff --git a/src/Client.ts b/src/Client.ts index b67bff3e3..35978be48 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -4,23 +4,25 @@ import * as environments from "./environments"; import * as core from "./core"; -import { Crm } from "./api/resources/crm/client/Client"; -import { Ats } from "./api/resources/ats/client/Client"; import { Filestorage } from "./api/resources/filestorage/client/Client"; +import { Ats } from "./api/resources/ats/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 { Accounting } from "./api/resources/accounting/client/Client"; export declare namespace MergeClient { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -35,40 +37,35 @@ export declare namespace MergeClient { } export class MergeClient { - constructor(protected readonly _options: MergeClient.Options) {} - + protected _filestorage: Filestorage | undefined; + protected _ats: Ats | undefined; protected _crm: Crm | undefined; + protected _hris: Hris | undefined; + protected _ticketing: Ticketing | undefined; + protected _accounting: Accounting | undefined; - public get crm(): Crm { - return (this._crm ??= new Crm(this._options)); - } + constructor(protected readonly _options: MergeClient.Options) {} - protected _ats: Ats | undefined; + public get filestorage(): Filestorage { + return (this._filestorage ??= new Filestorage(this._options)); + } public get ats(): Ats { return (this._ats ??= new Ats(this._options)); } - protected _filestorage: Filestorage | undefined; - - public get filestorage(): Filestorage { - return (this._filestorage ??= new Filestorage(this._options)); + public get crm(): Crm { + return (this._crm ??= new Crm(this._options)); } - protected _hris: Hris | undefined; - public get hris(): Hris { return (this._hris ??= new Hris(this._options)); } - protected _ticketing: Ticketing | undefined; - public get ticketing(): Ticketing { return (this._ticketing ??= new Ticketing(this._options)); } - protected _accounting: Accounting | undefined; - public get accounting(): Accounting { return (this._accounting ??= new Accounting(this._options)); } diff --git a/src/api/resources/accounting/client/Client.ts b/src/api/resources/accounting/client/Client.ts index 3e1912875..5e9eabb54 100644 --- a/src/api/resources/accounting/client/Client.ts +++ b/src/api/resources/accounting/client/Client.ts @@ -51,297 +51,242 @@ import { VendorCredits } from "../resources/vendorCredits/client/Client"; import { WebhookReceivers } from "../resources/webhookReceivers/client/Client"; export declare namespace Accounting { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: 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 Accounting { - constructor(protected readonly _options: Accounting.Options) {} - protected _accountDetails: AccountDetails | undefined; + protected _accountToken: AccountToken | undefined; + protected _accountingPeriods: AccountingPeriods | undefined; + protected _accounts: Accounts | undefined; + protected _addresses: Addresses | undefined; + protected _asyncPassthrough: AsyncPassthrough | undefined; + protected _asyncTasks: AsyncTasks | undefined; + protected _attachments: Attachments | undefined; + protected _auditTrail: AuditTrail | undefined; + protected _availableActions: AvailableActions | undefined; + protected _balanceSheets: BalanceSheets | undefined; + protected _bankFeedAccounts: BankFeedAccounts | undefined; + protected _bankFeedTransactions: BankFeedTransactions | undefined; + protected _cashFlowStatements: CashFlowStatements | undefined; + protected _companyInfo: CompanyInfo | undefined; + protected _contacts: Contacts | undefined; + protected _creditNotes: CreditNotes | undefined; + protected _scopes: Scopes | undefined; + protected _deleteAccount: DeleteAccount | undefined; + protected _employees: Employees | undefined; + protected _expenses: Expenses | undefined; + protected _fieldMapping: FieldMapping | undefined; + protected _generalLedgerTransactions: GeneralLedgerTransactions | undefined; + protected _generateKey: GenerateKey | undefined; + protected _incomeStatements: IncomeStatements | undefined; + protected _invoices: Invoices | undefined; + protected _issues: Issues | undefined; + protected _items: Items | undefined; + protected _journalEntries: JournalEntries | undefined; + protected _linkToken: LinkToken | undefined; + protected _linkedAccounts: LinkedAccounts | undefined; + protected _passthrough: Passthrough | undefined; + protected _paymentMethods: PaymentMethods | undefined; + protected _paymentTerms: PaymentTerms | undefined; + protected _payments: Payments | undefined; + protected _phoneNumbers: PhoneNumbers | undefined; + protected _purchaseOrders: PurchaseOrders | undefined; + protected _regenerateKey: RegenerateKey | undefined; + protected _syncStatus: SyncStatus | undefined; + protected _forceResync: ForceResync | undefined; + protected _taxRates: TaxRates | undefined; + protected _trackingCategories: TrackingCategories | undefined; + protected _transactions: Transactions | undefined; + protected _vendorCredits: VendorCredits | undefined; + protected _webhookReceivers: WebhookReceivers | undefined; + + constructor(protected readonly _options: Accounting.Options) {} public get accountDetails(): AccountDetails { return (this._accountDetails ??= new AccountDetails(this._options)); } - protected _accountToken: AccountToken | undefined; - public get accountToken(): AccountToken { return (this._accountToken ??= new AccountToken(this._options)); } - protected _accountingPeriods: AccountingPeriods | undefined; - public get accountingPeriods(): AccountingPeriods { return (this._accountingPeriods ??= new AccountingPeriods(this._options)); } - protected _accounts: Accounts | undefined; - public get accounts(): Accounts { return (this._accounts ??= new Accounts(this._options)); } - protected _addresses: Addresses | undefined; - public get addresses(): Addresses { return (this._addresses ??= new Addresses(this._options)); } - protected _asyncPassthrough: AsyncPassthrough | undefined; - public get asyncPassthrough(): AsyncPassthrough { return (this._asyncPassthrough ??= new AsyncPassthrough(this._options)); } - protected _asyncTasks: AsyncTasks | undefined; - public get asyncTasks(): AsyncTasks { return (this._asyncTasks ??= new AsyncTasks(this._options)); } - protected _attachments: Attachments | undefined; - public get attachments(): Attachments { return (this._attachments ??= new Attachments(this._options)); } - protected _auditTrail: AuditTrail | undefined; - public get auditTrail(): AuditTrail { return (this._auditTrail ??= new AuditTrail(this._options)); } - protected _availableActions: AvailableActions | undefined; - public get availableActions(): AvailableActions { return (this._availableActions ??= new AvailableActions(this._options)); } - protected _balanceSheets: BalanceSheets | undefined; - public get balanceSheets(): BalanceSheets { return (this._balanceSheets ??= new BalanceSheets(this._options)); } - protected _bankFeedAccounts: BankFeedAccounts | undefined; - public get bankFeedAccounts(): BankFeedAccounts { return (this._bankFeedAccounts ??= new BankFeedAccounts(this._options)); } - protected _bankFeedTransactions: BankFeedTransactions | undefined; - public get bankFeedTransactions(): BankFeedTransactions { return (this._bankFeedTransactions ??= new BankFeedTransactions(this._options)); } - protected _cashFlowStatements: CashFlowStatements | undefined; - public get cashFlowStatements(): CashFlowStatements { return (this._cashFlowStatements ??= new CashFlowStatements(this._options)); } - protected _companyInfo: CompanyInfo | undefined; - public get companyInfo(): CompanyInfo { return (this._companyInfo ??= new CompanyInfo(this._options)); } - protected _contacts: Contacts | undefined; - public get contacts(): Contacts { return (this._contacts ??= new Contacts(this._options)); } - protected _creditNotes: CreditNotes | undefined; - public get creditNotes(): CreditNotes { return (this._creditNotes ??= new CreditNotes(this._options)); } - protected _scopes: Scopes | undefined; - public get scopes(): Scopes { return (this._scopes ??= new Scopes(this._options)); } - protected _deleteAccount: DeleteAccount | undefined; - public get deleteAccount(): DeleteAccount { return (this._deleteAccount ??= new DeleteAccount(this._options)); } - protected _employees: Employees | undefined; - public get employees(): Employees { return (this._employees ??= new Employees(this._options)); } - protected _expenses: Expenses | undefined; - public get expenses(): Expenses { return (this._expenses ??= new Expenses(this._options)); } - protected _fieldMapping: FieldMapping | undefined; - public get fieldMapping(): FieldMapping { return (this._fieldMapping ??= new FieldMapping(this._options)); } - protected _generalLedgerTransactions: GeneralLedgerTransactions | undefined; - public get generalLedgerTransactions(): GeneralLedgerTransactions { return (this._generalLedgerTransactions ??= new GeneralLedgerTransactions(this._options)); } - protected _generateKey: GenerateKey | undefined; - public get generateKey(): GenerateKey { return (this._generateKey ??= new GenerateKey(this._options)); } - protected _incomeStatements: IncomeStatements | undefined; - public get incomeStatements(): IncomeStatements { return (this._incomeStatements ??= new IncomeStatements(this._options)); } - protected _invoices: Invoices | undefined; - public get invoices(): Invoices { return (this._invoices ??= new Invoices(this._options)); } - protected _issues: Issues | undefined; - public get issues(): Issues { return (this._issues ??= new Issues(this._options)); } - protected _items: Items | undefined; - public get items(): Items { return (this._items ??= new Items(this._options)); } - protected _journalEntries: JournalEntries | undefined; - public get journalEntries(): JournalEntries { return (this._journalEntries ??= new JournalEntries(this._options)); } - protected _linkToken: LinkToken | undefined; - public get linkToken(): LinkToken { return (this._linkToken ??= new LinkToken(this._options)); } - protected _linkedAccounts: LinkedAccounts | undefined; - public get linkedAccounts(): LinkedAccounts { return (this._linkedAccounts ??= new LinkedAccounts(this._options)); } - protected _passthrough: Passthrough | undefined; - public get passthrough(): Passthrough { return (this._passthrough ??= new Passthrough(this._options)); } - protected _paymentMethods: PaymentMethods | undefined; - public get paymentMethods(): PaymentMethods { return (this._paymentMethods ??= new PaymentMethods(this._options)); } - protected _paymentTerms: PaymentTerms | undefined; - public get paymentTerms(): PaymentTerms { return (this._paymentTerms ??= new PaymentTerms(this._options)); } - protected _payments: Payments | undefined; - public get payments(): Payments { return (this._payments ??= new Payments(this._options)); } - protected _phoneNumbers: PhoneNumbers | undefined; - public get phoneNumbers(): PhoneNumbers { return (this._phoneNumbers ??= new PhoneNumbers(this._options)); } - protected _purchaseOrders: PurchaseOrders | undefined; - public get purchaseOrders(): PurchaseOrders { return (this._purchaseOrders ??= new PurchaseOrders(this._options)); } - protected _regenerateKey: RegenerateKey | undefined; - public get regenerateKey(): RegenerateKey { return (this._regenerateKey ??= new RegenerateKey(this._options)); } - protected _syncStatus: SyncStatus | undefined; - public get syncStatus(): SyncStatus { return (this._syncStatus ??= new SyncStatus(this._options)); } - protected _forceResync: ForceResync | undefined; - public get forceResync(): ForceResync { return (this._forceResync ??= new ForceResync(this._options)); } - protected _taxRates: TaxRates | undefined; - public get taxRates(): TaxRates { return (this._taxRates ??= new TaxRates(this._options)); } - protected _trackingCategories: TrackingCategories | undefined; - public get trackingCategories(): TrackingCategories { return (this._trackingCategories ??= new TrackingCategories(this._options)); } - protected _transactions: Transactions | undefined; - public get transactions(): Transactions { return (this._transactions ??= new Transactions(this._options)); } - protected _vendorCredits: VendorCredits | undefined; - public get vendorCredits(): VendorCredits { return (this._vendorCredits ??= new VendorCredits(this._options)); } - protected _webhookReceivers: WebhookReceivers | undefined; - public get webhookReceivers(): WebhookReceivers { return (this._webhookReceivers ??= new WebhookReceivers(this._options)); } diff --git a/src/api/resources/accounting/resources/accountDetails/client/Client.ts b/src/api/resources/accounting/resources/accountDetails/client/Client.ts index 9f533521f..dc7f7720c 100644 --- a/src/api/resources/accounting/resources/accountDetails/client/Client.ts +++ b/src/api/resources/accounting/resources/accountDetails/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AccountDetails { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class AccountDetails { * @example * await client.accounting.accountDetails.retrieve() */ - public async retrieve(requestOptions?: AccountDetails.RequestOptions): Promise { + public retrieve( + requestOptions?: AccountDetails.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(requestOptions)); + } + + private async __retrieve( + requestOptions?: AccountDetails.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/account-details" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/account-details", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class AccountDetails { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class AccountDetails { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.AccountDetails.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.AccountDetails.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/accountToken/client/Client.ts b/src/api/resources/accounting/resources/accountToken/client/Client.ts index 574a01eed..d82718242 100644 --- a/src/api/resources/accounting/resources/accountToken/client/Client.ts +++ b/src/api/resources/accounting/resources/accountToken/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AccountToken { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,14 +46,23 @@ export class AccountToken { * @example * await client.accounting.accountToken.retrieve("public_token") */ - public async retrieve( + public retrieve( publicToken: string, - requestOptions?: AccountToken.RequestOptions - ): Promise { + requestOptions?: AccountToken.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(publicToken, requestOptions)); + } + + private async __retrieve( + publicToken: string, + requestOptions?: AccountToken.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/account-token/${encodeURIComponent(publicToken)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/account-token/${encodeURIComponent(publicToken)}`, ), method: "GET", headers: { @@ -62,8 +73,8 @@ export class AccountToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -75,13 +86,16 @@ export class AccountToken { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.AccountToken.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.AccountToken.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -99,7 +113,7 @@ export class AccountToken { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/account-token/{public_token}." + "Timeout exceeded when calling GET /accounting/v1/account-token/{public_token}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/accountingPeriods/client/Client.ts b/src/api/resources/accounting/resources/accountingPeriods/client/Client.ts index 49cd265c1..b52cbabd7 100644 --- a/src/api/resources/accounting/resources/accountingPeriods/client/Client.ts +++ b/src/api/resources/accounting/resources/accountingPeriods/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AccountingPeriods { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class AccountingPeriods { * @example * await client.accounting.accountingPeriods.list() */ - public async list( + public list( request: Merge.accounting.AccountingPeriodsListRequest = {}, - requestOptions?: AccountingPeriods.RequestOptions - ): Promise { + requestOptions?: AccountingPeriods.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private 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,8 +81,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/accounting-periods", ), method: "GET", headers: { @@ -84,8 +95,8 @@ export class AccountingPeriods { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -98,13 +109,16 @@ export class AccountingPeriods { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedAccountingPeriodList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedAccountingPeriodList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -122,7 +136,7 @@ export class AccountingPeriods { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/accounting-periods." + "Timeout exceeded when calling GET /accounting/v1/accounting-periods.", ); case "unknown": throw new errors.MergeError({ @@ -141,13 +155,21 @@ export class AccountingPeriods { * @example * await client.accounting.accountingPeriods.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.AccountingPeriodsRetrieveRequest = {}, - requestOptions?: AccountingPeriods.RequestOptions - ): Promise { + requestOptions?: AccountingPeriods.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.AccountingPeriodsRetrieveRequest = {}, + requestOptions?: AccountingPeriods.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -158,8 +180,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/accounting-periods/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -170,8 +194,8 @@ export class AccountingPeriods { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -184,13 +208,16 @@ export class AccountingPeriods { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.AccountingPeriod.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.AccountingPeriod.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -208,7 +235,7 @@ export class AccountingPeriods { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/accounting-periods/{id}." + "Timeout exceeded when calling GET /accounting/v1/accounting-periods/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/accounts/client/Client.ts b/src/api/resources/accounting/resources/accounts/client/Client.ts index af0541359..c58e8b94e 100644 --- a/src/api/resources/accounting/resources/accounts/client/Client.ts +++ b/src/api/resources/accounting/resources/accounts/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Accounts { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Accounts { * @example * await client.accounting.accounts.list() */ - public async list( + public list( + request: Merge.accounting.AccountsListRequest = {}, + requestOptions?: Accounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.accounting.AccountsListRequest = {}, - requestOptions?: Accounts.RequestOptions - ): Promise { + requestOptions?: Accounts.RequestOptions, + ): Promise> { const { accountType, companyId, @@ -66,7 +75,7 @@ export class Accounts { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountType != null) { _queryParams["account_type"] = accountType; } @@ -120,7 +129,10 @@ export class Accounts { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.accounting.AccountsListRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (remoteId != null) { @@ -128,13 +140,18 @@ export class Accounts { } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.accounting.AccountsListRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/accounts" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/accounts", ), method: "GET", headers: { @@ -145,8 +162,8 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -159,13 +176,16 @@ export class Accounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedAccountList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedAccountList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -201,12 +221,19 @@ export class Accounts { * model: {} * }) */ - public async create( + public create( request: Merge.accounting.AccountEndpointRequest, - requestOptions?: Accounts.RequestOptions - ): Promise { + requestOptions?: Accounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.accounting.AccountEndpointRequest, + requestOptions?: Accounts.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -217,8 +244,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/accounts", ), method: "POST", headers: { @@ -229,8 +258,8 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -244,13 +273,16 @@ export class Accounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.AccountResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.AccountResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -285,13 +317,21 @@ export class Accounts { * @example * await client.accounting.accounts.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.AccountsRetrieveRequest = {}, - requestOptions?: Accounts.RequestOptions - ): Promise { + requestOptions?: Accounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.AccountsRetrieveRequest = {}, + requestOptions?: Accounts.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -305,17 +345,25 @@ export class Accounts { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.accounting.AccountsRetrieveRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = + serializers.accounting.AccountsRetrieveRequestShowEnumOrigins.jsonOrThrow(showEnumOrigins, { + unrecognizedObjectKeys: "strip", + }); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/accounts/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/accounts/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -326,8 +374,8 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -340,13 +388,16 @@ export class Accounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.Account.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.Account.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -379,11 +430,21 @@ export class Accounts { * @example * await client.accounting.accounts.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Accounts.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Accounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Accounts.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/accounts/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/accounts/meta/post", ), method: "GET", headers: { @@ -394,8 +455,8 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -407,13 +468,16 @@ export class Accounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -431,7 +495,7 @@ export class Accounts { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/accounts/meta/post." + "Timeout exceeded when calling GET /accounting/v1/accounts/meta/post.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/accounts/types/AccountsListRequestRemoteFields.ts b/src/api/resources/accounting/resources/accounts/types/AccountsListRequestRemoteFields.ts index fce4791ae..c36dc6f4c 100644 --- a/src/api/resources/accounting/resources/accounts/types/AccountsListRequestRemoteFields.ts +++ b/src/api/resources/accounting/resources/accounts/types/AccountsListRequestRemoteFields.ts @@ -3,7 +3,6 @@ */ export type AccountsListRequestRemoteFields = "classification" | "classification,status" | "status"; - export const AccountsListRequestRemoteFields = { Classification: "classification", ClassificationStatus: "classification,status", diff --git a/src/api/resources/accounting/resources/accounts/types/AccountsListRequestShowEnumOrigins.ts b/src/api/resources/accounting/resources/accounts/types/AccountsListRequestShowEnumOrigins.ts index c856834e3..6e9b21c5d 100644 --- a/src/api/resources/accounting/resources/accounts/types/AccountsListRequestShowEnumOrigins.ts +++ b/src/api/resources/accounting/resources/accounts/types/AccountsListRequestShowEnumOrigins.ts @@ -3,7 +3,6 @@ */ export type AccountsListRequestShowEnumOrigins = "classification" | "classification,status" | "status"; - export const AccountsListRequestShowEnumOrigins = { Classification: "classification", ClassificationStatus: "classification,status", diff --git a/src/api/resources/accounting/resources/accounts/types/AccountsRetrieveRequestRemoteFields.ts b/src/api/resources/accounting/resources/accounts/types/AccountsRetrieveRequestRemoteFields.ts index 9c476ff23..24e2e9a04 100644 --- a/src/api/resources/accounting/resources/accounts/types/AccountsRetrieveRequestRemoteFields.ts +++ b/src/api/resources/accounting/resources/accounts/types/AccountsRetrieveRequestRemoteFields.ts @@ -3,7 +3,6 @@ */ export type AccountsRetrieveRequestRemoteFields = "classification" | "classification,status" | "status"; - export const AccountsRetrieveRequestRemoteFields = { Classification: "classification", ClassificationStatus: "classification,status", diff --git a/src/api/resources/accounting/resources/accounts/types/AccountsRetrieveRequestShowEnumOrigins.ts b/src/api/resources/accounting/resources/accounts/types/AccountsRetrieveRequestShowEnumOrigins.ts index 88c5520de..190804cbd 100644 --- a/src/api/resources/accounting/resources/accounts/types/AccountsRetrieveRequestShowEnumOrigins.ts +++ b/src/api/resources/accounting/resources/accounts/types/AccountsRetrieveRequestShowEnumOrigins.ts @@ -3,7 +3,6 @@ */ export type AccountsRetrieveRequestShowEnumOrigins = "classification" | "classification,status" | "status"; - export const AccountsRetrieveRequestShowEnumOrigins = { Classification: "classification", ClassificationStatus: "classification,status", diff --git a/src/api/resources/accounting/resources/addresses/client/Client.ts b/src/api/resources/accounting/resources/addresses/client/Client.ts index 5e13224f8..929f1ec79 100644 --- a/src/api/resources/accounting/resources/addresses/client/Client.ts +++ b/src/api/resources/accounting/resources/addresses/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Addresses { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -45,13 +47,21 @@ export class Addresses { * @example * await client.accounting.addresses.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.AddressesRetrieveRequest = {}, - requestOptions?: Addresses.RequestOptions - ): Promise { + requestOptions?: Addresses.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.AddressesRetrieveRequest = {}, + requestOptions?: Addresses.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -70,8 +80,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/addresses/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -82,8 +94,8 @@ export class Addresses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -96,13 +108,16 @@ export class Addresses { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.Address.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.Address.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/asyncPassthrough/client/Client.ts b/src/api/resources/accounting/resources/asyncPassthrough/client/Client.ts index d7451098d..dff8b4111 100644 --- a/src/api/resources/accounting/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/accounting/resources/asyncPassthrough/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace AsyncPassthrough { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -47,14 +49,23 @@ export class AsyncPassthrough { * path: "/scooters" * }) */ - public async create( + public create( request: Merge.accounting.DataPassthroughRequest, - requestOptions?: AsyncPassthrough.RequestOptions - ): Promise { + requestOptions?: AsyncPassthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.accounting.DataPassthroughRequest, + requestOptions?: AsyncPassthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/async-passthrough" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/async-passthrough", ), method: "POST", headers: { @@ -65,8 +76,8 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -81,13 +92,16 @@ export class AsyncPassthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.AsyncPassthroughReciept.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.AsyncPassthroughReciept.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -105,7 +119,7 @@ export class AsyncPassthrough { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /accounting/v1/async-passthrough." + "Timeout exceeded when calling POST /accounting/v1/async-passthrough.", ); case "unknown": throw new errors.MergeError({ @@ -123,14 +137,23 @@ export class AsyncPassthrough { * @example * await client.accounting.asyncPassthrough.retrieve("async_passthrough_receipt_id") */ - public async retrieve( + public retrieve( asyncPassthroughReceiptId: string, - requestOptions?: AsyncPassthrough.RequestOptions - ): Promise { + requestOptions?: AsyncPassthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(asyncPassthroughReceiptId, requestOptions)); + } + + private async __retrieve( + asyncPassthroughReceiptId: string, + requestOptions?: AsyncPassthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}`, ), method: "GET", headers: { @@ -141,8 +164,8 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -154,13 +177,16 @@ export class AsyncPassthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -178,7 +204,7 @@ export class AsyncPassthrough { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/async-passthrough/{async_passthrough_receipt_id}." + "Timeout exceeded when calling GET /accounting/v1/async-passthrough/{async_passthrough_receipt_id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/asyncTasks/client/Client.ts b/src/api/resources/accounting/resources/asyncTasks/client/Client.ts index ae58f3511..dd804710b 100644 --- a/src/api/resources/accounting/resources/asyncTasks/client/Client.ts +++ b/src/api/resources/accounting/resources/asyncTasks/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AsyncTasks { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,14 +46,23 @@ export class AsyncTasks { * @example * await client.accounting.asyncTasks.retrieve("id") */ - public async retrieve( + public retrieve( id: string, - requestOptions?: AsyncTasks.RequestOptions - ): Promise { + requestOptions?: AsyncTasks.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, requestOptions)); + } + + private async __retrieve( + id: string, + requestOptions?: AsyncTasks.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/async-tasks/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/async-tasks/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -62,8 +73,8 @@ export class AsyncTasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -75,13 +86,16 @@ export class AsyncTasks { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.AsyncPostTask.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.AsyncPostTask.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -99,7 +113,7 @@ export class AsyncTasks { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/async-tasks/{id}." + "Timeout exceeded when calling GET /accounting/v1/async-tasks/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/attachments/client/Client.ts b/src/api/resources/accounting/resources/attachments/client/Client.ts index 05951dada..acd637b54 100644 --- a/src/api/resources/accounting/resources/attachments/client/Client.ts +++ b/src/api/resources/accounting/resources/attachments/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Attachments { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Attachments { * @example * await client.accounting.attachments.list() */ - public async list( + public list( request: Merge.accounting.AttachmentsListRequest = {}, - requestOptions?: Attachments.RequestOptions - ): Promise { + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.AttachmentsListRequest = {}, + requestOptions?: Attachments.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -61,7 +70,7 @@ export class Attachments { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -108,8 +117,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/attachments", ), method: "GET", headers: { @@ -120,8 +131,8 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -134,13 +145,16 @@ export class Attachments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedAccountingAttachmentList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedAccountingAttachmentList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -176,12 +190,19 @@ export class Attachments { * model: {} * }) */ - public async create( + public create( request: Merge.accounting.AccountingAttachmentEndpointRequest, - requestOptions?: Attachments.RequestOptions - ): Promise { + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.accounting.AccountingAttachmentEndpointRequest, + requestOptions?: Attachments.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -192,8 +213,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/attachments", ), method: "POST", headers: { @@ -204,8 +227,8 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -221,13 +244,16 @@ export class Attachments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.AccountingAttachmentResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.AccountingAttachmentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -262,13 +288,21 @@ export class Attachments { * @example * await client.accounting.attachments.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.AttachmentsRetrieveRequest = {}, - requestOptions?: Attachments.RequestOptions - ): Promise { + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.AttachmentsRetrieveRequest = {}, + requestOptions?: Attachments.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -279,8 +313,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/attachments/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -291,8 +327,8 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -305,13 +341,16 @@ export class Attachments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.AccountingAttachment.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.AccountingAttachment.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -329,7 +368,7 @@ export class Attachments { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/attachments/{id}." + "Timeout exceeded when calling GET /accounting/v1/attachments/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -346,11 +385,21 @@ export class Attachments { * @example * await client.accounting.attachments.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Attachments.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Attachments.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/attachments/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/attachments/meta/post", ), method: "GET", headers: { @@ -361,8 +410,8 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -374,13 +423,16 @@ export class Attachments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -398,7 +450,7 @@ export class Attachments { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/attachments/meta/post." + "Timeout exceeded when calling GET /accounting/v1/attachments/meta/post.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/auditTrail/client/Client.ts b/src/api/resources/accounting/resources/auditTrail/client/Client.ts index 8646aeccc..d56cb8624 100644 --- a/src/api/resources/accounting/resources/auditTrail/client/Client.ts +++ b/src/api/resources/accounting/resources/auditTrail/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AuditTrail { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class AuditTrail { * @example * await client.accounting.auditTrail.list() */ - public async list( + public list( request: Merge.accounting.AuditTrailListRequest = {}, - requestOptions?: AuditTrail.RequestOptions - ): Promise { + requestOptions?: AuditTrail.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private 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,8 +85,10 @@ export class AuditTrail { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/audit-trail" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/audit-trail", ), method: "GET", headers: { @@ -88,8 +99,8 @@ export class AuditTrail { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -102,13 +113,16 @@ export class AuditTrail { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedAuditLogEventList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedAuditLogEventList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/availableActions/client/Client.ts b/src/api/resources/accounting/resources/availableActions/client/Client.ts index 7e3926203..f8eaa0a5f 100644 --- a/src/api/resources/accounting/resources/availableActions/client/Client.ts +++ b/src/api/resources/accounting/resources/availableActions/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AvailableActions { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,13 +45,21 @@ export class AvailableActions { * @example * await client.accounting.availableActions.retrieve() */ - public async retrieve( - requestOptions?: AvailableActions.RequestOptions - ): Promise { + public retrieve( + requestOptions?: AvailableActions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(requestOptions)); + } + + private async __retrieve( + requestOptions?: AvailableActions.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/available-actions" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/available-actions", ), method: "GET", headers: { @@ -60,8 +70,8 @@ export class AvailableActions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -73,13 +83,16 @@ export class AvailableActions { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.AvailableActions.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.AvailableActions.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -97,7 +110,7 @@ export class AvailableActions { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/available-actions." + "Timeout exceeded when calling GET /accounting/v1/available-actions.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/balanceSheets/client/Client.ts b/src/api/resources/accounting/resources/balanceSheets/client/Client.ts index 13b8b492e..5093ccb0c 100644 --- a/src/api/resources/accounting/resources/balanceSheets/client/Client.ts +++ b/src/api/resources/accounting/resources/balanceSheets/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace BalanceSheets { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class BalanceSheets { * @example * await client.accounting.balanceSheets.list() */ - public async list( + public list( request: Merge.accounting.BalanceSheetsListRequest = {}, - requestOptions?: BalanceSheets.RequestOptions - ): Promise { + requestOptions?: BalanceSheets.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.BalanceSheetsListRequest = {}, + requestOptions?: BalanceSheets.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -62,7 +71,7 @@ export class BalanceSheets { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -113,8 +122,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/balance-sheets", ), method: "GET", headers: { @@ -125,8 +136,8 @@ export class BalanceSheets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -139,13 +150,16 @@ export class BalanceSheets { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedBalanceSheetList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedBalanceSheetList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -180,13 +194,21 @@ export class BalanceSheets { * @example * await client.accounting.balanceSheets.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.BalanceSheetsRetrieveRequest = {}, - requestOptions?: BalanceSheets.RequestOptions - ): Promise { + requestOptions?: BalanceSheets.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.BalanceSheetsRetrieveRequest = {}, + requestOptions?: BalanceSheets.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -201,8 +223,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/balance-sheets/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -213,8 +237,8 @@ export class BalanceSheets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -227,13 +251,16 @@ export class BalanceSheets { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.BalanceSheet.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.BalanceSheet.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -251,7 +278,7 @@ export class BalanceSheets { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/balance-sheets/{id}." + "Timeout exceeded when calling GET /accounting/v1/balance-sheets/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/bankFeedAccounts/client/Client.ts b/src/api/resources/accounting/resources/bankFeedAccounts/client/Client.ts index 398eb1fef..930e63b68 100644 --- a/src/api/resources/accounting/resources/bankFeedAccounts/client/Client.ts +++ b/src/api/resources/accounting/resources/bankFeedAccounts/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace BankFeedAccounts { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class BankFeedAccounts { * @example * await client.accounting.bankFeedAccounts.list() */ - public async list( + public list( request: Merge.accounting.BankFeedAccountsListRequest = {}, - requestOptions?: BankFeedAccounts.RequestOptions - ): Promise { + requestOptions?: BankFeedAccounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.BankFeedAccountsListRequest = {}, + requestOptions?: BankFeedAccounts.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, includeRemoteData, includeShellData, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -72,8 +81,10 @@ export class BankFeedAccounts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/bank-feed-accounts" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/bank-feed-accounts", ), method: "GET", headers: { @@ -84,8 +95,8 @@ export class BankFeedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -98,13 +109,16 @@ export class BankFeedAccounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedBankFeedAccountList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedBankFeedAccountList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -122,7 +136,7 @@ export class BankFeedAccounts { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/bank-feed-accounts." + "Timeout exceeded when calling GET /accounting/v1/bank-feed-accounts.", ); case "unknown": throw new errors.MergeError({ @@ -142,12 +156,19 @@ export class BankFeedAccounts { * model: {} * }) */ - public async create( + public create( request: Merge.accounting.BankFeedAccountEndpointRequest, - requestOptions?: BankFeedAccounts.RequestOptions - ): Promise { + requestOptions?: BankFeedAccounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.accounting.BankFeedAccountEndpointRequest, + requestOptions?: BankFeedAccounts.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -158,8 +179,10 @@ export class BankFeedAccounts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/bank-feed-accounts" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/bank-feed-accounts", ), method: "POST", headers: { @@ -170,8 +193,8 @@ export class BankFeedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -187,13 +210,16 @@ export class BankFeedAccounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.BankFeedAccountResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.BankFeedAccountResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -211,7 +237,7 @@ export class BankFeedAccounts { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /accounting/v1/bank-feed-accounts." + "Timeout exceeded when calling POST /accounting/v1/bank-feed-accounts.", ); case "unknown": throw new errors.MergeError({ @@ -230,13 +256,21 @@ export class BankFeedAccounts { * @example * await client.accounting.bankFeedAccounts.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.BankFeedAccountsRetrieveRequest = {}, - requestOptions?: BankFeedAccounts.RequestOptions - ): Promise { + requestOptions?: BankFeedAccounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.BankFeedAccountsRetrieveRequest = {}, + requestOptions?: BankFeedAccounts.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -247,8 +281,10 @@ export class BankFeedAccounts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/bank-feed-accounts/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/bank-feed-accounts/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -259,8 +295,8 @@ export class BankFeedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -273,13 +309,16 @@ export class BankFeedAccounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.BankFeedAccount.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.BankFeedAccount.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -297,7 +336,7 @@ export class BankFeedAccounts { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/bank-feed-accounts/{id}." + "Timeout exceeded when calling GET /accounting/v1/bank-feed-accounts/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -314,13 +353,21 @@ export class BankFeedAccounts { * @example * await client.accounting.bankFeedAccounts.metaPostRetrieve() */ - public async metaPostRetrieve( - requestOptions?: BankFeedAccounts.RequestOptions - ): Promise { + public metaPostRetrieve( + requestOptions?: BankFeedAccounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: BankFeedAccounts.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/bank-feed-accounts/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/bank-feed-accounts/meta/post", ), method: "GET", headers: { @@ -331,8 +378,8 @@ export class BankFeedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -344,13 +391,16 @@ export class BankFeedAccounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -368,7 +418,7 @@ export class BankFeedAccounts { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/bank-feed-accounts/meta/post." + "Timeout exceeded when calling GET /accounting/v1/bank-feed-accounts/meta/post.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/bankFeedTransactions/client/Client.ts b/src/api/resources/accounting/resources/bankFeedTransactions/client/Client.ts index 7385abde5..c0064a0c4 100644 --- a/src/api/resources/accounting/resources/bankFeedTransactions/client/Client.ts +++ b/src/api/resources/accounting/resources/bankFeedTransactions/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace BankFeedTransactions { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class BankFeedTransactions { * @example * await client.accounting.bankFeedTransactions.list() */ - public async list( + public list( request: Merge.accounting.BankFeedTransactionsListRequest = {}, - requestOptions?: BankFeedTransactions.RequestOptions - ): Promise { + requestOptions?: BankFeedTransactions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.BankFeedTransactionsListRequest = {}, + requestOptions?: BankFeedTransactions.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -62,7 +71,7 @@ export class BankFeedTransactions { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -113,8 +122,10 @@ export class BankFeedTransactions { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/bank-feed-transactions" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/bank-feed-transactions", ), method: "GET", headers: { @@ -125,8 +136,8 @@ export class BankFeedTransactions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -139,13 +150,16 @@ export class BankFeedTransactions { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedBankFeedTransactionList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedBankFeedTransactionList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -163,7 +177,7 @@ export class BankFeedTransactions { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/bank-feed-transactions." + "Timeout exceeded when calling GET /accounting/v1/bank-feed-transactions.", ); case "unknown": throw new errors.MergeError({ @@ -183,12 +197,19 @@ export class BankFeedTransactions { * model: {} * }) */ - public async create( + public create( request: Merge.accounting.BankFeedTransactionEndpointRequest, - requestOptions?: BankFeedTransactions.RequestOptions - ): Promise { + requestOptions?: BankFeedTransactions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.accounting.BankFeedTransactionEndpointRequest, + requestOptions?: BankFeedTransactions.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -199,8 +220,10 @@ export class BankFeedTransactions { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/bank-feed-transactions" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/bank-feed-transactions", ), method: "POST", headers: { @@ -211,8 +234,8 @@ export class BankFeedTransactions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -228,13 +251,16 @@ export class BankFeedTransactions { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.BankFeedTransactionResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.BankFeedTransactionResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -252,7 +278,7 @@ export class BankFeedTransactions { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /accounting/v1/bank-feed-transactions." + "Timeout exceeded when calling POST /accounting/v1/bank-feed-transactions.", ); case "unknown": throw new errors.MergeError({ @@ -271,13 +297,21 @@ export class BankFeedTransactions { * @example * await client.accounting.bankFeedTransactions.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.BankFeedTransactionsRetrieveRequest = {}, - requestOptions?: BankFeedTransactions.RequestOptions - ): Promise { + requestOptions?: BankFeedTransactions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.BankFeedTransactionsRetrieveRequest = {}, + requestOptions?: BankFeedTransactions.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -292,8 +326,10 @@ export class BankFeedTransactions { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/bank-feed-transactions/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/bank-feed-transactions/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -304,8 +340,8 @@ export class BankFeedTransactions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -318,13 +354,16 @@ export class BankFeedTransactions { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.BankFeedTransaction.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.BankFeedTransaction.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -342,7 +381,7 @@ export class BankFeedTransactions { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/bank-feed-transactions/{id}." + "Timeout exceeded when calling GET /accounting/v1/bank-feed-transactions/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -359,13 +398,21 @@ export class BankFeedTransactions { * @example * await client.accounting.bankFeedTransactions.metaPostRetrieve() */ - public async metaPostRetrieve( - requestOptions?: BankFeedTransactions.RequestOptions - ): Promise { + public metaPostRetrieve( + requestOptions?: BankFeedTransactions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: BankFeedTransactions.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/bank-feed-transactions/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/bank-feed-transactions/meta/post", ), method: "GET", headers: { @@ -376,8 +423,8 @@ export class BankFeedTransactions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -389,13 +436,16 @@ export class BankFeedTransactions { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -413,7 +463,7 @@ export class BankFeedTransactions { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/bank-feed-transactions/meta/post." + "Timeout exceeded when calling GET /accounting/v1/bank-feed-transactions/meta/post.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/cashFlowStatements/client/Client.ts b/src/api/resources/accounting/resources/cashFlowStatements/client/Client.ts index 29c9c35aa..5e201b43e 100644 --- a/src/api/resources/accounting/resources/cashFlowStatements/client/Client.ts +++ b/src/api/resources/accounting/resources/cashFlowStatements/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace CashFlowStatements { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class CashFlowStatements { * @example * await client.accounting.cashFlowStatements.list() */ - public async list( + public list( request: Merge.accounting.CashFlowStatementsListRequest = {}, - requestOptions?: CashFlowStatements.RequestOptions - ): Promise { + requestOptions?: CashFlowStatements.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.CashFlowStatementsListRequest = {}, + requestOptions?: CashFlowStatements.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -62,7 +71,7 @@ export class CashFlowStatements { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -113,8 +122,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/cash-flow-statements", ), method: "GET", headers: { @@ -125,8 +136,8 @@ export class CashFlowStatements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -139,13 +150,16 @@ export class CashFlowStatements { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedCashFlowStatementList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedCashFlowStatementList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -163,7 +177,7 @@ export class CashFlowStatements { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/cash-flow-statements." + "Timeout exceeded when calling GET /accounting/v1/cash-flow-statements.", ); case "unknown": throw new errors.MergeError({ @@ -182,13 +196,21 @@ export class CashFlowStatements { * @example * await client.accounting.cashFlowStatements.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.CashFlowStatementsRetrieveRequest = {}, - requestOptions?: CashFlowStatements.RequestOptions - ): Promise { + requestOptions?: CashFlowStatements.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.CashFlowStatementsRetrieveRequest = {}, + requestOptions?: CashFlowStatements.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -203,8 +225,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/cash-flow-statements/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -215,8 +239,8 @@ export class CashFlowStatements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -229,13 +253,16 @@ export class CashFlowStatements { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.CashFlowStatement.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.CashFlowStatement.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -253,7 +280,7 @@ export class CashFlowStatements { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/cash-flow-statements/{id}." + "Timeout exceeded when calling GET /accounting/v1/cash-flow-statements/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/companyInfo/client/Client.ts b/src/api/resources/accounting/resources/companyInfo/client/Client.ts index 5398a72e7..81a85da57 100644 --- a/src/api/resources/accounting/resources/companyInfo/client/Client.ts +++ b/src/api/resources/accounting/resources/companyInfo/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace CompanyInfo { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class CompanyInfo { * @example * await client.accounting.companyInfo.list() */ - public async list( + public list( request: Merge.accounting.CompanyInfoListRequest = {}, - requestOptions?: CompanyInfo.RequestOptions - ): Promise { + requestOptions?: CompanyInfo.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.CompanyInfoListRequest = {}, + requestOptions?: CompanyInfo.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -61,7 +70,7 @@ export class CompanyInfo { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -75,7 +84,9 @@ export class CompanyInfo { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.CompanyInfoListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -108,8 +119,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/company-info", ), method: "GET", headers: { @@ -120,8 +133,8 @@ export class CompanyInfo { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -134,13 +147,16 @@ export class CompanyInfo { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedCompanyInfoList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedCompanyInfoList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -175,15 +191,25 @@ export class CompanyInfo { * @example * await client.accounting.companyInfo.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.CompanyInfoRetrieveRequest = {}, - requestOptions?: CompanyInfo.RequestOptions - ): Promise { + requestOptions?: CompanyInfo.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.CompanyInfoRetrieveRequest = {}, + requestOptions?: CompanyInfo.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.CompanyInfoRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -196,8 +222,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/company-info/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -208,8 +236,8 @@ export class CompanyInfo { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -222,13 +250,16 @@ export class CompanyInfo { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.CompanyInfo.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.CompanyInfo.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -246,7 +277,7 @@ export class CompanyInfo { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/company-info/{id}." + "Timeout exceeded when calling GET /accounting/v1/company-info/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/companyInfo/types/CompanyInfoListRequestExpand.ts b/src/api/resources/accounting/resources/companyInfo/types/CompanyInfoListRequestExpand.ts index efc979fed..18f2692d5 100644 --- a/src/api/resources/accounting/resources/companyInfo/types/CompanyInfoListRequestExpand.ts +++ b/src/api/resources/accounting/resources/companyInfo/types/CompanyInfoListRequestExpand.ts @@ -3,7 +3,6 @@ */ export type CompanyInfoListRequestExpand = "addresses" | "addresses,phone_numbers" | "phone_numbers"; - export const CompanyInfoListRequestExpand = { Addresses: "addresses", AddressesPhoneNumbers: "addresses,phone_numbers", diff --git a/src/api/resources/accounting/resources/companyInfo/types/CompanyInfoRetrieveRequestExpand.ts b/src/api/resources/accounting/resources/companyInfo/types/CompanyInfoRetrieveRequestExpand.ts index b903b96e1..2f33f5e72 100644 --- a/src/api/resources/accounting/resources/companyInfo/types/CompanyInfoRetrieveRequestExpand.ts +++ b/src/api/resources/accounting/resources/companyInfo/types/CompanyInfoRetrieveRequestExpand.ts @@ -3,7 +3,6 @@ */ export type CompanyInfoRetrieveRequestExpand = "addresses" | "addresses,phone_numbers" | "phone_numbers"; - export const CompanyInfoRetrieveRequestExpand = { Addresses: "addresses", AddressesPhoneNumbers: "addresses,phone_numbers", diff --git a/src/api/resources/accounting/resources/contacts/client/Client.ts b/src/api/resources/accounting/resources/contacts/client/Client.ts index e588f396d..c386bc7f8 100644 --- a/src/api/resources/accounting/resources/contacts/client/Client.ts +++ b/src/api/resources/accounting/resources/contacts/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Contacts { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Contacts { * @example * await client.accounting.contacts.list() */ - public async list( + public list( + request: Merge.accounting.ContactsListRequest = {}, + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.accounting.ContactsListRequest = {}, - requestOptions?: Contacts.RequestOptions - ): Promise { + requestOptions?: Contacts.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -69,7 +78,7 @@ export class Contacts { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -91,7 +100,9 @@ export class Contacts { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.ContactsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -148,8 +159,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/contacts", ), method: "GET", headers: { @@ -160,8 +173,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -174,13 +187,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedContactList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedContactList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -216,12 +232,19 @@ export class Contacts { * model: {} * }) */ - public async create( + public create( + request: Merge.accounting.ContactEndpointRequest, + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.accounting.ContactEndpointRequest, - requestOptions?: Contacts.RequestOptions - ): Promise { + requestOptions?: Contacts.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -232,8 +255,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/contacts", ), method: "POST", headers: { @@ -244,8 +269,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -259,13 +284,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.ContactResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.ContactResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -300,16 +328,26 @@ export class Contacts { * @example * await client.accounting.contacts.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.accounting.ContactsRetrieveRequest = {}, + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.accounting.ContactsRetrieveRequest = {}, - requestOptions?: Contacts.RequestOptions - ): Promise { + requestOptions?: Contacts.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeRemoteFields, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.ContactsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -334,8 +372,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/contacts/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -346,8 +386,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -360,13 +400,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.Contact.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.Contact.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -399,11 +442,21 @@ export class Contacts { * @example * await client.accounting.contacts.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Contacts.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Contacts.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/contacts/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/contacts/meta/post", ), method: "GET", headers: { @@ -414,8 +467,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -427,13 +480,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -451,7 +507,7 @@ export class Contacts { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/contacts/meta/post." + "Timeout exceeded when calling GET /accounting/v1/contacts/meta/post.", ); case "unknown": throw new errors.MergeError({ @@ -469,13 +525,20 @@ export class Contacts { * @example * await client.accounting.contacts.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( + request: Merge.accounting.ContactsRemoteFieldClassesListRequest = {}, + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( request: Merge.accounting.ContactsRemoteFieldClassesListRequest = {}, - requestOptions?: Contacts.RequestOptions - ): Promise { + requestOptions?: Contacts.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -502,8 +565,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/contacts/remote-field-classes", ), method: "GET", headers: { @@ -514,8 +579,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -528,13 +593,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -552,7 +620,7 @@ export class Contacts { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/contacts/remote-field-classes." + "Timeout exceeded when calling GET /accounting/v1/contacts/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/contacts/types/ContactsListRequestExpand.ts b/src/api/resources/accounting/resources/contacts/types/ContactsListRequestExpand.ts index aa9466704..aa01d7a49 100644 --- a/src/api/resources/accounting/resources/contacts/types/ContactsListRequestExpand.ts +++ b/src/api/resources/accounting/resources/contacts/types/ContactsListRequestExpand.ts @@ -10,7 +10,6 @@ export type ContactsListRequestExpand = | "company" | "phone_numbers" | "phone_numbers,company"; - export const ContactsListRequestExpand = { Addresses: "addresses", AddressesCompany: "addresses,company", diff --git a/src/api/resources/accounting/resources/contacts/types/ContactsRetrieveRequestExpand.ts b/src/api/resources/accounting/resources/contacts/types/ContactsRetrieveRequestExpand.ts index 4dd508936..5b415dfc1 100644 --- a/src/api/resources/accounting/resources/contacts/types/ContactsRetrieveRequestExpand.ts +++ b/src/api/resources/accounting/resources/contacts/types/ContactsRetrieveRequestExpand.ts @@ -10,7 +10,6 @@ export type ContactsRetrieveRequestExpand = | "company" | "phone_numbers" | "phone_numbers,company"; - export const ContactsRetrieveRequestExpand = { Addresses: "addresses", AddressesCompany: "addresses,company", diff --git a/src/api/resources/accounting/resources/creditNotes/client/Client.ts b/src/api/resources/accounting/resources/creditNotes/client/Client.ts index 10decf28a..47cb354b2 100644 --- a/src/api/resources/accounting/resources/creditNotes/client/Client.ts +++ b/src/api/resources/accounting/resources/creditNotes/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace CreditNotes { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class CreditNotes { * @example * await client.accounting.creditNotes.list() */ - public async list( + public list( + request: Merge.accounting.CreditNotesListRequest = {}, + requestOptions?: CreditNotes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.accounting.CreditNotesListRequest = {}, - requestOptions?: CreditNotes.RequestOptions - ): Promise { + requestOptions?: CreditNotes.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -66,7 +75,7 @@ export class CreditNotes { transactionDateAfter, transactionDateBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -84,7 +93,9 @@ export class CreditNotes { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.CreditNotesListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -112,7 +123,10 @@ export class CreditNotes { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.accounting.CreditNotesListRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (remoteId != null) { @@ -120,7 +134,10 @@ export class CreditNotes { } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = + serializers.accounting.CreditNotesListRequestShowEnumOrigins.jsonOrThrow(showEnumOrigins, { + unrecognizedObjectKeys: "strip", + }); } if (transactionDateAfter != null) { @@ -133,8 +150,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/credit-notes", ), method: "GET", headers: { @@ -145,8 +164,8 @@ export class CreditNotes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -159,13 +178,16 @@ export class CreditNotes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedCreditNoteList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedCreditNoteList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -201,12 +223,19 @@ export class CreditNotes { * model: {} * }) */ - public async create( + public create( + request: Merge.accounting.CreditNoteEndpointRequest, + requestOptions?: CreditNotes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.accounting.CreditNoteEndpointRequest, - requestOptions?: CreditNotes.RequestOptions - ): Promise { + requestOptions?: CreditNotes.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -217,8 +246,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/credit-notes", ), method: "POST", headers: { @@ -229,8 +260,8 @@ export class CreditNotes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -246,13 +277,16 @@ export class CreditNotes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.CreditNoteResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.CreditNoteResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -287,15 +321,25 @@ export class CreditNotes { * @example * await client.accounting.creditNotes.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.accounting.CreditNotesRetrieveRequest = {}, + requestOptions?: CreditNotes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.accounting.CreditNotesRetrieveRequest = {}, - requestOptions?: CreditNotes.RequestOptions - ): Promise { + requestOptions?: CreditNotes.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.CreditNotesRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -307,17 +351,25 @@ export class CreditNotes { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.accounting.CreditNotesRetrieveRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = + serializers.accounting.CreditNotesRetrieveRequestShowEnumOrigins.jsonOrThrow(showEnumOrigins, { + unrecognizedObjectKeys: "strip", + }); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/credit-notes/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/credit-notes/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -328,8 +380,8 @@ export class CreditNotes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -342,13 +394,16 @@ export class CreditNotes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.CreditNote.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.CreditNote.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -366,7 +421,7 @@ export class CreditNotes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/credit-notes/{id}." + "Timeout exceeded when calling GET /accounting/v1/credit-notes/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -383,11 +438,21 @@ export class CreditNotes { * @example * await client.accounting.creditNotes.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: CreditNotes.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: CreditNotes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: CreditNotes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/credit-notes/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/credit-notes/meta/post", ), method: "GET", headers: { @@ -398,8 +463,8 @@ export class CreditNotes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -411,13 +476,16 @@ export class CreditNotes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -435,7 +503,7 @@ export class CreditNotes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/credit-notes/meta/post." + "Timeout exceeded when calling GET /accounting/v1/credit-notes/meta/post.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/creditNotes/types/CreditNotesListRequestExpand.ts b/src/api/resources/accounting/resources/creditNotes/types/CreditNotesListRequestExpand.ts index 6cd4de2e1..70c56319d 100644 --- a/src/api/resources/accounting/resources/creditNotes/types/CreditNotesListRequestExpand.ts +++ b/src/api/resources/accounting/resources/creditNotes/types/CreditNotesListRequestExpand.ts @@ -130,7 +130,6 @@ export type CreditNotesListRequestExpand = | "tracking_categories,contact,accounting_period" | "tracking_categories,contact,company" | "tracking_categories,contact,company,accounting_period"; - export const CreditNotesListRequestExpand = { AccountingPeriod: "accounting_period", AppliedPayments: "applied_payments", diff --git a/src/api/resources/accounting/resources/creditNotes/types/CreditNotesListRequestRemoteFields.ts b/src/api/resources/accounting/resources/creditNotes/types/CreditNotesListRequestRemoteFields.ts index 3c17315f3..7a9a9ee4c 100644 --- a/src/api/resources/accounting/resources/creditNotes/types/CreditNotesListRequestRemoteFields.ts +++ b/src/api/resources/accounting/resources/creditNotes/types/CreditNotesListRequestRemoteFields.ts @@ -3,7 +3,6 @@ */ export type CreditNotesListRequestRemoteFields = "status" | "status,type" | "type"; - export const CreditNotesListRequestRemoteFields = { Status: "status", StatusType: "status,type", diff --git a/src/api/resources/accounting/resources/creditNotes/types/CreditNotesListRequestShowEnumOrigins.ts b/src/api/resources/accounting/resources/creditNotes/types/CreditNotesListRequestShowEnumOrigins.ts index 99e0242c3..0690e5da0 100644 --- a/src/api/resources/accounting/resources/creditNotes/types/CreditNotesListRequestShowEnumOrigins.ts +++ b/src/api/resources/accounting/resources/creditNotes/types/CreditNotesListRequestShowEnumOrigins.ts @@ -3,7 +3,6 @@ */ export type CreditNotesListRequestShowEnumOrigins = "status" | "status,type" | "type"; - export const CreditNotesListRequestShowEnumOrigins = { Status: "status", StatusType: "status,type", diff --git a/src/api/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestExpand.ts b/src/api/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestExpand.ts index 86f3c8603..c12931d3b 100644 --- a/src/api/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestExpand.ts +++ b/src/api/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestExpand.ts @@ -130,7 +130,6 @@ export type CreditNotesRetrieveRequestExpand = | "tracking_categories,contact,accounting_period" | "tracking_categories,contact,company" | "tracking_categories,contact,company,accounting_period"; - export const CreditNotesRetrieveRequestExpand = { AccountingPeriod: "accounting_period", AppliedPayments: "applied_payments", diff --git a/src/api/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestRemoteFields.ts b/src/api/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestRemoteFields.ts index c5d3d0fec..64d49fd99 100644 --- a/src/api/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestRemoteFields.ts +++ b/src/api/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestRemoteFields.ts @@ -3,7 +3,6 @@ */ export type CreditNotesRetrieveRequestRemoteFields = "status" | "status,type" | "type"; - export const CreditNotesRetrieveRequestRemoteFields = { Status: "status", StatusType: "status,type", diff --git a/src/api/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestShowEnumOrigins.ts b/src/api/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestShowEnumOrigins.ts index 13308f786..126736e49 100644 --- a/src/api/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestShowEnumOrigins.ts +++ b/src/api/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestShowEnumOrigins.ts @@ -3,7 +3,6 @@ */ export type CreditNotesRetrieveRequestShowEnumOrigins = "status" | "status,type" | "type"; - export const CreditNotesRetrieveRequestShowEnumOrigins = { Status: "status", StatusType: "status,type", diff --git a/src/api/resources/accounting/resources/deleteAccount/client/Client.ts b/src/api/resources/accounting/resources/deleteAccount/client/Client.ts index 65a58468f..a47278424 100644 --- a/src/api/resources/accounting/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/accounting/resources/deleteAccount/client/Client.ts @@ -8,15 +8,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace DeleteAccount { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -41,11 +43,17 @@ export class DeleteAccount { * @example * await client.accounting.deleteAccount.delete() */ - public async delete(requestOptions?: DeleteAccount.RequestOptions): Promise { + public delete(requestOptions?: DeleteAccount.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(requestOptions)); + } + + private async __delete(requestOptions?: DeleteAccount.RequestOptions): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/delete-account" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/delete-account", ), method: "POST", headers: { @@ -56,8 +64,8 @@ export class DeleteAccount { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -69,7 +77,7 @@ export class DeleteAccount { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return { data: undefined, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/employees/client/Client.ts b/src/api/resources/accounting/resources/employees/client/Client.ts index 1528a8635..7d518d885 100644 --- a/src/api/resources/accounting/resources/employees/client/Client.ts +++ b/src/api/resources/accounting/resources/employees/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Employees { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class Employees { * @example * await client.accounting.employees.list() */ - public async list( + public list( request: Merge.accounting.EmployeesListRequest = {}, - requestOptions?: Employees.RequestOptions - ): Promise { + requestOptions?: Employees.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.EmployeesListRequest = {}, + requestOptions?: Employees.RequestOptions, + ): Promise> { const { cursor, expand, includeDeletedData, includeRemoteData, includeShellData, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -76,8 +85,10 @@ export class Employees { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/employees" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/employees", ), method: "GET", headers: { @@ -88,8 +99,8 @@ export class Employees { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -102,13 +113,16 @@ export class Employees { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedEmployeeList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedEmployeeList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -143,13 +157,21 @@ export class Employees { * @example * await client.accounting.employees.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.EmployeesRetrieveRequest = {}, - requestOptions?: Employees.RequestOptions - ): Promise { + requestOptions?: Employees.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.EmployeesRetrieveRequest = {}, + requestOptions?: Employees.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -164,8 +186,10 @@ export class Employees { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/employees/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/employees/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -176,8 +200,8 @@ export class Employees { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -190,13 +214,16 @@ export class Employees { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.Employee.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.Employee.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/expenses/client/Client.ts b/src/api/resources/accounting/resources/expenses/client/Client.ts index ff971a95f..36a791341 100644 --- a/src/api/resources/accounting/resources/expenses/client/Client.ts +++ b/src/api/resources/accounting/resources/expenses/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Expenses { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Expenses { * @example * await client.accounting.expenses.list() */ - public async list( + public list( request: Merge.accounting.ExpensesListRequest = {}, - requestOptions?: Expenses.RequestOptions - ): Promise { + requestOptions?: Expenses.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.ExpensesListRequest = {}, + requestOptions?: Expenses.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -65,7 +74,7 @@ export class Expenses { transactionDateAfter, transactionDateBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -83,7 +92,9 @@ export class Expenses { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.ExpensesListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -128,8 +139,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/expenses", ), method: "GET", headers: { @@ -140,8 +153,8 @@ export class Expenses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -154,13 +167,16 @@ export class Expenses { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedExpenseList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedExpenseList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -196,12 +212,19 @@ export class Expenses { * model: {} * }) */ - public async create( + public create( request: Merge.accounting.ExpenseEndpointRequest, - requestOptions?: Expenses.RequestOptions - ): Promise { + requestOptions?: Expenses.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.accounting.ExpenseEndpointRequest, + requestOptions?: Expenses.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -212,8 +235,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/expenses", ), method: "POST", headers: { @@ -224,8 +249,8 @@ export class Expenses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -239,13 +264,16 @@ export class Expenses { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.ExpenseResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.ExpenseResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -280,15 +308,25 @@ export class Expenses { * @example * await client.accounting.expenses.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.accounting.ExpensesRetrieveRequest = {}, + requestOptions?: Expenses.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.accounting.ExpensesRetrieveRequest = {}, - requestOptions?: Expenses.RequestOptions - ): Promise { + requestOptions?: Expenses.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeRemoteFields, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.ExpensesRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -305,8 +343,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/expenses/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -317,8 +357,8 @@ export class Expenses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -331,13 +371,16 @@ export class Expenses { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.Expense.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.Expense.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -371,13 +414,20 @@ export class Expenses { * @example * await client.accounting.expenses.linesRemoteFieldClassesList() */ - public async linesRemoteFieldClassesList( + public linesRemoteFieldClassesList( request: Merge.accounting.ExpensesLinesRemoteFieldClassesListRequest = {}, - requestOptions?: Expenses.RequestOptions - ): Promise { + requestOptions?: Expenses.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linesRemoteFieldClassesList(request, requestOptions)); + } + + private async __linesRemoteFieldClassesList( + request: Merge.accounting.ExpensesLinesRemoteFieldClassesListRequest = {}, + requestOptions?: Expenses.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -404,8 +454,10 @@ 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/lines/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/expenses/lines/remote-field-classes", ), method: "GET", headers: { @@ -416,8 +468,8 @@ export class Expenses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -430,13 +482,16 @@ export class Expenses { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -454,7 +509,7 @@ export class Expenses { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/expenses/lines/remote-field-classes." + "Timeout exceeded when calling GET /accounting/v1/expenses/lines/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ @@ -471,11 +526,21 @@ export class Expenses { * @example * await client.accounting.expenses.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Expenses.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Expenses.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Expenses.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/expenses/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/expenses/meta/post", ), method: "GET", headers: { @@ -486,8 +551,8 @@ export class Expenses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -499,13 +564,16 @@ export class Expenses { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -523,7 +591,7 @@ export class Expenses { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/expenses/meta/post." + "Timeout exceeded when calling GET /accounting/v1/expenses/meta/post.", ); case "unknown": throw new errors.MergeError({ @@ -541,13 +609,20 @@ export class Expenses { * @example * await client.accounting.expenses.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( request: Merge.accounting.ExpensesRemoteFieldClassesListRequest = {}, - requestOptions?: Expenses.RequestOptions - ): Promise { + requestOptions?: Expenses.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( + request: Merge.accounting.ExpensesRemoteFieldClassesListRequest = {}, + requestOptions?: Expenses.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -574,8 +649,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/expenses/remote-field-classes", ), method: "GET", headers: { @@ -586,8 +663,8 @@ export class Expenses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -600,13 +677,16 @@ export class Expenses { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -624,7 +704,7 @@ export class Expenses { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/expenses/remote-field-classes." + "Timeout exceeded when calling GET /accounting/v1/expenses/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/expenses/types/ExpensesListRequestExpand.ts b/src/api/resources/accounting/resources/expenses/types/ExpensesListRequestExpand.ts index cbe4ce083..f874bb4b4 100644 --- a/src/api/resources/accounting/resources/expenses/types/ExpensesListRequestExpand.ts +++ b/src/api/resources/accounting/resources/expenses/types/ExpensesListRequestExpand.ts @@ -66,7 +66,6 @@ export type ExpensesListRequestExpand = | "tracking_categories,contact,employee,accounting_period" | "tracking_categories,employee" | "tracking_categories,employee,accounting_period"; - export const ExpensesListRequestExpand = { Account: "account", AccountAccountingPeriod: "account,accounting_period", diff --git a/src/api/resources/accounting/resources/expenses/types/ExpensesRetrieveRequestExpand.ts b/src/api/resources/accounting/resources/expenses/types/ExpensesRetrieveRequestExpand.ts index 2816ef6df..7126e5428 100644 --- a/src/api/resources/accounting/resources/expenses/types/ExpensesRetrieveRequestExpand.ts +++ b/src/api/resources/accounting/resources/expenses/types/ExpensesRetrieveRequestExpand.ts @@ -66,7 +66,6 @@ export type ExpensesRetrieveRequestExpand = | "tracking_categories,contact,employee,accounting_period" | "tracking_categories,employee" | "tracking_categories,employee,accounting_period"; - export const ExpensesRetrieveRequestExpand = { Account: "account", AccountAccountingPeriod: "account,accounting_period", diff --git a/src/api/resources/accounting/resources/fieldMapping/client/Client.ts b/src/api/resources/accounting/resources/fieldMapping/client/Client.ts index b9d82b99e..68242a3ab 100644 --- a/src/api/resources/accounting/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/accounting/resources/fieldMapping/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace FieldMapping { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,20 +46,29 @@ export class FieldMapping { * @example * await client.accounting.fieldMapping.fieldMappingsRetrieve() */ - public async fieldMappingsRetrieve( + public fieldMappingsRetrieve( request: Merge.accounting.FieldMappingsRetrieveRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsRetrieve(request, requestOptions)); + } + + private async __fieldMappingsRetrieve( + request: Merge.accounting.FieldMappingsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { excludeRemoteFieldMetadata } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (excludeRemoteFieldMetadata != null) { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/field-mappings" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/field-mappings", ), method: "GET", headers: { @@ -68,8 +79,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -82,13 +93,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -129,20 +143,29 @@ export class FieldMapping { * commonModelName: "ExampleCommonModel" * }) */ - public async fieldMappingsCreate( + public fieldMappingsCreate( + request: Merge.accounting.CreateFieldMappingRequest, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsCreate(request, requestOptions)); + } + + private async __fieldMappingsCreate( request: Merge.accounting.CreateFieldMappingRequest, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { excludeRemoteFieldMetadata, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (excludeRemoteFieldMetadata != null) { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/field-mappings" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/field-mappings", ), method: "POST", headers: { @@ -153,8 +176,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -170,13 +193,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -210,14 +236,23 @@ export class FieldMapping { * @example * await client.accounting.fieldMapping.fieldMappingsDestroy("field_mapping_id") */ - public async fieldMappingsDestroy( + public fieldMappingsDestroy( + fieldMappingId: string, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsDestroy(fieldMappingId, requestOptions)); + } + + private async __fieldMappingsDestroy( fieldMappingId: string, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "DELETE", headers: { @@ -228,8 +263,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -241,13 +276,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -265,7 +303,7 @@ export class FieldMapping { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling DELETE /accounting/v1/field-mappings/{field_mapping_id}." + "Timeout exceeded when calling DELETE /accounting/v1/field-mappings/{field_mapping_id}.", ); case "unknown": throw new errors.MergeError({ @@ -284,15 +322,27 @@ export class FieldMapping { * @example * await client.accounting.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id") */ - public async fieldMappingsPartialUpdate( + public fieldMappingsPartialUpdate( fieldMappingId: string, request: Merge.accounting.PatchedEditFieldMappingRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__fieldMappingsPartialUpdate(fieldMappingId, request, requestOptions), + ); + } + + private async __fieldMappingsPartialUpdate( + fieldMappingId: string, + request: Merge.accounting.PatchedEditFieldMappingRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "PATCH", headers: { @@ -303,8 +353,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -319,13 +369,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -343,7 +396,7 @@ export class FieldMapping { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling PATCH /accounting/v1/field-mappings/{field_mapping_id}." + "Timeout exceeded when calling PATCH /accounting/v1/field-mappings/{field_mapping_id}.", ); case "unknown": throw new errors.MergeError({ @@ -361,12 +414,19 @@ export class FieldMapping { * @example * await client.accounting.fieldMapping.remoteFieldsRetrieve() */ - public async remoteFieldsRetrieve( + public remoteFieldsRetrieve( + request: Merge.accounting.RemoteFieldsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldsRetrieve(request, requestOptions)); + } + + private async __remoteFieldsRetrieve( request: Merge.accounting.RemoteFieldsRetrieveRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { commonModels, includeExampleValues } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (commonModels != null) { _queryParams["common_models"] = commonModels; } @@ -377,8 +437,10 @@ 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/remote-fields" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/remote-fields", ), method: "GET", headers: { @@ -389,8 +451,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -403,13 +465,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.RemoteFieldApiResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.RemoteFieldApiResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -442,13 +507,21 @@ export class FieldMapping { * @example * await client.accounting.fieldMapping.targetFieldsRetrieve() */ - public async targetFieldsRetrieve( - requestOptions?: FieldMapping.RequestOptions - ): Promise { + public targetFieldsRetrieve( + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__targetFieldsRetrieve(requestOptions)); + } + + private async __targetFieldsRetrieve( + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/target-fields" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/target-fields", ), method: "GET", headers: { @@ -459,8 +532,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -472,13 +545,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/forceResync/client/Client.ts b/src/api/resources/accounting/resources/forceResync/client/Client.ts index fd5cf0206..a66037b5f 100644 --- a/src/api/resources/accounting/resources/forceResync/client/Client.ts +++ b/src/api/resources/accounting/resources/forceResync/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace ForceResync { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,13 +45,21 @@ export class ForceResync { * @example * await client.accounting.forceResync.syncStatusResyncCreate() */ - public async syncStatusResyncCreate( - requestOptions?: ForceResync.RequestOptions - ): Promise { + public syncStatusResyncCreate( + requestOptions?: ForceResync.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__syncStatusResyncCreate(requestOptions)); + } + + private async __syncStatusResyncCreate( + requestOptions?: ForceResync.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/sync-status/resync" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/sync-status/resync", ), method: "POST", headers: { @@ -60,8 +70,8 @@ export class ForceResync { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -73,13 +83,16 @@ export class ForceResync { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -97,7 +110,7 @@ export class ForceResync { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /accounting/v1/sync-status/resync." + "Timeout exceeded when calling POST /accounting/v1/sync-status/resync.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/generalLedgerTransactions/client/Client.ts b/src/api/resources/accounting/resources/generalLedgerTransactions/client/Client.ts index f9f04b9f3..6a35743a3 100644 --- a/src/api/resources/accounting/resources/generalLedgerTransactions/client/Client.ts +++ b/src/api/resources/accounting/resources/generalLedgerTransactions/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace GeneralLedgerTransactions { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class GeneralLedgerTransactions { * @example * await client.accounting.generalLedgerTransactions.list() */ - public async list( + public list( + request: Merge.accounting.GeneralLedgerTransactionsListRequest = {}, + requestOptions?: GeneralLedgerTransactions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.accounting.GeneralLedgerTransactionsListRequest = {}, - requestOptions?: GeneralLedgerTransactions.RequestOptions - ): Promise { + requestOptions?: GeneralLedgerTransactions.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -64,7 +73,7 @@ export class GeneralLedgerTransactions { postedDateBefore, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -82,7 +91,10 @@ export class GeneralLedgerTransactions { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.GeneralLedgerTransactionsListRequestExpand.jsonOrThrow( + expand, + { unrecognizedObjectKeys: "strip" }, + ); } if (includeDeletedData != null) { @@ -123,8 +135,10 @@ export class GeneralLedgerTransactions { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/general-ledger-transactions" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/general-ledger-transactions", ), method: "GET", headers: { @@ -135,8 +149,8 @@ export class GeneralLedgerTransactions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +163,16 @@ export class GeneralLedgerTransactions { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedGeneralLedgerTransactionList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedGeneralLedgerTransactionList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -173,7 +190,7 @@ export class GeneralLedgerTransactions { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/general-ledger-transactions." + "Timeout exceeded when calling GET /accounting/v1/general-ledger-transactions.", ); case "unknown": throw new errors.MergeError({ @@ -192,15 +209,26 @@ export class GeneralLedgerTransactions { * @example * await client.accounting.generalLedgerTransactions.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.GeneralLedgerTransactionsRetrieveRequest = {}, - requestOptions?: GeneralLedgerTransactions.RequestOptions - ): Promise { + requestOptions?: GeneralLedgerTransactions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.GeneralLedgerTransactionsRetrieveRequest = {}, + requestOptions?: GeneralLedgerTransactions.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.GeneralLedgerTransactionsRetrieveRequestExpand.jsonOrThrow( + expand, + { unrecognizedObjectKeys: "strip" }, + ); } if (includeRemoteData != null) { @@ -213,8 +241,10 @@ export class GeneralLedgerTransactions { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/general-ledger-transactions/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/general-ledger-transactions/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -225,8 +255,8 @@ export class GeneralLedgerTransactions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -239,13 +269,16 @@ export class GeneralLedgerTransactions { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.GeneralLedgerTransaction.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.GeneralLedgerTransaction.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -263,7 +296,7 @@ export class GeneralLedgerTransactions { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/general-ledger-transactions/{id}." + "Timeout exceeded when calling GET /accounting/v1/general-ledger-transactions/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsListRequestExpand.ts b/src/api/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsListRequestExpand.ts index a6b0e8284..da68eeafa 100644 --- a/src/api/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsListRequestExpand.ts +++ b/src/api/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsListRequestExpand.ts @@ -18,7 +18,6 @@ export type GeneralLedgerTransactionsListRequestExpand = | "tracking_categories,general_ledger_transaction_lines,accounting_period" | "tracking_categories,general_ledger_transaction_lines,company" | "tracking_categories,general_ledger_transaction_lines,company,accounting_period"; - export const GeneralLedgerTransactionsListRequestExpand = { AccountingPeriod: "accounting_period", Company: "company", diff --git a/src/api/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsRetrieveRequestExpand.ts b/src/api/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsRetrieveRequestExpand.ts index cd1bae423..8d613dd62 100644 --- a/src/api/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsRetrieveRequestExpand.ts +++ b/src/api/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsRetrieveRequestExpand.ts @@ -18,7 +18,6 @@ export type GeneralLedgerTransactionsRetrieveRequestExpand = | "tracking_categories,general_ledger_transaction_lines,accounting_period" | "tracking_categories,general_ledger_transaction_lines,company" | "tracking_categories,general_ledger_transaction_lines,company,accounting_period"; - export const GeneralLedgerTransactionsRetrieveRequestExpand = { AccountingPeriod: "accounting_period", Company: "company", diff --git a/src/api/resources/accounting/resources/generateKey/client/Client.ts b/src/api/resources/accounting/resources/generateKey/client/Client.ts index 7805c5400..68a8cf6ec 100644 --- a/src/api/resources/accounting/resources/generateKey/client/Client.ts +++ b/src/api/resources/accounting/resources/generateKey/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace GenerateKey { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -46,14 +48,23 @@ export class GenerateKey { * name: "Remote Deployment Key 1" * }) */ - public async create( + public create( request: Merge.accounting.GenerateRemoteKeyRequest, - requestOptions?: GenerateKey.RequestOptions - ): Promise { + requestOptions?: GenerateKey.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.accounting.GenerateRemoteKeyRequest, + requestOptions?: GenerateKey.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/generate-key" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/generate-key", ), method: "POST", headers: { @@ -64,8 +75,8 @@ export class GenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -80,13 +91,16 @@ export class GenerateKey { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.RemoteKey.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.RemoteKey.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/incomeStatements/client/Client.ts b/src/api/resources/accounting/resources/incomeStatements/client/Client.ts index 8994f2e94..40fe21342 100644 --- a/src/api/resources/accounting/resources/incomeStatements/client/Client.ts +++ b/src/api/resources/accounting/resources/incomeStatements/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace IncomeStatements { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class IncomeStatements { * @example * await client.accounting.incomeStatements.list() */ - public async list( + public list( request: Merge.accounting.IncomeStatementsListRequest = {}, - requestOptions?: IncomeStatements.RequestOptions - ): Promise { + requestOptions?: IncomeStatements.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.IncomeStatementsListRequest = {}, + requestOptions?: IncomeStatements.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -62,7 +71,7 @@ export class IncomeStatements { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -113,8 +122,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/income-statements", ), method: "GET", headers: { @@ -125,8 +136,8 @@ export class IncomeStatements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -139,13 +150,16 @@ export class IncomeStatements { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedIncomeStatementList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedIncomeStatementList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -163,7 +177,7 @@ export class IncomeStatements { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/income-statements." + "Timeout exceeded when calling GET /accounting/v1/income-statements.", ); case "unknown": throw new errors.MergeError({ @@ -182,13 +196,21 @@ export class IncomeStatements { * @example * await client.accounting.incomeStatements.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.IncomeStatementsRetrieveRequest = {}, - requestOptions?: IncomeStatements.RequestOptions - ): Promise { + requestOptions?: IncomeStatements.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.IncomeStatementsRetrieveRequest = {}, + requestOptions?: IncomeStatements.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -203,8 +225,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/income-statements/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -215,8 +239,8 @@ export class IncomeStatements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -229,13 +253,16 @@ export class IncomeStatements { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.IncomeStatement.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.IncomeStatement.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -253,7 +280,7 @@ export class IncomeStatements { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/income-statements/{id}." + "Timeout exceeded when calling GET /accounting/v1/income-statements/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/invoices/client/Client.ts b/src/api/resources/accounting/resources/invoices/client/Client.ts index bada6281b..3b49174aa 100644 --- a/src/api/resources/accounting/resources/invoices/client/Client.ts +++ b/src/api/resources/accounting/resources/invoices/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Invoices { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Invoices { * @example * await client.accounting.invoices.list() */ - public async list( + public list( + request: Merge.accounting.InvoicesListRequest = {}, + requestOptions?: Invoices.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.accounting.InvoicesListRequest = {}, - requestOptions?: Invoices.RequestOptions - ): Promise { + requestOptions?: Invoices.RequestOptions, + ): Promise> { const { companyId, contactId, @@ -71,7 +80,7 @@ export class Invoices { status, type: type_, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -93,7 +102,9 @@ export class Invoices { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.InvoicesListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -149,17 +160,23 @@ export class Invoices { } if (status != null) { - _queryParams["status"] = status; + _queryParams["status"] = serializers.accounting.InvoicesListRequestStatus.jsonOrThrow(status, { + unrecognizedObjectKeys: "strip", + }); } if (type_ != null) { - _queryParams["type"] = type_; + _queryParams["type"] = serializers.accounting.InvoicesListRequestType.jsonOrThrow(type_, { + unrecognizedObjectKeys: "strip", + }); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/invoices" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/invoices", ), method: "GET", headers: { @@ -170,8 +187,8 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -184,13 +201,16 @@ export class Invoices { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedInvoiceList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedInvoiceList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -227,12 +247,19 @@ export class Invoices { * model: {} * }) */ - public async create( + public create( + request: Merge.accounting.InvoiceEndpointRequest, + requestOptions?: Invoices.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.accounting.InvoiceEndpointRequest, - requestOptions?: Invoices.RequestOptions - ): Promise { + requestOptions?: Invoices.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -243,8 +270,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/invoices", ), method: "POST", headers: { @@ -255,8 +284,8 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -270,13 +299,16 @@ export class Invoices { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.InvoiceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.InvoiceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -311,16 +343,26 @@ export class Invoices { * @example * await client.accounting.invoices.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.InvoicesRetrieveRequest = {}, - requestOptions?: Invoices.RequestOptions - ): Promise { + requestOptions?: Invoices.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.InvoicesRetrieveRequest = {}, + requestOptions?: Invoices.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeRemoteFields, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.InvoicesRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -345,8 +387,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/invoices/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -357,8 +401,8 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -371,13 +415,16 @@ export class Invoices { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.Invoice.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.Invoice.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -414,13 +461,21 @@ export class Invoices { * model: {} * }) */ - public async partialUpdate( + public partialUpdate( + id: string, + request: Merge.accounting.PatchedInvoiceEndpointRequest, + requestOptions?: Invoices.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__partialUpdate(id, request, requestOptions)); + } + + private async __partialUpdate( id: string, request: Merge.accounting.PatchedInvoiceEndpointRequest, - requestOptions?: Invoices.RequestOptions - ): Promise { + requestOptions?: Invoices.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -431,8 +486,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/invoices/${encodeURIComponent(id)}`, ), method: "PATCH", headers: { @@ -443,8 +500,8 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -460,13 +517,16 @@ export class Invoices { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.InvoiceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.InvoiceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -500,13 +560,20 @@ export class Invoices { * @example * await client.accounting.invoices.lineItemsRemoteFieldClassesList() */ - public async lineItemsRemoteFieldClassesList( + public lineItemsRemoteFieldClassesList( request: Merge.accounting.InvoicesLineItemsRemoteFieldClassesListRequest = {}, - requestOptions?: Invoices.RequestOptions - ): Promise { + requestOptions?: Invoices.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__lineItemsRemoteFieldClassesList(request, requestOptions)); + } + + private async __lineItemsRemoteFieldClassesList( + request: Merge.accounting.InvoicesLineItemsRemoteFieldClassesListRequest = {}, + requestOptions?: Invoices.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -533,8 +600,10 @@ 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/line-items/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/invoices/line-items/remote-field-classes", ), method: "GET", headers: { @@ -545,8 +614,8 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -559,13 +628,16 @@ export class Invoices { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -583,7 +655,7 @@ export class Invoices { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/invoices/line-items/remote-field-classes." + "Timeout exceeded when calling GET /accounting/v1/invoices/line-items/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ @@ -601,14 +673,23 @@ export class Invoices { * @example * await client.accounting.invoices.metaPatchRetrieve("id") */ - public async metaPatchRetrieve( + public metaPatchRetrieve( id: string, - requestOptions?: Invoices.RequestOptions - ): Promise { + requestOptions?: Invoices.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPatchRetrieve(id, requestOptions)); + } + + private async __metaPatchRetrieve( + id: string, + requestOptions?: Invoices.RequestOptions, + ): Promise> { 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/invoices/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -619,8 +700,8 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -632,13 +713,16 @@ export class Invoices { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -656,7 +740,7 @@ export class Invoices { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/invoices/meta/patch/{id}." + "Timeout exceeded when calling GET /accounting/v1/invoices/meta/patch/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -673,11 +757,21 @@ export class Invoices { * @example * await client.accounting.invoices.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Invoices.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Invoices.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Invoices.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/invoices/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/invoices/meta/post", ), method: "GET", headers: { @@ -688,8 +782,8 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -701,13 +795,16 @@ export class Invoices { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -725,7 +822,7 @@ export class Invoices { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/invoices/meta/post." + "Timeout exceeded when calling GET /accounting/v1/invoices/meta/post.", ); case "unknown": throw new errors.MergeError({ @@ -743,13 +840,20 @@ export class Invoices { * @example * await client.accounting.invoices.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( request: Merge.accounting.InvoicesRemoteFieldClassesListRequest = {}, - requestOptions?: Invoices.RequestOptions - ): Promise { + requestOptions?: Invoices.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( + request: Merge.accounting.InvoicesRemoteFieldClassesListRequest = {}, + requestOptions?: Invoices.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -776,8 +880,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/invoices/remote-field-classes", ), method: "GET", headers: { @@ -788,8 +894,8 @@ export class Invoices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -802,13 +908,16 @@ export class Invoices { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -826,7 +935,7 @@ export class Invoices { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/invoices/remote-field-classes." + "Timeout exceeded when calling GET /accounting/v1/invoices/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/invoices/types/InvoicesListRequestExpand.ts b/src/api/resources/accounting/resources/invoices/types/InvoicesListRequestExpand.ts index 5e4f6f277..f475a391f 100644 --- a/src/api/resources/accounting/resources/invoices/types/InvoicesListRequestExpand.ts +++ b/src/api/resources/accounting/resources/invoices/types/InvoicesListRequestExpand.ts @@ -4098,7 +4098,6 @@ export type InvoicesListRequestExpand = | "tracking_categories,purchase_orders,employee,accounting_period,payment_term" | "tracking_categories,purchase_orders,employee,payment_term" | "tracking_categories,purchase_orders,payment_term"; - export const InvoicesListRequestExpand = { AccountingPeriod: "accounting_period", AccountingPeriodPaymentTerm: "accounting_period,payment_term", diff --git a/src/api/resources/accounting/resources/invoices/types/InvoicesListRequestStatus.ts b/src/api/resources/accounting/resources/invoices/types/InvoicesListRequestStatus.ts index d2eeb89ca..708b1f721 100644 --- a/src/api/resources/accounting/resources/invoices/types/InvoicesListRequestStatus.ts +++ b/src/api/resources/accounting/resources/invoices/types/InvoicesListRequestStatus.ts @@ -3,7 +3,6 @@ */ export type InvoicesListRequestStatus = "DRAFT" | "OPEN" | "PAID" | "PARTIALLY_PAID" | "SUBMITTED" | "VOID"; - export const InvoicesListRequestStatus = { Draft: "DRAFT", Open: "OPEN", diff --git a/src/api/resources/accounting/resources/invoices/types/InvoicesListRequestType.ts b/src/api/resources/accounting/resources/invoices/types/InvoicesListRequestType.ts index 20fcea89c..1958acec3 100644 --- a/src/api/resources/accounting/resources/invoices/types/InvoicesListRequestType.ts +++ b/src/api/resources/accounting/resources/invoices/types/InvoicesListRequestType.ts @@ -3,7 +3,6 @@ */ export type InvoicesListRequestType = "ACCOUNTS_PAYABLE" | "ACCOUNTS_RECEIVABLE"; - export const InvoicesListRequestType = { AccountsPayable: "ACCOUNTS_PAYABLE", AccountsReceivable: "ACCOUNTS_RECEIVABLE", diff --git a/src/api/resources/accounting/resources/invoices/types/InvoicesRetrieveRequestExpand.ts b/src/api/resources/accounting/resources/invoices/types/InvoicesRetrieveRequestExpand.ts index d60e05f1a..c145b3485 100644 --- a/src/api/resources/accounting/resources/invoices/types/InvoicesRetrieveRequestExpand.ts +++ b/src/api/resources/accounting/resources/invoices/types/InvoicesRetrieveRequestExpand.ts @@ -4098,7 +4098,6 @@ export type InvoicesRetrieveRequestExpand = | "tracking_categories,purchase_orders,employee,accounting_period,payment_term" | "tracking_categories,purchase_orders,employee,payment_term" | "tracking_categories,purchase_orders,payment_term"; - export const InvoicesRetrieveRequestExpand = { AccountingPeriod: "accounting_period", AccountingPeriodPaymentTerm: "accounting_period,payment_term", diff --git a/src/api/resources/accounting/resources/issues/client/Client.ts b/src/api/resources/accounting/resources/issues/client/Client.ts index 253d66084..e5a95d466 100644 --- a/src/api/resources/accounting/resources/issues/client/Client.ts +++ b/src/api/resources/accounting/resources/issues/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Issues { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Issues { * @example * await client.accounting.issues.list() */ - public async list( + public list( + request: Merge.accounting.IssuesListRequest = {}, + requestOptions?: Issues.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.accounting.IssuesListRequest = {}, - requestOptions?: Issues.RequestOptions - ): Promise { + requestOptions?: Issues.RequestOptions, + ): Promise> { const { accountToken, cursor, @@ -64,7 +73,7 @@ export class Issues { startDate, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountToken != null) { _queryParams["account_token"] = accountToken; } @@ -118,13 +127,17 @@ export class Issues { } if (status != null) { - _queryParams["status"] = status; + _queryParams["status"] = serializers.accounting.IssuesListRequestStatus.jsonOrThrow(status, { + unrecognizedObjectKeys: "strip", + }); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/issues" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/issues", ), method: "GET", headers: { @@ -135,8 +148,8 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +162,16 @@ export class Issues { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedIssueList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedIssueList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -189,11 +205,23 @@ export class Issues { * @example * await client.accounting.issues.retrieve("id") */ - public async retrieve(id: string, requestOptions?: Issues.RequestOptions): Promise { + public retrieve( + id: string, + requestOptions?: Issues.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, requestOptions)); + } + + private 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/issues/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -204,8 +232,8 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -217,13 +245,16 @@ export class Issues { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.Issue.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.Issue.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/issues/types/IssuesListRequestStatus.ts b/src/api/resources/accounting/resources/issues/types/IssuesListRequestStatus.ts index b2d4f1b76..a35e3e193 100644 --- a/src/api/resources/accounting/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/api/resources/accounting/resources/issues/types/IssuesListRequestStatus.ts @@ -3,7 +3,6 @@ */ export type IssuesListRequestStatus = "ONGOING" | "RESOLVED"; - export const IssuesListRequestStatus = { Ongoing: "ONGOING", Resolved: "RESOLVED", diff --git a/src/api/resources/accounting/resources/items/client/Client.ts b/src/api/resources/accounting/resources/items/client/Client.ts index 558c5fee9..640a3383b 100644 --- a/src/api/resources/accounting/resources/items/client/Client.ts +++ b/src/api/resources/accounting/resources/items/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Items { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Items { * @example * await client.accounting.items.list() */ - public async list( + public list( request: Merge.accounting.ItemsListRequest = {}, - requestOptions?: Items.RequestOptions - ): Promise { + requestOptions?: Items.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.ItemsListRequest = {}, + requestOptions?: Items.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -64,7 +73,7 @@ export class Items { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -82,7 +91,9 @@ export class Items { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.ItemsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -123,8 +134,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/items", ), method: "GET", headers: { @@ -135,8 +148,8 @@ export class Items { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +162,16 @@ export class Items { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedItemList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedItemList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -190,15 +206,25 @@ export class Items { * @example * await client.accounting.items.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.ItemsRetrieveRequest = {}, - requestOptions?: Items.RequestOptions - ): Promise { + requestOptions?: Items.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.ItemsRetrieveRequest = {}, + requestOptions?: Items.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.ItemsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -219,8 +245,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/items/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -231,8 +259,8 @@ export class Items { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -245,13 +273,16 @@ export class Items { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.Item.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.Item.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/items/types/ItemsListRequestExpand.ts b/src/api/resources/accounting/resources/items/types/ItemsListRequestExpand.ts index be925cabd..382b5b692 100644 --- a/src/api/resources/accounting/resources/items/types/ItemsListRequestExpand.ts +++ b/src/api/resources/accounting/resources/items/types/ItemsListRequestExpand.ts @@ -34,7 +34,6 @@ export type ItemsListRequestExpand = | "sales_account,sales_tax_rate,purchase_tax_rate" | "sales_tax_rate" | "sales_tax_rate,purchase_tax_rate"; - export const ItemsListRequestExpand = { Company: "company", CompanyPurchaseTaxRate: "company,purchase_tax_rate", diff --git a/src/api/resources/accounting/resources/items/types/ItemsRetrieveRequestExpand.ts b/src/api/resources/accounting/resources/items/types/ItemsRetrieveRequestExpand.ts index 6691b6b5a..099c2ec30 100644 --- a/src/api/resources/accounting/resources/items/types/ItemsRetrieveRequestExpand.ts +++ b/src/api/resources/accounting/resources/items/types/ItemsRetrieveRequestExpand.ts @@ -34,7 +34,6 @@ export type ItemsRetrieveRequestExpand = | "sales_account,sales_tax_rate,purchase_tax_rate" | "sales_tax_rate" | "sales_tax_rate,purchase_tax_rate"; - export const ItemsRetrieveRequestExpand = { Company: "company", CompanyPurchaseTaxRate: "company,purchase_tax_rate", diff --git a/src/api/resources/accounting/resources/journalEntries/client/Client.ts b/src/api/resources/accounting/resources/journalEntries/client/Client.ts index 8079413f6..c3e86cead 100644 --- a/src/api/resources/accounting/resources/journalEntries/client/Client.ts +++ b/src/api/resources/accounting/resources/journalEntries/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace JournalEntries { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class JournalEntries { * @example * await client.accounting.journalEntries.list() */ - public async list( + public list( + request: Merge.accounting.JournalEntriesListRequest = {}, + requestOptions?: JournalEntries.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.accounting.JournalEntriesListRequest = {}, - requestOptions?: JournalEntries.RequestOptions - ): Promise { + requestOptions?: JournalEntries.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -65,7 +74,7 @@ export class JournalEntries { transactionDateAfter, transactionDateBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -83,7 +92,9 @@ export class JournalEntries { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.JournalEntriesListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -128,8 +139,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/journal-entries", ), method: "GET", headers: { @@ -140,8 +153,8 @@ export class JournalEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -154,13 +167,16 @@ export class JournalEntries { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedJournalEntryList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedJournalEntryList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -196,12 +212,19 @@ export class JournalEntries { * model: {} * }) */ - public async create( + public create( request: Merge.accounting.JournalEntryEndpointRequest, - requestOptions?: JournalEntries.RequestOptions - ): Promise { + requestOptions?: JournalEntries.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.accounting.JournalEntryEndpointRequest, + requestOptions?: JournalEntries.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -212,8 +235,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/journal-entries", ), method: "POST", headers: { @@ -224,8 +249,8 @@ export class JournalEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -241,13 +266,16 @@ export class JournalEntries { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.JournalEntryResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.JournalEntryResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -265,7 +293,7 @@ export class JournalEntries { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /accounting/v1/journal-entries." + "Timeout exceeded when calling POST /accounting/v1/journal-entries.", ); case "unknown": throw new errors.MergeError({ @@ -284,15 +312,25 @@ export class JournalEntries { * @example * await client.accounting.journalEntries.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.accounting.JournalEntriesRetrieveRequest = {}, + requestOptions?: JournalEntries.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.accounting.JournalEntriesRetrieveRequest = {}, - requestOptions?: JournalEntries.RequestOptions - ): Promise { + requestOptions?: JournalEntries.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeRemoteFields, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.JournalEntriesRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -309,8 +347,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/journal-entries/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -321,8 +361,8 @@ export class JournalEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -335,13 +375,16 @@ export class JournalEntries { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.JournalEntry.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.JournalEntry.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -359,7 +402,7 @@ export class JournalEntries { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/journal-entries/{id}." + "Timeout exceeded when calling GET /accounting/v1/journal-entries/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -377,13 +420,20 @@ export class JournalEntries { * @example * await client.accounting.journalEntries.linesRemoteFieldClassesList() */ - public async linesRemoteFieldClassesList( + public linesRemoteFieldClassesList( request: Merge.accounting.JournalEntriesLinesRemoteFieldClassesListRequest = {}, - requestOptions?: JournalEntries.RequestOptions - ): Promise { + requestOptions?: JournalEntries.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linesRemoteFieldClassesList(request, requestOptions)); + } + + private async __linesRemoteFieldClassesList( + request: Merge.accounting.JournalEntriesLinesRemoteFieldClassesListRequest = {}, + requestOptions?: JournalEntries.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -410,8 +460,10 @@ 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/lines/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/journal-entries/lines/remote-field-classes", ), method: "GET", headers: { @@ -422,8 +474,8 @@ export class JournalEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -436,13 +488,16 @@ export class JournalEntries { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -460,7 +515,7 @@ export class JournalEntries { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/journal-entries/lines/remote-field-classes." + "Timeout exceeded when calling GET /accounting/v1/journal-entries/lines/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ @@ -477,13 +532,21 @@ export class JournalEntries { * @example * await client.accounting.journalEntries.metaPostRetrieve() */ - public async metaPostRetrieve( - requestOptions?: JournalEntries.RequestOptions - ): Promise { + public metaPostRetrieve( + requestOptions?: JournalEntries.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: JournalEntries.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/journal-entries/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/journal-entries/meta/post", ), method: "GET", headers: { @@ -494,8 +557,8 @@ export class JournalEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -507,13 +570,16 @@ export class JournalEntries { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -531,7 +597,7 @@ export class JournalEntries { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/journal-entries/meta/post." + "Timeout exceeded when calling GET /accounting/v1/journal-entries/meta/post.", ); case "unknown": throw new errors.MergeError({ @@ -549,13 +615,20 @@ export class JournalEntries { * @example * await client.accounting.journalEntries.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( request: Merge.accounting.JournalEntriesRemoteFieldClassesListRequest = {}, - requestOptions?: JournalEntries.RequestOptions - ): Promise { + requestOptions?: JournalEntries.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( + request: Merge.accounting.JournalEntriesRemoteFieldClassesListRequest = {}, + requestOptions?: JournalEntries.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -582,8 +655,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/journal-entries/remote-field-classes", ), method: "GET", headers: { @@ -594,8 +669,8 @@ export class JournalEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -608,13 +683,16 @@ export class JournalEntries { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -632,7 +710,7 @@ export class JournalEntries { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/journal-entries/remote-field-classes." + "Timeout exceeded when calling GET /accounting/v1/journal-entries/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/journalEntries/types/JournalEntriesListRequestExpand.ts b/src/api/resources/accounting/resources/journalEntries/types/JournalEntriesListRequestExpand.ts index 5e6756ca9..feef61407 100644 --- a/src/api/resources/accounting/resources/journalEntries/types/JournalEntriesListRequestExpand.ts +++ b/src/api/resources/accounting/resources/journalEntries/types/JournalEntriesListRequestExpand.ts @@ -66,7 +66,6 @@ export type JournalEntriesListRequestExpand = | "tracking_categories,accounting_period" | "tracking_categories,company" | "tracking_categories,company,accounting_period"; - export const JournalEntriesListRequestExpand = { AccountingPeriod: "accounting_period", AppliedPayments: "applied_payments", diff --git a/src/api/resources/accounting/resources/journalEntries/types/JournalEntriesRetrieveRequestExpand.ts b/src/api/resources/accounting/resources/journalEntries/types/JournalEntriesRetrieveRequestExpand.ts index 9b6631595..2dfb6ac4c 100644 --- a/src/api/resources/accounting/resources/journalEntries/types/JournalEntriesRetrieveRequestExpand.ts +++ b/src/api/resources/accounting/resources/journalEntries/types/JournalEntriesRetrieveRequestExpand.ts @@ -66,7 +66,6 @@ export type JournalEntriesRetrieveRequestExpand = | "tracking_categories,accounting_period" | "tracking_categories,company" | "tracking_categories,company,accounting_period"; - export const JournalEntriesRetrieveRequestExpand = { AccountingPeriod: "accounting_period", AppliedPayments: "applied_payments", diff --git a/src/api/resources/accounting/resources/linkToken/client/Client.ts b/src/api/resources/accounting/resources/linkToken/client/Client.ts index ea9d0dd30..76f2984ae 100644 --- a/src/api/resources/accounting/resources/linkToken/client/Client.ts +++ b/src/api/resources/accounting/resources/linkToken/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace LinkToken { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -49,14 +51,23 @@ export class LinkToken { * categories: ["hris", "ats"] * }) */ - public async create( + public create( request: Merge.accounting.EndUserDetailsRequest, - requestOptions?: LinkToken.RequestOptions - ): Promise { + requestOptions?: LinkToken.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.accounting.EndUserDetailsRequest, + requestOptions?: LinkToken.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/link-token" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/link-token", ), method: "POST", headers: { @@ -67,8 +78,8 @@ export class LinkToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -83,13 +94,16 @@ export class LinkToken { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.LinkToken.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.LinkToken.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/linkedAccounts/client/Client.ts b/src/api/resources/accounting/resources/linkedAccounts/client/Client.ts index a733fd76a..f8c59c2ab 100644 --- a/src/api/resources/accounting/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/accounting/resources/linkedAccounts/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace LinkedAccounts { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class LinkedAccounts { * @example * await client.accounting.linkedAccounts.list() */ - public async list( + public list( request: Merge.accounting.LinkedAccountsListRequest = {}, - requestOptions?: LinkedAccounts.RequestOptions - ): Promise { + requestOptions?: LinkedAccounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.LinkedAccountsListRequest = {}, + requestOptions?: LinkedAccounts.RequestOptions, + ): Promise> { const { category, cursor, @@ -63,9 +72,11 @@ export class LinkedAccounts { pageSize, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (category != null) { - _queryParams["category"] = category; + _queryParams["category"] = serializers.accounting.LinkedAccountsListRequestCategory.jsonOrThrow(category, { + unrecognizedObjectKeys: "strip", + }); } if (cursor != null) { @@ -118,8 +129,10 @@ export class LinkedAccounts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/linked-accounts" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/linked-accounts", ), method: "GET", headers: { @@ -130,8 +143,8 @@ export class LinkedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -144,13 +157,16 @@ export class LinkedAccounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/api/resources/accounting/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index edeb3e1d1..7474691d1 100644 --- a/src/api/resources/accounting/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/api/resources/accounting/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -10,7 +10,6 @@ export type LinkedAccountsListRequestCategory = | "hris" | "mktg" | "ticketing"; - export const LinkedAccountsListRequestCategory = { Accounting: "accounting", Ats: "ats", diff --git a/src/api/resources/accounting/resources/passthrough/client/Client.ts b/src/api/resources/accounting/resources/passthrough/client/Client.ts index 7ec0088b2..25a18b7fe 100644 --- a/src/api/resources/accounting/resources/passthrough/client/Client.ts +++ b/src/api/resources/accounting/resources/passthrough/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Passthrough { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -47,14 +49,23 @@ export class Passthrough { * path: "/scooters" * }) */ - public async create( + public create( request: Merge.accounting.DataPassthroughRequest, - requestOptions?: Passthrough.RequestOptions - ): Promise { + requestOptions?: Passthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.accounting.DataPassthroughRequest, + requestOptions?: Passthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/passthrough" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/passthrough", ), method: "POST", headers: { @@ -65,8 +76,8 @@ export class Passthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -81,13 +92,16 @@ export class Passthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.RemoteResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.RemoteResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/paymentMethods/client/Client.ts b/src/api/resources/accounting/resources/paymentMethods/client/Client.ts index 3ed005029..376e5088b 100644 --- a/src/api/resources/accounting/resources/paymentMethods/client/Client.ts +++ b/src/api/resources/accounting/resources/paymentMethods/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace PaymentMethods { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class PaymentMethods { * @example * await client.accounting.paymentMethods.list() */ - public async list( + public list( request: Merge.accounting.PaymentMethodsListRequest = {}, - requestOptions?: PaymentMethods.RequestOptions - ): Promise { + requestOptions?: PaymentMethods.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.PaymentMethodsListRequest = {}, + requestOptions?: PaymentMethods.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, includeRemoteData, includeShellData, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -72,8 +81,10 @@ export class PaymentMethods { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/payment-methods" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/payment-methods", ), method: "GET", headers: { @@ -84,8 +95,8 @@ export class PaymentMethods { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -98,13 +109,16 @@ export class PaymentMethods { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedPaymentMethodList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedPaymentMethodList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -139,13 +153,21 @@ export class PaymentMethods { * @example * await client.accounting.paymentMethods.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.PaymentMethodsRetrieveRequest = {}, - requestOptions?: PaymentMethods.RequestOptions - ): Promise { + requestOptions?: PaymentMethods.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.PaymentMethodsRetrieveRequest = {}, + requestOptions?: PaymentMethods.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -156,8 +178,10 @@ export class PaymentMethods { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/payment-methods/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/payment-methods/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -168,8 +192,8 @@ export class PaymentMethods { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -182,13 +206,16 @@ export class PaymentMethods { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaymentMethod.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaymentMethod.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -206,7 +233,7 @@ export class PaymentMethods { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/payment-methods/{id}." + "Timeout exceeded when calling GET /accounting/v1/payment-methods/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/paymentTerms/client/Client.ts b/src/api/resources/accounting/resources/paymentTerms/client/Client.ts index 1e14b50de..8705011ca 100644 --- a/src/api/resources/accounting/resources/paymentTerms/client/Client.ts +++ b/src/api/resources/accounting/resources/paymentTerms/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace PaymentTerms { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class PaymentTerms { * @example * await client.accounting.paymentTerms.list() */ - public async list( + public list( request: Merge.accounting.PaymentTermsListRequest = {}, - requestOptions?: PaymentTerms.RequestOptions - ): Promise { + requestOptions?: PaymentTerms.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.PaymentTermsListRequest = {}, + requestOptions?: PaymentTerms.RequestOptions, + ): Promise> { const { cursor, expand, includeDeletedData, includeRemoteData, includeShellData, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -76,8 +85,10 @@ export class PaymentTerms { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/payment-terms" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/payment-terms", ), method: "GET", headers: { @@ -88,8 +99,8 @@ export class PaymentTerms { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -102,13 +113,16 @@ export class PaymentTerms { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedPaymentTermList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedPaymentTermList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -143,13 +157,21 @@ export class PaymentTerms { * @example * await client.accounting.paymentTerms.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.PaymentTermsRetrieveRequest = {}, - requestOptions?: PaymentTerms.RequestOptions - ): Promise { + requestOptions?: PaymentTerms.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.PaymentTermsRetrieveRequest = {}, + requestOptions?: PaymentTerms.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -164,8 +186,10 @@ export class PaymentTerms { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `accounting/v1/payment-terms/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/payment-terms/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -176,8 +200,8 @@ export class PaymentTerms { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -190,13 +214,16 @@ export class PaymentTerms { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaymentTerm.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaymentTerm.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -214,7 +241,7 @@ export class PaymentTerms { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/payment-terms/{id}." + "Timeout exceeded when calling GET /accounting/v1/payment-terms/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/payments/client/Client.ts b/src/api/resources/accounting/resources/payments/client/Client.ts index 9b91b8250..c51b1cb4d 100644 --- a/src/api/resources/accounting/resources/payments/client/Client.ts +++ b/src/api/resources/accounting/resources/payments/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Payments { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Payments { * @example * await client.accounting.payments.list() */ - public async list( + public list( + request: Merge.accounting.PaymentsListRequest = {}, + requestOptions?: Payments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.accounting.PaymentsListRequest = {}, - requestOptions?: Payments.RequestOptions - ): Promise { + requestOptions?: Payments.RequestOptions, + ): Promise> { const { accountId, companyId, @@ -67,7 +76,7 @@ export class Payments { transactionDateAfter, transactionDateBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountId != null) { _queryParams["account_id"] = accountId; } @@ -93,7 +102,9 @@ export class Payments { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.PaymentsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -138,8 +149,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/payments", ), method: "GET", headers: { @@ -150,8 +163,8 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -164,13 +177,16 @@ export class Payments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedPaymentList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedPaymentList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -206,12 +222,19 @@ export class Payments { * model: {} * }) */ - public async create( + public create( + request: Merge.accounting.PaymentEndpointRequest, + requestOptions?: Payments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.accounting.PaymentEndpointRequest, - requestOptions?: Payments.RequestOptions - ): Promise { + requestOptions?: Payments.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -222,8 +245,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/payments", ), method: "POST", headers: { @@ -234,8 +259,8 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -249,13 +274,16 @@ export class Payments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaymentResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaymentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -290,15 +318,25 @@ export class Payments { * @example * await client.accounting.payments.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.accounting.PaymentsRetrieveRequest = {}, + requestOptions?: Payments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.accounting.PaymentsRetrieveRequest = {}, - requestOptions?: Payments.RequestOptions - ): Promise { + requestOptions?: Payments.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeRemoteFields, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.PaymentsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -315,8 +353,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/payments/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -327,8 +367,8 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -341,13 +381,16 @@ export class Payments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.Payment.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.Payment.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -384,13 +427,21 @@ export class Payments { * model: {} * }) */ - public async partialUpdate( + public partialUpdate( id: string, request: Merge.accounting.PatchedPaymentEndpointRequest, - requestOptions?: Payments.RequestOptions - ): Promise { + requestOptions?: Payments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__partialUpdate(id, request, requestOptions)); + } + + private async __partialUpdate( + id: string, + request: Merge.accounting.PatchedPaymentEndpointRequest, + requestOptions?: Payments.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -401,8 +452,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/payments/${encodeURIComponent(id)}`, ), method: "PATCH", headers: { @@ -413,8 +466,8 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -430,13 +483,16 @@ export class Payments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaymentResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaymentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -470,13 +526,20 @@ export class Payments { * @example * await client.accounting.payments.lineItemsRemoteFieldClassesList() */ - public async lineItemsRemoteFieldClassesList( + public lineItemsRemoteFieldClassesList( + request: Merge.accounting.PaymentsLineItemsRemoteFieldClassesListRequest = {}, + requestOptions?: Payments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__lineItemsRemoteFieldClassesList(request, requestOptions)); + } + + private async __lineItemsRemoteFieldClassesList( request: Merge.accounting.PaymentsLineItemsRemoteFieldClassesListRequest = {}, - requestOptions?: Payments.RequestOptions - ): Promise { + requestOptions?: Payments.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -503,8 +566,10 @@ 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/line-items/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/payments/line-items/remote-field-classes", ), method: "GET", headers: { @@ -515,8 +580,8 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -529,13 +594,16 @@ export class Payments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -553,7 +621,7 @@ export class Payments { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/payments/line-items/remote-field-classes." + "Timeout exceeded when calling GET /accounting/v1/payments/line-items/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ @@ -571,14 +639,23 @@ export class Payments { * @example * await client.accounting.payments.metaPatchRetrieve("id") */ - public async metaPatchRetrieve( + public metaPatchRetrieve( id: string, - requestOptions?: Payments.RequestOptions - ): Promise { + requestOptions?: Payments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPatchRetrieve(id, requestOptions)); + } + + private async __metaPatchRetrieve( + id: string, + requestOptions?: Payments.RequestOptions, + ): Promise> { 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/payments/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -589,8 +666,8 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -602,13 +679,16 @@ export class Payments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -626,7 +706,7 @@ export class Payments { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/payments/meta/patch/{id}." + "Timeout exceeded when calling GET /accounting/v1/payments/meta/patch/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -643,11 +723,21 @@ export class Payments { * @example * await client.accounting.payments.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Payments.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Payments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Payments.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/payments/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/payments/meta/post", ), method: "GET", headers: { @@ -658,8 +748,8 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -671,13 +761,16 @@ export class Payments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -695,7 +788,7 @@ export class Payments { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/payments/meta/post." + "Timeout exceeded when calling GET /accounting/v1/payments/meta/post.", ); case "unknown": throw new errors.MergeError({ @@ -713,13 +806,20 @@ export class Payments { * @example * await client.accounting.payments.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( request: Merge.accounting.PaymentsRemoteFieldClassesListRequest = {}, - requestOptions?: Payments.RequestOptions - ): Promise { + requestOptions?: Payments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( + request: Merge.accounting.PaymentsRemoteFieldClassesListRequest = {}, + requestOptions?: Payments.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -746,8 +846,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/payments/remote-field-classes", ), method: "GET", headers: { @@ -758,8 +860,8 @@ export class Payments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -772,13 +874,16 @@ export class Payments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -796,7 +901,7 @@ export class Payments { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/payments/remote-field-classes." + "Timeout exceeded when calling GET /accounting/v1/payments/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/payments/types/PaymentsListRequestExpand.ts b/src/api/resources/accounting/resources/payments/types/PaymentsListRequestExpand.ts index 73c34453e..7a7e01d32 100644 --- a/src/api/resources/accounting/resources/payments/types/PaymentsListRequestExpand.ts +++ b/src/api/resources/accounting/resources/payments/types/PaymentsListRequestExpand.ts @@ -130,7 +130,6 @@ export type PaymentsListRequestExpand = | "tracking_categories,contact,company,payment_method" | "tracking_categories,contact,payment_method" | "tracking_categories,payment_method"; - export const PaymentsListRequestExpand = { Account: "account", AccountAccountingPeriod: "account,accounting_period", diff --git a/src/api/resources/accounting/resources/payments/types/PaymentsRetrieveRequestExpand.ts b/src/api/resources/accounting/resources/payments/types/PaymentsRetrieveRequestExpand.ts index 4a758d139..7b611b427 100644 --- a/src/api/resources/accounting/resources/payments/types/PaymentsRetrieveRequestExpand.ts +++ b/src/api/resources/accounting/resources/payments/types/PaymentsRetrieveRequestExpand.ts @@ -130,7 +130,6 @@ export type PaymentsRetrieveRequestExpand = | "tracking_categories,contact,company,payment_method" | "tracking_categories,contact,payment_method" | "tracking_categories,payment_method"; - export const PaymentsRetrieveRequestExpand = { Account: "account", AccountAccountingPeriod: "account,accounting_period", diff --git a/src/api/resources/accounting/resources/phoneNumbers/client/Client.ts b/src/api/resources/accounting/resources/phoneNumbers/client/Client.ts index bf78d960d..d94e9b0b0 100644 --- a/src/api/resources/accounting/resources/phoneNumbers/client/Client.ts +++ b/src/api/resources/accounting/resources/phoneNumbers/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace PhoneNumbers { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -45,13 +47,21 @@ export class PhoneNumbers { * @example * await client.accounting.phoneNumbers.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.PhoneNumbersRetrieveRequest = {}, - requestOptions?: PhoneNumbers.RequestOptions - ): Promise { + requestOptions?: PhoneNumbers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.PhoneNumbersRetrieveRequest = {}, + requestOptions?: PhoneNumbers.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -62,8 +72,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/phone-numbers/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -74,8 +86,8 @@ export class PhoneNumbers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -88,13 +100,16 @@ export class PhoneNumbers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.AccountingPhoneNumber.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.AccountingPhoneNumber.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -112,7 +127,7 @@ export class PhoneNumbers { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/phone-numbers/{id}." + "Timeout exceeded when calling GET /accounting/v1/phone-numbers/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/purchaseOrders/client/Client.ts b/src/api/resources/accounting/resources/purchaseOrders/client/Client.ts index 71cea74c5..1bf382259 100644 --- a/src/api/resources/accounting/resources/purchaseOrders/client/Client.ts +++ b/src/api/resources/accounting/resources/purchaseOrders/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace PurchaseOrders { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class PurchaseOrders { * @example * await client.accounting.purchaseOrders.list() */ - public async list( + public list( + request: Merge.accounting.PurchaseOrdersListRequest = {}, + requestOptions?: PurchaseOrders.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.accounting.PurchaseOrdersListRequest = {}, - requestOptions?: PurchaseOrders.RequestOptions - ): Promise { + requestOptions?: PurchaseOrders.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -67,7 +76,7 @@ export class PurchaseOrders { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -85,7 +94,9 @@ export class PurchaseOrders { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.PurchaseOrdersListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -138,8 +149,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/purchase-orders", ), method: "GET", headers: { @@ -150,8 +163,8 @@ export class PurchaseOrders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -164,13 +177,16 @@ export class PurchaseOrders { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedPurchaseOrderList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedPurchaseOrderList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -206,12 +222,19 @@ export class PurchaseOrders { * model: {} * }) */ - public async create( + public create( request: Merge.accounting.PurchaseOrderEndpointRequest, - requestOptions?: PurchaseOrders.RequestOptions - ): Promise { + requestOptions?: PurchaseOrders.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.accounting.PurchaseOrderEndpointRequest, + requestOptions?: PurchaseOrders.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -222,8 +245,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/purchase-orders", ), method: "POST", headers: { @@ -234,8 +259,8 @@ export class PurchaseOrders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -251,13 +276,16 @@ export class PurchaseOrders { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PurchaseOrderResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PurchaseOrderResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -275,7 +303,7 @@ export class PurchaseOrders { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /accounting/v1/purchase-orders." + "Timeout exceeded when calling POST /accounting/v1/purchase-orders.", ); case "unknown": throw new errors.MergeError({ @@ -294,16 +322,26 @@ export class PurchaseOrders { * @example * await client.accounting.purchaseOrders.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.accounting.PurchaseOrdersRetrieveRequest = {}, + requestOptions?: PurchaseOrders.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.accounting.PurchaseOrdersRetrieveRequest = {}, - requestOptions?: PurchaseOrders.RequestOptions - ): Promise { + requestOptions?: PurchaseOrders.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeRemoteFields, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.PurchaseOrdersRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -328,8 +366,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/purchase-orders/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -340,8 +380,8 @@ export class PurchaseOrders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -354,13 +394,16 @@ export class PurchaseOrders { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PurchaseOrder.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PurchaseOrder.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -378,7 +421,7 @@ export class PurchaseOrders { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/purchase-orders/{id}." + "Timeout exceeded when calling GET /accounting/v1/purchase-orders/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -396,13 +439,20 @@ export class PurchaseOrders { * @example * await client.accounting.purchaseOrders.lineItemsRemoteFieldClassesList() */ - public async lineItemsRemoteFieldClassesList( + public lineItemsRemoteFieldClassesList( request: Merge.accounting.PurchaseOrdersLineItemsRemoteFieldClassesListRequest = {}, - requestOptions?: PurchaseOrders.RequestOptions - ): Promise { + requestOptions?: PurchaseOrders.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__lineItemsRemoteFieldClassesList(request, requestOptions)); + } + + private async __lineItemsRemoteFieldClassesList( + request: Merge.accounting.PurchaseOrdersLineItemsRemoteFieldClassesListRequest = {}, + requestOptions?: PurchaseOrders.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -429,8 +479,10 @@ 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/line-items/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/purchase-orders/line-items/remote-field-classes", ), method: "GET", headers: { @@ -441,8 +493,8 @@ export class PurchaseOrders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -455,13 +507,16 @@ export class PurchaseOrders { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -479,7 +534,7 @@ export class PurchaseOrders { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/purchase-orders/line-items/remote-field-classes." + "Timeout exceeded when calling GET /accounting/v1/purchase-orders/line-items/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ @@ -496,13 +551,21 @@ export class PurchaseOrders { * @example * await client.accounting.purchaseOrders.metaPostRetrieve() */ - public async metaPostRetrieve( - requestOptions?: PurchaseOrders.RequestOptions - ): Promise { + public metaPostRetrieve( + requestOptions?: PurchaseOrders.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: PurchaseOrders.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/purchase-orders/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/purchase-orders/meta/post", ), method: "GET", headers: { @@ -513,8 +576,8 @@ export class PurchaseOrders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -526,13 +589,16 @@ export class PurchaseOrders { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -550,7 +616,7 @@ export class PurchaseOrders { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/purchase-orders/meta/post." + "Timeout exceeded when calling GET /accounting/v1/purchase-orders/meta/post.", ); case "unknown": throw new errors.MergeError({ @@ -568,13 +634,20 @@ export class PurchaseOrders { * @example * await client.accounting.purchaseOrders.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( request: Merge.accounting.PurchaseOrdersRemoteFieldClassesListRequest = {}, - requestOptions?: PurchaseOrders.RequestOptions - ): Promise { + requestOptions?: PurchaseOrders.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( + request: Merge.accounting.PurchaseOrdersRemoteFieldClassesListRequest = {}, + requestOptions?: PurchaseOrders.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -601,8 +674,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/purchase-orders/remote-field-classes", ), method: "GET", headers: { @@ -613,8 +688,8 @@ export class PurchaseOrders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -627,13 +702,16 @@ export class PurchaseOrders { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -651,7 +729,7 @@ export class PurchaseOrders { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/purchase-orders/remote-field-classes." + "Timeout exceeded when calling GET /accounting/v1/purchase-orders/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersListRequestExpand.ts b/src/api/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersListRequestExpand.ts index 0a124c157..82be8599d 100644 --- a/src/api/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersListRequestExpand.ts +++ b/src/api/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersListRequestExpand.ts @@ -130,7 +130,6 @@ export type PurchaseOrdersListRequestExpand = | "vendor,company,accounting_period,payment_term" | "vendor,company,payment_term" | "vendor,payment_term"; - export const PurchaseOrdersListRequestExpand = { AccountingPeriod: "accounting_period", AccountingPeriodPaymentTerm: "accounting_period,payment_term", diff --git a/src/api/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersRetrieveRequestExpand.ts b/src/api/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersRetrieveRequestExpand.ts index 82895e88d..01fb5a557 100644 --- a/src/api/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersRetrieveRequestExpand.ts +++ b/src/api/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersRetrieveRequestExpand.ts @@ -130,7 +130,6 @@ export type PurchaseOrdersRetrieveRequestExpand = | "vendor,company,accounting_period,payment_term" | "vendor,company,payment_term" | "vendor,payment_term"; - export const PurchaseOrdersRetrieveRequestExpand = { AccountingPeriod: "accounting_period", AccountingPeriodPaymentTerm: "accounting_period,payment_term", diff --git a/src/api/resources/accounting/resources/regenerateKey/client/Client.ts b/src/api/resources/accounting/resources/regenerateKey/client/Client.ts index 0c429b45c..770583a11 100644 --- a/src/api/resources/accounting/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/accounting/resources/regenerateKey/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace RegenerateKey { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -46,14 +48,23 @@ export class RegenerateKey { * name: "Remote Deployment Key 1" * }) */ - public async create( + public create( request: Merge.accounting.RemoteKeyForRegenerationRequest, - requestOptions?: RegenerateKey.RequestOptions - ): Promise { + requestOptions?: RegenerateKey.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.accounting.RemoteKeyForRegenerationRequest, + requestOptions?: RegenerateKey.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/regenerate-key" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/regenerate-key", ), method: "POST", headers: { @@ -64,8 +75,8 @@ export class RegenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -80,13 +91,16 @@ export class RegenerateKey { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.RemoteKey.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.RemoteKey.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/scopes/client/Client.ts b/src/api/resources/accounting/resources/scopes/client/Client.ts index 0e2e80136..7dc4a881a 100644 --- a/src/api/resources/accounting/resources/scopes/client/Client.ts +++ b/src/api/resources/accounting/resources/scopes/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Scopes { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,13 +45,21 @@ export class Scopes { * @example * await client.accounting.scopes.defaultScopesRetrieve() */ - public async defaultScopesRetrieve( - requestOptions?: Scopes.RequestOptions - ): Promise { + public defaultScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__defaultScopesRetrieve(requestOptions)); + } + + private async __defaultScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/default-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/default-scopes", ), method: "GET", headers: { @@ -60,8 +70,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -73,13 +83,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -112,13 +125,21 @@ export class Scopes { * @example * await client.accounting.scopes.linkedAccountScopesRetrieve() */ - public async linkedAccountScopesRetrieve( - requestOptions?: Scopes.RequestOptions - ): Promise { + public linkedAccountScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linkedAccountScopesRetrieve(requestOptions)); + } + + private async __linkedAccountScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/linked-account-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/linked-account-scopes", ), method: "GET", headers: { @@ -129,8 +150,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -142,13 +163,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -166,7 +190,7 @@ export class Scopes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/linked-account-scopes." + "Timeout exceeded when calling GET /accounting/v1/linked-account-scopes.", ); case "unknown": throw new errors.MergeError({ @@ -207,14 +231,23 @@ export class Scopes { * }] * }) */ - public async linkedAccountScopesCreate( + public linkedAccountScopesCreate( request: Merge.accounting.LinkedAccountCommonModelScopeDeserializerRequest, - requestOptions?: Scopes.RequestOptions - ): Promise { + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linkedAccountScopesCreate(request, requestOptions)); + } + + private async __linkedAccountScopesCreate( + request: Merge.accounting.LinkedAccountCommonModelScopeDeserializerRequest, + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/linked-account-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/linked-account-scopes", ), method: "POST", headers: { @@ -225,8 +258,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -241,13 +274,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -265,7 +301,7 @@ export class Scopes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /accounting/v1/linked-account-scopes." + "Timeout exceeded when calling POST /accounting/v1/linked-account-scopes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/syncStatus/client/Client.ts b/src/api/resources/accounting/resources/syncStatus/client/Client.ts index 8d4aedb8c..64d2900f4 100644 --- a/src/api/resources/accounting/resources/syncStatus/client/Client.ts +++ b/src/api/resources/accounting/resources/syncStatus/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace SyncStatus { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class SyncStatus { * @example * await client.accounting.syncStatus.list() */ - public async list( + public list( request: Merge.accounting.SyncStatusListRequest = {}, - requestOptions?: SyncStatus.RequestOptions - ): Promise { + requestOptions?: SyncStatus.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private 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,8 +69,10 @@ export class SyncStatus { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/sync-status" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/sync-status", ), method: "GET", headers: { @@ -72,8 +83,8 @@ export class SyncStatus { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -86,13 +97,16 @@ export class SyncStatus { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedSyncStatusList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedSyncStatusList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/taxRates/client/Client.ts b/src/api/resources/accounting/resources/taxRates/client/Client.ts index 122cea041..e61f75744 100644 --- a/src/api/resources/accounting/resources/taxRates/client/Client.ts +++ b/src/api/resources/accounting/resources/taxRates/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace TaxRates { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class TaxRates { * @example * await client.accounting.taxRates.list() */ - public async list( + public list( request: Merge.accounting.TaxRatesListRequest = {}, - requestOptions?: TaxRates.RequestOptions - ): Promise { + requestOptions?: TaxRates.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.TaxRatesListRequest = {}, + requestOptions?: TaxRates.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -63,7 +72,7 @@ export class TaxRates { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -118,8 +127,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/tax-rates", ), method: "GET", headers: { @@ -130,8 +141,8 @@ export class TaxRates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -144,13 +155,16 @@ export class TaxRates { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedTaxRateList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedTaxRateList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -185,13 +199,21 @@ export class TaxRates { * @example * await client.accounting.taxRates.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.TaxRatesRetrieveRequest = {}, - requestOptions?: TaxRates.RequestOptions - ): Promise { + requestOptions?: TaxRates.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.TaxRatesRetrieveRequest = {}, + requestOptions?: TaxRates.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -206,8 +228,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/tax-rates/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -218,8 +242,8 @@ export class TaxRates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -232,13 +256,16 @@ export class TaxRates { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.TaxRate.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.TaxRate.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/accounting/resources/trackingCategories/client/Client.ts b/src/api/resources/accounting/resources/trackingCategories/client/Client.ts index 5fa7d3963..8c956df3f 100644 --- a/src/api/resources/accounting/resources/trackingCategories/client/Client.ts +++ b/src/api/resources/accounting/resources/trackingCategories/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace TrackingCategories { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class TrackingCategories { * @example * await client.accounting.trackingCategories.list() */ - public async list( + public list( request: Merge.accounting.TrackingCategoriesListRequest = {}, - requestOptions?: TrackingCategories.RequestOptions - ): Promise { + requestOptions?: TrackingCategories.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.TrackingCategoriesListRequest = {}, + requestOptions?: TrackingCategories.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -65,7 +74,7 @@ export class TrackingCategories { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -128,8 +137,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/tracking-categories", ), method: "GET", headers: { @@ -140,8 +151,8 @@ export class TrackingCategories { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -154,13 +165,16 @@ export class TrackingCategories { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedTrackingCategoryList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedTrackingCategoryList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -178,7 +192,7 @@ export class TrackingCategories { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/tracking-categories." + "Timeout exceeded when calling GET /accounting/v1/tracking-categories.", ); case "unknown": throw new errors.MergeError({ @@ -197,13 +211,21 @@ export class TrackingCategories { * @example * await client.accounting.trackingCategories.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.TrackingCategoriesRetrieveRequest = {}, - requestOptions?: TrackingCategories.RequestOptions - ): Promise { + requestOptions?: TrackingCategories.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.TrackingCategoriesRetrieveRequest = {}, + requestOptions?: TrackingCategories.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -226,8 +248,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/tracking-categories/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -238,8 +262,8 @@ export class TrackingCategories { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -252,13 +276,16 @@ export class TrackingCategories { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.TrackingCategory.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.TrackingCategory.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -276,7 +303,7 @@ export class TrackingCategories { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/tracking-categories/{id}." + "Timeout exceeded when calling GET /accounting/v1/tracking-categories/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/transactions/client/Client.ts b/src/api/resources/accounting/resources/transactions/client/Client.ts index ea5842fc9..110419a46 100644 --- a/src/api/resources/accounting/resources/transactions/client/Client.ts +++ b/src/api/resources/accounting/resources/transactions/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Transactions { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Transactions { * @example * await client.accounting.transactions.list() */ - public async list( + public list( request: Merge.accounting.TransactionsListRequest = {}, - requestOptions?: Transactions.RequestOptions - ): Promise { + requestOptions?: Transactions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.accounting.TransactionsListRequest = {}, + requestOptions?: Transactions.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -64,7 +73,7 @@ export class Transactions { transactionDateAfter, transactionDateBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -82,7 +91,9 @@ export class Transactions { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.TransactionsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -123,8 +134,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/transactions", ), method: "GET", headers: { @@ -135,8 +148,8 @@ export class Transactions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +162,16 @@ export class Transactions { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedTransactionList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedTransactionList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -190,15 +206,25 @@ export class Transactions { * @example * await client.accounting.transactions.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.accounting.TransactionsRetrieveRequest = {}, - requestOptions?: Transactions.RequestOptions - ): Promise { + requestOptions?: Transactions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.accounting.TransactionsRetrieveRequest = {}, + requestOptions?: Transactions.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.TransactionsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -211,8 +237,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/transactions/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -223,8 +251,8 @@ export class Transactions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -237,13 +265,16 @@ export class Transactions { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.Transaction.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.Transaction.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -261,7 +292,7 @@ export class Transactions { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/transactions/{id}." + "Timeout exceeded when calling GET /accounting/v1/transactions/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts b/src/api/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts index 53b360a50..8a5cab0ae 100644 --- a/src/api/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts +++ b/src/api/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts @@ -34,7 +34,6 @@ export type TransactionsListRequestExpand = | "tracking_categories,contact,account" | "tracking_categories,contact,account,accounting_period" | "tracking_categories,contact,accounting_period"; - export const TransactionsListRequestExpand = { Account: "account", AccountAccountingPeriod: "account,accounting_period", diff --git a/src/api/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts b/src/api/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts index f5f5ff525..419e267a5 100644 --- a/src/api/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts +++ b/src/api/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts @@ -34,7 +34,6 @@ export type TransactionsRetrieveRequestExpand = | "tracking_categories,contact,account" | "tracking_categories,contact,account,accounting_period" | "tracking_categories,contact,accounting_period"; - export const TransactionsRetrieveRequestExpand = { Account: "account", AccountAccountingPeriod: "account,accounting_period", diff --git a/src/api/resources/accounting/resources/vendorCredits/client/Client.ts b/src/api/resources/accounting/resources/vendorCredits/client/Client.ts index 5cea99750..94e7da8dd 100644 --- a/src/api/resources/accounting/resources/vendorCredits/client/Client.ts +++ b/src/api/resources/accounting/resources/vendorCredits/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace VendorCredits { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class VendorCredits { * @example * await client.accounting.vendorCredits.list() */ - public async list( + public list( + request: Merge.accounting.VendorCreditsListRequest = {}, + requestOptions?: VendorCredits.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.accounting.VendorCreditsListRequest = {}, - requestOptions?: VendorCredits.RequestOptions - ): Promise { + requestOptions?: VendorCredits.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -64,7 +73,7 @@ export class VendorCredits { transactionDateAfter, transactionDateBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -82,7 +91,9 @@ export class VendorCredits { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.VendorCreditsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -123,8 +134,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/vendor-credits", ), method: "GET", headers: { @@ -135,8 +148,8 @@ export class VendorCredits { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +162,16 @@ export class VendorCredits { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.PaginatedVendorCreditList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.PaginatedVendorCreditList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -191,12 +207,19 @@ export class VendorCredits { * model: {} * }) */ - public async create( + public create( + request: Merge.accounting.VendorCreditEndpointRequest, + requestOptions?: VendorCredits.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.accounting.VendorCreditEndpointRequest, - requestOptions?: VendorCredits.RequestOptions - ): Promise { + requestOptions?: VendorCredits.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -207,8 +230,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/vendor-credits", ), method: "POST", headers: { @@ -219,8 +244,8 @@ export class VendorCredits { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -236,13 +261,16 @@ export class VendorCredits { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.VendorCreditResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.VendorCreditResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -277,15 +305,25 @@ export class VendorCredits { * @example * await client.accounting.vendorCredits.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.accounting.VendorCreditsRetrieveRequest = {}, + requestOptions?: VendorCredits.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.accounting.VendorCreditsRetrieveRequest = {}, - requestOptions?: VendorCredits.RequestOptions - ): Promise { + requestOptions?: VendorCredits.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.accounting.VendorCreditsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -298,8 +336,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `accounting/v1/vendor-credits/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -310,8 +350,8 @@ export class VendorCredits { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -324,13 +364,16 @@ export class VendorCredits { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.VendorCredit.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.VendorCredit.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -348,7 +391,7 @@ export class VendorCredits { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/vendor-credits/{id}." + "Timeout exceeded when calling GET /accounting/v1/vendor-credits/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -365,13 +408,21 @@ export class VendorCredits { * @example * await client.accounting.vendorCredits.metaPostRetrieve() */ - public async metaPostRetrieve( - requestOptions?: VendorCredits.RequestOptions - ): Promise { + public metaPostRetrieve( + requestOptions?: VendorCredits.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: VendorCredits.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/vendor-credits/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/vendor-credits/meta/post", ), method: "GET", headers: { @@ -382,8 +433,8 @@ export class VendorCredits { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -395,13 +446,16 @@ export class VendorCredits { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -419,7 +473,7 @@ export class VendorCredits { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/vendor-credits/meta/post." + "Timeout exceeded when calling GET /accounting/v1/vendor-credits/meta/post.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/resources/vendorCredits/types/VendorCreditsListRequestExpand.ts b/src/api/resources/accounting/resources/vendorCredits/types/VendorCreditsListRequestExpand.ts index 3bd24f073..88e2944d9 100644 --- a/src/api/resources/accounting/resources/vendorCredits/types/VendorCreditsListRequestExpand.ts +++ b/src/api/resources/accounting/resources/vendorCredits/types/VendorCreditsListRequestExpand.ts @@ -34,7 +34,6 @@ export type VendorCreditsListRequestExpand = | "vendor,accounting_period" | "vendor,company" | "vendor,company,accounting_period"; - export const VendorCreditsListRequestExpand = { AccountingPeriod: "accounting_period", Company: "company", diff --git a/src/api/resources/accounting/resources/vendorCredits/types/VendorCreditsRetrieveRequestExpand.ts b/src/api/resources/accounting/resources/vendorCredits/types/VendorCreditsRetrieveRequestExpand.ts index a2928c892..3094a3434 100644 --- a/src/api/resources/accounting/resources/vendorCredits/types/VendorCreditsRetrieveRequestExpand.ts +++ b/src/api/resources/accounting/resources/vendorCredits/types/VendorCreditsRetrieveRequestExpand.ts @@ -34,7 +34,6 @@ export type VendorCreditsRetrieveRequestExpand = | "vendor,accounting_period" | "vendor,company" | "vendor,company,accounting_period"; - export const VendorCreditsRetrieveRequestExpand = { AccountingPeriod: "accounting_period", Company: "company", diff --git a/src/api/resources/accounting/resources/webhookReceivers/client/Client.ts b/src/api/resources/accounting/resources/webhookReceivers/client/Client.ts index fffc41288..fb4c6001d 100644 --- a/src/api/resources/accounting/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/accounting/resources/webhookReceivers/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace WebhookReceivers { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class WebhookReceivers { * @example * await client.accounting.webhookReceivers.list() */ - public async list(requestOptions?: WebhookReceivers.RequestOptions): Promise { + public list( + requestOptions?: WebhookReceivers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(requestOptions)); + } + + private async __list( + requestOptions?: WebhookReceivers.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/webhook-receivers" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/webhook-receivers", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class WebhookReceivers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.webhookReceivers.list.Response.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.webhookReceivers.list.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -95,7 +110,7 @@ export class WebhookReceivers { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /accounting/v1/webhook-receivers." + "Timeout exceeded when calling GET /accounting/v1/webhook-receivers.", ); case "unknown": throw new errors.MergeError({ @@ -116,14 +131,23 @@ export class WebhookReceivers { * isActive: true * }) */ - public async create( + public create( request: Merge.accounting.WebhookReceiverRequest, - requestOptions?: WebhookReceivers.RequestOptions - ): Promise { + requestOptions?: WebhookReceivers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.accounting.WebhookReceiverRequest, + requestOptions?: WebhookReceivers.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "accounting/v1/webhook-receivers" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "accounting/v1/webhook-receivers", ), method: "POST", headers: { @@ -134,8 +158,8 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -150,13 +174,16 @@ export class WebhookReceivers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.accounting.WebhookReceiver.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.accounting.WebhookReceiver.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -174,7 +201,7 @@ export class WebhookReceivers { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /accounting/v1/webhook-receivers." + "Timeout exceeded when calling POST /accounting/v1/webhook-receivers.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/accounting/types/AccountAccountTypeEnum.ts b/src/api/resources/accounting/types/AccountAccountTypeEnum.ts index 3b551ad4d..0c1811cf9 100644 --- a/src/api/resources/accounting/types/AccountAccountTypeEnum.ts +++ b/src/api/resources/accounting/types/AccountAccountTypeEnum.ts @@ -31,7 +31,6 @@ export type AccountAccountTypeEnum = | "OTHER_CURRENT_LIABILITY" | "LONG_TERM_LIABILITY" | "NON_POSTING"; - export const AccountAccountTypeEnum = { Bank: "BANK", CreditCard: "CREDIT_CARD", diff --git a/src/api/resources/accounting/types/AccountDetailsAndActionsStatusEnum.ts b/src/api/resources/accounting/types/AccountDetailsAndActionsStatusEnum.ts index 084a62d2f..c0020279f 100644 --- a/src/api/resources/accounting/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/api/resources/accounting/types/AccountDetailsAndActionsStatusEnum.ts @@ -9,7 +9,6 @@ * - `IDLE` - IDLE */ export type AccountDetailsAndActionsStatusEnum = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; - export const AccountDetailsAndActionsStatusEnum = { Complete: "COMPLETE", Incomplete: "INCOMPLETE", diff --git a/src/api/resources/accounting/types/AccountStatusEnum.ts b/src/api/resources/accounting/types/AccountStatusEnum.ts index 16a1304d6..10e8336f8 100644 --- a/src/api/resources/accounting/types/AccountStatusEnum.ts +++ b/src/api/resources/accounting/types/AccountStatusEnum.ts @@ -8,7 +8,6 @@ * - `INACTIVE` - INACTIVE */ export type AccountStatusEnum = "ACTIVE" | "PENDING" | "INACTIVE"; - export const AccountStatusEnum = { Active: "ACTIVE", Pending: "PENDING", diff --git a/src/api/resources/accounting/types/AddressTypeEnum.ts b/src/api/resources/accounting/types/AddressTypeEnum.ts index 29edf7b9e..4f3d78a4f 100644 --- a/src/api/resources/accounting/types/AddressTypeEnum.ts +++ b/src/api/resources/accounting/types/AddressTypeEnum.ts @@ -7,7 +7,6 @@ * - `SHIPPING` - SHIPPING */ export type AddressTypeEnum = "BILLING" | "SHIPPING"; - export const AddressTypeEnum = { Billing: "BILLING", Shipping: "SHIPPING", diff --git a/src/api/resources/accounting/types/AsyncPostTaskStatusEnum.ts b/src/api/resources/accounting/types/AsyncPostTaskStatusEnum.ts index 03a169ad7..533f8dc83 100644 --- a/src/api/resources/accounting/types/AsyncPostTaskStatusEnum.ts +++ b/src/api/resources/accounting/types/AsyncPostTaskStatusEnum.ts @@ -9,7 +9,6 @@ * - `FAILURE` - FAILURE */ export type AsyncPostTaskStatusEnum = "QUEUED" | "IN_PROGRESS" | "COMPLETED" | "FAILURE"; - export const AsyncPostTaskStatusEnum = { Queued: "QUEUED", InProgress: "IN_PROGRESS", diff --git a/src/api/resources/accounting/types/BankFeedAccountAccountTypeEnum.ts b/src/api/resources/accounting/types/BankFeedAccountAccountTypeEnum.ts index 5d9d43eb1..d9e3c04b8 100644 --- a/src/api/resources/accounting/types/BankFeedAccountAccountTypeEnum.ts +++ b/src/api/resources/accounting/types/BankFeedAccountAccountTypeEnum.ts @@ -7,7 +7,6 @@ * - `CREDIT_CARD` - CREDIT_CARD */ export type BankFeedAccountAccountTypeEnum = "BANK" | "CREDIT_CARD"; - export const BankFeedAccountAccountTypeEnum = { Bank: "BANK", CreditCard: "CREDIT_CARD", diff --git a/src/api/resources/accounting/types/CategoriesEnum.ts b/src/api/resources/accounting/types/CategoriesEnum.ts index 25eba4836..a5eb57230 100644 --- a/src/api/resources/accounting/types/CategoriesEnum.ts +++ b/src/api/resources/accounting/types/CategoriesEnum.ts @@ -12,7 +12,6 @@ * - `filestorage` - filestorage */ export type CategoriesEnum = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; - export const CategoriesEnum = { Hris: "hris", Ats: "ats", diff --git a/src/api/resources/accounting/types/CategoryEnum.ts b/src/api/resources/accounting/types/CategoryEnum.ts index 263fc40b8..6d3d6d6ae 100644 --- a/src/api/resources/accounting/types/CategoryEnum.ts +++ b/src/api/resources/accounting/types/CategoryEnum.ts @@ -12,7 +12,6 @@ * - `filestorage` - filestorage */ export type CategoryEnum = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; - export const CategoryEnum = { Hris: "hris", Ats: "ats", diff --git a/src/api/resources/accounting/types/CategoryTypeEnum.ts b/src/api/resources/accounting/types/CategoryTypeEnum.ts index a1713a1ae..1033156b2 100644 --- a/src/api/resources/accounting/types/CategoryTypeEnum.ts +++ b/src/api/resources/accounting/types/CategoryTypeEnum.ts @@ -7,7 +7,6 @@ * - `DEPARTMENT` - DEPARTMENT */ export type CategoryTypeEnum = "CLASS" | "DEPARTMENT"; - export const CategoryTypeEnum = { Class: "CLASS", Department: "DEPARTMENT", diff --git a/src/api/resources/accounting/types/ClassificationEnum.ts b/src/api/resources/accounting/types/ClassificationEnum.ts index 199cf6c1a..32c1ebecb 100644 --- a/src/api/resources/accounting/types/ClassificationEnum.ts +++ b/src/api/resources/accounting/types/ClassificationEnum.ts @@ -10,7 +10,6 @@ * - `REVENUE` - REVENUE */ export type ClassificationEnum = "ASSET" | "EQUITY" | "EXPENSE" | "LIABILITY" | "REVENUE"; - export const ClassificationEnum = { Asset: "ASSET", Equity: "EQUITY", diff --git a/src/api/resources/accounting/types/ComponentTypeEnum.ts b/src/api/resources/accounting/types/ComponentTypeEnum.ts index 689e2d7dd..76150b219 100644 --- a/src/api/resources/accounting/types/ComponentTypeEnum.ts +++ b/src/api/resources/accounting/types/ComponentTypeEnum.ts @@ -7,7 +7,6 @@ * - `PURCHASE` - PURCHASE */ export type ComponentTypeEnum = "SALES" | "PURCHASE"; - export const ComponentTypeEnum = { Sales: "SALES", Purchase: "PURCHASE", diff --git a/src/api/resources/accounting/types/CountryEnum.ts b/src/api/resources/accounting/types/CountryEnum.ts index e21e6bb70..46d4e560b 100644 --- a/src/api/resources/accounting/types/CountryEnum.ts +++ b/src/api/resources/accounting/types/CountryEnum.ts @@ -503,7 +503,6 @@ export type CountryEnum = | "YE" | "ZM" | "ZW"; - export const CountryEnum = { Af: "AF", Ax: "AX", diff --git a/src/api/resources/accounting/types/CreditNoteStatusEnum.ts b/src/api/resources/accounting/types/CreditNoteStatusEnum.ts index a42e579c2..7b5581204 100644 --- a/src/api/resources/accounting/types/CreditNoteStatusEnum.ts +++ b/src/api/resources/accounting/types/CreditNoteStatusEnum.ts @@ -8,7 +8,6 @@ * - `PAID` - PAID */ export type CreditNoteStatusEnum = "SUBMITTED" | "AUTHORIZED" | "PAID"; - export const CreditNoteStatusEnum = { Submitted: "SUBMITTED", Authorized: "AUTHORIZED", diff --git a/src/api/resources/accounting/types/CreditOrDebitEnum.ts b/src/api/resources/accounting/types/CreditOrDebitEnum.ts index 0b38c192b..3644b27e2 100644 --- a/src/api/resources/accounting/types/CreditOrDebitEnum.ts +++ b/src/api/resources/accounting/types/CreditOrDebitEnum.ts @@ -7,7 +7,6 @@ * - `DEBIT` - DEBIT */ export type CreditOrDebitEnum = "CREDIT" | "DEBIT"; - export const CreditOrDebitEnum = { Credit: "CREDIT", Debit: "DEBIT", diff --git a/src/api/resources/accounting/types/EnabledActionsEnum.ts b/src/api/resources/accounting/types/EnabledActionsEnum.ts index 73d70210e..24418b130 100644 --- a/src/api/resources/accounting/types/EnabledActionsEnum.ts +++ b/src/api/resources/accounting/types/EnabledActionsEnum.ts @@ -7,7 +7,6 @@ * - `WRITE` - WRITE */ export type EnabledActionsEnum = "READ" | "WRITE"; - export const EnabledActionsEnum = { Read: "READ", Write: "WRITE", diff --git a/src/api/resources/accounting/types/EncodingEnum.ts b/src/api/resources/accounting/types/EncodingEnum.ts index 3defec583..a828347f8 100644 --- a/src/api/resources/accounting/types/EncodingEnum.ts +++ b/src/api/resources/accounting/types/EncodingEnum.ts @@ -8,7 +8,6 @@ * - `GZIP_BASE64` - GZIP_BASE64 */ export type EncodingEnum = "RAW" | "BASE64" | "GZIP_BASE64"; - export const EncodingEnum = { Raw: "RAW", Base64: "BASE64", diff --git a/src/api/resources/accounting/types/EventTypeEnum.ts b/src/api/resources/accounting/types/EventTypeEnum.ts index eb3218428..08d0f1ce3 100644 --- a/src/api/resources/accounting/types/EventTypeEnum.ts +++ b/src/api/resources/accounting/types/EventTypeEnum.ts @@ -89,7 +89,6 @@ export type EventTypeEnum = | "DISABLED_MERGE_WEBHOOK" | "MERGE_WEBHOOK_TARGET_CHANGED" | "END_USER_CREDENTIALS_ACCESSED"; - export const EventTypeEnum = { CreatedRemoteProductionApiKey: "CREATED_REMOTE_PRODUCTION_API_KEY", DeletedRemoteProductionApiKey: "DELETED_REMOTE_PRODUCTION_API_KEY", diff --git a/src/api/resources/accounting/types/FeedStatusEnum.ts b/src/api/resources/accounting/types/FeedStatusEnum.ts index 0ce015916..0af1ca03b 100644 --- a/src/api/resources/accounting/types/FeedStatusEnum.ts +++ b/src/api/resources/accounting/types/FeedStatusEnum.ts @@ -7,7 +7,6 @@ * - `INACTIVE` - INACTIVE */ export type FeedStatusEnum = "ACTIVE" | "INACTIVE"; - export const FeedStatusEnum = { Active: "ACTIVE", Inactive: "INACTIVE", diff --git a/src/api/resources/accounting/types/FieldFormatEnum.ts b/src/api/resources/accounting/types/FieldFormatEnum.ts index a5b54cac7..351c87478 100644 --- a/src/api/resources/accounting/types/FieldFormatEnum.ts +++ b/src/api/resources/accounting/types/FieldFormatEnum.ts @@ -11,7 +11,6 @@ * - `list` - list */ export type FieldFormatEnum = "string" | "number" | "date" | "datetime" | "bool" | "list"; - export const FieldFormatEnum = { String: "string", Number: "number", diff --git a/src/api/resources/accounting/types/FieldTypeEnum.ts b/src/api/resources/accounting/types/FieldTypeEnum.ts index 39ace3972..e235eeea9 100644 --- a/src/api/resources/accounting/types/FieldTypeEnum.ts +++ b/src/api/resources/accounting/types/FieldTypeEnum.ts @@ -11,7 +11,6 @@ * - `list` - list */ export type FieldTypeEnum = "string" | "number" | "date" | "datetime" | "bool" | "list"; - export const FieldTypeEnum = { String: "string", Number: "number", diff --git a/src/api/resources/accounting/types/InvoiceStatusEnum.ts b/src/api/resources/accounting/types/InvoiceStatusEnum.ts index e3449c970..e80e40c76 100644 --- a/src/api/resources/accounting/types/InvoiceStatusEnum.ts +++ b/src/api/resources/accounting/types/InvoiceStatusEnum.ts @@ -11,7 +11,6 @@ * - `VOID` - VOID */ export type InvoiceStatusEnum = "PAID" | "DRAFT" | "SUBMITTED" | "PARTIALLY_PAID" | "OPEN" | "VOID"; - export const InvoiceStatusEnum = { Paid: "PAID", Draft: "DRAFT", diff --git a/src/api/resources/accounting/types/InvoiceTypeEnum.ts b/src/api/resources/accounting/types/InvoiceTypeEnum.ts index c867acccb..ade0eb353 100644 --- a/src/api/resources/accounting/types/InvoiceTypeEnum.ts +++ b/src/api/resources/accounting/types/InvoiceTypeEnum.ts @@ -7,7 +7,6 @@ * - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE */ export type InvoiceTypeEnum = "ACCOUNTS_RECEIVABLE" | "ACCOUNTS_PAYABLE"; - export const InvoiceTypeEnum = { AccountsReceivable: "ACCOUNTS_RECEIVABLE", AccountsPayable: "ACCOUNTS_PAYABLE", diff --git a/src/api/resources/accounting/types/IssueStatusEnum.ts b/src/api/resources/accounting/types/IssueStatusEnum.ts index 9536a7b6d..56fc6d5fa 100644 --- a/src/api/resources/accounting/types/IssueStatusEnum.ts +++ b/src/api/resources/accounting/types/IssueStatusEnum.ts @@ -7,7 +7,6 @@ * - `RESOLVED` - RESOLVED */ export type IssueStatusEnum = "ONGOING" | "RESOLVED"; - export const IssueStatusEnum = { Ongoing: "ONGOING", Resolved: "RESOLVED", diff --git a/src/api/resources/accounting/types/ItemFormatEnum.ts b/src/api/resources/accounting/types/ItemFormatEnum.ts index efd0263ba..276d6e676 100644 --- a/src/api/resources/accounting/types/ItemFormatEnum.ts +++ b/src/api/resources/accounting/types/ItemFormatEnum.ts @@ -11,7 +11,6 @@ * - `list` - decimal */ export type ItemFormatEnum = "string" | "number" | "date" | "datetime" | "bool" | "list"; - export const ItemFormatEnum = { String: "string", Number: "number", diff --git a/src/api/resources/accounting/types/ItemTypeEnum.ts b/src/api/resources/accounting/types/ItemTypeEnum.ts index b2883ed82..815b6314e 100644 --- a/src/api/resources/accounting/types/ItemTypeEnum.ts +++ b/src/api/resources/accounting/types/ItemTypeEnum.ts @@ -11,7 +11,6 @@ * - `list` - list */ export type ItemTypeEnum = "string" | "number" | "date" | "datetime" | "bool" | "list"; - export const ItemTypeEnum = { String: "string", Number: "number", diff --git a/src/api/resources/accounting/types/LanguageEnum.ts b/src/api/resources/accounting/types/LanguageEnum.ts index 92c0e5778..180002115 100644 --- a/src/api/resources/accounting/types/LanguageEnum.ts +++ b/src/api/resources/accounting/types/LanguageEnum.ts @@ -7,7 +7,6 @@ * - `de` - de */ export type LanguageEnum = "en" | "de"; - export const LanguageEnum = { En: "en", De: "de", diff --git a/src/api/resources/accounting/types/LastSyncResultEnum.ts b/src/api/resources/accounting/types/LastSyncResultEnum.ts index 2617afd73..e14779ef7 100644 --- a/src/api/resources/accounting/types/LastSyncResultEnum.ts +++ b/src/api/resources/accounting/types/LastSyncResultEnum.ts @@ -11,7 +11,6 @@ * - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED */ export type LastSyncResultEnum = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; - export const LastSyncResultEnum = { Syncing: "SYNCING", Done: "DONE", diff --git a/src/api/resources/accounting/types/MethodEnum.ts b/src/api/resources/accounting/types/MethodEnum.ts index 5fb2be8d3..5d8dae516 100644 --- a/src/api/resources/accounting/types/MethodEnum.ts +++ b/src/api/resources/accounting/types/MethodEnum.ts @@ -12,7 +12,6 @@ * - `DELETE` - DELETE */ export type MethodEnum = "GET" | "OPTIONS" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE"; - export const MethodEnum = { Get: "GET", Options: "OPTIONS", diff --git a/src/api/resources/accounting/types/MethodTypeEnum.ts b/src/api/resources/accounting/types/MethodTypeEnum.ts index 627bc8d7e..a25530ada 100644 --- a/src/api/resources/accounting/types/MethodTypeEnum.ts +++ b/src/api/resources/accounting/types/MethodTypeEnum.ts @@ -10,7 +10,6 @@ * - `CHECK` - CHECK */ export type MethodTypeEnum = "CREDIT_CARD" | "DEBIT_CARD" | "ACH" | "CASH" | "CHECK"; - export const MethodTypeEnum = { CreditCard: "CREDIT_CARD", DebitCard: "DEBIT_CARD", diff --git a/src/api/resources/accounting/types/PaymentTypeEnum.ts b/src/api/resources/accounting/types/PaymentTypeEnum.ts index b200369ac..cef92471a 100644 --- a/src/api/resources/accounting/types/PaymentTypeEnum.ts +++ b/src/api/resources/accounting/types/PaymentTypeEnum.ts @@ -7,7 +7,6 @@ * - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE */ export type PaymentTypeEnum = "ACCOUNTS_PAYABLE" | "ACCOUNTS_RECEIVABLE"; - export const PaymentTypeEnum = { AccountsPayable: "ACCOUNTS_PAYABLE", AccountsReceivable: "ACCOUNTS_RECEIVABLE", diff --git a/src/api/resources/accounting/types/PostingStatusEnum.ts b/src/api/resources/accounting/types/PostingStatusEnum.ts index 47e7d1bae..2dbcdf07b 100644 --- a/src/api/resources/accounting/types/PostingStatusEnum.ts +++ b/src/api/resources/accounting/types/PostingStatusEnum.ts @@ -7,7 +7,6 @@ * - `POSTED` - POSTED */ export type PostingStatusEnum = "UNPOSTED" | "POSTED"; - export const PostingStatusEnum = { Unposted: "UNPOSTED", Posted: "POSTED", diff --git a/src/api/resources/accounting/types/PurchaseOrderStatusEnum.ts b/src/api/resources/accounting/types/PurchaseOrderStatusEnum.ts index 5e0e37e22..05371c497 100644 --- a/src/api/resources/accounting/types/PurchaseOrderStatusEnum.ts +++ b/src/api/resources/accounting/types/PurchaseOrderStatusEnum.ts @@ -10,7 +10,6 @@ * - `DELETED` - DELETED */ export type PurchaseOrderStatusEnum = "DRAFT" | "SUBMITTED" | "AUTHORIZED" | "BILLED" | "DELETED"; - export const PurchaseOrderStatusEnum = { Draft: "DRAFT", Submitted: "SUBMITTED", diff --git a/src/api/resources/accounting/types/RequestFormatEnum.ts b/src/api/resources/accounting/types/RequestFormatEnum.ts index 4b66af670..6c5f28198 100644 --- a/src/api/resources/accounting/types/RequestFormatEnum.ts +++ b/src/api/resources/accounting/types/RequestFormatEnum.ts @@ -8,7 +8,6 @@ * - `MULTIPART` - MULTIPART */ export type RequestFormatEnum = "JSON" | "XML" | "MULTIPART"; - export const RequestFormatEnum = { Json: "JSON", Xml: "XML", diff --git a/src/api/resources/accounting/types/ResponseTypeEnum.ts b/src/api/resources/accounting/types/ResponseTypeEnum.ts index 91a373778..e123001a6 100644 --- a/src/api/resources/accounting/types/ResponseTypeEnum.ts +++ b/src/api/resources/accounting/types/ResponseTypeEnum.ts @@ -7,7 +7,6 @@ * - `BASE64_GZIP` - BASE64_GZIP */ export type ResponseTypeEnum = "JSON" | "BASE64_GZIP"; - export const ResponseTypeEnum = { Json: "JSON", Base64Gzip: "BASE64_GZIP", diff --git a/src/api/resources/accounting/types/RoleEnum.ts b/src/api/resources/accounting/types/RoleEnum.ts index 5792757ea..d7b99ac49 100644 --- a/src/api/resources/accounting/types/RoleEnum.ts +++ b/src/api/resources/accounting/types/RoleEnum.ts @@ -11,7 +11,6 @@ * - `MERGE_TEAM` - MERGE_TEAM */ export type RoleEnum = "ADMIN" | "DEVELOPER" | "MEMBER" | "API" | "SYSTEM" | "MERGE_TEAM"; - export const RoleEnum = { Admin: "ADMIN", Developer: "DEVELOPER", diff --git a/src/api/resources/accounting/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/api/resources/accounting/types/SelectiveSyncConfigurationsUsageEnum.ts index 93a6bf0bf..db8508f89 100644 --- a/src/api/resources/accounting/types/SelectiveSyncConfigurationsUsageEnum.ts +++ b/src/api/resources/accounting/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -7,7 +7,6 @@ * - `IN_LAST_SYNC` - IN_LAST_SYNC */ export type SelectiveSyncConfigurationsUsageEnum = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; - export const SelectiveSyncConfigurationsUsageEnum = { InNextSync: "IN_NEXT_SYNC", InLastSync: "IN_LAST_SYNC", diff --git a/src/api/resources/accounting/types/Status7D1Enum.ts b/src/api/resources/accounting/types/Status7D1Enum.ts index 0fadd399d..f6d957155 100644 --- a/src/api/resources/accounting/types/Status7D1Enum.ts +++ b/src/api/resources/accounting/types/Status7D1Enum.ts @@ -7,7 +7,6 @@ * - `ARCHIVED` - ARCHIVED */ export type Status7D1Enum = "ACTIVE" | "ARCHIVED"; - export const Status7D1Enum = { Active: "ACTIVE", Archived: "ARCHIVED", diff --git a/src/api/resources/accounting/types/Status895Enum.ts b/src/api/resources/accounting/types/Status895Enum.ts index 762430845..da57cd320 100644 --- a/src/api/resources/accounting/types/Status895Enum.ts +++ b/src/api/resources/accounting/types/Status895Enum.ts @@ -7,7 +7,6 @@ * - `INACTIVE` - INACTIVE */ export type Status895Enum = "ACTIVE" | "INACTIVE"; - export const Status895Enum = { Active: "ACTIVE", Inactive: "INACTIVE", diff --git a/src/api/resources/accounting/types/StatusFd5Enum.ts b/src/api/resources/accounting/types/StatusFd5Enum.ts index dfb75bf03..837436325 100644 --- a/src/api/resources/accounting/types/StatusFd5Enum.ts +++ b/src/api/resources/accounting/types/StatusFd5Enum.ts @@ -11,7 +11,6 @@ * - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED */ export type StatusFd5Enum = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; - export const StatusFd5Enum = { Syncing: "SYNCING", Done: "DONE", diff --git a/src/api/resources/accounting/types/TransactionCurrencyEnum.ts b/src/api/resources/accounting/types/TransactionCurrencyEnum.ts index 41ace7c40..356005104 100644 --- a/src/api/resources/accounting/types/TransactionCurrencyEnum.ts +++ b/src/api/resources/accounting/types/TransactionCurrencyEnum.ts @@ -617,7 +617,6 @@ export type TransactionCurrencyEnum = | "ZWD" | "ZWR" | "ZWL"; - export const TransactionCurrencyEnum = { Xua: "XUA", Afn: "AFN", diff --git a/src/api/resources/accounting/types/UnderlyingTransactionTypeEnum.ts b/src/api/resources/accounting/types/UnderlyingTransactionTypeEnum.ts index b065774dd..f3fd44169 100644 --- a/src/api/resources/accounting/types/UnderlyingTransactionTypeEnum.ts +++ b/src/api/resources/accounting/types/UnderlyingTransactionTypeEnum.ts @@ -19,7 +19,6 @@ export type UnderlyingTransactionTypeEnum = | "PAYMENT" | "VENDOR_CREDIT" | "CREDIT_NOTE"; - export const UnderlyingTransactionTypeEnum = { Invoice: "INVOICE", Expense: "EXPENSE", diff --git a/src/api/resources/ats/client/Client.ts b/src/api/resources/ats/client/Client.ts index 53ce4f38f..92c725071 100644 --- a/src/api/resources/ats/client/Client.ts +++ b/src/api/resources/ats/client/Client.ts @@ -39,225 +39,182 @@ import { Users } from "../resources/users/client/Client"; import { WebhookReceivers } from "../resources/webhookReceivers/client/Client"; export declare namespace Ats { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: 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 Ats { - constructor(protected readonly _options: Ats.Options) {} - protected _accountDetails: AccountDetails | undefined; + protected _accountToken: AccountToken | undefined; + protected _activities: Activities | undefined; + protected _applications: Applications | undefined; + protected _asyncPassthrough: AsyncPassthrough | undefined; + protected _attachments: Attachments | undefined; + protected _auditTrail: AuditTrail | undefined; + protected _availableActions: AvailableActions | undefined; + protected _candidates: Candidates | undefined; + protected _scopes: Scopes | undefined; + protected _deleteAccount: DeleteAccount | undefined; + protected _departments: Departments | undefined; + protected _eeocs: Eeocs | undefined; + protected _fieldMapping: FieldMapping | undefined; + protected _generateKey: GenerateKey | undefined; + protected _interviews: Interviews | undefined; + protected _issues: Issues | undefined; + protected _jobInterviewStages: JobInterviewStages | undefined; + protected _jobPostings: JobPostings | undefined; + protected _jobs: Jobs | undefined; + protected _linkToken: LinkToken | undefined; + protected _linkedAccounts: LinkedAccounts | undefined; + protected _offers: Offers | undefined; + protected _offices: Offices | undefined; + protected _passthrough: Passthrough | undefined; + protected _regenerateKey: RegenerateKey | undefined; + protected _rejectReasons: RejectReasons | undefined; + protected _scorecards: Scorecards | undefined; + protected _syncStatus: SyncStatus | undefined; + protected _forceResync: ForceResync | undefined; + protected _tags: Tags | undefined; + protected _users: Users | undefined; + protected _webhookReceivers: WebhookReceivers | undefined; + + constructor(protected readonly _options: Ats.Options) {} public get accountDetails(): AccountDetails { return (this._accountDetails ??= new AccountDetails(this._options)); } - protected _accountToken: AccountToken | undefined; - public get accountToken(): AccountToken { return (this._accountToken ??= new AccountToken(this._options)); } - protected _activities: Activities | undefined; - public get activities(): Activities { return (this._activities ??= new Activities(this._options)); } - protected _applications: Applications | undefined; - public get applications(): Applications { return (this._applications ??= new Applications(this._options)); } - protected _asyncPassthrough: AsyncPassthrough | undefined; - public get asyncPassthrough(): AsyncPassthrough { return (this._asyncPassthrough ??= new AsyncPassthrough(this._options)); } - protected _attachments: Attachments | undefined; - public get attachments(): Attachments { return (this._attachments ??= new Attachments(this._options)); } - protected _auditTrail: AuditTrail | undefined; - public get auditTrail(): AuditTrail { return (this._auditTrail ??= new AuditTrail(this._options)); } - protected _availableActions: AvailableActions | undefined; - public get availableActions(): AvailableActions { return (this._availableActions ??= new AvailableActions(this._options)); } - protected _candidates: Candidates | undefined; - public get candidates(): Candidates { return (this._candidates ??= new Candidates(this._options)); } - protected _scopes: Scopes | undefined; - public get scopes(): Scopes { return (this._scopes ??= new Scopes(this._options)); } - protected _deleteAccount: DeleteAccount | undefined; - public get deleteAccount(): DeleteAccount { return (this._deleteAccount ??= new DeleteAccount(this._options)); } - protected _departments: Departments | undefined; - public get departments(): Departments { return (this._departments ??= new Departments(this._options)); } - protected _eeocs: Eeocs | undefined; - public get eeocs(): Eeocs { return (this._eeocs ??= new Eeocs(this._options)); } - protected _fieldMapping: FieldMapping | undefined; - public get fieldMapping(): FieldMapping { return (this._fieldMapping ??= new FieldMapping(this._options)); } - protected _generateKey: GenerateKey | undefined; - public get generateKey(): GenerateKey { return (this._generateKey ??= new GenerateKey(this._options)); } - protected _interviews: Interviews | undefined; - public get interviews(): Interviews { return (this._interviews ??= new Interviews(this._options)); } - protected _issues: Issues | undefined; - public get issues(): Issues { return (this._issues ??= new Issues(this._options)); } - protected _jobInterviewStages: JobInterviewStages | undefined; - public get jobInterviewStages(): JobInterviewStages { return (this._jobInterviewStages ??= new JobInterviewStages(this._options)); } - protected _jobPostings: JobPostings | undefined; - public get jobPostings(): JobPostings { return (this._jobPostings ??= new JobPostings(this._options)); } - protected _jobs: Jobs | undefined; - public get jobs(): Jobs { return (this._jobs ??= new Jobs(this._options)); } - protected _linkToken: LinkToken | undefined; - public get linkToken(): LinkToken { return (this._linkToken ??= new LinkToken(this._options)); } - protected _linkedAccounts: LinkedAccounts | undefined; - public get linkedAccounts(): LinkedAccounts { return (this._linkedAccounts ??= new LinkedAccounts(this._options)); } - protected _offers: Offers | undefined; - public get offers(): Offers { return (this._offers ??= new Offers(this._options)); } - protected _offices: Offices | undefined; - public get offices(): Offices { return (this._offices ??= new Offices(this._options)); } - protected _passthrough: Passthrough | undefined; - public get passthrough(): Passthrough { return (this._passthrough ??= new Passthrough(this._options)); } - protected _regenerateKey: RegenerateKey | undefined; - public get regenerateKey(): RegenerateKey { return (this._regenerateKey ??= new RegenerateKey(this._options)); } - protected _rejectReasons: RejectReasons | undefined; - public get rejectReasons(): RejectReasons { return (this._rejectReasons ??= new RejectReasons(this._options)); } - protected _scorecards: Scorecards | undefined; - public get scorecards(): Scorecards { return (this._scorecards ??= new Scorecards(this._options)); } - protected _syncStatus: SyncStatus | undefined; - public get syncStatus(): SyncStatus { return (this._syncStatus ??= new SyncStatus(this._options)); } - protected _forceResync: ForceResync | undefined; - public get forceResync(): ForceResync { return (this._forceResync ??= new ForceResync(this._options)); } - protected _tags: Tags | undefined; - public get tags(): Tags { return (this._tags ??= new Tags(this._options)); } - protected _users: Users | undefined; - public get users(): Users { return (this._users ??= new Users(this._options)); } - protected _webhookReceivers: WebhookReceivers | undefined; - public get webhookReceivers(): WebhookReceivers { return (this._webhookReceivers ??= new WebhookReceivers(this._options)); } diff --git a/src/api/resources/ats/resources/accountDetails/client/Client.ts b/src/api/resources/ats/resources/accountDetails/client/Client.ts index 705f5697d..7ef9c1037 100644 --- a/src/api/resources/ats/resources/accountDetails/client/Client.ts +++ b/src/api/resources/ats/resources/accountDetails/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AccountDetails { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class AccountDetails { * @example * await client.ats.accountDetails.retrieve() */ - public async retrieve(requestOptions?: AccountDetails.RequestOptions): Promise { + public retrieve( + requestOptions?: AccountDetails.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(requestOptions)); + } + + private async __retrieve( + requestOptions?: AccountDetails.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/account-details" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/account-details", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class AccountDetails { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class AccountDetails { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.AccountDetails.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.AccountDetails.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/accountToken/client/Client.ts b/src/api/resources/ats/resources/accountToken/client/Client.ts index d537c1e5f..8df1f8e2f 100644 --- a/src/api/resources/ats/resources/accountToken/client/Client.ts +++ b/src/api/resources/ats/resources/accountToken/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AccountToken { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,14 +46,23 @@ export class AccountToken { * @example * await client.ats.accountToken.retrieve("public_token") */ - public async retrieve( + public retrieve( publicToken: string, - requestOptions?: AccountToken.RequestOptions - ): Promise { + requestOptions?: AccountToken.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(publicToken, requestOptions)); + } + + private async __retrieve( + publicToken: string, + requestOptions?: AccountToken.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/account-token/${encodeURIComponent(publicToken)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/account-token/${encodeURIComponent(publicToken)}`, ), method: "GET", headers: { @@ -62,8 +73,8 @@ export class AccountToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -75,13 +86,16 @@ export class AccountToken { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.AccountToken.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.AccountToken.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -99,7 +113,7 @@ export class AccountToken { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ats/v1/account-token/{public_token}." + "Timeout exceeded when calling GET /ats/v1/account-token/{public_token}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ats/resources/activities/client/Client.ts b/src/api/resources/ats/resources/activities/client/Client.ts index cf245b791..5b06ffd90 100644 --- a/src/api/resources/ats/resources/activities/client/Client.ts +++ b/src/api/resources/ats/resources/activities/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Activities { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Activities { * @example * await client.ats.activities.list() */ - public async list( + public list( + request: Merge.ats.ActivitiesListRequest = {}, + requestOptions?: Activities.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.ats.ActivitiesListRequest = {}, - requestOptions?: Activities.RequestOptions - ): Promise { + requestOptions?: Activities.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -64,7 +73,7 @@ export class Activities { showEnumOrigins, userId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -106,7 +115,10 @@ export class Activities { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.ats.ActivitiesListRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (remoteId != null) { @@ -114,7 +126,10 @@ export class Activities { } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.ats.ActivitiesListRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } if (userId != null) { @@ -123,8 +138,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/activities", ), method: "GET", headers: { @@ -135,8 +152,8 @@ export class Activities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +166,16 @@ export class Activities { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedActivityList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedActivityList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -192,12 +212,19 @@ export class Activities { * remoteUserId: "remote_user_id" * }) */ - public async create( + public create( + request: Merge.ats.ActivityEndpointRequest, + requestOptions?: Activities.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.ats.ActivityEndpointRequest, - requestOptions?: Activities.RequestOptions - ): Promise { + requestOptions?: Activities.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -208,8 +235,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/activities", ), method: "POST", headers: { @@ -220,8 +249,8 @@ export class Activities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -235,13 +264,16 @@ export class Activities { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.ActivityResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.ActivityResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -276,13 +308,21 @@ export class Activities { * @example * await client.ats.activities.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.ats.ActivitiesRetrieveRequest = {}, + requestOptions?: Activities.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.ats.ActivitiesRetrieveRequest = {}, - requestOptions?: Activities.RequestOptions - ): Promise { + requestOptions?: Activities.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -296,17 +336,25 @@ export class Activities { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.ats.ActivitiesRetrieveRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.ats.ActivitiesRetrieveRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/activities/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/activities/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -317,8 +365,8 @@ export class Activities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -331,13 +379,16 @@ export class Activities { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.Activity.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.Activity.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -370,11 +421,21 @@ export class Activities { * @example * await client.ats.activities.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Activities.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Activities.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Activities.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/activities/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/activities/meta/post", ), method: "GET", headers: { @@ -385,8 +446,8 @@ export class Activities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -398,13 +459,16 @@ export class Activities { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/activities/types/ActivitiesListRequestRemoteFields.ts b/src/api/resources/ats/resources/activities/types/ActivitiesListRequestRemoteFields.ts index 03894e675..63a734ba3 100644 --- a/src/api/resources/ats/resources/activities/types/ActivitiesListRequestRemoteFields.ts +++ b/src/api/resources/ats/resources/activities/types/ActivitiesListRequestRemoteFields.ts @@ -3,7 +3,6 @@ */ export type ActivitiesListRequestRemoteFields = "activity_type" | "activity_type,visibility" | "visibility"; - export const ActivitiesListRequestRemoteFields = { ActivityType: "activity_type", ActivityTypeVisibility: "activity_type,visibility", diff --git a/src/api/resources/ats/resources/activities/types/ActivitiesListRequestShowEnumOrigins.ts b/src/api/resources/ats/resources/activities/types/ActivitiesListRequestShowEnumOrigins.ts index dc1437833..042277a5b 100644 --- a/src/api/resources/ats/resources/activities/types/ActivitiesListRequestShowEnumOrigins.ts +++ b/src/api/resources/ats/resources/activities/types/ActivitiesListRequestShowEnumOrigins.ts @@ -3,7 +3,6 @@ */ export type ActivitiesListRequestShowEnumOrigins = "activity_type" | "activity_type,visibility" | "visibility"; - export const ActivitiesListRequestShowEnumOrigins = { ActivityType: "activity_type", ActivityTypeVisibility: "activity_type,visibility", diff --git a/src/api/resources/ats/resources/activities/types/ActivitiesRetrieveRequestRemoteFields.ts b/src/api/resources/ats/resources/activities/types/ActivitiesRetrieveRequestRemoteFields.ts index 3da2cdb24..d8bffceba 100644 --- a/src/api/resources/ats/resources/activities/types/ActivitiesRetrieveRequestRemoteFields.ts +++ b/src/api/resources/ats/resources/activities/types/ActivitiesRetrieveRequestRemoteFields.ts @@ -3,7 +3,6 @@ */ export type ActivitiesRetrieveRequestRemoteFields = "activity_type" | "activity_type,visibility" | "visibility"; - export const ActivitiesRetrieveRequestRemoteFields = { ActivityType: "activity_type", ActivityTypeVisibility: "activity_type,visibility", diff --git a/src/api/resources/ats/resources/activities/types/ActivitiesRetrieveRequestShowEnumOrigins.ts b/src/api/resources/ats/resources/activities/types/ActivitiesRetrieveRequestShowEnumOrigins.ts index 17d04c376..98ffbaa8d 100644 --- a/src/api/resources/ats/resources/activities/types/ActivitiesRetrieveRequestShowEnumOrigins.ts +++ b/src/api/resources/ats/resources/activities/types/ActivitiesRetrieveRequestShowEnumOrigins.ts @@ -3,7 +3,6 @@ */ export type ActivitiesRetrieveRequestShowEnumOrigins = "activity_type" | "activity_type,visibility" | "visibility"; - export const ActivitiesRetrieveRequestShowEnumOrigins = { ActivityType: "activity_type", ActivityTypeVisibility: "activity_type,visibility", diff --git a/src/api/resources/ats/resources/applications/client/Client.ts b/src/api/resources/ats/resources/applications/client/Client.ts index 289d2d6d1..c9c0439e3 100644 --- a/src/api/resources/ats/resources/applications/client/Client.ts +++ b/src/api/resources/ats/resources/applications/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Applications { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Applications { * @example * await client.ats.applications.list() */ - public async list( + public list( request: Merge.ats.ApplicationsListRequest = {}, - requestOptions?: Applications.RequestOptions - ): Promise { + requestOptions?: Applications.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ats.ApplicationsListRequest = {}, + requestOptions?: Applications.RequestOptions, + ): Promise> { const { candidateId, createdAfter, @@ -67,7 +76,7 @@ export class Applications { remoteId, source, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (candidateId != null) { _queryParams["candidate_id"] = candidateId; } @@ -93,7 +102,9 @@ export class Applications { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ats.ApplicationsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -138,8 +149,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/applications", ), method: "GET", headers: { @@ -150,8 +163,8 @@ export class Applications { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -164,13 +177,16 @@ export class Applications { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedApplicationList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedApplicationList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -210,12 +226,19 @@ export class Applications { * remoteUserId: "remote_user_id" * }) */ - public async create( + public create( request: Merge.ats.ApplicationEndpointRequest, - requestOptions?: Applications.RequestOptions - ): Promise { + requestOptions?: Applications.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ats.ApplicationEndpointRequest, + requestOptions?: Applications.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -226,8 +249,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/applications", ), method: "POST", headers: { @@ -238,8 +263,8 @@ export class Applications { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -253,13 +278,16 @@ export class Applications { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.ApplicationResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.ApplicationResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -294,15 +322,25 @@ export class Applications { * @example * await client.ats.applications.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.ats.ApplicationsRetrieveRequest = {}, + requestOptions?: Applications.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.ats.ApplicationsRetrieveRequest = {}, - requestOptions?: Applications.RequestOptions - ): Promise { + requestOptions?: Applications.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ats.ApplicationsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -315,8 +353,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/applications/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -327,8 +367,8 @@ export class Applications { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -341,13 +381,16 @@ export class Applications { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.Application.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.Application.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -382,13 +425,21 @@ export class Applications { * @example * await client.ats.applications.changeStageCreate("id") */ - public async changeStageCreate( + public changeStageCreate( id: string, request: Merge.ats.UpdateApplicationStageRequest = {}, - requestOptions?: Applications.RequestOptions - ): Promise { + requestOptions?: Applications.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__changeStageCreate(id, request, requestOptions)); + } + + private async __changeStageCreate( + id: string, + request: Merge.ats.UpdateApplicationStageRequest = {}, + requestOptions?: Applications.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -399,8 +450,10 @@ 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/${encodeURIComponent(id)}/change-stage` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/applications/${encodeURIComponent(id)}/change-stage`, ), method: "POST", headers: { @@ -411,8 +464,8 @@ export class Applications { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -426,13 +479,16 @@ export class Applications { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.ApplicationResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.ApplicationResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -450,7 +506,7 @@ export class Applications { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /ats/v1/applications/{id}/change-stage." + "Timeout exceeded when calling POST /ats/v1/applications/{id}/change-stage.", ); case "unknown": throw new errors.MergeError({ @@ -468,20 +524,29 @@ export class Applications { * @example * await client.ats.applications.metaPostRetrieve() */ - public async metaPostRetrieve( + public metaPostRetrieve( + request: Merge.ats.ApplicationsMetaPostRetrieveRequest = {}, + requestOptions?: Applications.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(request, requestOptions)); + } + + private async __metaPostRetrieve( request: Merge.ats.ApplicationsMetaPostRetrieveRequest = {}, - requestOptions?: Applications.RequestOptions - ): Promise { + requestOptions?: Applications.RequestOptions, + ): Promise> { const { applicationRemoteTemplateId } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (applicationRemoteTemplateId != null) { _queryParams["application_remote_template_id"] = applicationRemoteTemplateId; } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/applications/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/applications/meta/post", ), method: "GET", headers: { @@ -492,8 +557,8 @@ export class Applications { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -506,13 +571,16 @@ export class Applications { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/applications/types/ApplicationsListRequestExpand.ts b/src/api/resources/ats/resources/applications/types/ApplicationsListRequestExpand.ts index 30bbe5ced..a1828dcbc 100644 --- a/src/api/resources/ats/resources/applications/types/ApplicationsListRequestExpand.ts +++ b/src/api/resources/ats/resources/applications/types/ApplicationsListRequestExpand.ts @@ -258,7 +258,6 @@ export type ApplicationsListRequestExpand = | "screening_question_answers.question,job,current_stage,reject_reason" | "screening_question_answers.question,job,reject_reason" | "screening_question_answers.question,reject_reason"; - export const ApplicationsListRequestExpand = { Candidate: "candidate", CandidateCreditedTo: "candidate,credited_to", diff --git a/src/api/resources/ats/resources/applications/types/ApplicationsRetrieveRequestExpand.ts b/src/api/resources/ats/resources/applications/types/ApplicationsRetrieveRequestExpand.ts index 62e8d9764..226f23b3e 100644 --- a/src/api/resources/ats/resources/applications/types/ApplicationsRetrieveRequestExpand.ts +++ b/src/api/resources/ats/resources/applications/types/ApplicationsRetrieveRequestExpand.ts @@ -258,7 +258,6 @@ export type ApplicationsRetrieveRequestExpand = | "screening_question_answers.question,job,current_stage,reject_reason" | "screening_question_answers.question,job,reject_reason" | "screening_question_answers.question,reject_reason"; - export const ApplicationsRetrieveRequestExpand = { Candidate: "candidate", CandidateCreditedTo: "candidate,credited_to", diff --git a/src/api/resources/ats/resources/asyncPassthrough/client/Client.ts b/src/api/resources/ats/resources/asyncPassthrough/client/Client.ts index d2cd1cfe7..3c6e41b6e 100644 --- a/src/api/resources/ats/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/ats/resources/asyncPassthrough/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace AsyncPassthrough { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -47,14 +49,23 @@ export class AsyncPassthrough { * path: "/scooters" * }) */ - public async create( + public create( request: Merge.ats.DataPassthroughRequest, - requestOptions?: AsyncPassthrough.RequestOptions - ): Promise { + requestOptions?: AsyncPassthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ats.DataPassthroughRequest, + requestOptions?: AsyncPassthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/async-passthrough" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/async-passthrough", ), method: "POST", headers: { @@ -65,8 +76,8 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -79,13 +90,16 @@ export class AsyncPassthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.AsyncPassthroughReciept.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.AsyncPassthroughReciept.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -119,14 +133,23 @@ export class AsyncPassthrough { * @example * await client.ats.asyncPassthrough.retrieve("async_passthrough_receipt_id") */ - public async retrieve( + public retrieve( asyncPassthroughReceiptId: string, - requestOptions?: AsyncPassthrough.RequestOptions - ): Promise { + requestOptions?: AsyncPassthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(asyncPassthroughReceiptId, requestOptions)); + } + + private async __retrieve( + asyncPassthroughReceiptId: string, + requestOptions?: AsyncPassthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}`, ), method: "GET", headers: { @@ -137,8 +160,8 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -150,13 +173,16 @@ export class AsyncPassthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -174,7 +200,7 @@ export class AsyncPassthrough { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ats/v1/async-passthrough/{async_passthrough_receipt_id}." + "Timeout exceeded when calling GET /ats/v1/async-passthrough/{async_passthrough_receipt_id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ats/resources/attachments/client/Client.ts b/src/api/resources/ats/resources/attachments/client/Client.ts index 9d9c95bd9..4a7dafac1 100644 --- a/src/api/resources/ats/resources/attachments/client/Client.ts +++ b/src/api/resources/ats/resources/attachments/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Attachments { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Attachments { * @example * await client.ats.attachments.list() */ - public async list( + public list( request: Merge.ats.AttachmentsListRequest = {}, - requestOptions?: Attachments.RequestOptions - ): Promise { + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ats.AttachmentsListRequest = {}, + requestOptions?: Attachments.RequestOptions, + ): Promise> { const { candidateId, createdAfter, @@ -64,7 +73,7 @@ export class Attachments { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (candidateId != null) { _queryParams["candidate_id"] = candidateId; } @@ -123,8 +132,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/attachments", ), method: "GET", headers: { @@ -135,8 +146,8 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +160,16 @@ export class Attachments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedAttachmentList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedAttachmentList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -192,12 +206,19 @@ export class Attachments { * remoteUserId: "remote_user_id" * }) */ - public async create( + public create( request: Merge.ats.AttachmentEndpointRequest, - requestOptions?: Attachments.RequestOptions - ): Promise { + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ats.AttachmentEndpointRequest, + requestOptions?: Attachments.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -208,8 +229,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/attachments", ), method: "POST", headers: { @@ -220,8 +243,8 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -235,13 +258,16 @@ export class Attachments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.AttachmentResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.AttachmentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -276,13 +302,21 @@ export class Attachments { * @example * await client.ats.attachments.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ats.AttachmentsRetrieveRequest = {}, - requestOptions?: Attachments.RequestOptions - ): Promise { + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ats.AttachmentsRetrieveRequest = {}, + requestOptions?: Attachments.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -305,8 +339,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/attachments/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -317,8 +353,8 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -331,13 +367,16 @@ export class Attachments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.Attachment.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.Attachment.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -370,11 +409,21 @@ export class Attachments { * @example * await client.ats.attachments.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Attachments.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Attachments.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/attachments/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/attachments/meta/post", ), method: "GET", headers: { @@ -385,8 +434,8 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -398,13 +447,16 @@ export class Attachments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/auditTrail/client/Client.ts b/src/api/resources/ats/resources/auditTrail/client/Client.ts index 2196077f8..6fe687061 100644 --- a/src/api/resources/ats/resources/auditTrail/client/Client.ts +++ b/src/api/resources/ats/resources/auditTrail/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AuditTrail { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class AuditTrail { * @example * await client.ats.auditTrail.list() */ - public async list( + public list( request: Merge.ats.AuditTrailListRequest = {}, - requestOptions?: AuditTrail.RequestOptions - ): Promise { + requestOptions?: AuditTrail.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private 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,8 +85,10 @@ export class AuditTrail { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/audit-trail" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/audit-trail", ), method: "GET", headers: { @@ -88,8 +99,8 @@ export class AuditTrail { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -102,13 +113,16 @@ export class AuditTrail { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedAuditLogEventList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedAuditLogEventList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/availableActions/client/Client.ts b/src/api/resources/ats/resources/availableActions/client/Client.ts index 9771e947f..578e6e6b6 100644 --- a/src/api/resources/ats/resources/availableActions/client/Client.ts +++ b/src/api/resources/ats/resources/availableActions/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AvailableActions { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class AvailableActions { * @example * await client.ats.availableActions.retrieve() */ - public async retrieve(requestOptions?: AvailableActions.RequestOptions): Promise { + public retrieve( + requestOptions?: AvailableActions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(requestOptions)); + } + + private async __retrieve( + requestOptions?: AvailableActions.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/available-actions" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/available-actions", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class AvailableActions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class AvailableActions { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.AvailableActions.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.AvailableActions.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/candidates/client/Client.ts b/src/api/resources/ats/resources/candidates/client/Client.ts index a6e1e59cf..02632fc4b 100644 --- a/src/api/resources/ats/resources/candidates/client/Client.ts +++ b/src/api/resources/ats/resources/candidates/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Candidates { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Candidates { * @example * await client.ats.candidates.list() */ - public async list( + public list( + request: Merge.ats.CandidatesListRequest = {}, + requestOptions?: Candidates.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.ats.CandidatesListRequest = {}, - requestOptions?: Candidates.RequestOptions - ): Promise { + requestOptions?: Candidates.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -65,7 +74,7 @@ export class Candidates { remoteId, tags, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -83,7 +92,9 @@ export class Candidates { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ats.CandidatesListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (firstName != null) { @@ -128,8 +139,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/candidates", ), method: "GET", headers: { @@ -140,8 +153,8 @@ export class Candidates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -154,13 +167,16 @@ export class Candidates { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedCandidateList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedCandidateList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -197,12 +213,19 @@ export class Candidates { * remoteUserId: "remote_user_id" * }) */ - public async create( + public create( + request: Merge.ats.CandidateEndpointRequest, + requestOptions?: Candidates.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.ats.CandidateEndpointRequest, - requestOptions?: Candidates.RequestOptions - ): Promise { + requestOptions?: Candidates.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -213,8 +236,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/candidates", ), method: "POST", headers: { @@ -225,8 +250,8 @@ export class Candidates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -240,13 +265,16 @@ export class Candidates { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.CandidateResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.CandidateResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -281,15 +309,25 @@ export class Candidates { * @example * await client.ats.candidates.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ats.CandidatesRetrieveRequest = {}, - requestOptions?: Candidates.RequestOptions - ): Promise { + requestOptions?: Candidates.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ats.CandidatesRetrieveRequest = {}, + requestOptions?: Candidates.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ats.CandidatesRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -302,8 +340,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/candidates/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -314,8 +354,8 @@ export class Candidates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -328,13 +368,16 @@ export class Candidates { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.Candidate.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.Candidate.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -372,13 +415,21 @@ export class Candidates { * remoteUserId: "remote_user_id" * }) */ - public async partialUpdate( + public partialUpdate( + id: string, + request: Merge.ats.PatchedCandidateEndpointRequest, + requestOptions?: Candidates.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__partialUpdate(id, request, requestOptions)); + } + + private async __partialUpdate( id: string, request: Merge.ats.PatchedCandidateEndpointRequest, - requestOptions?: Candidates.RequestOptions - ): Promise { + requestOptions?: Candidates.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -389,8 +440,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/candidates/${encodeURIComponent(id)}`, ), method: "PATCH", headers: { @@ -401,8 +454,8 @@ export class Candidates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -418,13 +471,16 @@ export class Candidates { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.CandidateResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.CandidateResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -461,15 +517,25 @@ export class Candidates { * reason: "GENERAL_CUSTOMER_REQUEST" * }) */ - public async ignoreCreate( + public ignoreCreate( modelId: string, request: Merge.ats.IgnoreCommonModelRequest, - requestOptions?: Candidates.RequestOptions - ): Promise { + requestOptions?: Candidates.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__ignoreCreate(modelId, request, requestOptions)); + } + + private async __ignoreCreate( + modelId: string, + request: Merge.ats.IgnoreCommonModelRequest, + requestOptions?: Candidates.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/candidates/ignore/${encodeURIComponent(modelId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/candidates/ignore/${encodeURIComponent(modelId)}`, ), method: "POST", headers: { @@ -480,8 +546,8 @@ export class Candidates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -494,7 +560,7 @@ export class Candidates { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return { data: undefined, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -512,7 +578,7 @@ export class Candidates { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /ats/v1/candidates/ignore/{model_id}." + "Timeout exceeded when calling POST /ats/v1/candidates/ignore/{model_id}.", ); case "unknown": throw new errors.MergeError({ @@ -530,14 +596,23 @@ export class Candidates { * @example * await client.ats.candidates.metaPatchRetrieve("id") */ - public async metaPatchRetrieve( + public metaPatchRetrieve( + id: string, + requestOptions?: Candidates.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPatchRetrieve(id, requestOptions)); + } + + private async __metaPatchRetrieve( id: string, - requestOptions?: Candidates.RequestOptions - ): Promise { + requestOptions?: Candidates.RequestOptions, + ): Promise> { 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/candidates/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -548,8 +623,8 @@ export class Candidates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -561,13 +636,16 @@ export class Candidates { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -585,7 +663,7 @@ export class Candidates { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ats/v1/candidates/meta/patch/{id}." + "Timeout exceeded when calling GET /ats/v1/candidates/meta/patch/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -602,11 +680,21 @@ export class Candidates { * @example * await client.ats.candidates.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Candidates.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Candidates.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Candidates.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/candidates/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/candidates/meta/post", ), method: "GET", headers: { @@ -617,8 +705,8 @@ export class Candidates { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -630,13 +718,16 @@ export class Candidates { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/candidates/types/CandidatesListRequestExpand.ts b/src/api/resources/ats/resources/candidates/types/CandidatesListRequestExpand.ts index 61e125988..0aee2997e 100644 --- a/src/api/resources/ats/resources/candidates/types/CandidatesListRequestExpand.ts +++ b/src/api/resources/ats/resources/candidates/types/CandidatesListRequestExpand.ts @@ -3,7 +3,6 @@ */ export type CandidatesListRequestExpand = "applications" | "applications,attachments" | "attachments"; - export const CandidatesListRequestExpand = { Applications: "applications", ApplicationsAttachments: "applications,attachments", diff --git a/src/api/resources/ats/resources/candidates/types/CandidatesRetrieveRequestExpand.ts b/src/api/resources/ats/resources/candidates/types/CandidatesRetrieveRequestExpand.ts index 0f1f7c5c7..4b7ca7bb9 100644 --- a/src/api/resources/ats/resources/candidates/types/CandidatesRetrieveRequestExpand.ts +++ b/src/api/resources/ats/resources/candidates/types/CandidatesRetrieveRequestExpand.ts @@ -3,7 +3,6 @@ */ export type CandidatesRetrieveRequestExpand = "applications" | "applications,attachments" | "attachments"; - export const CandidatesRetrieveRequestExpand = { Applications: "applications", ApplicationsAttachments: "applications,attachments", diff --git a/src/api/resources/ats/resources/deleteAccount/client/Client.ts b/src/api/resources/ats/resources/deleteAccount/client/Client.ts index 33aa19f61..7da9834ef 100644 --- a/src/api/resources/ats/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/ats/resources/deleteAccount/client/Client.ts @@ -8,15 +8,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace DeleteAccount { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -41,11 +43,17 @@ export class DeleteAccount { * @example * await client.ats.deleteAccount.delete() */ - public async delete(requestOptions?: DeleteAccount.RequestOptions): Promise { + public delete(requestOptions?: DeleteAccount.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(requestOptions)); + } + + private async __delete(requestOptions?: DeleteAccount.RequestOptions): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/delete-account" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/delete-account", ), method: "POST", headers: { @@ -56,8 +64,8 @@ export class DeleteAccount { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -69,7 +77,7 @@ export class DeleteAccount { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return { data: undefined, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/departments/client/Client.ts b/src/api/resources/ats/resources/departments/client/Client.ts index c2b88cd16..061a071fe 100644 --- a/src/api/resources/ats/resources/departments/client/Client.ts +++ b/src/api/resources/ats/resources/departments/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Departments { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Departments { * @example * await client.ats.departments.list() */ - public async list( + public list( request: Merge.ats.DepartmentsListRequest = {}, - requestOptions?: Departments.RequestOptions - ): Promise { + requestOptions?: Departments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ats.DepartmentsListRequest = {}, + requestOptions?: Departments.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -60,7 +69,7 @@ export class Departments { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,8 +112,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/departments", ), method: "GET", headers: { @@ -115,8 +126,8 @@ export class Departments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -129,13 +140,16 @@ export class Departments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedDepartmentList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedDepartmentList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -170,13 +184,21 @@ export class Departments { * @example * await client.ats.departments.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ats.DepartmentsRetrieveRequest = {}, - requestOptions?: Departments.RequestOptions - ): Promise { + requestOptions?: Departments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ats.DepartmentsRetrieveRequest = {}, + requestOptions?: Departments.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -187,8 +209,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/departments/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -199,8 +223,8 @@ export class Departments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -213,13 +237,16 @@ export class Departments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.Department.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.Department.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/eeocs/client/Client.ts b/src/api/resources/ats/resources/eeocs/client/Client.ts index 439b985d8..bea9ffc57 100644 --- a/src/api/resources/ats/resources/eeocs/client/Client.ts +++ b/src/api/resources/ats/resources/eeocs/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Eeocs { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Eeocs { * @example * await client.ats.eeocs.list() */ - public async list( + public list( request: Merge.ats.EeocsListRequest = {}, - requestOptions?: Eeocs.RequestOptions - ): Promise { + requestOptions?: Eeocs.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ats.EeocsListRequest = {}, + requestOptions?: Eeocs.RequestOptions, + ): Promise> { const { candidateId, createdAfter, @@ -64,7 +73,7 @@ export class Eeocs { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (candidateId != null) { _queryParams["candidate_id"] = candidateId; } @@ -110,7 +119,9 @@ export class Eeocs { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.ats.EeocsListRequestRemoteFields.jsonOrThrow(remoteFields, { + unrecognizedObjectKeys: "strip", + }); } if (remoteId != null) { @@ -118,13 +129,18 @@ export class Eeocs { } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.ats.EeocsListRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/eeocs" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/eeocs", ), method: "GET", headers: { @@ -135,8 +151,8 @@ export class Eeocs { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +165,16 @@ export class Eeocs { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedEeocList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedEeocList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -190,13 +209,21 @@ export class Eeocs { * @example * await client.ats.eeocs.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ats.EeocsRetrieveRequest = {}, - requestOptions?: Eeocs.RequestOptions - ): Promise { + requestOptions?: Eeocs.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ats.EeocsRetrieveRequest = {}, + requestOptions?: Eeocs.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -210,17 +237,24 @@ export class Eeocs { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.ats.EeocsRetrieveRequestRemoteFields.jsonOrThrow(remoteFields, { + unrecognizedObjectKeys: "strip", + }); } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.ats.EeocsRetrieveRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/eeocs/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/eeocs/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -231,8 +265,8 @@ export class Eeocs { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -245,13 +279,16 @@ export class Eeocs { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.Eeoc.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.Eeoc.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/eeocs/types/EeocsListRequestRemoteFields.ts b/src/api/resources/ats/resources/eeocs/types/EeocsListRequestRemoteFields.ts index 3f3297224..adfc66ab9 100644 --- a/src/api/resources/ats/resources/eeocs/types/EeocsListRequestRemoteFields.ts +++ b/src/api/resources/ats/resources/eeocs/types/EeocsListRequestRemoteFields.ts @@ -18,7 +18,6 @@ export type EeocsListRequestRemoteFields = | "race" | "race,veteran_status" | "veteran_status"; - export const EeocsListRequestRemoteFields = { DisabilityStatus: "disability_status", DisabilityStatusGender: "disability_status,gender", diff --git a/src/api/resources/ats/resources/eeocs/types/EeocsListRequestShowEnumOrigins.ts b/src/api/resources/ats/resources/eeocs/types/EeocsListRequestShowEnumOrigins.ts index d970fda01..265677cfc 100644 --- a/src/api/resources/ats/resources/eeocs/types/EeocsListRequestShowEnumOrigins.ts +++ b/src/api/resources/ats/resources/eeocs/types/EeocsListRequestShowEnumOrigins.ts @@ -18,7 +18,6 @@ export type EeocsListRequestShowEnumOrigins = | "race" | "race,veteran_status" | "veteran_status"; - export const EeocsListRequestShowEnumOrigins = { DisabilityStatus: "disability_status", DisabilityStatusGender: "disability_status,gender", diff --git a/src/api/resources/ats/resources/eeocs/types/EeocsRetrieveRequestRemoteFields.ts b/src/api/resources/ats/resources/eeocs/types/EeocsRetrieveRequestRemoteFields.ts index bd0ce7844..fbffc412d 100644 --- a/src/api/resources/ats/resources/eeocs/types/EeocsRetrieveRequestRemoteFields.ts +++ b/src/api/resources/ats/resources/eeocs/types/EeocsRetrieveRequestRemoteFields.ts @@ -18,7 +18,6 @@ export type EeocsRetrieveRequestRemoteFields = | "race" | "race,veteran_status" | "veteran_status"; - export const EeocsRetrieveRequestRemoteFields = { DisabilityStatus: "disability_status", DisabilityStatusGender: "disability_status,gender", diff --git a/src/api/resources/ats/resources/eeocs/types/EeocsRetrieveRequestShowEnumOrigins.ts b/src/api/resources/ats/resources/eeocs/types/EeocsRetrieveRequestShowEnumOrigins.ts index 26079c9c1..216656127 100644 --- a/src/api/resources/ats/resources/eeocs/types/EeocsRetrieveRequestShowEnumOrigins.ts +++ b/src/api/resources/ats/resources/eeocs/types/EeocsRetrieveRequestShowEnumOrigins.ts @@ -18,7 +18,6 @@ export type EeocsRetrieveRequestShowEnumOrigins = | "race" | "race,veteran_status" | "veteran_status"; - export const EeocsRetrieveRequestShowEnumOrigins = { DisabilityStatus: "disability_status", DisabilityStatusGender: "disability_status,gender", diff --git a/src/api/resources/ats/resources/fieldMapping/client/Client.ts b/src/api/resources/ats/resources/fieldMapping/client/Client.ts index 8d33bfdc5..c7df028c5 100644 --- a/src/api/resources/ats/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/ats/resources/fieldMapping/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace FieldMapping { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,20 +46,29 @@ export class FieldMapping { * @example * await client.ats.fieldMapping.fieldMappingsRetrieve() */ - public async fieldMappingsRetrieve( + public fieldMappingsRetrieve( request: Merge.ats.FieldMappingsRetrieveRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsRetrieve(request, requestOptions)); + } + + private async __fieldMappingsRetrieve( + request: Merge.ats.FieldMappingsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { excludeRemoteFieldMetadata } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (excludeRemoteFieldMetadata != null) { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/field-mappings" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/field-mappings", ), method: "GET", headers: { @@ -68,8 +79,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -82,13 +93,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -129,20 +143,29 @@ export class FieldMapping { * commonModelName: "ExampleCommonModel" * }) */ - public async fieldMappingsCreate( + public fieldMappingsCreate( + request: Merge.ats.CreateFieldMappingRequest, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsCreate(request, requestOptions)); + } + + private async __fieldMappingsCreate( request: Merge.ats.CreateFieldMappingRequest, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { excludeRemoteFieldMetadata, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (excludeRemoteFieldMetadata != null) { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/field-mappings" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/field-mappings", ), method: "POST", headers: { @@ -153,8 +176,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -168,13 +191,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -208,14 +234,23 @@ export class FieldMapping { * @example * await client.ats.fieldMapping.fieldMappingsDestroy("field_mapping_id") */ - public async fieldMappingsDestroy( + public fieldMappingsDestroy( + fieldMappingId: string, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsDestroy(fieldMappingId, requestOptions)); + } + + private async __fieldMappingsDestroy( fieldMappingId: string, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "DELETE", headers: { @@ -226,8 +261,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -239,13 +274,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -263,7 +301,7 @@ export class FieldMapping { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling DELETE /ats/v1/field-mappings/{field_mapping_id}." + "Timeout exceeded when calling DELETE /ats/v1/field-mappings/{field_mapping_id}.", ); case "unknown": throw new errors.MergeError({ @@ -282,15 +320,27 @@ export class FieldMapping { * @example * await client.ats.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id") */ - public async fieldMappingsPartialUpdate( + public fieldMappingsPartialUpdate( fieldMappingId: string, request: Merge.ats.PatchedEditFieldMappingRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__fieldMappingsPartialUpdate(fieldMappingId, request, requestOptions), + ); + } + + private async __fieldMappingsPartialUpdate( + fieldMappingId: string, + request: Merge.ats.PatchedEditFieldMappingRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ats/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "PATCH", headers: { @@ -301,8 +351,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -317,13 +367,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -341,7 +394,7 @@ export class FieldMapping { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling PATCH /ats/v1/field-mappings/{field_mapping_id}." + "Timeout exceeded when calling PATCH /ats/v1/field-mappings/{field_mapping_id}.", ); case "unknown": throw new errors.MergeError({ @@ -359,12 +412,19 @@ export class FieldMapping { * @example * await client.ats.fieldMapping.remoteFieldsRetrieve() */ - public async remoteFieldsRetrieve( + public remoteFieldsRetrieve( + request: Merge.ats.RemoteFieldsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldsRetrieve(request, requestOptions)); + } + + private async __remoteFieldsRetrieve( request: Merge.ats.RemoteFieldsRetrieveRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { commonModels, includeExampleValues } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (commonModels != null) { _queryParams["common_models"] = commonModels; } @@ -375,8 +435,10 @@ 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/remote-fields" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/remote-fields", ), method: "GET", headers: { @@ -387,8 +449,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -401,13 +463,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.RemoteFieldApiResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.RemoteFieldApiResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -440,13 +505,21 @@ export class FieldMapping { * @example * await client.ats.fieldMapping.targetFieldsRetrieve() */ - public async targetFieldsRetrieve( - requestOptions?: FieldMapping.RequestOptions - ): Promise { + public targetFieldsRetrieve( + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__targetFieldsRetrieve(requestOptions)); + } + + private async __targetFieldsRetrieve( + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/target-fields" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/target-fields", ), method: "GET", headers: { @@ -457,8 +530,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -470,13 +543,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/forceResync/client/Client.ts b/src/api/resources/ats/resources/forceResync/client/Client.ts index b2438cb65..6255bae1c 100644 --- a/src/api/resources/ats/resources/forceResync/client/Client.ts +++ b/src/api/resources/ats/resources/forceResync/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace ForceResync { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class ForceResync { * @example * await client.ats.forceResync.syncStatusResyncCreate() */ - public async syncStatusResyncCreate(requestOptions?: ForceResync.RequestOptions): Promise { + public syncStatusResyncCreate( + requestOptions?: ForceResync.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__syncStatusResyncCreate(requestOptions)); + } + + private async __syncStatusResyncCreate( + requestOptions?: ForceResync.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/sync-status/resync" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/sync-status/resync", ), method: "POST", headers: { @@ -58,8 +70,8 @@ export class ForceResync { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class ForceResync { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/generateKey/client/Client.ts b/src/api/resources/ats/resources/generateKey/client/Client.ts index 0b9f614ad..1bbb26276 100644 --- a/src/api/resources/ats/resources/generateKey/client/Client.ts +++ b/src/api/resources/ats/resources/generateKey/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace GenerateKey { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -46,14 +48,23 @@ export class GenerateKey { * name: "Remote Deployment Key 1" * }) */ - public async create( + public create( request: Merge.ats.GenerateRemoteKeyRequest, - requestOptions?: GenerateKey.RequestOptions - ): Promise { + requestOptions?: GenerateKey.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ats.GenerateRemoteKeyRequest, + requestOptions?: GenerateKey.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/generate-key" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/generate-key", ), method: "POST", headers: { @@ -64,8 +75,8 @@ export class GenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -78,13 +89,16 @@ export class GenerateKey { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.RemoteKey.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.RemoteKey.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/interviews/client/Client.ts b/src/api/resources/ats/resources/interviews/client/Client.ts index dadd97074..601d0cb5a 100644 --- a/src/api/resources/ats/resources/interviews/client/Client.ts +++ b/src/api/resources/ats/resources/interviews/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Interviews { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Interviews { * @example * await client.ats.interviews.list() */ - public async list( + public list( + request: Merge.ats.InterviewsListRequest = {}, + requestOptions?: Interviews.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.ats.InterviewsListRequest = {}, - requestOptions?: Interviews.RequestOptions - ): Promise { + requestOptions?: Interviews.RequestOptions, + ): Promise> { const { applicationId, createdAfter, @@ -67,7 +76,7 @@ export class Interviews { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (applicationId != null) { _queryParams["application_id"] = applicationId; } @@ -85,7 +94,9 @@ export class Interviews { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ats.InterviewsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -138,8 +149,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/interviews", ), method: "GET", headers: { @@ -150,8 +163,8 @@ export class Interviews { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -164,13 +177,16 @@ export class Interviews { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedScheduledInterviewList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedScheduledInterviewList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -207,12 +223,19 @@ export class Interviews { * remoteUserId: "remote_user_id" * }) */ - public async create( + public create( + request: Merge.ats.ScheduledInterviewEndpointRequest, + requestOptions?: Interviews.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.ats.ScheduledInterviewEndpointRequest, - requestOptions?: Interviews.RequestOptions - ): Promise { + requestOptions?: Interviews.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -223,8 +246,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/interviews", ), method: "POST", headers: { @@ -235,8 +260,8 @@ export class Interviews { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -252,13 +277,16 @@ export class Interviews { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.ScheduledInterviewResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.ScheduledInterviewResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -293,15 +321,25 @@ export class Interviews { * @example * await client.ats.interviews.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.ats.InterviewsRetrieveRequest = {}, + requestOptions?: Interviews.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.ats.InterviewsRetrieveRequest = {}, - requestOptions?: Interviews.RequestOptions - ): Promise { + requestOptions?: Interviews.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ats.InterviewsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -322,8 +360,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/interviews/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -334,8 +374,8 @@ export class Interviews { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -348,13 +388,16 @@ export class Interviews { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.ScheduledInterview.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.ScheduledInterview.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -387,11 +430,21 @@ export class Interviews { * @example * await client.ats.interviews.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Interviews.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Interviews.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Interviews.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/interviews/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/interviews/meta/post", ), method: "GET", headers: { @@ -402,8 +455,8 @@ export class Interviews { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -415,13 +468,16 @@ export class Interviews { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/interviews/types/InterviewsListRequestExpand.ts b/src/api/resources/ats/resources/interviews/types/InterviewsListRequestExpand.ts index ac226bb8e..afca27603 100644 --- a/src/api/resources/ats/resources/interviews/types/InterviewsListRequestExpand.ts +++ b/src/api/resources/ats/resources/interviews/types/InterviewsListRequestExpand.ts @@ -18,7 +18,6 @@ export type InterviewsListRequestExpand = | "organizer,application" | "organizer,application,job_interview_stage" | "organizer,job_interview_stage"; - export const InterviewsListRequestExpand = { Application: "application", ApplicationJobInterviewStage: "application,job_interview_stage", diff --git a/src/api/resources/ats/resources/interviews/types/InterviewsRetrieveRequestExpand.ts b/src/api/resources/ats/resources/interviews/types/InterviewsRetrieveRequestExpand.ts index f38de342e..3f404ca65 100644 --- a/src/api/resources/ats/resources/interviews/types/InterviewsRetrieveRequestExpand.ts +++ b/src/api/resources/ats/resources/interviews/types/InterviewsRetrieveRequestExpand.ts @@ -18,7 +18,6 @@ export type InterviewsRetrieveRequestExpand = | "organizer,application" | "organizer,application,job_interview_stage" | "organizer,job_interview_stage"; - export const InterviewsRetrieveRequestExpand = { Application: "application", ApplicationJobInterviewStage: "application,job_interview_stage", diff --git a/src/api/resources/ats/resources/issues/client/Client.ts b/src/api/resources/ats/resources/issues/client/Client.ts index cda8b3978..abfa8e5ff 100644 --- a/src/api/resources/ats/resources/issues/client/Client.ts +++ b/src/api/resources/ats/resources/issues/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Issues { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Issues { * @example * await client.ats.issues.list() */ - public async list( + public list( + request: Merge.ats.IssuesListRequest = {}, + requestOptions?: Issues.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.ats.IssuesListRequest = {}, - requestOptions?: Issues.RequestOptions - ): Promise { + requestOptions?: Issues.RequestOptions, + ): Promise> { const { accountToken, cursor, @@ -64,7 +73,7 @@ export class Issues { startDate, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountToken != null) { _queryParams["account_token"] = accountToken; } @@ -118,13 +127,17 @@ export class Issues { } if (status != null) { - _queryParams["status"] = status; + _queryParams["status"] = serializers.ats.IssuesListRequestStatus.jsonOrThrow(status, { + unrecognizedObjectKeys: "strip", + }); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/issues" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/issues", ), method: "GET", headers: { @@ -135,8 +148,8 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +162,16 @@ export class Issues { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedIssueList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedIssueList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -189,11 +205,20 @@ export class Issues { * @example * await client.ats.issues.retrieve("id") */ - public async retrieve(id: string, requestOptions?: Issues.RequestOptions): Promise { + public retrieve(id: string, requestOptions?: Issues.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, requestOptions)); + } + + private 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/issues/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -204,8 +229,8 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -217,13 +242,16 @@ export class Issues { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.Issue.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.Issue.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/issues/types/IssuesListRequestStatus.ts b/src/api/resources/ats/resources/issues/types/IssuesListRequestStatus.ts index b2d4f1b76..a35e3e193 100644 --- a/src/api/resources/ats/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/api/resources/ats/resources/issues/types/IssuesListRequestStatus.ts @@ -3,7 +3,6 @@ */ export type IssuesListRequestStatus = "ONGOING" | "RESOLVED"; - export const IssuesListRequestStatus = { Ongoing: "ONGOING", Resolved: "RESOLVED", diff --git a/src/api/resources/ats/resources/jobInterviewStages/client/Client.ts b/src/api/resources/ats/resources/jobInterviewStages/client/Client.ts index e60dfc8a1..ffe702ec0 100644 --- a/src/api/resources/ats/resources/jobInterviewStages/client/Client.ts +++ b/src/api/resources/ats/resources/jobInterviewStages/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace JobInterviewStages { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class JobInterviewStages { * @example * await client.ats.jobInterviewStages.list() */ - public async list( + public list( request: Merge.ats.JobInterviewStagesListRequest = {}, - requestOptions?: JobInterviewStages.RequestOptions - ): Promise { + requestOptions?: JobInterviewStages.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ats.JobInterviewStagesListRequest = {}, + requestOptions?: JobInterviewStages.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -62,7 +71,7 @@ export class JobInterviewStages { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -113,8 +122,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/job-interview-stages", ), method: "GET", headers: { @@ -125,8 +136,8 @@ export class JobInterviewStages { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -139,13 +150,16 @@ export class JobInterviewStages { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedJobInterviewStageList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedJobInterviewStageList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -180,13 +194,21 @@ export class JobInterviewStages { * @example * await client.ats.jobInterviewStages.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ats.JobInterviewStagesRetrieveRequest = {}, - requestOptions?: JobInterviewStages.RequestOptions - ): Promise { + requestOptions?: JobInterviewStages.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ats.JobInterviewStagesRetrieveRequest = {}, + requestOptions?: JobInterviewStages.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -201,8 +223,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/job-interview-stages/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -213,8 +237,8 @@ export class JobInterviewStages { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -227,13 +251,16 @@ export class JobInterviewStages { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.JobInterviewStage.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.JobInterviewStage.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -251,7 +278,7 @@ export class JobInterviewStages { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ats/v1/job-interview-stages/{id}." + "Timeout exceeded when calling GET /ats/v1/job-interview-stages/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ats/resources/jobPostings/client/Client.ts b/src/api/resources/ats/resources/jobPostings/client/Client.ts index 1bd203d58..3cbdce9c8 100644 --- a/src/api/resources/ats/resources/jobPostings/client/Client.ts +++ b/src/api/resources/ats/resources/jobPostings/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace JobPostings { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class JobPostings { * @example * await client.ats.jobPostings.list() */ - public async list( + public list( + request: Merge.ats.JobPostingsListRequest = {}, + requestOptions?: JobPostings.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.ats.JobPostingsListRequest = {}, - requestOptions?: JobPostings.RequestOptions - ): Promise { + requestOptions?: JobPostings.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -62,7 +71,7 @@ export class JobPostings { remoteId, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,13 +117,17 @@ export class JobPostings { } if (status != null) { - _queryParams["status"] = status; + _queryParams["status"] = serializers.ats.JobPostingsListRequestStatus.jsonOrThrow(status, { + unrecognizedObjectKeys: "strip", + }); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/job-postings" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/job-postings", ), method: "GET", headers: { @@ -125,8 +138,8 @@ export class JobPostings { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -139,13 +152,16 @@ export class JobPostings { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedJobPostingList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedJobPostingList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -180,13 +196,21 @@ export class JobPostings { * @example * await client.ats.jobPostings.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.ats.JobPostingsRetrieveRequest = {}, + requestOptions?: JobPostings.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.ats.JobPostingsRetrieveRequest = {}, - requestOptions?: JobPostings.RequestOptions - ): Promise { + requestOptions?: JobPostings.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -201,8 +225,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/job-postings/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -213,8 +239,8 @@ export class JobPostings { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -227,13 +253,16 @@ export class JobPostings { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.JobPosting.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.JobPosting.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/jobPostings/types/JobPostingsListRequestStatus.ts b/src/api/resources/ats/resources/jobPostings/types/JobPostingsListRequestStatus.ts index 62f8982a2..ad9a08cf4 100644 --- a/src/api/resources/ats/resources/jobPostings/types/JobPostingsListRequestStatus.ts +++ b/src/api/resources/ats/resources/jobPostings/types/JobPostingsListRequestStatus.ts @@ -3,7 +3,6 @@ */ export type JobPostingsListRequestStatus = "CLOSED" | "DRAFT" | "INTERNAL" | "PENDING" | "PUBLISHED"; - export const JobPostingsListRequestStatus = { Closed: "CLOSED", Draft: "DRAFT", diff --git a/src/api/resources/ats/resources/jobs/client/Client.ts b/src/api/resources/ats/resources/jobs/client/Client.ts index 91860d2b3..fc196a1e2 100644 --- a/src/api/resources/ats/resources/jobs/client/Client.ts +++ b/src/api/resources/ats/resources/jobs/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Jobs { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Jobs { * @example * await client.ats.jobs.list() */ - public async list( + public list( + request: Merge.ats.JobsListRequest = {}, + requestOptions?: Jobs.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.ats.JobsListRequest = {}, - requestOptions?: Jobs.RequestOptions - ): Promise { + requestOptions?: Jobs.RequestOptions, + ): Promise> { const { code, createdAfter, @@ -66,7 +75,7 @@ export class Jobs { showEnumOrigins, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (code != null) { _queryParams["code"] = code; } @@ -84,7 +93,9 @@ export class Jobs { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ats.JobsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -128,13 +139,17 @@ export class Jobs { } if (status != null) { - _queryParams["status"] = status; + _queryParams["status"] = serializers.ats.JobsListRequestStatus.jsonOrThrow(status, { + unrecognizedObjectKeys: "strip", + }); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/jobs" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/jobs", ), method: "GET", headers: { @@ -145,8 +160,8 @@ export class Jobs { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -159,13 +174,16 @@ export class Jobs { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedJobList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedJobList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -200,15 +218,25 @@ export class Jobs { * @example * await client.ats.jobs.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.ats.JobsRetrieveRequest = {}, + requestOptions?: Jobs.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.ats.JobsRetrieveRequest = {}, - requestOptions?: Jobs.RequestOptions - ): Promise { + requestOptions?: Jobs.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ats.JobsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -229,8 +257,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/jobs/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -241,8 +271,8 @@ export class Jobs { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -255,13 +285,16 @@ export class Jobs { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.Job.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.Job.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -296,19 +329,29 @@ export class Jobs { * @example * await client.ats.jobs.screeningQuestionsList("job_id") */ - public async screeningQuestionsList( + public screeningQuestionsList( + jobId: string, + request: Merge.ats.JobsScreeningQuestionsListRequest = {}, + requestOptions?: Jobs.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__screeningQuestionsList(jobId, request, requestOptions)); + } + + private async __screeningQuestionsList( jobId: string, request: Merge.ats.JobsScreeningQuestionsListRequest = {}, - requestOptions?: Jobs.RequestOptions - ): Promise { + requestOptions?: Jobs.RequestOptions, + ): Promise> { const { cursor, expand, includeDeletedData, includeRemoteData, includeShellData, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ats.JobsScreeningQuestionsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -329,8 +372,10 @@ 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/${encodeURIComponent(jobId)}/screening-questions` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/jobs/${encodeURIComponent(jobId)}/screening-questions`, ), method: "GET", headers: { @@ -341,8 +386,8 @@ export class Jobs { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -355,13 +400,16 @@ export class Jobs { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedScreeningQuestionList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedScreeningQuestionList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -379,7 +427,7 @@ export class Jobs { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ats/v1/jobs/{job_id}/screening-questions." + "Timeout exceeded when calling GET /ats/v1/jobs/{job_id}/screening-questions.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ats/resources/jobs/types/JobsListRequestExpand.ts b/src/api/resources/ats/resources/jobs/types/JobsListRequestExpand.ts index 4f4a5782a..f59c915a1 100644 --- a/src/api/resources/ats/resources/jobs/types/JobsListRequestExpand.ts +++ b/src/api/resources/ats/resources/jobs/types/JobsListRequestExpand.ts @@ -34,7 +34,6 @@ export type JobsListRequestExpand = | "offices,job_postings,recruiters" | "offices,recruiters" | "recruiters"; - export const JobsListRequestExpand = { Departments: "departments", DepartmentsHiringManagers: "departments,hiring_managers", diff --git a/src/api/resources/ats/resources/jobs/types/JobsListRequestStatus.ts b/src/api/resources/ats/resources/jobs/types/JobsListRequestStatus.ts index 0567a04e5..4e3068475 100644 --- a/src/api/resources/ats/resources/jobs/types/JobsListRequestStatus.ts +++ b/src/api/resources/ats/resources/jobs/types/JobsListRequestStatus.ts @@ -3,7 +3,6 @@ */ export type JobsListRequestStatus = "ARCHIVED" | "CLOSED" | "DRAFT" | "OPEN" | "PENDING"; - export const JobsListRequestStatus = { Archived: "ARCHIVED", Closed: "CLOSED", diff --git a/src/api/resources/ats/resources/jobs/types/JobsRetrieveRequestExpand.ts b/src/api/resources/ats/resources/jobs/types/JobsRetrieveRequestExpand.ts index f6b8d9737..43d37258c 100644 --- a/src/api/resources/ats/resources/jobs/types/JobsRetrieveRequestExpand.ts +++ b/src/api/resources/ats/resources/jobs/types/JobsRetrieveRequestExpand.ts @@ -34,7 +34,6 @@ export type JobsRetrieveRequestExpand = | "offices,job_postings,recruiters" | "offices,recruiters" | "recruiters"; - export const JobsRetrieveRequestExpand = { Departments: "departments", DepartmentsHiringManagers: "departments,hiring_managers", diff --git a/src/api/resources/ats/resources/jobs/types/JobsScreeningQuestionsListRequestExpand.ts b/src/api/resources/ats/resources/jobs/types/JobsScreeningQuestionsListRequestExpand.ts index b199b2a60..001a35cb0 100644 --- a/src/api/resources/ats/resources/jobs/types/JobsScreeningQuestionsListRequestExpand.ts +++ b/src/api/resources/ats/resources/jobs/types/JobsScreeningQuestionsListRequestExpand.ts @@ -3,7 +3,6 @@ */ export type JobsScreeningQuestionsListRequestExpand = "job" | "options" | "options,job"; - export const JobsScreeningQuestionsListRequestExpand = { Job: "job", Options: "options", diff --git a/src/api/resources/ats/resources/linkToken/client/Client.ts b/src/api/resources/ats/resources/linkToken/client/Client.ts index ddf2aa07c..e64dce5a5 100644 --- a/src/api/resources/ats/resources/linkToken/client/Client.ts +++ b/src/api/resources/ats/resources/linkToken/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace LinkToken { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -49,14 +51,23 @@ export class LinkToken { * categories: ["hris", "ats"] * }) */ - public async create( + public create( request: Merge.ats.EndUserDetailsRequest, - requestOptions?: LinkToken.RequestOptions - ): Promise { + requestOptions?: LinkToken.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ats.EndUserDetailsRequest, + requestOptions?: LinkToken.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/link-token" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/link-token", ), method: "POST", headers: { @@ -67,8 +78,8 @@ export class LinkToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -81,13 +92,16 @@ export class LinkToken { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.LinkToken.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.LinkToken.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/linkedAccounts/client/Client.ts b/src/api/resources/ats/resources/linkedAccounts/client/Client.ts index f68cb86b8..261a916b5 100644 --- a/src/api/resources/ats/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/ats/resources/linkedAccounts/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace LinkedAccounts { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class LinkedAccounts { * @example * await client.ats.linkedAccounts.list() */ - public async list( + public list( request: Merge.ats.LinkedAccountsListRequest = {}, - requestOptions?: LinkedAccounts.RequestOptions - ): Promise { + requestOptions?: LinkedAccounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ats.LinkedAccountsListRequest = {}, + requestOptions?: LinkedAccounts.RequestOptions, + ): Promise> { const { category, cursor, @@ -63,9 +72,11 @@ export class LinkedAccounts { pageSize, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (category != null) { - _queryParams["category"] = category; + _queryParams["category"] = serializers.ats.LinkedAccountsListRequestCategory.jsonOrThrow(category, { + unrecognizedObjectKeys: "strip", + }); } if (cursor != null) { @@ -118,8 +129,10 @@ export class LinkedAccounts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/linked-accounts" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/linked-accounts", ), method: "GET", headers: { @@ -130,8 +143,8 @@ export class LinkedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -144,13 +157,16 @@ export class LinkedAccounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/api/resources/ats/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index edeb3e1d1..7474691d1 100644 --- a/src/api/resources/ats/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/api/resources/ats/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -10,7 +10,6 @@ export type LinkedAccountsListRequestCategory = | "hris" | "mktg" | "ticketing"; - export const LinkedAccountsListRequestCategory = { Accounting: "accounting", Ats: "ats", diff --git a/src/api/resources/ats/resources/offers/client/Client.ts b/src/api/resources/ats/resources/offers/client/Client.ts index 57ec271da..700efe569 100644 --- a/src/api/resources/ats/resources/offers/client/Client.ts +++ b/src/api/resources/ats/resources/offers/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Offers { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Offers { * @example * await client.ats.offers.list() */ - public async list( + public list( request: Merge.ats.OffersListRequest = {}, - requestOptions?: Offers.RequestOptions - ): Promise { + requestOptions?: Offers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ats.OffersListRequest = {}, + requestOptions?: Offers.RequestOptions, + ): Promise> { const { applicationId, createdAfter, @@ -65,7 +74,7 @@ export class Offers { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (applicationId != null) { _queryParams["application_id"] = applicationId; } @@ -87,7 +96,9 @@ export class Offers { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ats.OffersListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -128,8 +139,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/offers", ), method: "GET", headers: { @@ -140,8 +153,8 @@ export class Offers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -154,13 +167,16 @@ export class Offers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedOfferList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedOfferList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -195,15 +211,25 @@ export class Offers { * @example * await client.ats.offers.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ats.OffersRetrieveRequest = {}, - requestOptions?: Offers.RequestOptions - ): Promise { + requestOptions?: Offers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ats.OffersRetrieveRequest = {}, + requestOptions?: Offers.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ats.OffersRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -224,8 +250,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/offers/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -236,8 +264,8 @@ export class Offers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -250,13 +278,16 @@ export class Offers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.Offer.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.Offer.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/offers/types/OffersListRequestExpand.ts b/src/api/resources/ats/resources/offers/types/OffersListRequestExpand.ts index b1d587932..38fa8cdbf 100644 --- a/src/api/resources/ats/resources/offers/types/OffersListRequestExpand.ts +++ b/src/api/resources/ats/resources/offers/types/OffersListRequestExpand.ts @@ -3,7 +3,6 @@ */ export type OffersListRequestExpand = "application" | "application,creator" | "creator"; - export const OffersListRequestExpand = { Application: "application", ApplicationCreator: "application,creator", diff --git a/src/api/resources/ats/resources/offers/types/OffersRetrieveRequestExpand.ts b/src/api/resources/ats/resources/offers/types/OffersRetrieveRequestExpand.ts index e62f72661..5db17c49d 100644 --- a/src/api/resources/ats/resources/offers/types/OffersRetrieveRequestExpand.ts +++ b/src/api/resources/ats/resources/offers/types/OffersRetrieveRequestExpand.ts @@ -3,7 +3,6 @@ */ export type OffersRetrieveRequestExpand = "application" | "application,creator" | "creator"; - export const OffersRetrieveRequestExpand = { Application: "application", ApplicationCreator: "application,creator", diff --git a/src/api/resources/ats/resources/offices/client/Client.ts b/src/api/resources/ats/resources/offices/client/Client.ts index 5d124facb..031928029 100644 --- a/src/api/resources/ats/resources/offices/client/Client.ts +++ b/src/api/resources/ats/resources/offices/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Offices { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Offices { * @example * await client.ats.offices.list() */ - public async list( + public list( request: Merge.ats.OfficesListRequest = {}, - requestOptions?: Offices.RequestOptions - ): Promise { + requestOptions?: Offices.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ats.OfficesListRequest = {}, + requestOptions?: Offices.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -60,7 +69,7 @@ export class Offices { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,8 +112,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/offices", ), method: "GET", headers: { @@ -115,8 +126,8 @@ export class Offices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -129,13 +140,16 @@ export class Offices { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedOfficeList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedOfficeList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -170,13 +184,21 @@ export class Offices { * @example * await client.ats.offices.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ats.OfficesRetrieveRequest = {}, - requestOptions?: Offices.RequestOptions - ): Promise { + requestOptions?: Offices.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ats.OfficesRetrieveRequest = {}, + requestOptions?: Offices.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -187,8 +209,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/offices/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -199,8 +223,8 @@ export class Offices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -213,13 +237,16 @@ export class Offices { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.Office.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.Office.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/passthrough/client/Client.ts b/src/api/resources/ats/resources/passthrough/client/Client.ts index f474da2e3..406f0cc20 100644 --- a/src/api/resources/ats/resources/passthrough/client/Client.ts +++ b/src/api/resources/ats/resources/passthrough/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Passthrough { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -47,14 +49,23 @@ export class Passthrough { * path: "/scooters" * }) */ - public async create( + public create( request: Merge.ats.DataPassthroughRequest, - requestOptions?: Passthrough.RequestOptions - ): Promise { + requestOptions?: Passthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ats.DataPassthroughRequest, + requestOptions?: Passthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/passthrough" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/passthrough", ), method: "POST", headers: { @@ -65,8 +76,8 @@ export class Passthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -79,13 +90,16 @@ export class Passthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.RemoteResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.RemoteResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/regenerateKey/client/Client.ts b/src/api/resources/ats/resources/regenerateKey/client/Client.ts index e9ce4579a..75f0e3499 100644 --- a/src/api/resources/ats/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/ats/resources/regenerateKey/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace RegenerateKey { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -46,14 +48,23 @@ export class RegenerateKey { * name: "Remote Deployment Key 1" * }) */ - public async create( + public create( request: Merge.ats.RemoteKeyForRegenerationRequest, - requestOptions?: RegenerateKey.RequestOptions - ): Promise { + requestOptions?: RegenerateKey.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ats.RemoteKeyForRegenerationRequest, + requestOptions?: RegenerateKey.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/regenerate-key" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/regenerate-key", ), method: "POST", headers: { @@ -64,8 +75,8 @@ export class RegenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -80,13 +91,16 @@ export class RegenerateKey { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.RemoteKey.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.RemoteKey.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/rejectReasons/client/Client.ts b/src/api/resources/ats/resources/rejectReasons/client/Client.ts index 50374d161..02e7d4667 100644 --- a/src/api/resources/ats/resources/rejectReasons/client/Client.ts +++ b/src/api/resources/ats/resources/rejectReasons/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace RejectReasons { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class RejectReasons { * @example * await client.ats.rejectReasons.list() */ - public async list( + public list( request: Merge.ats.RejectReasonsListRequest = {}, - requestOptions?: RejectReasons.RequestOptions - ): Promise { + requestOptions?: RejectReasons.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ats.RejectReasonsListRequest = {}, + requestOptions?: RejectReasons.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -60,7 +69,7 @@ export class RejectReasons { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,8 +112,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/reject-reasons", ), method: "GET", headers: { @@ -115,8 +126,8 @@ export class RejectReasons { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -129,13 +140,16 @@ export class RejectReasons { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedRejectReasonList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedRejectReasonList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -170,13 +184,21 @@ export class RejectReasons { * @example * await client.ats.rejectReasons.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ats.RejectReasonsRetrieveRequest = {}, - requestOptions?: RejectReasons.RequestOptions - ): Promise { + requestOptions?: RejectReasons.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ats.RejectReasonsRetrieveRequest = {}, + requestOptions?: RejectReasons.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -187,8 +209,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/reject-reasons/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -199,8 +223,8 @@ export class RejectReasons { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -213,13 +237,16 @@ export class RejectReasons { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.RejectReason.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.RejectReason.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/scopes/client/Client.ts b/src/api/resources/ats/resources/scopes/client/Client.ts index 58145e664..4e6ed598a 100644 --- a/src/api/resources/ats/resources/scopes/client/Client.ts +++ b/src/api/resources/ats/resources/scopes/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Scopes { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class Scopes { * @example * await client.ats.scopes.defaultScopesRetrieve() */ - public async defaultScopesRetrieve(requestOptions?: Scopes.RequestOptions): Promise { + public defaultScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__defaultScopesRetrieve(requestOptions)); + } + + private async __defaultScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/default-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/default-scopes", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -110,13 +125,21 @@ export class Scopes { * @example * await client.ats.scopes.linkedAccountScopesRetrieve() */ - public async linkedAccountScopesRetrieve( - requestOptions?: Scopes.RequestOptions - ): Promise { + public linkedAccountScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linkedAccountScopesRetrieve(requestOptions)); + } + + private async __linkedAccountScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/linked-account-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/linked-account-scopes", ), method: "GET", headers: { @@ -127,8 +150,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -140,13 +163,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -203,14 +229,23 @@ export class Scopes { * }] * }) */ - public async linkedAccountScopesCreate( + public linkedAccountScopesCreate( request: Merge.ats.LinkedAccountCommonModelScopeDeserializerRequest, - requestOptions?: Scopes.RequestOptions - ): Promise { + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linkedAccountScopesCreate(request, requestOptions)); + } + + private async __linkedAccountScopesCreate( + request: Merge.ats.LinkedAccountCommonModelScopeDeserializerRequest, + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/linked-account-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/linked-account-scopes", ), method: "POST", headers: { @@ -221,8 +256,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -237,13 +272,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/scorecards/client/Client.ts b/src/api/resources/ats/resources/scorecards/client/Client.ts index c40b4e4c3..da4f0caec 100644 --- a/src/api/resources/ats/resources/scorecards/client/Client.ts +++ b/src/api/resources/ats/resources/scorecards/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Scorecards { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Scorecards { * @example * await client.ats.scorecards.list() */ - public async list( + public list( request: Merge.ats.ScorecardsListRequest = {}, - requestOptions?: Scorecards.RequestOptions - ): Promise { + requestOptions?: Scorecards.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ats.ScorecardsListRequest = {}, + requestOptions?: Scorecards.RequestOptions, + ): Promise> { const { applicationId, createdAfter, @@ -66,7 +75,7 @@ export class Scorecards { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (applicationId != null) { _queryParams["application_id"] = applicationId; } @@ -84,7 +93,9 @@ export class Scorecards { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ats.ScorecardsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -133,8 +144,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/scorecards", ), method: "GET", headers: { @@ -145,8 +158,8 @@ export class Scorecards { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -159,13 +172,16 @@ export class Scorecards { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedScorecardList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedScorecardList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -200,15 +216,25 @@ export class Scorecards { * @example * await client.ats.scorecards.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ats.ScorecardsRetrieveRequest = {}, - requestOptions?: Scorecards.RequestOptions - ): Promise { + requestOptions?: Scorecards.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ats.ScorecardsRetrieveRequest = {}, + requestOptions?: Scorecards.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ats.ScorecardsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -229,8 +255,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/scorecards/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -241,8 +269,8 @@ export class Scorecards { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -255,13 +283,16 @@ export class Scorecards { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.Scorecard.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.Scorecard.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/scorecards/types/ScorecardsListRequestExpand.ts b/src/api/resources/ats/resources/scorecards/types/ScorecardsListRequestExpand.ts index 2f5ad180b..32e889ef3 100644 --- a/src/api/resources/ats/resources/scorecards/types/ScorecardsListRequestExpand.ts +++ b/src/api/resources/ats/resources/scorecards/types/ScorecardsListRequestExpand.ts @@ -10,7 +10,6 @@ export type ScorecardsListRequestExpand = | "interview" | "interview,interviewer" | "interviewer"; - export const ScorecardsListRequestExpand = { Application: "application", ApplicationInterview: "application,interview", diff --git a/src/api/resources/ats/resources/scorecards/types/ScorecardsRetrieveRequestExpand.ts b/src/api/resources/ats/resources/scorecards/types/ScorecardsRetrieveRequestExpand.ts index 538afc92b..5d0429d50 100644 --- a/src/api/resources/ats/resources/scorecards/types/ScorecardsRetrieveRequestExpand.ts +++ b/src/api/resources/ats/resources/scorecards/types/ScorecardsRetrieveRequestExpand.ts @@ -10,7 +10,6 @@ export type ScorecardsRetrieveRequestExpand = | "interview" | "interview,interviewer" | "interviewer"; - export const ScorecardsRetrieveRequestExpand = { Application: "application", ApplicationInterview: "application,interview", diff --git a/src/api/resources/ats/resources/syncStatus/client/Client.ts b/src/api/resources/ats/resources/syncStatus/client/Client.ts index 63fe9dbfb..40d4e336a 100644 --- a/src/api/resources/ats/resources/syncStatus/client/Client.ts +++ b/src/api/resources/ats/resources/syncStatus/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace SyncStatus { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class SyncStatus { * @example * await client.ats.syncStatus.list() */ - public async list( + public list( request: Merge.ats.SyncStatusListRequest = {}, - requestOptions?: SyncStatus.RequestOptions - ): Promise { + requestOptions?: SyncStatus.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private 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,8 +69,10 @@ export class SyncStatus { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/sync-status" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/sync-status", ), method: "GET", headers: { @@ -72,8 +83,8 @@ export class SyncStatus { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -86,13 +97,16 @@ export class SyncStatus { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedSyncStatusList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedSyncStatusList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/tags/client/Client.ts b/src/api/resources/ats/resources/tags/client/Client.ts index 00e9a8b73..f9bbb7b7b 100644 --- a/src/api/resources/ats/resources/tags/client/Client.ts +++ b/src/api/resources/ats/resources/tags/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Tags { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Tags { * @example * await client.ats.tags.list() */ - public async list( + public list( request: Merge.ats.TagsListRequest = {}, - requestOptions?: Tags.RequestOptions - ): Promise { + requestOptions?: Tags.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ats.TagsListRequest = {}, + requestOptions?: Tags.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -60,7 +69,7 @@ export class Tags { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,8 +112,10 @@ export class Tags { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/tags" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/tags", ), method: "GET", headers: { @@ -115,8 +126,8 @@ export class Tags { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -129,13 +140,16 @@ export class Tags { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedTagList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedTagList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/users/client/Client.ts b/src/api/resources/ats/resources/users/client/Client.ts index a3b027750..78c5da4ae 100644 --- a/src/api/resources/ats/resources/users/client/Client.ts +++ b/src/api/resources/ats/resources/users/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Users { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Users { * @example * await client.ats.users.list() */ - public async list( + public list( request: Merge.ats.UsersListRequest = {}, - requestOptions?: Users.RequestOptions - ): Promise { + requestOptions?: Users.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ats.UsersListRequest = {}, + requestOptions?: Users.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -63,7 +72,7 @@ export class Users { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -118,8 +127,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/users", ), method: "GET", headers: { @@ -130,8 +141,8 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -144,13 +155,16 @@ export class Users { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.PaginatedRemoteUserList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.PaginatedRemoteUserList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -185,13 +199,21 @@ export class Users { * @example * await client.ats.users.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ats.UsersRetrieveRequest = {}, - requestOptions?: Users.RequestOptions - ): Promise { + requestOptions?: Users.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ats.UsersRetrieveRequest = {}, + requestOptions?: Users.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -210,8 +232,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ats/v1/users/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -222,8 +246,8 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -236,13 +260,16 @@ export class Users { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.RemoteUser.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.RemoteUser.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/resources/webhookReceivers/client/Client.ts b/src/api/resources/ats/resources/webhookReceivers/client/Client.ts index a17a0df73..de4933bf3 100644 --- a/src/api/resources/ats/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/ats/resources/webhookReceivers/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace WebhookReceivers { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class WebhookReceivers { * @example * await client.ats.webhookReceivers.list() */ - public async list(requestOptions?: WebhookReceivers.RequestOptions): Promise { + public list( + requestOptions?: WebhookReceivers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(requestOptions)); + } + + private async __list( + requestOptions?: WebhookReceivers.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/webhook-receivers" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/webhook-receivers", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class WebhookReceivers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.webhookReceivers.list.Response.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.webhookReceivers.list.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -114,14 +129,23 @@ export class WebhookReceivers { * isActive: true * }) */ - public async create( + public create( request: Merge.ats.WebhookReceiverRequest, - requestOptions?: WebhookReceivers.RequestOptions - ): Promise { + requestOptions?: WebhookReceivers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ats.WebhookReceiverRequest, + requestOptions?: WebhookReceivers.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ats/v1/webhook-receivers" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ats/v1/webhook-receivers", ), method: "POST", headers: { @@ -132,8 +156,8 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -146,13 +170,16 @@ export class WebhookReceivers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ats.WebhookReceiver.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ats.WebhookReceiver.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ats/types/AccessRoleEnum.ts b/src/api/resources/ats/types/AccessRoleEnum.ts index 8a08abd6e..ded8b7e8c 100644 --- a/src/api/resources/ats/types/AccessRoleEnum.ts +++ b/src/api/resources/ats/types/AccessRoleEnum.ts @@ -10,7 +10,6 @@ * - `INTERVIEWER` - INTERVIEWER */ export type AccessRoleEnum = "SUPER_ADMIN" | "ADMIN" | "TEAM_MEMBER" | "LIMITED_TEAM_MEMBER" | "INTERVIEWER"; - export const AccessRoleEnum = { SuperAdmin: "SUPER_ADMIN", Admin: "ADMIN", diff --git a/src/api/resources/ats/types/AccountDetailsAndActionsStatusEnum.ts b/src/api/resources/ats/types/AccountDetailsAndActionsStatusEnum.ts index 084a62d2f..c0020279f 100644 --- a/src/api/resources/ats/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/api/resources/ats/types/AccountDetailsAndActionsStatusEnum.ts @@ -9,7 +9,6 @@ * - `IDLE` - IDLE */ export type AccountDetailsAndActionsStatusEnum = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; - export const AccountDetailsAndActionsStatusEnum = { Complete: "COMPLETE", Incomplete: "INCOMPLETE", diff --git a/src/api/resources/ats/types/ActivityTypeEnum.ts b/src/api/resources/ats/types/ActivityTypeEnum.ts index b9bf9a452..0cb281631 100644 --- a/src/api/resources/ats/types/ActivityTypeEnum.ts +++ b/src/api/resources/ats/types/ActivityTypeEnum.ts @@ -8,7 +8,6 @@ * - `OTHER` - OTHER */ export type ActivityTypeEnum = "NOTE" | "EMAIL" | "OTHER"; - export const ActivityTypeEnum = { Note: "NOTE", Email: "EMAIL", diff --git a/src/api/resources/ats/types/AttachmentTypeEnum.ts b/src/api/resources/ats/types/AttachmentTypeEnum.ts index 16ecd8229..134385214 100644 --- a/src/api/resources/ats/types/AttachmentTypeEnum.ts +++ b/src/api/resources/ats/types/AttachmentTypeEnum.ts @@ -9,7 +9,6 @@ * - `OTHER` - OTHER */ export type AttachmentTypeEnum = "RESUME" | "COVER_LETTER" | "OFFER_LETTER" | "OTHER"; - export const AttachmentTypeEnum = { Resume: "RESUME", CoverLetter: "COVER_LETTER", diff --git a/src/api/resources/ats/types/CategoriesEnum.ts b/src/api/resources/ats/types/CategoriesEnum.ts index 25eba4836..a5eb57230 100644 --- a/src/api/resources/ats/types/CategoriesEnum.ts +++ b/src/api/resources/ats/types/CategoriesEnum.ts @@ -12,7 +12,6 @@ * - `filestorage` - filestorage */ export type CategoriesEnum = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; - export const CategoriesEnum = { Hris: "hris", Ats: "ats", diff --git a/src/api/resources/ats/types/CategoryEnum.ts b/src/api/resources/ats/types/CategoryEnum.ts index 263fc40b8..6d3d6d6ae 100644 --- a/src/api/resources/ats/types/CategoryEnum.ts +++ b/src/api/resources/ats/types/CategoryEnum.ts @@ -12,7 +12,6 @@ * - `filestorage` - filestorage */ export type CategoryEnum = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; - export const CategoryEnum = { Hris: "hris", Ats: "ats", diff --git a/src/api/resources/ats/types/DisabilityStatusEnum.ts b/src/api/resources/ats/types/DisabilityStatusEnum.ts index 0080fef4b..799df3ff2 100644 --- a/src/api/resources/ats/types/DisabilityStatusEnum.ts +++ b/src/api/resources/ats/types/DisabilityStatusEnum.ts @@ -11,7 +11,6 @@ export type DisabilityStatusEnum = | "YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY" | "NO_I_DONT_HAVE_A_DISABILITY" | "I_DONT_WISH_TO_ANSWER"; - export const DisabilityStatusEnum = { YesIHaveADisabilityOrPreviouslyHadADisability: "YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY", NoIDontHaveADisability: "NO_I_DONT_HAVE_A_DISABILITY", diff --git a/src/api/resources/ats/types/EmailAddressTypeEnum.ts b/src/api/resources/ats/types/EmailAddressTypeEnum.ts index bae187661..46faa5211 100644 --- a/src/api/resources/ats/types/EmailAddressTypeEnum.ts +++ b/src/api/resources/ats/types/EmailAddressTypeEnum.ts @@ -8,7 +8,6 @@ * - `OTHER` - OTHER */ export type EmailAddressTypeEnum = "PERSONAL" | "WORK" | "OTHER"; - export const EmailAddressTypeEnum = { Personal: "PERSONAL", Work: "WORK", diff --git a/src/api/resources/ats/types/EnabledActionsEnum.ts b/src/api/resources/ats/types/EnabledActionsEnum.ts index 73d70210e..24418b130 100644 --- a/src/api/resources/ats/types/EnabledActionsEnum.ts +++ b/src/api/resources/ats/types/EnabledActionsEnum.ts @@ -7,7 +7,6 @@ * - `WRITE` - WRITE */ export type EnabledActionsEnum = "READ" | "WRITE"; - export const EnabledActionsEnum = { Read: "READ", Write: "WRITE", diff --git a/src/api/resources/ats/types/EncodingEnum.ts b/src/api/resources/ats/types/EncodingEnum.ts index 3defec583..a828347f8 100644 --- a/src/api/resources/ats/types/EncodingEnum.ts +++ b/src/api/resources/ats/types/EncodingEnum.ts @@ -8,7 +8,6 @@ * - `GZIP_BASE64` - GZIP_BASE64 */ export type EncodingEnum = "RAW" | "BASE64" | "GZIP_BASE64"; - export const EncodingEnum = { Raw: "RAW", Base64: "BASE64", diff --git a/src/api/resources/ats/types/EventTypeEnum.ts b/src/api/resources/ats/types/EventTypeEnum.ts index eb3218428..08d0f1ce3 100644 --- a/src/api/resources/ats/types/EventTypeEnum.ts +++ b/src/api/resources/ats/types/EventTypeEnum.ts @@ -89,7 +89,6 @@ export type EventTypeEnum = | "DISABLED_MERGE_WEBHOOK" | "MERGE_WEBHOOK_TARGET_CHANGED" | "END_USER_CREDENTIALS_ACCESSED"; - export const EventTypeEnum = { CreatedRemoteProductionApiKey: "CREATED_REMOTE_PRODUCTION_API_KEY", DeletedRemoteProductionApiKey: "DELETED_REMOTE_PRODUCTION_API_KEY", diff --git a/src/api/resources/ats/types/GenderEnum.ts b/src/api/resources/ats/types/GenderEnum.ts index 5e9ed19c3..585c123ed 100644 --- a/src/api/resources/ats/types/GenderEnum.ts +++ b/src/api/resources/ats/types/GenderEnum.ts @@ -10,7 +10,6 @@ * - `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY */ export type GenderEnum = "MALE" | "FEMALE" | "NON-BINARY" | "OTHER" | "DECLINE_TO_SELF_IDENTIFY"; - export const GenderEnum = { Male: "MALE", Female: "FEMALE", diff --git a/src/api/resources/ats/types/IssueStatusEnum.ts b/src/api/resources/ats/types/IssueStatusEnum.ts index 9536a7b6d..56fc6d5fa 100644 --- a/src/api/resources/ats/types/IssueStatusEnum.ts +++ b/src/api/resources/ats/types/IssueStatusEnum.ts @@ -7,7 +7,6 @@ * - `RESOLVED` - RESOLVED */ export type IssueStatusEnum = "ONGOING" | "RESOLVED"; - export const IssueStatusEnum = { Ongoing: "ONGOING", Resolved: "RESOLVED", diff --git a/src/api/resources/ats/types/JobPostingStatusEnum.ts b/src/api/resources/ats/types/JobPostingStatusEnum.ts index bca92d091..22125bb27 100644 --- a/src/api/resources/ats/types/JobPostingStatusEnum.ts +++ b/src/api/resources/ats/types/JobPostingStatusEnum.ts @@ -10,7 +10,6 @@ * - `PENDING` - PENDING */ export type JobPostingStatusEnum = "PUBLISHED" | "CLOSED" | "DRAFT" | "INTERNAL" | "PENDING"; - export const JobPostingStatusEnum = { Published: "PUBLISHED", Closed: "CLOSED", diff --git a/src/api/resources/ats/types/JobStatusEnum.ts b/src/api/resources/ats/types/JobStatusEnum.ts index 858453260..948712113 100644 --- a/src/api/resources/ats/types/JobStatusEnum.ts +++ b/src/api/resources/ats/types/JobStatusEnum.ts @@ -10,7 +10,6 @@ * - `PENDING` - PENDING */ export type JobStatusEnum = "OPEN" | "CLOSED" | "DRAFT" | "ARCHIVED" | "PENDING"; - export const JobStatusEnum = { Open: "OPEN", Closed: "CLOSED", diff --git a/src/api/resources/ats/types/JobTypeEnum.ts b/src/api/resources/ats/types/JobTypeEnum.ts index e213f496f..2629f57d3 100644 --- a/src/api/resources/ats/types/JobTypeEnum.ts +++ b/src/api/resources/ats/types/JobTypeEnum.ts @@ -8,7 +8,6 @@ * - `PROFILE` - PROFILE */ export type JobTypeEnum = "POSTING" | "REQUISITION" | "PROFILE"; - export const JobTypeEnum = { Posting: "POSTING", Requisition: "REQUISITION", diff --git a/src/api/resources/ats/types/LanguageEnum.ts b/src/api/resources/ats/types/LanguageEnum.ts index 92c0e5778..180002115 100644 --- a/src/api/resources/ats/types/LanguageEnum.ts +++ b/src/api/resources/ats/types/LanguageEnum.ts @@ -7,7 +7,6 @@ * - `de` - de */ export type LanguageEnum = "en" | "de"; - export const LanguageEnum = { En: "en", De: "de", diff --git a/src/api/resources/ats/types/LastSyncResultEnum.ts b/src/api/resources/ats/types/LastSyncResultEnum.ts index 2617afd73..e14779ef7 100644 --- a/src/api/resources/ats/types/LastSyncResultEnum.ts +++ b/src/api/resources/ats/types/LastSyncResultEnum.ts @@ -11,7 +11,6 @@ * - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED */ export type LastSyncResultEnum = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; - export const LastSyncResultEnum = { Syncing: "SYNCING", Done: "DONE", diff --git a/src/api/resources/ats/types/MethodEnum.ts b/src/api/resources/ats/types/MethodEnum.ts index 5fb2be8d3..5d8dae516 100644 --- a/src/api/resources/ats/types/MethodEnum.ts +++ b/src/api/resources/ats/types/MethodEnum.ts @@ -12,7 +12,6 @@ * - `DELETE` - DELETE */ export type MethodEnum = "GET" | "OPTIONS" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE"; - export const MethodEnum = { Get: "GET", Options: "OPTIONS", diff --git a/src/api/resources/ats/types/OfferStatusEnum.ts b/src/api/resources/ats/types/OfferStatusEnum.ts index ca265ec86..7190a4f3e 100644 --- a/src/api/resources/ats/types/OfferStatusEnum.ts +++ b/src/api/resources/ats/types/OfferStatusEnum.ts @@ -23,7 +23,6 @@ export type OfferStatusEnum = | "DENIED" | "SIGNED" | "DEPRECATED"; - export const OfferStatusEnum = { Draft: "DRAFT", ApprovalSent: "APPROVAL-SENT", diff --git a/src/api/resources/ats/types/OverallRecommendationEnum.ts b/src/api/resources/ats/types/OverallRecommendationEnum.ts index 3d0b53e35..67db618f9 100644 --- a/src/api/resources/ats/types/OverallRecommendationEnum.ts +++ b/src/api/resources/ats/types/OverallRecommendationEnum.ts @@ -10,7 +10,6 @@ * - `NO_DECISION` - NO_DECISION */ export type OverallRecommendationEnum = "DEFINITELY_NO" | "NO" | "YES" | "STRONG_YES" | "NO_DECISION"; - export const OverallRecommendationEnum = { DefinitelyNo: "DEFINITELY_NO", No: "NO", diff --git a/src/api/resources/ats/types/PhoneNumberTypeEnum.ts b/src/api/resources/ats/types/PhoneNumberTypeEnum.ts index dbd9cd8f6..559d896b5 100644 --- a/src/api/resources/ats/types/PhoneNumberTypeEnum.ts +++ b/src/api/resources/ats/types/PhoneNumberTypeEnum.ts @@ -10,7 +10,6 @@ * - `OTHER` - OTHER */ export type PhoneNumberTypeEnum = "HOME" | "WORK" | "MOBILE" | "SKYPE" | "OTHER"; - export const PhoneNumberTypeEnum = { Home: "HOME", Work: "WORK", diff --git a/src/api/resources/ats/types/RaceEnum.ts b/src/api/resources/ats/types/RaceEnum.ts index 5f94cd93c..eddf2e0c1 100644 --- a/src/api/resources/ats/types/RaceEnum.ts +++ b/src/api/resources/ats/types/RaceEnum.ts @@ -21,7 +21,6 @@ export type RaceEnum = | "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER" | "TWO_OR_MORE_RACES" | "DECLINE_TO_SELF_IDENTIFY"; - export const RaceEnum = { AmericanIndianOrAlaskanNative: "AMERICAN_INDIAN_OR_ALASKAN_NATIVE", Asian: "ASIAN", diff --git a/src/api/resources/ats/types/ReasonEnum.ts b/src/api/resources/ats/types/ReasonEnum.ts index 28995e0a8..6298f17e7 100644 --- a/src/api/resources/ats/types/ReasonEnum.ts +++ b/src/api/resources/ats/types/ReasonEnum.ts @@ -8,7 +8,6 @@ * - `OTHER` - OTHER */ export type ReasonEnum = "GENERAL_CUSTOMER_REQUEST" | "GDPR" | "OTHER"; - export const ReasonEnum = { GeneralCustomerRequest: "GENERAL_CUSTOMER_REQUEST", Gdpr: "GDPR", diff --git a/src/api/resources/ats/types/RequestFormatEnum.ts b/src/api/resources/ats/types/RequestFormatEnum.ts index 4b66af670..6c5f28198 100644 --- a/src/api/resources/ats/types/RequestFormatEnum.ts +++ b/src/api/resources/ats/types/RequestFormatEnum.ts @@ -8,7 +8,6 @@ * - `MULTIPART` - MULTIPART */ export type RequestFormatEnum = "JSON" | "XML" | "MULTIPART"; - export const RequestFormatEnum = { Json: "JSON", Xml: "XML", diff --git a/src/api/resources/ats/types/ResponseTypeEnum.ts b/src/api/resources/ats/types/ResponseTypeEnum.ts index 91a373778..e123001a6 100644 --- a/src/api/resources/ats/types/ResponseTypeEnum.ts +++ b/src/api/resources/ats/types/ResponseTypeEnum.ts @@ -7,7 +7,6 @@ * - `BASE64_GZIP` - BASE64_GZIP */ export type ResponseTypeEnum = "JSON" | "BASE64_GZIP"; - export const ResponseTypeEnum = { Json: "JSON", Base64Gzip: "BASE64_GZIP", diff --git a/src/api/resources/ats/types/RoleEnum.ts b/src/api/resources/ats/types/RoleEnum.ts index 5792757ea..d7b99ac49 100644 --- a/src/api/resources/ats/types/RoleEnum.ts +++ b/src/api/resources/ats/types/RoleEnum.ts @@ -11,7 +11,6 @@ * - `MERGE_TEAM` - MERGE_TEAM */ export type RoleEnum = "ADMIN" | "DEVELOPER" | "MEMBER" | "API" | "SYSTEM" | "MERGE_TEAM"; - export const RoleEnum = { Admin: "ADMIN", Developer: "DEVELOPER", diff --git a/src/api/resources/ats/types/ScheduledInterviewStatusEnum.ts b/src/api/resources/ats/types/ScheduledInterviewStatusEnum.ts index feb139941..166d072e2 100644 --- a/src/api/resources/ats/types/ScheduledInterviewStatusEnum.ts +++ b/src/api/resources/ats/types/ScheduledInterviewStatusEnum.ts @@ -8,7 +8,6 @@ * - `COMPLETE` - COMPLETE */ export type ScheduledInterviewStatusEnum = "SCHEDULED" | "AWAITING_FEEDBACK" | "COMPLETE"; - export const ScheduledInterviewStatusEnum = { Scheduled: "SCHEDULED", AwaitingFeedback: "AWAITING_FEEDBACK", diff --git a/src/api/resources/ats/types/ScreeningQuestionTypeEnum.ts b/src/api/resources/ats/types/ScreeningQuestionTypeEnum.ts index 9a1426d03..8d383be34 100644 --- a/src/api/resources/ats/types/ScreeningQuestionTypeEnum.ts +++ b/src/api/resources/ats/types/ScreeningQuestionTypeEnum.ts @@ -21,7 +21,6 @@ export type ScreeningQuestionTypeEnum = | "MULTI_LINE_TEXT" | "NUMERIC" | "BOOLEAN"; - export const ScreeningQuestionTypeEnum = { Date: "DATE", File: "FILE", diff --git a/src/api/resources/ats/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/api/resources/ats/types/SelectiveSyncConfigurationsUsageEnum.ts index 93a6bf0bf..db8508f89 100644 --- a/src/api/resources/ats/types/SelectiveSyncConfigurationsUsageEnum.ts +++ b/src/api/resources/ats/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -7,7 +7,6 @@ * - `IN_LAST_SYNC` - IN_LAST_SYNC */ export type SelectiveSyncConfigurationsUsageEnum = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; - export const SelectiveSyncConfigurationsUsageEnum = { InNextSync: "IN_NEXT_SYNC", InLastSync: "IN_LAST_SYNC", diff --git a/src/api/resources/ats/types/StatusFd5Enum.ts b/src/api/resources/ats/types/StatusFd5Enum.ts index dfb75bf03..837436325 100644 --- a/src/api/resources/ats/types/StatusFd5Enum.ts +++ b/src/api/resources/ats/types/StatusFd5Enum.ts @@ -11,7 +11,6 @@ * - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED */ export type StatusFd5Enum = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; - export const StatusFd5Enum = { Syncing: "SYNCING", Done: "DONE", diff --git a/src/api/resources/ats/types/UrlTypeEnum.ts b/src/api/resources/ats/types/UrlTypeEnum.ts index 3efb1c676..348577362 100644 --- a/src/api/resources/ats/types/UrlTypeEnum.ts +++ b/src/api/resources/ats/types/UrlTypeEnum.ts @@ -12,7 +12,6 @@ * - `JOB_POSTING` - JOB_POSTING */ export type UrlTypeEnum = "PERSONAL" | "COMPANY" | "PORTFOLIO" | "BLOG" | "SOCIAL_MEDIA" | "OTHER" | "JOB_POSTING"; - export const UrlTypeEnum = { Personal: "PERSONAL", Company: "COMPANY", diff --git a/src/api/resources/ats/types/VeteranStatusEnum.ts b/src/api/resources/ats/types/VeteranStatusEnum.ts index 78df07afc..cf1ee4038 100644 --- a/src/api/resources/ats/types/VeteranStatusEnum.ts +++ b/src/api/resources/ats/types/VeteranStatusEnum.ts @@ -11,7 +11,6 @@ export type VeteranStatusEnum = | "I_AM_NOT_A_PROTECTED_VETERAN" | "I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN" | "I_DONT_WISH_TO_ANSWER"; - export const VeteranStatusEnum = { IAmNotAProtectedVeteran: "I_AM_NOT_A_PROTECTED_VETERAN", IIdentifyAsOneOrMoreOfTheClassificationsOfAProtectedVeteran: diff --git a/src/api/resources/ats/types/VisibilityEnum.ts b/src/api/resources/ats/types/VisibilityEnum.ts index 3bdf239dc..ffecf8757 100644 --- a/src/api/resources/ats/types/VisibilityEnum.ts +++ b/src/api/resources/ats/types/VisibilityEnum.ts @@ -8,7 +8,6 @@ * - `PRIVATE` - PRIVATE */ export type VisibilityEnum = "ADMIN_ONLY" | "PUBLIC" | "PRIVATE"; - export const VisibilityEnum = { AdminOnly: "ADMIN_ONLY", Public: "PUBLIC", diff --git a/src/api/resources/crm/client/Client.ts b/src/api/resources/crm/client/Client.ts index 016202868..e71ff6feb 100644 --- a/src/api/resources/crm/client/Client.ts +++ b/src/api/resources/crm/client/Client.ts @@ -37,213 +37,172 @@ import { Users } from "../resources/users/client/Client"; import { WebhookReceivers } from "../resources/webhookReceivers/client/Client"; export declare namespace Crm { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: 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 Crm { - constructor(protected readonly _options: Crm.Options) {} - protected _accountDetails: AccountDetails | undefined; + protected _accountToken: AccountToken | undefined; + protected _accounts: Accounts | undefined; + protected _asyncPassthrough: AsyncPassthrough | undefined; + protected _auditTrail: AuditTrail | undefined; + protected _availableActions: AvailableActions | undefined; + protected _contacts: Contacts | undefined; + protected _customObjectClasses: CustomObjectClasses | undefined; + protected _associationTypes: AssociationTypes | undefined; + protected _customObjects: CustomObjects | undefined; + protected _associations: Associations | undefined; + protected _scopes: Scopes | undefined; + protected _deleteAccount: DeleteAccount | undefined; + protected _engagementTypes: EngagementTypes | undefined; + protected _engagements: Engagements | undefined; + protected _fieldMapping: FieldMapping | undefined; + protected _generateKey: GenerateKey | undefined; + protected _issues: Issues | undefined; + protected _leads: Leads | undefined; + protected _linkToken: LinkToken | undefined; + protected _linkedAccounts: LinkedAccounts | undefined; + protected _notes: Notes | undefined; + protected _opportunities: Opportunities | undefined; + protected _passthrough: Passthrough | undefined; + protected _regenerateKey: RegenerateKey | undefined; + protected _stages: Stages | undefined; + protected _syncStatus: SyncStatus | undefined; + protected _forceResync: ForceResync | undefined; + protected _tasks: Tasks | undefined; + protected _users: Users | undefined; + protected _webhookReceivers: WebhookReceivers | undefined; + + constructor(protected readonly _options: Crm.Options) {} public get accountDetails(): AccountDetails { return (this._accountDetails ??= new AccountDetails(this._options)); } - protected _accountToken: AccountToken | undefined; - public get accountToken(): AccountToken { return (this._accountToken ??= new AccountToken(this._options)); } - protected _accounts: Accounts | undefined; - public get accounts(): Accounts { return (this._accounts ??= new Accounts(this._options)); } - protected _asyncPassthrough: AsyncPassthrough | undefined; - public get asyncPassthrough(): AsyncPassthrough { return (this._asyncPassthrough ??= new AsyncPassthrough(this._options)); } - protected _auditTrail: AuditTrail | undefined; - public get auditTrail(): AuditTrail { return (this._auditTrail ??= new AuditTrail(this._options)); } - protected _availableActions: AvailableActions | undefined; - public get availableActions(): AvailableActions { return (this._availableActions ??= new AvailableActions(this._options)); } - protected _contacts: Contacts | undefined; - public get contacts(): Contacts { return (this._contacts ??= new Contacts(this._options)); } - protected _customObjectClasses: CustomObjectClasses | undefined; - public get customObjectClasses(): CustomObjectClasses { return (this._customObjectClasses ??= new CustomObjectClasses(this._options)); } - protected _associationTypes: AssociationTypes | undefined; - public get associationTypes(): AssociationTypes { return (this._associationTypes ??= new AssociationTypes(this._options)); } - protected _customObjects: CustomObjects | undefined; - public get customObjects(): CustomObjects { return (this._customObjects ??= new CustomObjects(this._options)); } - protected _associations: Associations | undefined; - public get associations(): Associations { return (this._associations ??= new Associations(this._options)); } - protected _scopes: Scopes | undefined; - public get scopes(): Scopes { return (this._scopes ??= new Scopes(this._options)); } - protected _deleteAccount: DeleteAccount | undefined; - public get deleteAccount(): DeleteAccount { return (this._deleteAccount ??= new DeleteAccount(this._options)); } - protected _engagementTypes: EngagementTypes | undefined; - public get engagementTypes(): EngagementTypes { return (this._engagementTypes ??= new EngagementTypes(this._options)); } - protected _engagements: Engagements | undefined; - public get engagements(): Engagements { return (this._engagements ??= new Engagements(this._options)); } - protected _fieldMapping: FieldMapping | undefined; - public get fieldMapping(): FieldMapping { return (this._fieldMapping ??= new FieldMapping(this._options)); } - protected _generateKey: GenerateKey | undefined; - public get generateKey(): GenerateKey { return (this._generateKey ??= new GenerateKey(this._options)); } - protected _issues: Issues | undefined; - public get issues(): Issues { return (this._issues ??= new Issues(this._options)); } - protected _leads: Leads | undefined; - public get leads(): Leads { return (this._leads ??= new Leads(this._options)); } - protected _linkToken: LinkToken | undefined; - public get linkToken(): LinkToken { return (this._linkToken ??= new LinkToken(this._options)); } - protected _linkedAccounts: LinkedAccounts | undefined; - public get linkedAccounts(): LinkedAccounts { return (this._linkedAccounts ??= new LinkedAccounts(this._options)); } - protected _notes: Notes | undefined; - public get notes(): Notes { return (this._notes ??= new Notes(this._options)); } - protected _opportunities: Opportunities | undefined; - public get opportunities(): Opportunities { return (this._opportunities ??= new Opportunities(this._options)); } - protected _passthrough: Passthrough | undefined; - public get passthrough(): Passthrough { return (this._passthrough ??= new Passthrough(this._options)); } - protected _regenerateKey: RegenerateKey | undefined; - public get regenerateKey(): RegenerateKey { return (this._regenerateKey ??= new RegenerateKey(this._options)); } - protected _stages: Stages | undefined; - public get stages(): Stages { return (this._stages ??= new Stages(this._options)); } - protected _syncStatus: SyncStatus | undefined; - public get syncStatus(): SyncStatus { return (this._syncStatus ??= new SyncStatus(this._options)); } - protected _forceResync: ForceResync | undefined; - public get forceResync(): ForceResync { return (this._forceResync ??= new ForceResync(this._options)); } - protected _tasks: Tasks | undefined; - public get tasks(): Tasks { return (this._tasks ??= new Tasks(this._options)); } - protected _users: Users | undefined; - public get users(): Users { return (this._users ??= new Users(this._options)); } - protected _webhookReceivers: WebhookReceivers | undefined; - public get webhookReceivers(): WebhookReceivers { return (this._webhookReceivers ??= new WebhookReceivers(this._options)); } diff --git a/src/api/resources/crm/resources/accountDetails/client/Client.ts b/src/api/resources/crm/resources/accountDetails/client/Client.ts index ca36be3fe..5ad1b862f 100644 --- a/src/api/resources/crm/resources/accountDetails/client/Client.ts +++ b/src/api/resources/crm/resources/accountDetails/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AccountDetails { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class AccountDetails { * @example * await client.crm.accountDetails.retrieve() */ - public async retrieve(requestOptions?: AccountDetails.RequestOptions): Promise { + public retrieve( + requestOptions?: AccountDetails.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(requestOptions)); + } + + private async __retrieve( + requestOptions?: AccountDetails.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/account-details" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/account-details", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class AccountDetails { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class AccountDetails { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.AccountDetails.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.AccountDetails.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/resources/accountToken/client/Client.ts b/src/api/resources/crm/resources/accountToken/client/Client.ts index 3e03dbf01..6ebf08df0 100644 --- a/src/api/resources/crm/resources/accountToken/client/Client.ts +++ b/src/api/resources/crm/resources/accountToken/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AccountToken { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,14 +46,23 @@ export class AccountToken { * @example * await client.crm.accountToken.retrieve("public_token") */ - public async retrieve( + public retrieve( publicToken: string, - requestOptions?: AccountToken.RequestOptions - ): Promise { + requestOptions?: AccountToken.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(publicToken, requestOptions)); + } + + private async __retrieve( + publicToken: string, + requestOptions?: AccountToken.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/account-token/${encodeURIComponent(publicToken)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/account-token/${encodeURIComponent(publicToken)}`, ), method: "GET", headers: { @@ -62,8 +73,8 @@ export class AccountToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -75,13 +86,16 @@ export class AccountToken { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.AccountToken.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.AccountToken.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -99,7 +113,7 @@ export class AccountToken { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/account-token/{public_token}." + "Timeout exceeded when calling GET /crm/v1/account-token/{public_token}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/accounts/client/Client.ts b/src/api/resources/crm/resources/accounts/client/Client.ts index 0933476ee..c1dadcc39 100644 --- a/src/api/resources/crm/resources/accounts/client/Client.ts +++ b/src/api/resources/crm/resources/accounts/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Accounts { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Accounts { * @example * await client.crm.accounts.list() */ - public async list( + public list( request: Merge.crm.AccountsListRequest = {}, - requestOptions?: Accounts.RequestOptions - ): Promise { + requestOptions?: Accounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.crm.AccountsListRequest = {}, + requestOptions?: Accounts.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -64,7 +73,7 @@ export class Accounts { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -123,8 +132,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/accounts", ), method: "GET", headers: { @@ -135,8 +146,8 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +160,16 @@ export class Accounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedAccountList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedAccountList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -191,12 +205,19 @@ export class Accounts { * model: {} * }) */ - public async create( + public create( request: Merge.crm.CrmAccountEndpointRequest, - requestOptions?: Accounts.RequestOptions - ): Promise { + requestOptions?: Accounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.crm.CrmAccountEndpointRequest, + requestOptions?: Accounts.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -207,8 +228,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/accounts", ), method: "POST", headers: { @@ -219,8 +242,8 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -234,13 +257,16 @@ export class Accounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.CrmAccountResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.CrmAccountResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -275,13 +301,21 @@ export class Accounts { * @example * await client.crm.accounts.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.crm.AccountsRetrieveRequest = {}, - requestOptions?: Accounts.RequestOptions - ): Promise { + requestOptions?: Accounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.crm.AccountsRetrieveRequest = {}, + requestOptions?: Accounts.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeRemoteFields, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -300,8 +334,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/accounts/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -312,8 +348,8 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -326,13 +362,16 @@ export class Accounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.Account.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.Account.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -369,13 +408,21 @@ export class Accounts { * model: {} * }) */ - public async partialUpdate( + public partialUpdate( id: string, request: Merge.crm.PatchedCrmAccountEndpointRequest, - requestOptions?: Accounts.RequestOptions - ): Promise { + requestOptions?: Accounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__partialUpdate(id, request, requestOptions)); + } + + private async __partialUpdate( + id: string, + request: Merge.crm.PatchedCrmAccountEndpointRequest, + requestOptions?: Accounts.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -386,8 +433,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/accounts/${encodeURIComponent(id)}`, ), method: "PATCH", headers: { @@ -398,8 +447,8 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -415,13 +464,16 @@ export class Accounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.CrmAccountResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.CrmAccountResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -455,14 +507,23 @@ export class Accounts { * @example * await client.crm.accounts.metaPatchRetrieve("id") */ - public async metaPatchRetrieve( + public metaPatchRetrieve( id: string, - requestOptions?: Accounts.RequestOptions - ): Promise { + requestOptions?: Accounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPatchRetrieve(id, requestOptions)); + } + + private async __metaPatchRetrieve( + id: string, + requestOptions?: Accounts.RequestOptions, + ): Promise> { 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/accounts/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -473,8 +534,8 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -486,13 +547,16 @@ export class Accounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -510,7 +574,7 @@ export class Accounts { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/accounts/meta/patch/{id}." + "Timeout exceeded when calling GET /crm/v1/accounts/meta/patch/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -527,11 +591,21 @@ export class Accounts { * @example * await client.crm.accounts.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Accounts.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Accounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Accounts.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/accounts/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/accounts/meta/post", ), method: "GET", headers: { @@ -542,8 +616,8 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -555,13 +629,16 @@ export class Accounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -595,10 +672,17 @@ export class Accounts { * @example * await client.crm.accounts.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( request: Merge.crm.AccountsRemoteFieldClassesListRequest = {}, - requestOptions?: Accounts.RequestOptions - ): Promise { + requestOptions?: Accounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( + request: Merge.crm.AccountsRemoteFieldClassesListRequest = {}, + requestOptions?: Accounts.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, @@ -608,7 +692,7 @@ export class Accounts { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -639,8 +723,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/accounts/remote-field-classes", ), method: "GET", headers: { @@ -651,8 +737,8 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -665,13 +751,16 @@ export class Accounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -689,7 +778,7 @@ export class Accounts { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/accounts/remote-field-classes." + "Timeout exceeded when calling GET /crm/v1/accounts/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/associationTypes/client/Client.ts b/src/api/resources/crm/resources/associationTypes/client/Client.ts index 6c861fcd3..e0aac556a 100644 --- a/src/api/resources/crm/resources/associationTypes/client/Client.ts +++ b/src/api/resources/crm/resources/associationTypes/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AssociationTypes { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -45,11 +47,21 @@ export class AssociationTypes { * @example * await client.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id") */ - public async customObjectClassesAssociationTypesList( + public customObjectClassesAssociationTypesList( customObjectClassId: string, request: Merge.crm.CustomObjectClassesAssociationTypesListRequest = {}, - requestOptions?: AssociationTypes.RequestOptions - ): Promise { + requestOptions?: AssociationTypes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__customObjectClassesAssociationTypesList(customObjectClassId, request, requestOptions), + ); + } + + private async __customObjectClassesAssociationTypesList( + customObjectClassId: string, + request: Merge.crm.CustomObjectClassesAssociationTypesListRequest = {}, + requestOptions?: AssociationTypes.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -63,7 +75,7 @@ export class AssociationTypes { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -110,8 +122,10 @@ 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/${encodeURIComponent(customObjectClassId)}/association-types` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/association-types`, ), method: "GET", headers: { @@ -122,8 +136,8 @@ export class AssociationTypes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -136,13 +150,16 @@ export class AssociationTypes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedAssociationTypeList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedAssociationTypeList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -160,7 +177,7 @@ export class AssociationTypes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/association-types." + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/association-types.", ); case "unknown": throw new errors.MergeError({ @@ -191,13 +208,23 @@ export class AssociationTypes { * } * }) */ - public async customObjectClassesAssociationTypesCreate( + public customObjectClassesAssociationTypesCreate( customObjectClassId: string, request: Merge.crm.CrmAssociationTypeEndpointRequest, - requestOptions?: AssociationTypes.RequestOptions - ): Promise { + requestOptions?: AssociationTypes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__customObjectClassesAssociationTypesCreate(customObjectClassId, request, requestOptions), + ); + } + + private async __customObjectClassesAssociationTypesCreate( + customObjectClassId: string, + request: Merge.crm.CrmAssociationTypeEndpointRequest, + requestOptions?: AssociationTypes.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -208,8 +235,10 @@ 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/${encodeURIComponent(customObjectClassId)}/association-types` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/association-types`, ), method: "POST", headers: { @@ -220,8 +249,8 @@ export class AssociationTypes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -237,13 +266,16 @@ export class AssociationTypes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.CrmAssociationTypeResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.CrmAssociationTypeResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -261,7 +293,7 @@ export class AssociationTypes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /crm/v1/custom-object-classes/{custom_object_class_id}/association-types." + "Timeout exceeded when calling POST /crm/v1/custom-object-classes/{custom_object_class_id}/association-types.", ); case "unknown": throw new errors.MergeError({ @@ -281,14 +313,25 @@ export class AssociationTypes { * @example * await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("custom_object_class_id", "id") */ - public async customObjectClassesAssociationTypesRetrieve( + public customObjectClassesAssociationTypesRetrieve( customObjectClassId: string, id: string, request: Merge.crm.CustomObjectClassesAssociationTypesRetrieveRequest = {}, - requestOptions?: AssociationTypes.RequestOptions - ): Promise { + requestOptions?: AssociationTypes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__customObjectClassesAssociationTypesRetrieve(customObjectClassId, id, request, requestOptions), + ); + } + + private async __customObjectClassesAssociationTypesRetrieve( + customObjectClassId: string, + id: string, + request: Merge.crm.CustomObjectClassesAssociationTypesRetrieveRequest = {}, + requestOptions?: AssociationTypes.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -303,10 +346,10 @@ 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/${encodeURIComponent( - customObjectClassId - )}/association-types/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/association-types/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -317,8 +360,8 @@ export class AssociationTypes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -331,13 +374,16 @@ export class AssociationTypes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.AssociationType.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.AssociationType.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -355,7 +401,7 @@ export class AssociationTypes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/{id}." + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -373,14 +419,25 @@ export class AssociationTypes { * @example * await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve("custom_object_class_id") */ - public async customObjectClassesAssociationTypesMetaPostRetrieve( + public customObjectClassesAssociationTypesMetaPostRetrieve( customObjectClassId: string, - requestOptions?: AssociationTypes.RequestOptions - ): Promise { + requestOptions?: AssociationTypes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__customObjectClassesAssociationTypesMetaPostRetrieve(customObjectClassId, requestOptions), + ); + } + + private async __customObjectClassesAssociationTypesMetaPostRetrieve( + customObjectClassId: string, + requestOptions?: AssociationTypes.RequestOptions, + ): Promise> { 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/${encodeURIComponent(customObjectClassId)}/association-types/meta/post` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/association-types/meta/post`, ), method: "GET", headers: { @@ -391,8 +448,8 @@ export class AssociationTypes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -404,13 +461,16 @@ export class AssociationTypes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -428,7 +488,7 @@ export class AssociationTypes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/meta/post." + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/meta/post.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/associations/client/Client.ts b/src/api/resources/crm/resources/associations/client/Client.ts index c5c29b0fd..3c94467ce 100644 --- a/src/api/resources/crm/resources/associations/client/Client.ts +++ b/src/api/resources/crm/resources/associations/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Associations { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -46,12 +48,28 @@ export class Associations { * @example * await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("custom_object_class_id", "object_id") */ - public async customObjectClassesCustomObjectsAssociationsList( + public customObjectClassesCustomObjectsAssociationsList( customObjectClassId: string, objectId: string, request: Merge.crm.CustomObjectClassesCustomObjectsAssociationsListRequest = {}, - requestOptions?: Associations.RequestOptions - ): Promise { + requestOptions?: Associations.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__customObjectClassesCustomObjectsAssociationsList( + customObjectClassId, + objectId, + request, + requestOptions, + ), + ); + } + + private async __customObjectClassesCustomObjectsAssociationsList( + customObjectClassId: string, + objectId: string, + request: Merge.crm.CustomObjectClassesCustomObjectsAssociationsListRequest = {}, + requestOptions?: Associations.RequestOptions, + ): Promise> { const { associationTypeId, createdAfter, @@ -66,7 +84,7 @@ export class Associations { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (associationTypeId != null) { _queryParams["association_type_id"] = associationTypeId; } @@ -117,10 +135,10 @@ 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/${encodeURIComponent( - customObjectClassId - )}/custom-objects/${encodeURIComponent(objectId)}/associations` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/custom-objects/${encodeURIComponent(objectId)}/associations`, ), method: "GET", headers: { @@ -131,8 +149,8 @@ export class Associations { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -145,13 +163,16 @@ export class Associations { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedAssociationList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedAssociationList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -169,7 +190,7 @@ export class Associations { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{object_id}/associations." + "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({ @@ -192,17 +213,39 @@ export class Associations { * @example * await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate("association_type_id", "source_class_id", "source_object_id", "target_class_id", "target_object_id") */ - public async customObjectClassesCustomObjectsAssociationsUpdate( + public customObjectClassesCustomObjectsAssociationsUpdate( associationTypeId: string, sourceClassId: string, sourceObjectId: string, targetClassId: string, targetObjectId: string, request: Merge.crm.CustomObjectClassesCustomObjectsAssociationsUpdateRequest = {}, - requestOptions?: Associations.RequestOptions - ): Promise { + requestOptions?: Associations.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__customObjectClassesCustomObjectsAssociationsUpdate( + associationTypeId, + sourceClassId, + sourceObjectId, + targetClassId, + targetObjectId, + request, + requestOptions, + ), + ); + } + + private async __customObjectClassesCustomObjectsAssociationsUpdate( + associationTypeId: string, + sourceClassId: string, + sourceObjectId: string, + targetClassId: string, + targetObjectId: string, + request: Merge.crm.CustomObjectClassesCustomObjectsAssociationsUpdateRequest = {}, + requestOptions?: Associations.RequestOptions, + ): Promise> { const { isDebugMode, runAsync } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -213,12 +256,10 @@ 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/${encodeURIComponent(sourceClassId)}/custom-objects/${encodeURIComponent( - sourceObjectId - )}/associations/${encodeURIComponent(targetClassId)}/${encodeURIComponent( - targetObjectId - )}/${encodeURIComponent(associationTypeId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/custom-object-classes/${encodeURIComponent(sourceClassId)}/custom-objects/${encodeURIComponent(sourceObjectId)}/associations/${encodeURIComponent(targetClassId)}/${encodeURIComponent(targetObjectId)}/${encodeURIComponent(associationTypeId)}`, ), method: "PUT", headers: { @@ -229,8 +270,8 @@ export class Associations { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -243,13 +284,16 @@ export class Associations { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.Association.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.Association.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -267,7 +311,7 @@ export class Associations { }); case "timeout": 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}." + "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({ diff --git a/src/api/resources/crm/resources/asyncPassthrough/client/Client.ts b/src/api/resources/crm/resources/asyncPassthrough/client/Client.ts index 7b65e017e..490325748 100644 --- a/src/api/resources/crm/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/crm/resources/asyncPassthrough/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace AsyncPassthrough { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -47,14 +49,23 @@ export class AsyncPassthrough { * path: "/scooters" * }) */ - public async create( + public create( request: Merge.crm.DataPassthroughRequest, - requestOptions?: AsyncPassthrough.RequestOptions - ): Promise { + requestOptions?: AsyncPassthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.crm.DataPassthroughRequest, + requestOptions?: AsyncPassthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/async-passthrough" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/async-passthrough", ), method: "POST", headers: { @@ -65,8 +76,8 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -79,13 +90,16 @@ export class AsyncPassthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.AsyncPassthroughReciept.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.AsyncPassthroughReciept.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -119,14 +133,23 @@ export class AsyncPassthrough { * @example * await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id") */ - public async retrieve( + public retrieve( asyncPassthroughReceiptId: string, - requestOptions?: AsyncPassthrough.RequestOptions - ): Promise { + requestOptions?: AsyncPassthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(asyncPassthroughReceiptId, requestOptions)); + } + + private async __retrieve( + asyncPassthroughReceiptId: string, + requestOptions?: AsyncPassthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}`, ), method: "GET", headers: { @@ -137,8 +160,8 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -150,13 +173,16 @@ export class AsyncPassthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -174,7 +200,7 @@ export class AsyncPassthrough { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/async-passthrough/{async_passthrough_receipt_id}." + "Timeout exceeded when calling GET /crm/v1/async-passthrough/{async_passthrough_receipt_id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/auditTrail/client/Client.ts b/src/api/resources/crm/resources/auditTrail/client/Client.ts index 4f165a494..6e181a37d 100644 --- a/src/api/resources/crm/resources/auditTrail/client/Client.ts +++ b/src/api/resources/crm/resources/auditTrail/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AuditTrail { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class AuditTrail { * @example * await client.crm.auditTrail.list() */ - public async list( + public list( request: Merge.crm.AuditTrailListRequest = {}, - requestOptions?: AuditTrail.RequestOptions - ): Promise { + requestOptions?: AuditTrail.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private 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,8 +85,10 @@ export class AuditTrail { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/audit-trail" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/audit-trail", ), method: "GET", headers: { @@ -88,8 +99,8 @@ export class AuditTrail { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -102,13 +113,16 @@ export class AuditTrail { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedAuditLogEventList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedAuditLogEventList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/resources/availableActions/client/Client.ts b/src/api/resources/crm/resources/availableActions/client/Client.ts index 74f316e11..494f05ae5 100644 --- a/src/api/resources/crm/resources/availableActions/client/Client.ts +++ b/src/api/resources/crm/resources/availableActions/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AvailableActions { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class AvailableActions { * @example * await client.crm.availableActions.retrieve() */ - public async retrieve(requestOptions?: AvailableActions.RequestOptions): Promise { + public retrieve( + requestOptions?: AvailableActions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(requestOptions)); + } + + private async __retrieve( + requestOptions?: AvailableActions.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/available-actions" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/available-actions", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class AvailableActions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class AvailableActions { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.AvailableActions.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.AvailableActions.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/resources/contacts/client/Client.ts b/src/api/resources/crm/resources/contacts/client/Client.ts index b146154d2..79feeb9ee 100644 --- a/src/api/resources/crm/resources/contacts/client/Client.ts +++ b/src/api/resources/crm/resources/contacts/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Contacts { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Contacts { * @example * await client.crm.contacts.list() */ - public async list( + public list( + request: Merge.crm.ContactsListRequest = {}, + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.crm.ContactsListRequest = {}, - requestOptions?: Contacts.RequestOptions - ): Promise { + requestOptions?: Contacts.RequestOptions, + ): Promise> { const { accountId, createdAfter, @@ -65,7 +74,7 @@ export class Contacts { phoneNumbers, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountId != null) { _queryParams["account_id"] = accountId; } @@ -87,7 +96,9 @@ export class Contacts { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.crm.ContactsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -128,8 +139,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/contacts", ), method: "GET", headers: { @@ -140,8 +153,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -154,13 +167,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedContactList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedContactList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -196,12 +212,19 @@ export class Contacts { * model: {} * }) */ - public async create( + public create( + request: Merge.crm.CrmContactEndpointRequest, + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.crm.CrmContactEndpointRequest, - requestOptions?: Contacts.RequestOptions - ): Promise { + requestOptions?: Contacts.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -212,8 +235,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/contacts", ), method: "POST", headers: { @@ -224,8 +249,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -239,13 +264,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.CrmContactResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.CrmContactResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -280,15 +308,25 @@ export class Contacts { * @example * await client.crm.contacts.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.crm.ContactsRetrieveRequest = {}, + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.crm.ContactsRetrieveRequest = {}, - requestOptions?: Contacts.RequestOptions - ): Promise { + requestOptions?: Contacts.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeRemoteFields, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.crm.ContactsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -305,8 +343,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/contacts/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -317,8 +357,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -331,13 +371,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.Contact.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.Contact.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -374,13 +417,21 @@ export class Contacts { * model: {} * }) */ - public async partialUpdate( + public partialUpdate( id: string, request: Merge.crm.PatchedCrmContactEndpointRequest, - requestOptions?: Contacts.RequestOptions - ): Promise { + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__partialUpdate(id, request, requestOptions)); + } + + private async __partialUpdate( + id: string, + request: Merge.crm.PatchedCrmContactEndpointRequest, + requestOptions?: Contacts.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -391,8 +442,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/contacts/${encodeURIComponent(id)}`, ), method: "PATCH", headers: { @@ -403,8 +456,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -420,13 +473,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.CrmContactResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.CrmContactResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -463,15 +519,25 @@ export class Contacts { * reason: "GENERAL_CUSTOMER_REQUEST" * }) */ - public async ignoreCreate( + public ignoreCreate( + modelId: string, + request: Merge.crm.IgnoreCommonModelRequest, + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__ignoreCreate(modelId, request, requestOptions)); + } + + private async __ignoreCreate( modelId: string, request: Merge.crm.IgnoreCommonModelRequest, - requestOptions?: Contacts.RequestOptions - ): Promise { + requestOptions?: Contacts.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/contacts/ignore/${encodeURIComponent(modelId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/contacts/ignore/${encodeURIComponent(modelId)}`, ), method: "POST", headers: { @@ -482,8 +548,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -496,7 +562,7 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return { data: undefined, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -514,7 +580,7 @@ export class Contacts { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /crm/v1/contacts/ignore/{model_id}." + "Timeout exceeded when calling POST /crm/v1/contacts/ignore/{model_id}.", ); case "unknown": throw new errors.MergeError({ @@ -532,14 +598,23 @@ export class Contacts { * @example * await client.crm.contacts.metaPatchRetrieve("id") */ - public async metaPatchRetrieve( + public metaPatchRetrieve( id: string, - requestOptions?: Contacts.RequestOptions - ): Promise { + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPatchRetrieve(id, requestOptions)); + } + + private async __metaPatchRetrieve( + id: string, + requestOptions?: Contacts.RequestOptions, + ): Promise> { 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/contacts/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -550,8 +625,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -563,13 +638,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -587,7 +665,7 @@ export class Contacts { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/contacts/meta/patch/{id}." + "Timeout exceeded when calling GET /crm/v1/contacts/meta/patch/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -604,11 +682,21 @@ export class Contacts { * @example * await client.crm.contacts.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Contacts.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Contacts.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/contacts/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/contacts/meta/post", ), method: "GET", headers: { @@ -619,8 +707,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -632,13 +720,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -672,10 +763,17 @@ export class Contacts { * @example * await client.crm.contacts.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( request: Merge.crm.ContactsRemoteFieldClassesListRequest = {}, - requestOptions?: Contacts.RequestOptions - ): Promise { + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( + request: Merge.crm.ContactsRemoteFieldClassesListRequest = {}, + requestOptions?: Contacts.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, @@ -685,7 +783,7 @@ export class Contacts { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -716,8 +814,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/contacts/remote-field-classes", ), method: "GET", headers: { @@ -728,8 +828,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -742,13 +842,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -766,7 +869,7 @@ export class Contacts { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/contacts/remote-field-classes." + "Timeout exceeded when calling GET /crm/v1/contacts/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/contacts/types/ContactsListRequestExpand.ts b/src/api/resources/crm/resources/contacts/types/ContactsListRequestExpand.ts index d4855e98d..1c3094133 100644 --- a/src/api/resources/crm/resources/contacts/types/ContactsListRequestExpand.ts +++ b/src/api/resources/crm/resources/contacts/types/ContactsListRequestExpand.ts @@ -3,7 +3,6 @@ */ export type ContactsListRequestExpand = "account" | "account,owner" | "owner"; - export const ContactsListRequestExpand = { Account: "account", AccountOwner: "account,owner", diff --git a/src/api/resources/crm/resources/contacts/types/ContactsRetrieveRequestExpand.ts b/src/api/resources/crm/resources/contacts/types/ContactsRetrieveRequestExpand.ts index e5d5fc5a7..be883cfbc 100644 --- a/src/api/resources/crm/resources/contacts/types/ContactsRetrieveRequestExpand.ts +++ b/src/api/resources/crm/resources/contacts/types/ContactsRetrieveRequestExpand.ts @@ -3,7 +3,6 @@ */ export type ContactsRetrieveRequestExpand = "account" | "account,owner" | "owner"; - export const ContactsRetrieveRequestExpand = { Account: "account", AccountOwner: "account,owner", diff --git a/src/api/resources/crm/resources/customObjectClasses/client/Client.ts b/src/api/resources/crm/resources/customObjectClasses/client/Client.ts index f10b61937..af8151e1d 100644 --- a/src/api/resources/crm/resources/customObjectClasses/client/Client.ts +++ b/src/api/resources/crm/resources/customObjectClasses/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace CustomObjectClasses { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class CustomObjectClasses { * @example * await client.crm.customObjectClasses.list() */ - public async list( + public list( request: Merge.crm.CustomObjectClassesListRequest = {}, - requestOptions?: CustomObjectClasses.RequestOptions - ): Promise { + requestOptions?: CustomObjectClasses.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.crm.CustomObjectClassesListRequest = {}, + requestOptions?: CustomObjectClasses.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -61,7 +70,7 @@ export class CustomObjectClasses { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,8 +117,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/custom-object-classes", ), method: "GET", headers: { @@ -120,8 +131,8 @@ export class CustomObjectClasses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -134,13 +145,16 @@ export class CustomObjectClasses { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedCustomObjectClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedCustomObjectClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -175,13 +189,21 @@ export class CustomObjectClasses { * @example * await client.crm.customObjectClasses.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.crm.CustomObjectClassesRetrieveRequest = {}, - requestOptions?: CustomObjectClasses.RequestOptions - ): Promise { + requestOptions?: CustomObjectClasses.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.crm.CustomObjectClassesRetrieveRequest = {}, + requestOptions?: CustomObjectClasses.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -196,8 +218,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/custom-object-classes/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -208,8 +232,8 @@ export class CustomObjectClasses { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -222,13 +246,16 @@ export class CustomObjectClasses { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.CustomObjectClass.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.CustomObjectClass.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -246,7 +273,7 @@ export class CustomObjectClasses { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{id}." + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/customObjects/client/Client.ts b/src/api/resources/crm/resources/customObjects/client/Client.ts index a6e91d234..cc9bdf3a6 100644 --- a/src/api/resources/crm/resources/customObjects/client/Client.ts +++ b/src/api/resources/crm/resources/customObjects/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace CustomObjects { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -45,11 +47,21 @@ export class CustomObjects { * @example * await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id") */ - public async customObjectClassesCustomObjectsList( + public customObjectClassesCustomObjectsList( customObjectClassId: string, request: Merge.crm.CustomObjectClassesCustomObjectsListRequest = {}, - requestOptions?: CustomObjects.RequestOptions - ): Promise { + requestOptions?: CustomObjects.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__customObjectClassesCustomObjectsList(customObjectClassId, request, requestOptions), + ); + } + + private async __customObjectClassesCustomObjectsList( + customObjectClassId: string, + request: Merge.crm.CustomObjectClassesCustomObjectsListRequest = {}, + requestOptions?: CustomObjects.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -63,7 +75,7 @@ export class CustomObjects { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -110,8 +122,10 @@ 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/${encodeURIComponent(customObjectClassId)}/custom-objects` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/custom-objects`, ), method: "GET", headers: { @@ -122,8 +136,8 @@ export class CustomObjects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -136,13 +150,16 @@ export class CustomObjects { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedCustomObjectList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedCustomObjectList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -160,7 +177,7 @@ export class CustomObjects { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects." + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects.", ); case "unknown": throw new errors.MergeError({ @@ -185,13 +202,23 @@ export class CustomObjects { * } * }) */ - public async customObjectClassesCustomObjectsCreate( + public customObjectClassesCustomObjectsCreate( + customObjectClassId: string, + request: Merge.crm.CrmCustomObjectEndpointRequest, + requestOptions?: CustomObjects.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__customObjectClassesCustomObjectsCreate(customObjectClassId, request, requestOptions), + ); + } + + private async __customObjectClassesCustomObjectsCreate( customObjectClassId: string, request: Merge.crm.CrmCustomObjectEndpointRequest, - requestOptions?: CustomObjects.RequestOptions - ): Promise { + requestOptions?: CustomObjects.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -202,8 +229,10 @@ 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/${encodeURIComponent(customObjectClassId)}/custom-objects` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/custom-objects`, ), method: "POST", headers: { @@ -214,8 +243,8 @@ export class CustomObjects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -231,13 +260,16 @@ export class CustomObjects { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.CrmCustomObjectResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.CrmCustomObjectResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -255,7 +287,7 @@ export class CustomObjects { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects." + "Timeout exceeded when calling POST /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects.", ); case "unknown": throw new errors.MergeError({ @@ -275,14 +307,25 @@ export class CustomObjects { * @example * await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_object_class_id", "id") */ - public async customObjectClassesCustomObjectsRetrieve( + public customObjectClassesCustomObjectsRetrieve( + customObjectClassId: string, + id: string, + request: Merge.crm.CustomObjectClassesCustomObjectsRetrieveRequest = {}, + requestOptions?: CustomObjects.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__customObjectClassesCustomObjectsRetrieve(customObjectClassId, id, request, requestOptions), + ); + } + + private async __customObjectClassesCustomObjectsRetrieve( customObjectClassId: string, id: string, request: Merge.crm.CustomObjectClassesCustomObjectsRetrieveRequest = {}, - requestOptions?: CustomObjects.RequestOptions - ): Promise { + requestOptions?: CustomObjects.RequestOptions, + ): Promise> { const { includeRemoteData, includeRemoteFields, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -297,10 +340,10 @@ 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/${encodeURIComponent( - customObjectClassId - )}/custom-objects/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/custom-objects/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -311,8 +354,8 @@ export class CustomObjects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -325,13 +368,16 @@ export class CustomObjects { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.CustomObject.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.CustomObject.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -349,7 +395,7 @@ export class CustomObjects { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id}." + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -367,14 +413,25 @@ export class CustomObjects { * @example * await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve("custom_object_class_id") */ - public async customObjectClassesCustomObjectsMetaPostRetrieve( + public customObjectClassesCustomObjectsMetaPostRetrieve( + customObjectClassId: string, + requestOptions?: CustomObjects.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__customObjectClassesCustomObjectsMetaPostRetrieve(customObjectClassId, requestOptions), + ); + } + + private async __customObjectClassesCustomObjectsMetaPostRetrieve( customObjectClassId: string, - requestOptions?: CustomObjects.RequestOptions - ): Promise { + requestOptions?: CustomObjects.RequestOptions, + ): Promise> { 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/${encodeURIComponent(customObjectClassId)}/custom-objects/meta/post` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/custom-object-classes/${encodeURIComponent(customObjectClassId)}/custom-objects/meta/post`, ), method: "GET", headers: { @@ -385,8 +442,8 @@ export class CustomObjects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -398,13 +455,16 @@ export class CustomObjects { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -422,7 +482,7 @@ export class CustomObjects { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/post." + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/post.", ); case "unknown": throw new errors.MergeError({ @@ -440,10 +500,19 @@ export class CustomObjects { * @example * await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList() */ - public async customObjectClassesCustomObjectsRemoteFieldClassesList( + public customObjectClassesCustomObjectsRemoteFieldClassesList( + request: Merge.crm.CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest = {}, + requestOptions?: CustomObjects.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__customObjectClassesCustomObjectsRemoteFieldClassesList(request, requestOptions), + ); + } + + private async __customObjectClassesCustomObjectsRemoteFieldClassesList( request: Merge.crm.CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest = {}, - requestOptions?: CustomObjects.RequestOptions - ): Promise { + requestOptions?: CustomObjects.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, @@ -453,7 +522,7 @@ export class CustomObjects { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -484,8 +553,10 @@ 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/custom-objects/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/custom-object-classes/custom-objects/remote-field-classes", ), method: "GET", headers: { @@ -496,8 +567,8 @@ export class CustomObjects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -510,13 +581,16 @@ export class CustomObjects { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -534,7 +608,7 @@ export class CustomObjects { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/custom-object-classes/custom-objects/remote-field-classes." + "Timeout exceeded when calling GET /crm/v1/custom-object-classes/custom-objects/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/deleteAccount/client/Client.ts b/src/api/resources/crm/resources/deleteAccount/client/Client.ts index b0e23af69..f8565d60c 100644 --- a/src/api/resources/crm/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/crm/resources/deleteAccount/client/Client.ts @@ -8,15 +8,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace DeleteAccount { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -41,11 +43,17 @@ export class DeleteAccount { * @example * await client.crm.deleteAccount.delete() */ - public async delete(requestOptions?: DeleteAccount.RequestOptions): Promise { + public delete(requestOptions?: DeleteAccount.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(requestOptions)); + } + + private async __delete(requestOptions?: DeleteAccount.RequestOptions): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/delete-account" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/delete-account", ), method: "POST", headers: { @@ -56,8 +64,8 @@ export class DeleteAccount { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -69,7 +77,7 @@ export class DeleteAccount { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return { data: undefined, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/resources/engagementTypes/client/Client.ts b/src/api/resources/crm/resources/engagementTypes/client/Client.ts index c79947ee6..93f774947 100644 --- a/src/api/resources/crm/resources/engagementTypes/client/Client.ts +++ b/src/api/resources/crm/resources/engagementTypes/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace EngagementTypes { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class EngagementTypes { * @example * await client.crm.engagementTypes.list() */ - public async list( + public list( request: Merge.crm.EngagementTypesListRequest = {}, - requestOptions?: EngagementTypes.RequestOptions - ): Promise { + requestOptions?: EngagementTypes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.crm.EngagementTypesListRequest = {}, + requestOptions?: EngagementTypes.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -61,7 +70,7 @@ export class EngagementTypes { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,8 +117,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/engagement-types", ), method: "GET", headers: { @@ -120,8 +131,8 @@ export class EngagementTypes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -134,13 +145,16 @@ export class EngagementTypes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedEngagementTypeList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedEngagementTypeList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -175,13 +189,21 @@ export class EngagementTypes { * @example * await client.crm.engagementTypes.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.crm.EngagementTypesRetrieveRequest = {}, - requestOptions?: EngagementTypes.RequestOptions - ): Promise { + requestOptions?: EngagementTypes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.crm.EngagementTypesRetrieveRequest = {}, + requestOptions?: EngagementTypes.RequestOptions, + ): Promise> { const { includeRemoteData, includeRemoteFields, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -196,8 +218,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/engagement-types/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -208,8 +232,8 @@ export class EngagementTypes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -222,13 +246,16 @@ export class EngagementTypes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.EngagementType.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.EngagementType.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -262,10 +289,17 @@ export class EngagementTypes { * @example * await client.crm.engagementTypes.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( + request: Merge.crm.EngagementTypesRemoteFieldClassesListRequest = {}, + requestOptions?: EngagementTypes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( request: Merge.crm.EngagementTypesRemoteFieldClassesListRequest = {}, - requestOptions?: EngagementTypes.RequestOptions - ): Promise { + requestOptions?: EngagementTypes.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, @@ -275,7 +309,7 @@ export class EngagementTypes { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -306,8 +340,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/engagement-types/remote-field-classes", ), method: "GET", headers: { @@ -318,8 +354,8 @@ export class EngagementTypes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -332,13 +368,16 @@ export class EngagementTypes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -356,7 +395,7 @@ export class EngagementTypes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/engagement-types/remote-field-classes." + "Timeout exceeded when calling GET /crm/v1/engagement-types/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/engagements/client/Client.ts b/src/api/resources/crm/resources/engagements/client/Client.ts index 9b57a0c1b..d4f31589d 100644 --- a/src/api/resources/crm/resources/engagements/client/Client.ts +++ b/src/api/resources/crm/resources/engagements/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Engagements { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Engagements { * @example * await client.crm.engagements.list() */ - public async list( + public list( + request: Merge.crm.EngagementsListRequest = {}, + requestOptions?: Engagements.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.crm.EngagementsListRequest = {}, - requestOptions?: Engagements.RequestOptions - ): Promise { + requestOptions?: Engagements.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -64,7 +73,7 @@ export class Engagements { startedAfter, startedBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -78,7 +87,9 @@ export class Engagements { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.crm.EngagementsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -123,8 +134,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/engagements", ), method: "GET", headers: { @@ -135,8 +148,8 @@ export class Engagements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +162,16 @@ export class Engagements { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedEngagementList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedEngagementList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -191,12 +207,19 @@ export class Engagements { * model: {} * }) */ - public async create( + public create( + request: Merge.crm.EngagementEndpointRequest, + requestOptions?: Engagements.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.crm.EngagementEndpointRequest, - requestOptions?: Engagements.RequestOptions - ): Promise { + requestOptions?: Engagements.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -207,8 +230,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/engagements", ), method: "POST", headers: { @@ -219,8 +244,8 @@ export class Engagements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -234,13 +259,16 @@ export class Engagements { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.EngagementResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.EngagementResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -275,15 +303,25 @@ export class Engagements { * @example * await client.crm.engagements.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.crm.EngagementsRetrieveRequest = {}, - requestOptions?: Engagements.RequestOptions - ): Promise { + requestOptions?: Engagements.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.crm.EngagementsRetrieveRequest = {}, + requestOptions?: Engagements.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeRemoteFields, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.crm.EngagementsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -300,8 +338,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/engagements/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -312,8 +352,8 @@ export class Engagements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -326,13 +366,16 @@ export class Engagements { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.Engagement.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.Engagement.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -369,13 +412,21 @@ export class Engagements { * model: {} * }) */ - public async partialUpdate( + public partialUpdate( + id: string, + request: Merge.crm.PatchedEngagementEndpointRequest, + requestOptions?: Engagements.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__partialUpdate(id, request, requestOptions)); + } + + private async __partialUpdate( id: string, request: Merge.crm.PatchedEngagementEndpointRequest, - requestOptions?: Engagements.RequestOptions - ): Promise { + requestOptions?: Engagements.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -386,8 +437,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/engagements/${encodeURIComponent(id)}`, ), method: "PATCH", headers: { @@ -398,8 +451,8 @@ export class Engagements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -415,13 +468,16 @@ export class Engagements { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.EngagementResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.EngagementResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -455,14 +511,23 @@ export class Engagements { * @example * await client.crm.engagements.metaPatchRetrieve("id") */ - public async metaPatchRetrieve( + public metaPatchRetrieve( + id: string, + requestOptions?: Engagements.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPatchRetrieve(id, requestOptions)); + } + + private async __metaPatchRetrieve( id: string, - requestOptions?: Engagements.RequestOptions - ): Promise { + requestOptions?: Engagements.RequestOptions, + ): Promise> { 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/engagements/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -473,8 +538,8 @@ export class Engagements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -486,13 +551,16 @@ export class Engagements { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -510,7 +578,7 @@ export class Engagements { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/engagements/meta/patch/{id}." + "Timeout exceeded when calling GET /crm/v1/engagements/meta/patch/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -527,11 +595,21 @@ export class Engagements { * @example * await client.crm.engagements.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Engagements.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Engagements.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Engagements.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/engagements/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/engagements/meta/post", ), method: "GET", headers: { @@ -542,8 +620,8 @@ export class Engagements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -555,13 +633,16 @@ export class Engagements { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -595,10 +676,17 @@ export class Engagements { * @example * await client.crm.engagements.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( request: Merge.crm.EngagementsRemoteFieldClassesListRequest = {}, - requestOptions?: Engagements.RequestOptions - ): Promise { + requestOptions?: Engagements.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( + request: Merge.crm.EngagementsRemoteFieldClassesListRequest = {}, + requestOptions?: Engagements.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, @@ -608,7 +696,7 @@ export class Engagements { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -639,8 +727,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/engagements/remote-field-classes", ), method: "GET", headers: { @@ -651,8 +741,8 @@ export class Engagements { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -665,13 +755,16 @@ export class Engagements { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -689,7 +782,7 @@ export class Engagements { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/engagements/remote-field-classes." + "Timeout exceeded when calling GET /crm/v1/engagements/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/engagements/types/EngagementsListRequestExpand.ts b/src/api/resources/crm/resources/engagements/types/EngagementsListRequestExpand.ts index 3fd98c5c6..1ae0bc27d 100644 --- a/src/api/resources/crm/resources/engagements/types/EngagementsListRequestExpand.ts +++ b/src/api/resources/crm/resources/engagements/types/EngagementsListRequestExpand.ts @@ -18,7 +18,6 @@ export type EngagementsListRequestExpand = | "owner,account" | "owner,account,engagement_type" | "owner,engagement_type"; - export const EngagementsListRequestExpand = { Account: "account", AccountEngagementType: "account,engagement_type", diff --git a/src/api/resources/crm/resources/engagements/types/EngagementsRetrieveRequestExpand.ts b/src/api/resources/crm/resources/engagements/types/EngagementsRetrieveRequestExpand.ts index 7449e53cd..a005227f9 100644 --- a/src/api/resources/crm/resources/engagements/types/EngagementsRetrieveRequestExpand.ts +++ b/src/api/resources/crm/resources/engagements/types/EngagementsRetrieveRequestExpand.ts @@ -18,7 +18,6 @@ export type EngagementsRetrieveRequestExpand = | "owner,account" | "owner,account,engagement_type" | "owner,engagement_type"; - export const EngagementsRetrieveRequestExpand = { Account: "account", AccountEngagementType: "account,engagement_type", diff --git a/src/api/resources/crm/resources/fieldMapping/client/Client.ts b/src/api/resources/crm/resources/fieldMapping/client/Client.ts index cb628e3af..27cc091f8 100644 --- a/src/api/resources/crm/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/crm/resources/fieldMapping/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace FieldMapping { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,20 +46,29 @@ export class FieldMapping { * @example * await client.crm.fieldMapping.fieldMappingsRetrieve() */ - public async fieldMappingsRetrieve( + public fieldMappingsRetrieve( request: Merge.crm.FieldMappingsRetrieveRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsRetrieve(request, requestOptions)); + } + + private async __fieldMappingsRetrieve( + request: Merge.crm.FieldMappingsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { excludeRemoteFieldMetadata } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (excludeRemoteFieldMetadata != null) { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/field-mappings" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/field-mappings", ), method: "GET", headers: { @@ -68,8 +79,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -82,13 +93,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -129,20 +143,29 @@ export class FieldMapping { * commonModelName: "ExampleCommonModel" * }) */ - public async fieldMappingsCreate( + public fieldMappingsCreate( + request: Merge.crm.CreateFieldMappingRequest, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsCreate(request, requestOptions)); + } + + private async __fieldMappingsCreate( request: Merge.crm.CreateFieldMappingRequest, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { excludeRemoteFieldMetadata, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (excludeRemoteFieldMetadata != null) { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/field-mappings" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/field-mappings", ), method: "POST", headers: { @@ -153,8 +176,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -168,13 +191,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -208,14 +234,23 @@ export class FieldMapping { * @example * await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id") */ - public async fieldMappingsDestroy( + public fieldMappingsDestroy( + fieldMappingId: string, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsDestroy(fieldMappingId, requestOptions)); + } + + private async __fieldMappingsDestroy( fieldMappingId: string, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "DELETE", headers: { @@ -226,8 +261,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -239,13 +274,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -263,7 +301,7 @@ export class FieldMapping { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling DELETE /crm/v1/field-mappings/{field_mapping_id}." + "Timeout exceeded when calling DELETE /crm/v1/field-mappings/{field_mapping_id}.", ); case "unknown": throw new errors.MergeError({ @@ -282,15 +320,27 @@ export class FieldMapping { * @example * await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id") */ - public async fieldMappingsPartialUpdate( + public fieldMappingsPartialUpdate( fieldMappingId: string, request: Merge.crm.PatchedEditFieldMappingRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__fieldMappingsPartialUpdate(fieldMappingId, request, requestOptions), + ); + } + + private async __fieldMappingsPartialUpdate( + fieldMappingId: string, + request: Merge.crm.PatchedEditFieldMappingRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "PATCH", headers: { @@ -301,8 +351,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -317,13 +367,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -341,7 +394,7 @@ export class FieldMapping { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling PATCH /crm/v1/field-mappings/{field_mapping_id}." + "Timeout exceeded when calling PATCH /crm/v1/field-mappings/{field_mapping_id}.", ); case "unknown": throw new errors.MergeError({ @@ -359,12 +412,19 @@ export class FieldMapping { * @example * await client.crm.fieldMapping.remoteFieldsRetrieve() */ - public async remoteFieldsRetrieve( + public remoteFieldsRetrieve( + request: Merge.crm.RemoteFieldsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldsRetrieve(request, requestOptions)); + } + + private async __remoteFieldsRetrieve( request: Merge.crm.RemoteFieldsRetrieveRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { commonModels, includeExampleValues } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (commonModels != null) { _queryParams["common_models"] = commonModels; } @@ -375,8 +435,10 @@ 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/remote-fields" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/remote-fields", ), method: "GET", headers: { @@ -387,8 +449,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -401,13 +463,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.RemoteFieldApiResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.RemoteFieldApiResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -440,13 +505,21 @@ export class FieldMapping { * @example * await client.crm.fieldMapping.targetFieldsRetrieve() */ - public async targetFieldsRetrieve( - requestOptions?: FieldMapping.RequestOptions - ): Promise { + public targetFieldsRetrieve( + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__targetFieldsRetrieve(requestOptions)); + } + + private async __targetFieldsRetrieve( + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/target-fields" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/target-fields", ), method: "GET", headers: { @@ -457,8 +530,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -470,13 +543,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/resources/forceResync/client/Client.ts b/src/api/resources/crm/resources/forceResync/client/Client.ts index 0fe916e88..a2b7a6abd 100644 --- a/src/api/resources/crm/resources/forceResync/client/Client.ts +++ b/src/api/resources/crm/resources/forceResync/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace ForceResync { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class ForceResync { * @example * await client.crm.forceResync.syncStatusResyncCreate() */ - public async syncStatusResyncCreate(requestOptions?: ForceResync.RequestOptions): Promise { + public syncStatusResyncCreate( + requestOptions?: ForceResync.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__syncStatusResyncCreate(requestOptions)); + } + + private async __syncStatusResyncCreate( + requestOptions?: ForceResync.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/sync-status/resync" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/sync-status/resync", ), method: "POST", headers: { @@ -58,8 +70,8 @@ export class ForceResync { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class ForceResync { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/resources/generateKey/client/Client.ts b/src/api/resources/crm/resources/generateKey/client/Client.ts index ec2b54d59..ec91da776 100644 --- a/src/api/resources/crm/resources/generateKey/client/Client.ts +++ b/src/api/resources/crm/resources/generateKey/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace GenerateKey { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -46,14 +48,23 @@ export class GenerateKey { * name: "Remote Deployment Key 1" * }) */ - public async create( + public create( request: Merge.crm.GenerateRemoteKeyRequest, - requestOptions?: GenerateKey.RequestOptions - ): Promise { + requestOptions?: GenerateKey.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.crm.GenerateRemoteKeyRequest, + requestOptions?: GenerateKey.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/generate-key" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/generate-key", ), method: "POST", headers: { @@ -64,8 +75,8 @@ export class GenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -78,13 +89,16 @@ export class GenerateKey { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.RemoteKey.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.RemoteKey.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/resources/issues/client/Client.ts b/src/api/resources/crm/resources/issues/client/Client.ts index d9edb7806..b667482df 100644 --- a/src/api/resources/crm/resources/issues/client/Client.ts +++ b/src/api/resources/crm/resources/issues/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Issues { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Issues { * @example * await client.crm.issues.list() */ - public async list( + public list( + request: Merge.crm.IssuesListRequest = {}, + requestOptions?: Issues.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.crm.IssuesListRequest = {}, - requestOptions?: Issues.RequestOptions - ): Promise { + requestOptions?: Issues.RequestOptions, + ): Promise> { const { accountToken, cursor, @@ -64,7 +73,7 @@ export class Issues { startDate, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountToken != null) { _queryParams["account_token"] = accountToken; } @@ -118,13 +127,17 @@ export class Issues { } if (status != null) { - _queryParams["status"] = status; + _queryParams["status"] = serializers.crm.IssuesListRequestStatus.jsonOrThrow(status, { + unrecognizedObjectKeys: "strip", + }); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/issues" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/issues", ), method: "GET", headers: { @@ -135,8 +148,8 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +162,16 @@ export class Issues { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedIssueList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedIssueList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -189,11 +205,20 @@ export class Issues { * @example * await client.crm.issues.retrieve("id") */ - public async retrieve(id: string, requestOptions?: Issues.RequestOptions): Promise { + public retrieve(id: string, requestOptions?: Issues.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, requestOptions)); + } + + private 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/issues/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -204,8 +229,8 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -217,13 +242,16 @@ export class Issues { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.Issue.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.Issue.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/resources/issues/types/IssuesListRequestStatus.ts b/src/api/resources/crm/resources/issues/types/IssuesListRequestStatus.ts index b2d4f1b76..a35e3e193 100644 --- a/src/api/resources/crm/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/api/resources/crm/resources/issues/types/IssuesListRequestStatus.ts @@ -3,7 +3,6 @@ */ export type IssuesListRequestStatus = "ONGOING" | "RESOLVED"; - export const IssuesListRequestStatus = { Ongoing: "ONGOING", Resolved: "RESOLVED", diff --git a/src/api/resources/crm/resources/leads/client/Client.ts b/src/api/resources/crm/resources/leads/client/Client.ts index c0610653e..03e1ee9a9 100644 --- a/src/api/resources/crm/resources/leads/client/Client.ts +++ b/src/api/resources/crm/resources/leads/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Leads { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Leads { * @example * await client.crm.leads.list() */ - public async list( + public list( + request: Merge.crm.LeadsListRequest = {}, + requestOptions?: Leads.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.crm.LeadsListRequest = {}, - requestOptions?: Leads.RequestOptions - ): Promise { + requestOptions?: Leads.RequestOptions, + ): Promise> { const { convertedAccountId, convertedContactId, @@ -67,7 +76,7 @@ export class Leads { phoneNumbers, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (convertedAccountId != null) { _queryParams["converted_account_id"] = convertedAccountId; } @@ -93,7 +102,9 @@ export class Leads { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.crm.LeadsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -138,8 +149,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/leads", ), method: "GET", headers: { @@ -150,8 +163,8 @@ export class Leads { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -164,13 +177,16 @@ export class Leads { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedLeadList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedLeadList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -206,12 +222,19 @@ export class Leads { * model: {} * }) */ - public async create( + public create( + request: Merge.crm.LeadEndpointRequest, + requestOptions?: Leads.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.crm.LeadEndpointRequest, - requestOptions?: Leads.RequestOptions - ): Promise { + requestOptions?: Leads.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -222,8 +245,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/leads", ), method: "POST", headers: { @@ -234,8 +259,8 @@ export class Leads { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -249,13 +274,16 @@ export class Leads { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.LeadResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.LeadResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -290,15 +318,25 @@ export class Leads { * @example * await client.crm.leads.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.crm.LeadsRetrieveRequest = {}, + requestOptions?: Leads.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.crm.LeadsRetrieveRequest = {}, - requestOptions?: Leads.RequestOptions - ): Promise { + requestOptions?: Leads.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeRemoteFields, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.crm.LeadsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -315,8 +353,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/leads/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -327,8 +367,8 @@ export class Leads { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -341,13 +381,16 @@ export class Leads { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.Lead.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.Lead.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -380,11 +423,19 @@ export class Leads { * @example * await client.crm.leads.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Leads.RequestOptions): Promise { + public metaPostRetrieve(requestOptions?: Leads.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Leads.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/leads/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/leads/meta/post", ), method: "GET", headers: { @@ -395,8 +446,8 @@ export class Leads { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -408,13 +459,16 @@ export class Leads { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -448,10 +502,17 @@ export class Leads { * @example * await client.crm.leads.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( + request: Merge.crm.LeadsRemoteFieldClassesListRequest = {}, + requestOptions?: Leads.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( request: Merge.crm.LeadsRemoteFieldClassesListRequest = {}, - requestOptions?: Leads.RequestOptions - ): Promise { + requestOptions?: Leads.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, @@ -461,7 +522,7 @@ export class Leads { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -492,8 +553,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/leads/remote-field-classes", ), method: "GET", headers: { @@ -504,8 +567,8 @@ export class Leads { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -518,13 +581,16 @@ export class Leads { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -542,7 +608,7 @@ export class Leads { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/leads/remote-field-classes." + "Timeout exceeded when calling GET /crm/v1/leads/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/leads/types/LeadsListRequestExpand.ts b/src/api/resources/crm/resources/leads/types/LeadsListRequestExpand.ts index 33acdb622..97bcf246b 100644 --- a/src/api/resources/crm/resources/leads/types/LeadsListRequestExpand.ts +++ b/src/api/resources/crm/resources/leads/types/LeadsListRequestExpand.ts @@ -10,7 +10,6 @@ export type LeadsListRequestExpand = | "owner,converted_account" | "owner,converted_contact" | "owner,converted_contact,converted_account"; - export const LeadsListRequestExpand = { ConvertedAccount: "converted_account", ConvertedContact: "converted_contact", diff --git a/src/api/resources/crm/resources/leads/types/LeadsRetrieveRequestExpand.ts b/src/api/resources/crm/resources/leads/types/LeadsRetrieveRequestExpand.ts index 4d0d99b3b..5119fe77a 100644 --- a/src/api/resources/crm/resources/leads/types/LeadsRetrieveRequestExpand.ts +++ b/src/api/resources/crm/resources/leads/types/LeadsRetrieveRequestExpand.ts @@ -10,7 +10,6 @@ export type LeadsRetrieveRequestExpand = | "owner,converted_account" | "owner,converted_contact" | "owner,converted_contact,converted_account"; - export const LeadsRetrieveRequestExpand = { ConvertedAccount: "converted_account", ConvertedContact: "converted_contact", diff --git a/src/api/resources/crm/resources/linkToken/client/Client.ts b/src/api/resources/crm/resources/linkToken/client/Client.ts index df179f6be..1221badba 100644 --- a/src/api/resources/crm/resources/linkToken/client/Client.ts +++ b/src/api/resources/crm/resources/linkToken/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace LinkToken { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -49,14 +51,23 @@ export class LinkToken { * categories: ["hris", "ats"] * }) */ - public async create( + public create( request: Merge.crm.EndUserDetailsRequest, - requestOptions?: LinkToken.RequestOptions - ): Promise { + requestOptions?: LinkToken.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.crm.EndUserDetailsRequest, + requestOptions?: LinkToken.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/link-token" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/link-token", ), method: "POST", headers: { @@ -67,8 +78,8 @@ export class LinkToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -81,13 +92,16 @@ export class LinkToken { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.LinkToken.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.LinkToken.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/resources/linkedAccounts/client/Client.ts b/src/api/resources/crm/resources/linkedAccounts/client/Client.ts index 203a4a686..cbc2e00d9 100644 --- a/src/api/resources/crm/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/crm/resources/linkedAccounts/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace LinkedAccounts { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class LinkedAccounts { * @example * await client.crm.linkedAccounts.list() */ - public async list( + public list( request: Merge.crm.LinkedAccountsListRequest = {}, - requestOptions?: LinkedAccounts.RequestOptions - ): Promise { + requestOptions?: LinkedAccounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.crm.LinkedAccountsListRequest = {}, + requestOptions?: LinkedAccounts.RequestOptions, + ): Promise> { const { category, cursor, @@ -63,9 +72,11 @@ export class LinkedAccounts { pageSize, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (category != null) { - _queryParams["category"] = category; + _queryParams["category"] = serializers.crm.LinkedAccountsListRequestCategory.jsonOrThrow(category, { + unrecognizedObjectKeys: "strip", + }); } if (cursor != null) { @@ -118,8 +129,10 @@ export class LinkedAccounts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/linked-accounts" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/linked-accounts", ), method: "GET", headers: { @@ -130,8 +143,8 @@ export class LinkedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -144,13 +157,16 @@ export class LinkedAccounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/api/resources/crm/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index edeb3e1d1..7474691d1 100644 --- a/src/api/resources/crm/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/api/resources/crm/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -10,7 +10,6 @@ export type LinkedAccountsListRequestCategory = | "hris" | "mktg" | "ticketing"; - export const LinkedAccountsListRequestCategory = { Accounting: "accounting", Ats: "ats", diff --git a/src/api/resources/crm/resources/notes/client/Client.ts b/src/api/resources/crm/resources/notes/client/Client.ts index 656ec36c8..1312eb90e 100644 --- a/src/api/resources/crm/resources/notes/client/Client.ts +++ b/src/api/resources/crm/resources/notes/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Notes { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Notes { * @example * await client.crm.notes.list() */ - public async list( + public list( + request: Merge.crm.NotesListRequest = {}, + requestOptions?: Notes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.crm.NotesListRequest = {}, - requestOptions?: Notes.RequestOptions - ): Promise { + requestOptions?: Notes.RequestOptions, + ): Promise> { const { accountId, contactId, @@ -66,7 +75,7 @@ export class Notes { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountId != null) { _queryParams["account_id"] = accountId; } @@ -88,7 +97,9 @@ export class Notes { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.crm.NotesListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -133,8 +144,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/notes", ), method: "GET", headers: { @@ -145,8 +158,8 @@ export class Notes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -159,13 +172,16 @@ export class Notes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedNoteList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedNoteList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -201,12 +217,19 @@ export class Notes { * model: {} * }) */ - public async create( + public create( + request: Merge.crm.NoteEndpointRequest, + requestOptions?: Notes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.crm.NoteEndpointRequest, - requestOptions?: Notes.RequestOptions - ): Promise { + requestOptions?: Notes.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -217,8 +240,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/notes", ), method: "POST", headers: { @@ -229,8 +254,8 @@ export class Notes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -244,13 +269,16 @@ export class Notes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.NoteResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.NoteResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -285,15 +313,25 @@ export class Notes { * @example * await client.crm.notes.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.crm.NotesRetrieveRequest = {}, + requestOptions?: Notes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.crm.NotesRetrieveRequest = {}, - requestOptions?: Notes.RequestOptions - ): Promise { + requestOptions?: Notes.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeRemoteFields, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.crm.NotesRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -310,8 +348,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/notes/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -322,8 +362,8 @@ export class Notes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -336,13 +376,16 @@ export class Notes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.Note.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.Note.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -375,11 +418,19 @@ export class Notes { * @example * await client.crm.notes.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Notes.RequestOptions): Promise { + public metaPostRetrieve(requestOptions?: Notes.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Notes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/notes/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/notes/meta/post", ), method: "GET", headers: { @@ -390,8 +441,8 @@ export class Notes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -403,13 +454,16 @@ export class Notes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -443,10 +497,17 @@ export class Notes { * @example * await client.crm.notes.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( + request: Merge.crm.NotesRemoteFieldClassesListRequest = {}, + requestOptions?: Notes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( request: Merge.crm.NotesRemoteFieldClassesListRequest = {}, - requestOptions?: Notes.RequestOptions - ): Promise { + requestOptions?: Notes.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, @@ -456,7 +517,7 @@ export class Notes { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -487,8 +548,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/notes/remote-field-classes", ), method: "GET", headers: { @@ -499,8 +562,8 @@ export class Notes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -513,13 +576,16 @@ export class Notes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -537,7 +603,7 @@ export class Notes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/notes/remote-field-classes." + "Timeout exceeded when calling GET /crm/v1/notes/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/notes/types/NotesListRequestExpand.ts b/src/api/resources/crm/resources/notes/types/NotesListRequestExpand.ts index c90345fd7..07d361f02 100644 --- a/src/api/resources/crm/resources/notes/types/NotesListRequestExpand.ts +++ b/src/api/resources/crm/resources/notes/types/NotesListRequestExpand.ts @@ -18,7 +18,6 @@ export type NotesListRequestExpand = | "owner,contact,account,opportunity" | "owner,contact,opportunity" | "owner,opportunity"; - export const NotesListRequestExpand = { Account: "account", AccountOpportunity: "account,opportunity", diff --git a/src/api/resources/crm/resources/notes/types/NotesRetrieveRequestExpand.ts b/src/api/resources/crm/resources/notes/types/NotesRetrieveRequestExpand.ts index fa5e51783..268e33d92 100644 --- a/src/api/resources/crm/resources/notes/types/NotesRetrieveRequestExpand.ts +++ b/src/api/resources/crm/resources/notes/types/NotesRetrieveRequestExpand.ts @@ -18,7 +18,6 @@ export type NotesRetrieveRequestExpand = | "owner,contact,account,opportunity" | "owner,contact,opportunity" | "owner,opportunity"; - export const NotesRetrieveRequestExpand = { Account: "account", AccountOpportunity: "account,opportunity", diff --git a/src/api/resources/crm/resources/opportunities/client/Client.ts b/src/api/resources/crm/resources/opportunities/client/Client.ts index 15053678f..c55f64434 100644 --- a/src/api/resources/crm/resources/opportunities/client/Client.ts +++ b/src/api/resources/crm/resources/opportunities/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Opportunities { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Opportunities { * @example * await client.crm.opportunities.list() */ - public async list( + public list( + request: Merge.crm.OpportunitiesListRequest = {}, + requestOptions?: Opportunities.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.crm.OpportunitiesListRequest = {}, - requestOptions?: Opportunities.RequestOptions - ): Promise { + requestOptions?: Opportunities.RequestOptions, + ): Promise> { const { accountId, createdAfter, @@ -69,7 +78,7 @@ export class Opportunities { stageId, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountId != null) { _queryParams["account_id"] = accountId; } @@ -87,7 +96,9 @@ export class Opportunities { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.crm.OpportunitiesListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -143,13 +154,17 @@ export class Opportunities { } if (status != null) { - _queryParams["status"] = status; + _queryParams["status"] = serializers.crm.OpportunitiesListRequestStatus.jsonOrThrow(status, { + unrecognizedObjectKeys: "strip", + }); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/opportunities" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/opportunities", ), method: "GET", headers: { @@ -160,8 +175,8 @@ export class Opportunities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -174,13 +189,16 @@ export class Opportunities { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedOpportunityList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedOpportunityList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -216,12 +234,19 @@ export class Opportunities { * model: {} * }) */ - public async create( + public create( request: Merge.crm.OpportunityEndpointRequest, - requestOptions?: Opportunities.RequestOptions - ): Promise { + requestOptions?: Opportunities.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.crm.OpportunityEndpointRequest, + requestOptions?: Opportunities.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -232,8 +257,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/opportunities", ), method: "POST", headers: { @@ -244,8 +271,8 @@ export class Opportunities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -259,13 +286,16 @@ export class Opportunities { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.OpportunityResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.OpportunityResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -300,16 +330,26 @@ export class Opportunities { * @example * await client.crm.opportunities.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.crm.OpportunitiesRetrieveRequest = {}, - requestOptions?: Opportunities.RequestOptions - ): Promise { + requestOptions?: Opportunities.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.crm.OpportunitiesRetrieveRequest = {}, + requestOptions?: Opportunities.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeRemoteFields, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.crm.OpportunitiesRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -334,8 +374,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/opportunities/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -346,8 +388,8 @@ export class Opportunities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -360,13 +402,16 @@ export class Opportunities { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.Opportunity.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.Opportunity.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -403,13 +448,21 @@ export class Opportunities { * model: {} * }) */ - public async partialUpdate( + public partialUpdate( id: string, request: Merge.crm.PatchedOpportunityEndpointRequest, - requestOptions?: Opportunities.RequestOptions - ): Promise { + requestOptions?: Opportunities.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__partialUpdate(id, request, requestOptions)); + } + + private async __partialUpdate( + id: string, + request: Merge.crm.PatchedOpportunityEndpointRequest, + requestOptions?: Opportunities.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -420,8 +473,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/opportunities/${encodeURIComponent(id)}`, ), method: "PATCH", headers: { @@ -432,8 +487,8 @@ export class Opportunities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -449,13 +504,16 @@ export class Opportunities { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.OpportunityResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.OpportunityResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -489,14 +547,23 @@ export class Opportunities { * @example * await client.crm.opportunities.metaPatchRetrieve("id") */ - public async metaPatchRetrieve( + public metaPatchRetrieve( + id: string, + requestOptions?: Opportunities.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPatchRetrieve(id, requestOptions)); + } + + private async __metaPatchRetrieve( id: string, - requestOptions?: Opportunities.RequestOptions - ): Promise { + requestOptions?: Opportunities.RequestOptions, + ): Promise> { 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/opportunities/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -507,8 +574,8 @@ export class Opportunities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -520,13 +587,16 @@ export class Opportunities { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -544,7 +614,7 @@ export class Opportunities { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/opportunities/meta/patch/{id}." + "Timeout exceeded when calling GET /crm/v1/opportunities/meta/patch/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -561,11 +631,21 @@ export class Opportunities { * @example * await client.crm.opportunities.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Opportunities.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Opportunities.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Opportunities.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/opportunities/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/opportunities/meta/post", ), method: "GET", headers: { @@ -576,8 +656,8 @@ export class Opportunities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -589,13 +669,16 @@ export class Opportunities { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -613,7 +696,7 @@ export class Opportunities { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/opportunities/meta/post." + "Timeout exceeded when calling GET /crm/v1/opportunities/meta/post.", ); case "unknown": throw new errors.MergeError({ @@ -631,10 +714,17 @@ export class Opportunities { * @example * await client.crm.opportunities.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( request: Merge.crm.OpportunitiesRemoteFieldClassesListRequest = {}, - requestOptions?: Opportunities.RequestOptions - ): Promise { + requestOptions?: Opportunities.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( + request: Merge.crm.OpportunitiesRemoteFieldClassesListRequest = {}, + requestOptions?: Opportunities.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, @@ -644,7 +734,7 @@ export class Opportunities { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -675,8 +765,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/opportunities/remote-field-classes", ), method: "GET", headers: { @@ -687,8 +779,8 @@ export class Opportunities { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -701,13 +793,16 @@ export class Opportunities { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -725,7 +820,7 @@ export class Opportunities { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/opportunities/remote-field-classes." + "Timeout exceeded when calling GET /crm/v1/opportunities/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/opportunities/types/OpportunitiesListRequestExpand.ts b/src/api/resources/crm/resources/opportunities/types/OpportunitiesListRequestExpand.ts index b42735838..f60c5a22b 100644 --- a/src/api/resources/crm/resources/opportunities/types/OpportunitiesListRequestExpand.ts +++ b/src/api/resources/crm/resources/opportunities/types/OpportunitiesListRequestExpand.ts @@ -10,7 +10,6 @@ export type OpportunitiesListRequestExpand = | "owner,stage,account" | "stage" | "stage,account"; - export const OpportunitiesListRequestExpand = { Account: "account", Owner: "owner", diff --git a/src/api/resources/crm/resources/opportunities/types/OpportunitiesListRequestStatus.ts b/src/api/resources/crm/resources/opportunities/types/OpportunitiesListRequestStatus.ts index 488a743eb..f6da75c27 100644 --- a/src/api/resources/crm/resources/opportunities/types/OpportunitiesListRequestStatus.ts +++ b/src/api/resources/crm/resources/opportunities/types/OpportunitiesListRequestStatus.ts @@ -3,7 +3,6 @@ */ export type OpportunitiesListRequestStatus = "LOST" | "OPEN" | "WON"; - export const OpportunitiesListRequestStatus = { Lost: "LOST", Open: "OPEN", diff --git a/src/api/resources/crm/resources/opportunities/types/OpportunitiesRetrieveRequestExpand.ts b/src/api/resources/crm/resources/opportunities/types/OpportunitiesRetrieveRequestExpand.ts index 1c5888d9a..de95da3d7 100644 --- a/src/api/resources/crm/resources/opportunities/types/OpportunitiesRetrieveRequestExpand.ts +++ b/src/api/resources/crm/resources/opportunities/types/OpportunitiesRetrieveRequestExpand.ts @@ -10,7 +10,6 @@ export type OpportunitiesRetrieveRequestExpand = | "owner,stage,account" | "stage" | "stage,account"; - export const OpportunitiesRetrieveRequestExpand = { Account: "account", Owner: "owner", diff --git a/src/api/resources/crm/resources/passthrough/client/Client.ts b/src/api/resources/crm/resources/passthrough/client/Client.ts index 4e9b8feeb..a4d85fb55 100644 --- a/src/api/resources/crm/resources/passthrough/client/Client.ts +++ b/src/api/resources/crm/resources/passthrough/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Passthrough { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -47,14 +49,23 @@ export class Passthrough { * path: "/scooters" * }) */ - public async create( + public create( request: Merge.crm.DataPassthroughRequest, - requestOptions?: Passthrough.RequestOptions - ): Promise { + requestOptions?: Passthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.crm.DataPassthroughRequest, + requestOptions?: Passthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/passthrough" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/passthrough", ), method: "POST", headers: { @@ -65,8 +76,8 @@ export class Passthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -79,13 +90,16 @@ export class Passthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.RemoteResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.RemoteResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/resources/regenerateKey/client/Client.ts b/src/api/resources/crm/resources/regenerateKey/client/Client.ts index 1bd2b930f..fd08401b1 100644 --- a/src/api/resources/crm/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/crm/resources/regenerateKey/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace RegenerateKey { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -46,14 +48,23 @@ export class RegenerateKey { * name: "Remote Deployment Key 1" * }) */ - public async create( + public create( request: Merge.crm.RemoteKeyForRegenerationRequest, - requestOptions?: RegenerateKey.RequestOptions - ): Promise { + requestOptions?: RegenerateKey.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.crm.RemoteKeyForRegenerationRequest, + requestOptions?: RegenerateKey.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/regenerate-key" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/regenerate-key", ), method: "POST", headers: { @@ -64,8 +75,8 @@ export class RegenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -80,13 +91,16 @@ export class RegenerateKey { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.RemoteKey.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.RemoteKey.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/resources/scopes/client/Client.ts b/src/api/resources/crm/resources/scopes/client/Client.ts index 326075b8e..cab76242c 100644 --- a/src/api/resources/crm/resources/scopes/client/Client.ts +++ b/src/api/resources/crm/resources/scopes/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Scopes { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class Scopes { * @example * await client.crm.scopes.defaultScopesRetrieve() */ - public async defaultScopesRetrieve(requestOptions?: Scopes.RequestOptions): Promise { + public defaultScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__defaultScopesRetrieve(requestOptions)); + } + + private async __defaultScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/default-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/default-scopes", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -110,13 +125,21 @@ export class Scopes { * @example * await client.crm.scopes.linkedAccountScopesRetrieve() */ - public async linkedAccountScopesRetrieve( - requestOptions?: Scopes.RequestOptions - ): Promise { + public linkedAccountScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linkedAccountScopesRetrieve(requestOptions)); + } + + private async __linkedAccountScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/linked-account-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/linked-account-scopes", ), method: "GET", headers: { @@ -127,8 +150,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -140,13 +163,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -203,14 +229,23 @@ export class Scopes { * }] * }) */ - public async linkedAccountScopesCreate( + public linkedAccountScopesCreate( request: Merge.crm.LinkedAccountCommonModelScopeDeserializerRequest, - requestOptions?: Scopes.RequestOptions - ): Promise { + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linkedAccountScopesCreate(request, requestOptions)); + } + + private async __linkedAccountScopesCreate( + request: Merge.crm.LinkedAccountCommonModelScopeDeserializerRequest, + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/linked-account-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/linked-account-scopes", ), method: "POST", headers: { @@ -221,8 +256,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -237,13 +272,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/resources/stages/client/Client.ts b/src/api/resources/crm/resources/stages/client/Client.ts index 9e9131a83..cb7ad2aac 100644 --- a/src/api/resources/crm/resources/stages/client/Client.ts +++ b/src/api/resources/crm/resources/stages/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Stages { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Stages { * @example * await client.crm.stages.list() */ - public async list( + public list( request: Merge.crm.StagesListRequest = {}, - requestOptions?: Stages.RequestOptions - ): Promise { + requestOptions?: Stages.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.crm.StagesListRequest = {}, + requestOptions?: Stages.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -61,7 +70,7 @@ export class Stages { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,8 +117,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/stages", ), method: "GET", headers: { @@ -120,8 +131,8 @@ export class Stages { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -134,13 +145,16 @@ export class Stages { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedStageList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedStageList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -175,13 +189,21 @@ export class Stages { * @example * await client.crm.stages.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.crm.StagesRetrieveRequest = {}, - requestOptions?: Stages.RequestOptions - ): Promise { + requestOptions?: Stages.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.crm.StagesRetrieveRequest = {}, + requestOptions?: Stages.RequestOptions, + ): Promise> { const { includeRemoteData, includeRemoteFields, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -196,8 +218,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/stages/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -208,8 +232,8 @@ export class Stages { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -222,13 +246,16 @@ export class Stages { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.Stage.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.Stage.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -262,10 +289,17 @@ export class Stages { * @example * await client.crm.stages.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( + request: Merge.crm.StagesRemoteFieldClassesListRequest = {}, + requestOptions?: Stages.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( request: Merge.crm.StagesRemoteFieldClassesListRequest = {}, - requestOptions?: Stages.RequestOptions - ): Promise { + requestOptions?: Stages.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, @@ -275,7 +309,7 @@ export class Stages { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -306,8 +340,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/stages/remote-field-classes", ), method: "GET", headers: { @@ -318,8 +354,8 @@ export class Stages { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -332,13 +368,16 @@ export class Stages { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -356,7 +395,7 @@ export class Stages { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/stages/remote-field-classes." + "Timeout exceeded when calling GET /crm/v1/stages/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/syncStatus/client/Client.ts b/src/api/resources/crm/resources/syncStatus/client/Client.ts index 22ef8edc0..5dadbe793 100644 --- a/src/api/resources/crm/resources/syncStatus/client/Client.ts +++ b/src/api/resources/crm/resources/syncStatus/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace SyncStatus { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class SyncStatus { * @example * await client.crm.syncStatus.list() */ - public async list( + public list( request: Merge.crm.SyncStatusListRequest = {}, - requestOptions?: SyncStatus.RequestOptions - ): Promise { + requestOptions?: SyncStatus.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private 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,8 +69,10 @@ export class SyncStatus { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/sync-status" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/sync-status", ), method: "GET", headers: { @@ -72,8 +83,8 @@ export class SyncStatus { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -86,13 +97,16 @@ export class SyncStatus { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedSyncStatusList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedSyncStatusList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/resources/tasks/client/Client.ts b/src/api/resources/crm/resources/tasks/client/Client.ts index 8bd2fbb5d..96929ff45 100644 --- a/src/api/resources/crm/resources/tasks/client/Client.ts +++ b/src/api/resources/crm/resources/tasks/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Tasks { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Tasks { * @example * await client.crm.tasks.list() */ - public async list( + public list( + request: Merge.crm.TasksListRequest = {}, + requestOptions?: Tasks.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.crm.TasksListRequest = {}, - requestOptions?: Tasks.RequestOptions - ): Promise { + requestOptions?: Tasks.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -62,7 +71,7 @@ export class Tasks { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -76,7 +85,9 @@ export class Tasks { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.crm.TasksListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -113,8 +124,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/tasks", ), method: "GET", headers: { @@ -125,8 +138,8 @@ export class Tasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -139,13 +152,16 @@ export class Tasks { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedTaskList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedTaskList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -181,12 +197,19 @@ export class Tasks { * model: {} * }) */ - public async create( + public create( request: Merge.crm.TaskEndpointRequest, - requestOptions?: Tasks.RequestOptions - ): Promise { + requestOptions?: Tasks.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.crm.TaskEndpointRequest, + requestOptions?: Tasks.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -197,8 +220,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/tasks", ), method: "POST", headers: { @@ -209,8 +234,8 @@ export class Tasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -224,13 +249,16 @@ export class Tasks { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.TaskResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.TaskResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -265,15 +293,25 @@ export class Tasks { * @example * await client.crm.tasks.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.crm.TasksRetrieveRequest = {}, + requestOptions?: Tasks.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.crm.TasksRetrieveRequest = {}, - requestOptions?: Tasks.RequestOptions - ): Promise { + requestOptions?: Tasks.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeRemoteFields, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.crm.TasksRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -290,8 +328,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/tasks/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -302,8 +342,8 @@ export class Tasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -316,13 +356,16 @@ export class Tasks { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.Task.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.Task.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -359,13 +402,21 @@ export class Tasks { * model: {} * }) */ - public async partialUpdate( + public partialUpdate( id: string, request: Merge.crm.PatchedTaskEndpointRequest, - requestOptions?: Tasks.RequestOptions - ): Promise { + requestOptions?: Tasks.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__partialUpdate(id, request, requestOptions)); + } + + private async __partialUpdate( + id: string, + request: Merge.crm.PatchedTaskEndpointRequest, + requestOptions?: Tasks.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -376,8 +427,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/tasks/${encodeURIComponent(id)}`, ), method: "PATCH", headers: { @@ -388,8 +441,8 @@ export class Tasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -403,13 +456,16 @@ export class Tasks { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.TaskResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.TaskResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -443,11 +499,23 @@ export class Tasks { * @example * await client.crm.tasks.metaPatchRetrieve("id") */ - public async metaPatchRetrieve(id: string, requestOptions?: Tasks.RequestOptions): Promise { + public metaPatchRetrieve( + id: string, + requestOptions?: Tasks.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPatchRetrieve(id, requestOptions)); + } + + private 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/tasks/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -458,8 +526,8 @@ export class Tasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -471,13 +539,16 @@ export class Tasks { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -510,11 +581,19 @@ export class Tasks { * @example * await client.crm.tasks.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Tasks.RequestOptions): Promise { + public metaPostRetrieve(requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + 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/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/tasks/meta/post", ), method: "GET", headers: { @@ -525,8 +604,8 @@ export class Tasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -538,13 +617,16 @@ export class Tasks { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -578,10 +660,17 @@ export class Tasks { * @example * await client.crm.tasks.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( request: Merge.crm.TasksRemoteFieldClassesListRequest = {}, - requestOptions?: Tasks.RequestOptions - ): Promise { + requestOptions?: Tasks.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( + request: Merge.crm.TasksRemoteFieldClassesListRequest = {}, + requestOptions?: Tasks.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, @@ -591,7 +680,7 @@ export class Tasks { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -622,8 +711,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/tasks/remote-field-classes", ), method: "GET", headers: { @@ -634,8 +725,8 @@ export class Tasks { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -648,13 +739,16 @@ export class Tasks { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -672,7 +766,7 @@ export class Tasks { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/tasks/remote-field-classes." + "Timeout exceeded when calling GET /crm/v1/tasks/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/tasks/types/TasksListRequestExpand.ts b/src/api/resources/crm/resources/tasks/types/TasksListRequestExpand.ts index a8ce4b447..b16cd259f 100644 --- a/src/api/resources/crm/resources/tasks/types/TasksListRequestExpand.ts +++ b/src/api/resources/crm/resources/tasks/types/TasksListRequestExpand.ts @@ -10,7 +10,6 @@ export type TasksListRequestExpand = | "owner,account" | "owner,account,opportunity" | "owner,opportunity"; - export const TasksListRequestExpand = { Account: "account", AccountOpportunity: "account,opportunity", diff --git a/src/api/resources/crm/resources/tasks/types/TasksRetrieveRequestExpand.ts b/src/api/resources/crm/resources/tasks/types/TasksRetrieveRequestExpand.ts index ebb32c121..87238cb62 100644 --- a/src/api/resources/crm/resources/tasks/types/TasksRetrieveRequestExpand.ts +++ b/src/api/resources/crm/resources/tasks/types/TasksRetrieveRequestExpand.ts @@ -10,7 +10,6 @@ export type TasksRetrieveRequestExpand = | "owner,account" | "owner,account,opportunity" | "owner,opportunity"; - export const TasksRetrieveRequestExpand = { Account: "account", AccountOpportunity: "account,opportunity", diff --git a/src/api/resources/crm/resources/users/client/Client.ts b/src/api/resources/crm/resources/users/client/Client.ts index 7f9e13345..a4e70f55e 100644 --- a/src/api/resources/crm/resources/users/client/Client.ts +++ b/src/api/resources/crm/resources/users/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Users { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Users { * @example * await client.crm.users.list() */ - public async list( + public list( request: Merge.crm.UsersListRequest = {}, - requestOptions?: Users.RequestOptions - ): Promise { + requestOptions?: Users.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.crm.UsersListRequest = {}, + requestOptions?: Users.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -62,7 +71,7 @@ export class Users { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -113,8 +122,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/users", ), method: "GET", headers: { @@ -125,8 +136,8 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -139,13 +150,16 @@ export class Users { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedUserList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedUserList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -180,13 +194,21 @@ export class Users { * @example * await client.crm.users.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.crm.UsersRetrieveRequest = {}, - requestOptions?: Users.RequestOptions - ): Promise { + requestOptions?: Users.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.crm.UsersRetrieveRequest = {}, + requestOptions?: Users.RequestOptions, + ): Promise> { const { includeRemoteData, includeRemoteFields, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -201,8 +223,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/users/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -213,8 +237,8 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -227,13 +251,16 @@ export class Users { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.User.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.User.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -270,15 +297,25 @@ export class Users { * reason: "GENERAL_CUSTOMER_REQUEST" * }) */ - public async ignoreCreate( + public ignoreCreate( modelId: string, request: Merge.crm.IgnoreCommonModelRequest, - requestOptions?: Users.RequestOptions - ): Promise { + requestOptions?: Users.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__ignoreCreate(modelId, request, requestOptions)); + } + + private async __ignoreCreate( + modelId: string, + request: Merge.crm.IgnoreCommonModelRequest, + requestOptions?: Users.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `crm/v1/users/ignore/${encodeURIComponent(modelId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `crm/v1/users/ignore/${encodeURIComponent(modelId)}`, ), method: "POST", headers: { @@ -289,8 +326,8 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -303,7 +340,7 @@ export class Users { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return { data: undefined, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -321,7 +358,7 @@ export class Users { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /crm/v1/users/ignore/{model_id}." + "Timeout exceeded when calling POST /crm/v1/users/ignore/{model_id}.", ); case "unknown": throw new errors.MergeError({ @@ -339,10 +376,17 @@ export class Users { * @example * await client.crm.users.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( request: Merge.crm.UsersRemoteFieldClassesListRequest = {}, - requestOptions?: Users.RequestOptions - ): Promise { + requestOptions?: Users.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( + request: Merge.crm.UsersRemoteFieldClassesListRequest = {}, + requestOptions?: Users.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, @@ -352,7 +396,7 @@ export class Users { isCommonModelField, pageSize, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -383,8 +427,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/users/remote-field-classes", ), method: "GET", headers: { @@ -395,8 +441,8 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -409,13 +455,16 @@ export class Users { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -433,7 +482,7 @@ export class Users { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /crm/v1/users/remote-field-classes." + "Timeout exceeded when calling GET /crm/v1/users/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/crm/resources/webhookReceivers/client/Client.ts b/src/api/resources/crm/resources/webhookReceivers/client/Client.ts index 05a729326..f4d9d8afe 100644 --- a/src/api/resources/crm/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/crm/resources/webhookReceivers/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace WebhookReceivers { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class WebhookReceivers { * @example * await client.crm.webhookReceivers.list() */ - public async list(requestOptions?: WebhookReceivers.RequestOptions): Promise { + public list( + requestOptions?: WebhookReceivers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(requestOptions)); + } + + private async __list( + requestOptions?: WebhookReceivers.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/webhook-receivers" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/webhook-receivers", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class WebhookReceivers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.webhookReceivers.list.Response.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.webhookReceivers.list.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -114,14 +129,23 @@ export class WebhookReceivers { * isActive: true * }) */ - public async create( + public create( request: Merge.crm.WebhookReceiverRequest, - requestOptions?: WebhookReceivers.RequestOptions - ): Promise { + requestOptions?: WebhookReceivers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.crm.WebhookReceiverRequest, + requestOptions?: WebhookReceivers.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "crm/v1/webhook-receivers" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "crm/v1/webhook-receivers", ), method: "POST", headers: { @@ -132,8 +156,8 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -146,13 +170,16 @@ export class WebhookReceivers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.crm.WebhookReceiver.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.crm.WebhookReceiver.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/crm/types/AccountDetailsAndActionsStatusEnum.ts b/src/api/resources/crm/types/AccountDetailsAndActionsStatusEnum.ts index 084a62d2f..c0020279f 100644 --- a/src/api/resources/crm/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/api/resources/crm/types/AccountDetailsAndActionsStatusEnum.ts @@ -9,7 +9,6 @@ * - `IDLE` - IDLE */ export type AccountDetailsAndActionsStatusEnum = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; - export const AccountDetailsAndActionsStatusEnum = { Complete: "COMPLETE", Incomplete: "INCOMPLETE", diff --git a/src/api/resources/crm/types/ActivityTypeEnum.ts b/src/api/resources/crm/types/ActivityTypeEnum.ts index 899bd7623..db96cd89d 100644 --- a/src/api/resources/crm/types/ActivityTypeEnum.ts +++ b/src/api/resources/crm/types/ActivityTypeEnum.ts @@ -8,7 +8,6 @@ * - `EMAIL` - EMAIL */ export type ActivityTypeEnum = "CALL" | "MEETING" | "EMAIL"; - export const ActivityTypeEnum = { Call: "CALL", Meeting: "MEETING", diff --git a/src/api/resources/crm/types/AddressTypeEnum.ts b/src/api/resources/crm/types/AddressTypeEnum.ts index 29edf7b9e..4f3d78a4f 100644 --- a/src/api/resources/crm/types/AddressTypeEnum.ts +++ b/src/api/resources/crm/types/AddressTypeEnum.ts @@ -7,7 +7,6 @@ * - `SHIPPING` - SHIPPING */ export type AddressTypeEnum = "BILLING" | "SHIPPING"; - export const AddressTypeEnum = { Billing: "BILLING", Shipping: "SHIPPING", diff --git a/src/api/resources/crm/types/CardinalityEnum.ts b/src/api/resources/crm/types/CardinalityEnum.ts index 9b028f6a5..760e7aecf 100644 --- a/src/api/resources/crm/types/CardinalityEnum.ts +++ b/src/api/resources/crm/types/CardinalityEnum.ts @@ -9,7 +9,6 @@ * - `ONE_TO_MANY` - ONE_TO_MANY */ export type CardinalityEnum = "ONE_TO_ONE" | "MANY_TO_ONE" | "MANY_TO_MANY" | "ONE_TO_MANY"; - export const CardinalityEnum = { OneToOne: "ONE_TO_ONE", ManyToOne: "MANY_TO_ONE", diff --git a/src/api/resources/crm/types/CategoriesEnum.ts b/src/api/resources/crm/types/CategoriesEnum.ts index 25eba4836..a5eb57230 100644 --- a/src/api/resources/crm/types/CategoriesEnum.ts +++ b/src/api/resources/crm/types/CategoriesEnum.ts @@ -12,7 +12,6 @@ * - `filestorage` - filestorage */ export type CategoriesEnum = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; - export const CategoriesEnum = { Hris: "hris", Ats: "ats", diff --git a/src/api/resources/crm/types/CategoryEnum.ts b/src/api/resources/crm/types/CategoryEnum.ts index 263fc40b8..6d3d6d6ae 100644 --- a/src/api/resources/crm/types/CategoryEnum.ts +++ b/src/api/resources/crm/types/CategoryEnum.ts @@ -12,7 +12,6 @@ * - `filestorage` - filestorage */ export type CategoryEnum = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; - export const CategoryEnum = { Hris: "hris", Ats: "ats", diff --git a/src/api/resources/crm/types/CountryEnum.ts b/src/api/resources/crm/types/CountryEnum.ts index e21e6bb70..46d4e560b 100644 --- a/src/api/resources/crm/types/CountryEnum.ts +++ b/src/api/resources/crm/types/CountryEnum.ts @@ -503,7 +503,6 @@ export type CountryEnum = | "YE" | "ZM" | "ZW"; - export const CountryEnum = { Af: "AF", Ax: "AX", diff --git a/src/api/resources/crm/types/DirectionEnum.ts b/src/api/resources/crm/types/DirectionEnum.ts index a1ba673cd..b32224fcd 100644 --- a/src/api/resources/crm/types/DirectionEnum.ts +++ b/src/api/resources/crm/types/DirectionEnum.ts @@ -7,7 +7,6 @@ * - `OUTBOUND` - OUTBOUND */ export type DirectionEnum = "INBOUND" | "OUTBOUND"; - export const DirectionEnum = { Inbound: "INBOUND", Outbound: "OUTBOUND", diff --git a/src/api/resources/crm/types/EnabledActionsEnum.ts b/src/api/resources/crm/types/EnabledActionsEnum.ts index 73d70210e..24418b130 100644 --- a/src/api/resources/crm/types/EnabledActionsEnum.ts +++ b/src/api/resources/crm/types/EnabledActionsEnum.ts @@ -7,7 +7,6 @@ * - `WRITE` - WRITE */ export type EnabledActionsEnum = "READ" | "WRITE"; - export const EnabledActionsEnum = { Read: "READ", Write: "WRITE", diff --git a/src/api/resources/crm/types/EncodingEnum.ts b/src/api/resources/crm/types/EncodingEnum.ts index 3defec583..a828347f8 100644 --- a/src/api/resources/crm/types/EncodingEnum.ts +++ b/src/api/resources/crm/types/EncodingEnum.ts @@ -8,7 +8,6 @@ * - `GZIP_BASE64` - GZIP_BASE64 */ export type EncodingEnum = "RAW" | "BASE64" | "GZIP_BASE64"; - export const EncodingEnum = { Raw: "RAW", Base64: "BASE64", diff --git a/src/api/resources/crm/types/EventTypeEnum.ts b/src/api/resources/crm/types/EventTypeEnum.ts index eb3218428..08d0f1ce3 100644 --- a/src/api/resources/crm/types/EventTypeEnum.ts +++ b/src/api/resources/crm/types/EventTypeEnum.ts @@ -89,7 +89,6 @@ export type EventTypeEnum = | "DISABLED_MERGE_WEBHOOK" | "MERGE_WEBHOOK_TARGET_CHANGED" | "END_USER_CREDENTIALS_ACCESSED"; - export const EventTypeEnum = { CreatedRemoteProductionApiKey: "CREATED_REMOTE_PRODUCTION_API_KEY", DeletedRemoteProductionApiKey: "DELETED_REMOTE_PRODUCTION_API_KEY", diff --git a/src/api/resources/crm/types/FieldFormatEnum.ts b/src/api/resources/crm/types/FieldFormatEnum.ts index a5b54cac7..351c87478 100644 --- a/src/api/resources/crm/types/FieldFormatEnum.ts +++ b/src/api/resources/crm/types/FieldFormatEnum.ts @@ -11,7 +11,6 @@ * - `list` - list */ export type FieldFormatEnum = "string" | "number" | "date" | "datetime" | "bool" | "list"; - export const FieldFormatEnum = { String: "string", Number: "number", diff --git a/src/api/resources/crm/types/FieldTypeEnum.ts b/src/api/resources/crm/types/FieldTypeEnum.ts index 39ace3972..e235eeea9 100644 --- a/src/api/resources/crm/types/FieldTypeEnum.ts +++ b/src/api/resources/crm/types/FieldTypeEnum.ts @@ -11,7 +11,6 @@ * - `list` - list */ export type FieldTypeEnum = "string" | "number" | "date" | "datetime" | "bool" | "list"; - export const FieldTypeEnum = { String: "string", Number: "number", diff --git a/src/api/resources/crm/types/IssueStatusEnum.ts b/src/api/resources/crm/types/IssueStatusEnum.ts index 9536a7b6d..56fc6d5fa 100644 --- a/src/api/resources/crm/types/IssueStatusEnum.ts +++ b/src/api/resources/crm/types/IssueStatusEnum.ts @@ -7,7 +7,6 @@ * - `RESOLVED` - RESOLVED */ export type IssueStatusEnum = "ONGOING" | "RESOLVED"; - export const IssueStatusEnum = { Ongoing: "ONGOING", Resolved: "RESOLVED", diff --git a/src/api/resources/crm/types/ItemFormatEnum.ts b/src/api/resources/crm/types/ItemFormatEnum.ts index efd0263ba..276d6e676 100644 --- a/src/api/resources/crm/types/ItemFormatEnum.ts +++ b/src/api/resources/crm/types/ItemFormatEnum.ts @@ -11,7 +11,6 @@ * - `list` - decimal */ export type ItemFormatEnum = "string" | "number" | "date" | "datetime" | "bool" | "list"; - export const ItemFormatEnum = { String: "string", Number: "number", diff --git a/src/api/resources/crm/types/ItemTypeEnum.ts b/src/api/resources/crm/types/ItemTypeEnum.ts index b2883ed82..815b6314e 100644 --- a/src/api/resources/crm/types/ItemTypeEnum.ts +++ b/src/api/resources/crm/types/ItemTypeEnum.ts @@ -11,7 +11,6 @@ * - `list` - list */ export type ItemTypeEnum = "string" | "number" | "date" | "datetime" | "bool" | "list"; - export const ItemTypeEnum = { String: "string", Number: "number", diff --git a/src/api/resources/crm/types/LanguageEnum.ts b/src/api/resources/crm/types/LanguageEnum.ts index 92c0e5778..180002115 100644 --- a/src/api/resources/crm/types/LanguageEnum.ts +++ b/src/api/resources/crm/types/LanguageEnum.ts @@ -7,7 +7,6 @@ * - `de` - de */ export type LanguageEnum = "en" | "de"; - export const LanguageEnum = { En: "en", De: "de", diff --git a/src/api/resources/crm/types/LastSyncResultEnum.ts b/src/api/resources/crm/types/LastSyncResultEnum.ts index 2617afd73..e14779ef7 100644 --- a/src/api/resources/crm/types/LastSyncResultEnum.ts +++ b/src/api/resources/crm/types/LastSyncResultEnum.ts @@ -11,7 +11,6 @@ * - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED */ export type LastSyncResultEnum = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; - export const LastSyncResultEnum = { Syncing: "SYNCING", Done: "DONE", diff --git a/src/api/resources/crm/types/MethodEnum.ts b/src/api/resources/crm/types/MethodEnum.ts index 5fb2be8d3..5d8dae516 100644 --- a/src/api/resources/crm/types/MethodEnum.ts +++ b/src/api/resources/crm/types/MethodEnum.ts @@ -12,7 +12,6 @@ * - `DELETE` - DELETE */ export type MethodEnum = "GET" | "OPTIONS" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE"; - export const MethodEnum = { Get: "GET", Options: "OPTIONS", diff --git a/src/api/resources/crm/types/OpportunityStatusEnum.ts b/src/api/resources/crm/types/OpportunityStatusEnum.ts index bbc59aa96..d9d7df43a 100644 --- a/src/api/resources/crm/types/OpportunityStatusEnum.ts +++ b/src/api/resources/crm/types/OpportunityStatusEnum.ts @@ -8,7 +8,6 @@ * - `LOST` - LOST */ export type OpportunityStatusEnum = "OPEN" | "WON" | "LOST"; - export const OpportunityStatusEnum = { Open: "OPEN", Won: "WON", diff --git a/src/api/resources/crm/types/OriginTypeEnum.ts b/src/api/resources/crm/types/OriginTypeEnum.ts index c9bacdb7d..4da1bdd2a 100644 --- a/src/api/resources/crm/types/OriginTypeEnum.ts +++ b/src/api/resources/crm/types/OriginTypeEnum.ts @@ -8,7 +8,6 @@ * - `REMOTE_ONLY_MODEL` - REMOTE_ONLY_MODEL */ export type OriginTypeEnum = "CUSTOM_OBJECT" | "COMMON_MODEL" | "REMOTE_ONLY_MODEL"; - export const OriginTypeEnum = { CustomObject: "CUSTOM_OBJECT", CommonModel: "COMMON_MODEL", diff --git a/src/api/resources/crm/types/ReasonEnum.ts b/src/api/resources/crm/types/ReasonEnum.ts index 28995e0a8..6298f17e7 100644 --- a/src/api/resources/crm/types/ReasonEnum.ts +++ b/src/api/resources/crm/types/ReasonEnum.ts @@ -8,7 +8,6 @@ * - `OTHER` - OTHER */ export type ReasonEnum = "GENERAL_CUSTOMER_REQUEST" | "GDPR" | "OTHER"; - export const ReasonEnum = { GeneralCustomerRequest: "GENERAL_CUSTOMER_REQUEST", Gdpr: "GDPR", diff --git a/src/api/resources/crm/types/RequestFormatEnum.ts b/src/api/resources/crm/types/RequestFormatEnum.ts index 4b66af670..6c5f28198 100644 --- a/src/api/resources/crm/types/RequestFormatEnum.ts +++ b/src/api/resources/crm/types/RequestFormatEnum.ts @@ -8,7 +8,6 @@ * - `MULTIPART` - MULTIPART */ export type RequestFormatEnum = "JSON" | "XML" | "MULTIPART"; - export const RequestFormatEnum = { Json: "JSON", Xml: "XML", diff --git a/src/api/resources/crm/types/ResponseTypeEnum.ts b/src/api/resources/crm/types/ResponseTypeEnum.ts index 91a373778..e123001a6 100644 --- a/src/api/resources/crm/types/ResponseTypeEnum.ts +++ b/src/api/resources/crm/types/ResponseTypeEnum.ts @@ -7,7 +7,6 @@ * - `BASE64_GZIP` - BASE64_GZIP */ export type ResponseTypeEnum = "JSON" | "BASE64_GZIP"; - export const ResponseTypeEnum = { Json: "JSON", Base64Gzip: "BASE64_GZIP", diff --git a/src/api/resources/crm/types/RoleEnum.ts b/src/api/resources/crm/types/RoleEnum.ts index 5792757ea..d7b99ac49 100644 --- a/src/api/resources/crm/types/RoleEnum.ts +++ b/src/api/resources/crm/types/RoleEnum.ts @@ -11,7 +11,6 @@ * - `MERGE_TEAM` - MERGE_TEAM */ export type RoleEnum = "ADMIN" | "DEVELOPER" | "MEMBER" | "API" | "SYSTEM" | "MERGE_TEAM"; - export const RoleEnum = { Admin: "ADMIN", Developer: "DEVELOPER", diff --git a/src/api/resources/crm/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/api/resources/crm/types/SelectiveSyncConfigurationsUsageEnum.ts index 93a6bf0bf..db8508f89 100644 --- a/src/api/resources/crm/types/SelectiveSyncConfigurationsUsageEnum.ts +++ b/src/api/resources/crm/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -7,7 +7,6 @@ * - `IN_LAST_SYNC` - IN_LAST_SYNC */ export type SelectiveSyncConfigurationsUsageEnum = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; - export const SelectiveSyncConfigurationsUsageEnum = { InNextSync: "IN_NEXT_SYNC", InLastSync: "IN_LAST_SYNC", diff --git a/src/api/resources/crm/types/StatusFd5Enum.ts b/src/api/resources/crm/types/StatusFd5Enum.ts index dfb75bf03..837436325 100644 --- a/src/api/resources/crm/types/StatusFd5Enum.ts +++ b/src/api/resources/crm/types/StatusFd5Enum.ts @@ -11,7 +11,6 @@ * - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED */ export type StatusFd5Enum = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; - export const StatusFd5Enum = { Syncing: "SYNCING", Done: "DONE", diff --git a/src/api/resources/crm/types/TaskStatusEnum.ts b/src/api/resources/crm/types/TaskStatusEnum.ts index 9dae09d6f..0f89f0517 100644 --- a/src/api/resources/crm/types/TaskStatusEnum.ts +++ b/src/api/resources/crm/types/TaskStatusEnum.ts @@ -7,7 +7,6 @@ * - `CLOSED` - CLOSED */ export type TaskStatusEnum = "OPEN" | "CLOSED"; - export const TaskStatusEnum = { Open: "OPEN", Closed: "CLOSED", diff --git a/src/api/resources/filestorage/client/Client.ts b/src/api/resources/filestorage/client/Client.ts index b248db4a4..2b3196e96 100644 --- a/src/api/resources/filestorage/client/Client.ts +++ b/src/api/resources/filestorage/client/Client.ts @@ -28,159 +28,127 @@ import { Users } from "../resources/users/client/Client"; import { WebhookReceivers } from "../resources/webhookReceivers/client/Client"; export declare namespace Filestorage { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: 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 Filestorage { - constructor(protected readonly _options: Filestorage.Options) {} - protected _accountDetails: AccountDetails | undefined; + protected _accountToken: AccountToken | undefined; + protected _asyncPassthrough: AsyncPassthrough | undefined; + protected _auditTrail: AuditTrail | undefined; + protected _availableActions: AvailableActions | undefined; + protected _scopes: Scopes | undefined; + protected _deleteAccount: DeleteAccount | undefined; + protected _drives: Drives | undefined; + protected _fieldMapping: FieldMapping | undefined; + protected _files: Files | undefined; + protected _folders: Folders | undefined; + protected _generateKey: GenerateKey | undefined; + protected _groups: Groups | undefined; + protected _issues: Issues | undefined; + protected _linkToken: LinkToken | undefined; + protected _linkedAccounts: LinkedAccounts | undefined; + protected _passthrough: Passthrough | undefined; + protected _regenerateKey: RegenerateKey | undefined; + protected _syncStatus: SyncStatus | undefined; + protected _forceResync: ForceResync | undefined; + protected _users: Users | undefined; + protected _webhookReceivers: WebhookReceivers | undefined; + + constructor(protected readonly _options: Filestorage.Options) {} public get accountDetails(): AccountDetails { return (this._accountDetails ??= new AccountDetails(this._options)); } - protected _accountToken: AccountToken | undefined; - public get accountToken(): AccountToken { return (this._accountToken ??= new AccountToken(this._options)); } - protected _asyncPassthrough: AsyncPassthrough | undefined; - public get asyncPassthrough(): AsyncPassthrough { return (this._asyncPassthrough ??= new AsyncPassthrough(this._options)); } - protected _auditTrail: AuditTrail | undefined; - public get auditTrail(): AuditTrail { return (this._auditTrail ??= new AuditTrail(this._options)); } - protected _availableActions: AvailableActions | undefined; - public get availableActions(): AvailableActions { return (this._availableActions ??= new AvailableActions(this._options)); } - protected _scopes: Scopes | undefined; - public get scopes(): Scopes { return (this._scopes ??= new Scopes(this._options)); } - protected _deleteAccount: DeleteAccount | undefined; - public get deleteAccount(): DeleteAccount { return (this._deleteAccount ??= new DeleteAccount(this._options)); } - protected _drives: Drives | undefined; - public get drives(): Drives { return (this._drives ??= new Drives(this._options)); } - protected _fieldMapping: FieldMapping | undefined; - public get fieldMapping(): FieldMapping { return (this._fieldMapping ??= new FieldMapping(this._options)); } - protected _files: Files | undefined; - public get files(): Files { return (this._files ??= new Files(this._options)); } - protected _folders: Folders | undefined; - public get folders(): Folders { return (this._folders ??= new Folders(this._options)); } - protected _generateKey: GenerateKey | undefined; - public get generateKey(): GenerateKey { return (this._generateKey ??= new GenerateKey(this._options)); } - protected _groups: Groups | undefined; - public get groups(): Groups { return (this._groups ??= new Groups(this._options)); } - protected _issues: Issues | undefined; - public get issues(): Issues { return (this._issues ??= new Issues(this._options)); } - protected _linkToken: LinkToken | undefined; - public get linkToken(): LinkToken { return (this._linkToken ??= new LinkToken(this._options)); } - protected _linkedAccounts: LinkedAccounts | undefined; - public get linkedAccounts(): LinkedAccounts { return (this._linkedAccounts ??= new LinkedAccounts(this._options)); } - protected _passthrough: Passthrough | undefined; - public get passthrough(): Passthrough { return (this._passthrough ??= new Passthrough(this._options)); } - protected _regenerateKey: RegenerateKey | undefined; - public get regenerateKey(): RegenerateKey { return (this._regenerateKey ??= new RegenerateKey(this._options)); } - protected _syncStatus: SyncStatus | undefined; - public get syncStatus(): SyncStatus { return (this._syncStatus ??= new SyncStatus(this._options)); } - protected _forceResync: ForceResync | undefined; - public get forceResync(): ForceResync { return (this._forceResync ??= new ForceResync(this._options)); } - protected _users: Users | undefined; - public get users(): Users { return (this._users ??= new Users(this._options)); } - protected _webhookReceivers: WebhookReceivers | undefined; - public get webhookReceivers(): WebhookReceivers { return (this._webhookReceivers ??= new WebhookReceivers(this._options)); } diff --git a/src/api/resources/filestorage/resources/accountDetails/client/Client.ts b/src/api/resources/filestorage/resources/accountDetails/client/Client.ts index dd344cbf9..4a39867c5 100644 --- a/src/api/resources/filestorage/resources/accountDetails/client/Client.ts +++ b/src/api/resources/filestorage/resources/accountDetails/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AccountDetails { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class AccountDetails { * @example * await client.filestorage.accountDetails.retrieve() */ - public async retrieve(requestOptions?: AccountDetails.RequestOptions): Promise { + public retrieve( + requestOptions?: AccountDetails.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(requestOptions)); + } + + private async __retrieve( + requestOptions?: AccountDetails.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/account-details" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/account-details", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class AccountDetails { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class AccountDetails { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.AccountDetails.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.AccountDetails.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -95,7 +110,7 @@ export class AccountDetails { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /filestorage/v1/account-details." + "Timeout exceeded when calling GET /filestorage/v1/account-details.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/filestorage/resources/accountToken/client/Client.ts b/src/api/resources/filestorage/resources/accountToken/client/Client.ts index 44967b570..fb5fc09fc 100644 --- a/src/api/resources/filestorage/resources/accountToken/client/Client.ts +++ b/src/api/resources/filestorage/resources/accountToken/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AccountToken { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,14 +46,23 @@ export class AccountToken { * @example * await client.filestorage.accountToken.retrieve("public_token") */ - public async retrieve( + public retrieve( publicToken: string, - requestOptions?: AccountToken.RequestOptions - ): Promise { + requestOptions?: AccountToken.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(publicToken, requestOptions)); + } + + private async __retrieve( + publicToken: string, + requestOptions?: AccountToken.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/account-token/${encodeURIComponent(publicToken)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `filestorage/v1/account-token/${encodeURIComponent(publicToken)}`, ), method: "GET", headers: { @@ -62,8 +73,8 @@ export class AccountToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -75,13 +86,16 @@ export class AccountToken { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.AccountToken.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.AccountToken.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -99,7 +113,7 @@ export class AccountToken { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /filestorage/v1/account-token/{public_token}." + "Timeout exceeded when calling GET /filestorage/v1/account-token/{public_token}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/filestorage/resources/asyncPassthrough/client/Client.ts b/src/api/resources/filestorage/resources/asyncPassthrough/client/Client.ts index 2e5de8756..e30df9888 100644 --- a/src/api/resources/filestorage/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/filestorage/resources/asyncPassthrough/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace AsyncPassthrough { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -47,14 +49,23 @@ export class AsyncPassthrough { * path: "/scooters" * }) */ - public async create( + public create( request: Merge.filestorage.DataPassthroughRequest, - requestOptions?: AsyncPassthrough.RequestOptions - ): Promise { + requestOptions?: AsyncPassthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.filestorage.DataPassthroughRequest, + requestOptions?: AsyncPassthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/async-passthrough" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/async-passthrough", ), method: "POST", headers: { @@ -65,8 +76,8 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -81,13 +92,16 @@ export class AsyncPassthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.AsyncPassthroughReciept.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.AsyncPassthroughReciept.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -105,7 +119,7 @@ export class AsyncPassthrough { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /filestorage/v1/async-passthrough." + "Timeout exceeded when calling POST /filestorage/v1/async-passthrough.", ); case "unknown": throw new errors.MergeError({ @@ -123,14 +137,23 @@ export class AsyncPassthrough { * @example * await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id") */ - public async retrieve( + public retrieve( asyncPassthroughReceiptId: string, - requestOptions?: AsyncPassthrough.RequestOptions - ): Promise { + requestOptions?: AsyncPassthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(asyncPassthroughReceiptId, requestOptions)); + } + + private async __retrieve( + asyncPassthroughReceiptId: string, + requestOptions?: AsyncPassthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `filestorage/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}`, ), method: "GET", headers: { @@ -141,8 +164,8 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -154,13 +177,16 @@ export class AsyncPassthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -178,7 +204,7 @@ export class AsyncPassthrough { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /filestorage/v1/async-passthrough/{async_passthrough_receipt_id}." + "Timeout exceeded when calling GET /filestorage/v1/async-passthrough/{async_passthrough_receipt_id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/filestorage/resources/auditTrail/client/Client.ts b/src/api/resources/filestorage/resources/auditTrail/client/Client.ts index bc5241cf0..11cc9f58c 100644 --- a/src/api/resources/filestorage/resources/auditTrail/client/Client.ts +++ b/src/api/resources/filestorage/resources/auditTrail/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AuditTrail { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class AuditTrail { * @example * await client.filestorage.auditTrail.list() */ - public async list( + public list( request: Merge.filestorage.AuditTrailListRequest = {}, - requestOptions?: AuditTrail.RequestOptions - ): Promise { + requestOptions?: AuditTrail.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private 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,8 +85,10 @@ export class AuditTrail { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/audit-trail" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/audit-trail", ), method: "GET", headers: { @@ -88,8 +99,8 @@ export class AuditTrail { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -102,13 +113,16 @@ export class AuditTrail { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.PaginatedAuditLogEventList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.PaginatedAuditLogEventList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/filestorage/resources/availableActions/client/Client.ts b/src/api/resources/filestorage/resources/availableActions/client/Client.ts index c80fa332d..06d8af828 100644 --- a/src/api/resources/filestorage/resources/availableActions/client/Client.ts +++ b/src/api/resources/filestorage/resources/availableActions/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AvailableActions { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,13 +45,21 @@ export class AvailableActions { * @example * await client.filestorage.availableActions.retrieve() */ - public async retrieve( - requestOptions?: AvailableActions.RequestOptions - ): Promise { + public retrieve( + requestOptions?: AvailableActions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(requestOptions)); + } + + private async __retrieve( + requestOptions?: AvailableActions.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/available-actions" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/available-actions", ), method: "GET", headers: { @@ -60,8 +70,8 @@ export class AvailableActions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -73,13 +83,16 @@ export class AvailableActions { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.AvailableActions.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.AvailableActions.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -97,7 +110,7 @@ export class AvailableActions { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /filestorage/v1/available-actions." + "Timeout exceeded when calling GET /filestorage/v1/available-actions.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/filestorage/resources/deleteAccount/client/Client.ts b/src/api/resources/filestorage/resources/deleteAccount/client/Client.ts index 1ae673b34..cec598f23 100644 --- a/src/api/resources/filestorage/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/filestorage/resources/deleteAccount/client/Client.ts @@ -8,15 +8,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace DeleteAccount { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -41,11 +43,17 @@ export class DeleteAccount { * @example * await client.filestorage.deleteAccount.delete() */ - public async delete(requestOptions?: DeleteAccount.RequestOptions): Promise { + public delete(requestOptions?: DeleteAccount.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(requestOptions)); + } + + private async __delete(requestOptions?: DeleteAccount.RequestOptions): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/delete-account" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/delete-account", ), method: "POST", headers: { @@ -56,8 +64,8 @@ export class DeleteAccount { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -69,7 +77,7 @@ export class DeleteAccount { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return { data: undefined, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -87,7 +95,7 @@ export class DeleteAccount { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /filestorage/v1/delete-account." + "Timeout exceeded when calling POST /filestorage/v1/delete-account.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/filestorage/resources/drives/client/Client.ts b/src/api/resources/filestorage/resources/drives/client/Client.ts index d540a6bae..c6d464aed 100644 --- a/src/api/resources/filestorage/resources/drives/client/Client.ts +++ b/src/api/resources/filestorage/resources/drives/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Drives { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Drives { * @example * await client.filestorage.drives.list() */ - public async list( + public list( request: Merge.filestorage.DrivesListRequest = {}, - requestOptions?: Drives.RequestOptions - ): Promise { + requestOptions?: Drives.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.filestorage.DrivesListRequest = {}, + requestOptions?: Drives.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -61,7 +70,7 @@ export class Drives { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,8 +117,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/drives", ), method: "GET", headers: { @@ -120,8 +131,8 @@ export class Drives { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -134,13 +145,16 @@ export class Drives { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.PaginatedDriveList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.PaginatedDriveList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -175,13 +189,21 @@ export class Drives { * @example * await client.filestorage.drives.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.filestorage.DrivesRetrieveRequest = {}, - requestOptions?: Drives.RequestOptions - ): Promise { + requestOptions?: Drives.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.filestorage.DrivesRetrieveRequest = {}, + requestOptions?: Drives.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -192,8 +214,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `filestorage/v1/drives/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -204,8 +228,8 @@ export class Drives { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -218,13 +242,16 @@ export class Drives { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.Drive.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.Drive.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/filestorage/resources/fieldMapping/client/Client.ts b/src/api/resources/filestorage/resources/fieldMapping/client/Client.ts index 6fd872d93..b64682143 100644 --- a/src/api/resources/filestorage/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/filestorage/resources/fieldMapping/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace FieldMapping { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,20 +46,29 @@ export class FieldMapping { * @example * await client.filestorage.fieldMapping.fieldMappingsRetrieve() */ - public async fieldMappingsRetrieve( + public fieldMappingsRetrieve( request: Merge.filestorage.FieldMappingsRetrieveRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsRetrieve(request, requestOptions)); + } + + private async __fieldMappingsRetrieve( + request: Merge.filestorage.FieldMappingsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { excludeRemoteFieldMetadata } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (excludeRemoteFieldMetadata != null) { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/field-mappings" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/field-mappings", ), method: "GET", headers: { @@ -68,8 +79,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -82,13 +93,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -129,20 +143,29 @@ export class FieldMapping { * commonModelName: "ExampleCommonModel" * }) */ - public async fieldMappingsCreate( + public fieldMappingsCreate( + request: Merge.filestorage.CreateFieldMappingRequest, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsCreate(request, requestOptions)); + } + + private async __fieldMappingsCreate( request: Merge.filestorage.CreateFieldMappingRequest, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { excludeRemoteFieldMetadata, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (excludeRemoteFieldMetadata != null) { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/field-mappings" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/field-mappings", ), method: "POST", headers: { @@ -153,8 +176,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -170,13 +193,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -194,7 +220,7 @@ export class FieldMapping { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /filestorage/v1/field-mappings." + "Timeout exceeded when calling POST /filestorage/v1/field-mappings.", ); case "unknown": throw new errors.MergeError({ @@ -212,14 +238,23 @@ export class FieldMapping { * @example * await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id") */ - public async fieldMappingsDestroy( + public fieldMappingsDestroy( + fieldMappingId: string, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsDestroy(fieldMappingId, requestOptions)); + } + + private async __fieldMappingsDestroy( fieldMappingId: string, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `filestorage/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "DELETE", headers: { @@ -230,8 +265,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -243,13 +278,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -267,7 +305,7 @@ export class FieldMapping { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling DELETE /filestorage/v1/field-mappings/{field_mapping_id}." + "Timeout exceeded when calling DELETE /filestorage/v1/field-mappings/{field_mapping_id}.", ); case "unknown": throw new errors.MergeError({ @@ -286,15 +324,27 @@ export class FieldMapping { * @example * await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id") */ - public async fieldMappingsPartialUpdate( + public fieldMappingsPartialUpdate( fieldMappingId: string, request: Merge.filestorage.PatchedEditFieldMappingRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__fieldMappingsPartialUpdate(fieldMappingId, request, requestOptions), + ); + } + + private async __fieldMappingsPartialUpdate( + fieldMappingId: string, + request: Merge.filestorage.PatchedEditFieldMappingRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `filestorage/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "PATCH", headers: { @@ -305,8 +355,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -321,13 +371,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -345,7 +398,7 @@ export class FieldMapping { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling PATCH /filestorage/v1/field-mappings/{field_mapping_id}." + "Timeout exceeded when calling PATCH /filestorage/v1/field-mappings/{field_mapping_id}.", ); case "unknown": throw new errors.MergeError({ @@ -363,12 +416,19 @@ export class FieldMapping { * @example * await client.filestorage.fieldMapping.remoteFieldsRetrieve() */ - public async remoteFieldsRetrieve( + public remoteFieldsRetrieve( + request: Merge.filestorage.RemoteFieldsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldsRetrieve(request, requestOptions)); + } + + private async __remoteFieldsRetrieve( request: Merge.filestorage.RemoteFieldsRetrieveRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { commonModels, includeExampleValues } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (commonModels != null) { _queryParams["common_models"] = commonModels; } @@ -379,8 +439,10 @@ 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/remote-fields" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/remote-fields", ), method: "GET", headers: { @@ -391,8 +453,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -405,13 +467,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.RemoteFieldApiResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.RemoteFieldApiResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -444,13 +509,21 @@ export class FieldMapping { * @example * await client.filestorage.fieldMapping.targetFieldsRetrieve() */ - public async targetFieldsRetrieve( - requestOptions?: FieldMapping.RequestOptions - ): Promise { + public targetFieldsRetrieve( + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__targetFieldsRetrieve(requestOptions)); + } + + private async __targetFieldsRetrieve( + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/target-fields" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/target-fields", ), method: "GET", headers: { @@ -461,8 +534,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -474,13 +547,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/filestorage/resources/files/client/Client.ts b/src/api/resources/filestorage/resources/files/client/Client.ts index e0b2b25c4..8f1cf7b94 100644 --- a/src/api/resources/filestorage/resources/files/client/Client.ts +++ b/src/api/resources/filestorage/resources/files/client/Client.ts @@ -5,21 +5,23 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; import * as stream from "stream"; export declare namespace Files { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -45,10 +47,17 @@ export class Files { * @example * await client.filestorage.files.list() */ - public async list( + public list( + request: Merge.filestorage.FilesListRequest = {}, + requestOptions?: Files.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.filestorage.FilesListRequest = {}, - requestOptions?: Files.RequestOptions - ): Promise { + requestOptions?: Files.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -66,7 +75,7 @@ export class Files { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -84,7 +93,9 @@ export class Files { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.filestorage.FilesListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (folderId != null) { @@ -129,8 +140,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/files", ), method: "GET", headers: { @@ -141,8 +154,8 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -155,13 +168,16 @@ export class Files { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.PaginatedFileList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.PaginatedFileList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -197,12 +213,19 @@ export class Files { * model: {} * }) */ - public async create( + public create( + request: Merge.filestorage.FileStorageFileEndpointRequest, + requestOptions?: Files.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.filestorage.FileStorageFileEndpointRequest, - requestOptions?: Files.RequestOptions - ): Promise { + requestOptions?: Files.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -213,8 +236,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/files", ), method: "POST", headers: { @@ -225,8 +250,8 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -242,13 +267,16 @@ export class Files { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.FileStorageFileResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.FileStorageFileResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -283,15 +311,25 @@ export class Files { * @example * await client.filestorage.files.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.filestorage.FilesRetrieveRequest = {}, - requestOptions?: Files.RequestOptions - ): Promise { + requestOptions?: Files.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.filestorage.FilesRetrieveRequest = {}, + requestOptions?: Files.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.filestorage.FilesRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -304,8 +342,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `filestorage/v1/files/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -316,8 +356,8 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -330,13 +370,16 @@ export class Files { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.File_.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.File_.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -364,13 +407,21 @@ export class Files { /** * Returns the `File` content with the given `id` as a stream of bytes. */ - public async downloadRetrieve( + public downloadRetrieve( + id: string, + request: Merge.filestorage.FilesDownloadRetrieveRequest = {}, + requestOptions?: Files.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__downloadRetrieve(id, request, requestOptions)); + } + + private async __downloadRetrieve( id: string, request: Merge.filestorage.FilesDownloadRetrieveRequest = {}, - requestOptions?: Files.RequestOptions - ): Promise { + requestOptions?: Files.RequestOptions, + ): Promise> { const { includeShellData, mimeType } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeShellData != null) { _queryParams["include_shell_data"] = includeShellData.toString(); } @@ -381,8 +432,10 @@ 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/${encodeURIComponent(id)}/download` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `filestorage/v1/files/${encodeURIComponent(id)}/download`, ), method: "GET", headers: { @@ -393,8 +446,8 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -408,7 +461,7 @@ export class Files { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return _response.body; + return { data: _response.body, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -426,7 +479,7 @@ export class Files { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /filestorage/v1/files/{id}/download." + "Timeout exceeded when calling GET /filestorage/v1/files/{id}/download.", ); case "unknown": throw new errors.MergeError({ @@ -445,21 +498,31 @@ export class Files { * @example * await client.filestorage.files.downloadRequestMetaRetrieve("id") */ - public async downloadRequestMetaRetrieve( + public downloadRequestMetaRetrieve( + id: string, + request: Merge.filestorage.FilesDownloadRequestMetaRetrieveRequest = {}, + requestOptions?: Files.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__downloadRequestMetaRetrieve(id, request, requestOptions)); + } + + private async __downloadRequestMetaRetrieve( id: string, request: Merge.filestorage.FilesDownloadRequestMetaRetrieveRequest = {}, - requestOptions?: Files.RequestOptions - ): Promise { + requestOptions?: Files.RequestOptions, + ): Promise> { const { mimeType } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (mimeType != null) { _queryParams["mime_type"] = mimeType; } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `filestorage/v1/files/${encodeURIComponent(id)}/download/request-meta` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `filestorage/v1/files/${encodeURIComponent(id)}/download/request-meta`, ), method: "GET", headers: { @@ -470,8 +533,8 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -484,13 +547,16 @@ export class Files { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.DownloadRequestMeta.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.DownloadRequestMeta.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -508,7 +574,7 @@ export class Files { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /filestorage/v1/files/{id}/download/request-meta." + "Timeout exceeded when calling GET /filestorage/v1/files/{id}/download/request-meta.", ); case "unknown": throw new errors.MergeError({ @@ -526,12 +592,19 @@ export class Files { * @example * await client.filestorage.files.downloadRequestMetaList() */ - public async downloadRequestMetaList( + public downloadRequestMetaList( + request: Merge.filestorage.FilesDownloadRequestMetaListRequest = {}, + requestOptions?: Files.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__downloadRequestMetaList(request, requestOptions)); + } + + private async __downloadRequestMetaList( request: Merge.filestorage.FilesDownloadRequestMetaListRequest = {}, - requestOptions?: Files.RequestOptions - ): Promise { + requestOptions?: Files.RequestOptions, + ): Promise> { const { cursor, includeDeletedData, mimeType, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -550,8 +623,10 @@ 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/download/request-meta" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/files/download/request-meta", ), method: "GET", headers: { @@ -562,8 +637,8 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -576,13 +651,16 @@ export class Files { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.PaginatedDownloadRequestMetaList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.PaginatedDownloadRequestMetaList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -600,7 +678,7 @@ export class Files { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /filestorage/v1/files/download/request-meta." + "Timeout exceeded when calling GET /filestorage/v1/files/download/request-meta.", ); case "unknown": throw new errors.MergeError({ @@ -617,11 +695,21 @@ export class Files { * @example * await client.filestorage.files.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Files.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Files.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Files.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/files/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/files/meta/post", ), method: "GET", headers: { @@ -632,8 +720,8 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -645,13 +733,16 @@ export class Files { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -669,7 +760,7 @@ export class Files { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /filestorage/v1/files/meta/post." + "Timeout exceeded when calling GET /filestorage/v1/files/meta/post.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/filestorage/resources/files/types/FilesListRequestExpand.ts b/src/api/resources/filestorage/resources/files/types/FilesListRequestExpand.ts index 9461095db..655893866 100644 --- a/src/api/resources/filestorage/resources/files/types/FilesListRequestExpand.ts +++ b/src/api/resources/filestorage/resources/files/types/FilesListRequestExpand.ts @@ -10,7 +10,6 @@ export type FilesListRequestExpand = | "permissions,drive" | "permissions,folder" | "permissions,folder,drive"; - export const FilesListRequestExpand = { Drive: "drive", Folder: "folder", diff --git a/src/api/resources/filestorage/resources/files/types/FilesRetrieveRequestExpand.ts b/src/api/resources/filestorage/resources/files/types/FilesRetrieveRequestExpand.ts index 399bc2bb1..fdefa13d9 100644 --- a/src/api/resources/filestorage/resources/files/types/FilesRetrieveRequestExpand.ts +++ b/src/api/resources/filestorage/resources/files/types/FilesRetrieveRequestExpand.ts @@ -10,7 +10,6 @@ export type FilesRetrieveRequestExpand = | "permissions,drive" | "permissions,folder" | "permissions,folder,drive"; - export const FilesRetrieveRequestExpand = { Drive: "drive", Folder: "folder", diff --git a/src/api/resources/filestorage/resources/folders/client/Client.ts b/src/api/resources/filestorage/resources/folders/client/Client.ts index fca4d6d6c..7604cc8d5 100644 --- a/src/api/resources/filestorage/resources/folders/client/Client.ts +++ b/src/api/resources/filestorage/resources/folders/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Folders { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Folders { * @example * await client.filestorage.folders.list() */ - public async list( + public list( + request: Merge.filestorage.FoldersListRequest = {}, + requestOptions?: Folders.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.filestorage.FoldersListRequest = {}, - requestOptions?: Folders.RequestOptions - ): Promise { + requestOptions?: Folders.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -64,7 +73,7 @@ export class Folders { parentFolderId, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -82,7 +91,9 @@ export class Folders { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.filestorage.FoldersListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -123,8 +134,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/folders", ), method: "GET", headers: { @@ -135,8 +148,8 @@ export class Folders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +162,16 @@ export class Folders { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.PaginatedFolderList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.PaginatedFolderList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -191,12 +207,19 @@ export class Folders { * model: {} * }) */ - public async create( + public create( + request: Merge.filestorage.FileStorageFolderEndpointRequest, + requestOptions?: Folders.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.filestorage.FileStorageFolderEndpointRequest, - requestOptions?: Folders.RequestOptions - ): Promise { + requestOptions?: Folders.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -207,8 +230,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/folders", ), method: "POST", headers: { @@ -219,8 +244,8 @@ export class Folders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -236,13 +261,16 @@ export class Folders { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.FileStorageFolderResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.FileStorageFolderResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -277,15 +305,25 @@ export class Folders { * @example * await client.filestorage.folders.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.filestorage.FoldersRetrieveRequest = {}, + requestOptions?: Folders.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.filestorage.FoldersRetrieveRequest = {}, - requestOptions?: Folders.RequestOptions - ): Promise { + requestOptions?: Folders.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.filestorage.FoldersRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -298,8 +336,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `filestorage/v1/folders/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -310,8 +350,8 @@ export class Folders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -324,13 +364,16 @@ export class Folders { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.Folder.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.Folder.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -363,11 +406,21 @@ export class Folders { * @example * await client.filestorage.folders.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Folders.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Folders.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Folders.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/folders/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/folders/meta/post", ), method: "GET", headers: { @@ -378,8 +431,8 @@ export class Folders { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -391,13 +444,16 @@ export class Folders { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -415,7 +471,7 @@ export class Folders { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /filestorage/v1/folders/meta/post." + "Timeout exceeded when calling GET /filestorage/v1/folders/meta/post.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/filestorage/resources/folders/types/FoldersListRequestExpand.ts b/src/api/resources/filestorage/resources/folders/types/FoldersListRequestExpand.ts index 8feed3e4c..1d40685dc 100644 --- a/src/api/resources/filestorage/resources/folders/types/FoldersListRequestExpand.ts +++ b/src/api/resources/filestorage/resources/folders/types/FoldersListRequestExpand.ts @@ -10,7 +10,6 @@ export type FoldersListRequestExpand = | "permissions,drive" | "permissions,parent_folder" | "permissions,parent_folder,drive"; - export const FoldersListRequestExpand = { Drive: "drive", ParentFolder: "parent_folder", diff --git a/src/api/resources/filestorage/resources/folders/types/FoldersRetrieveRequestExpand.ts b/src/api/resources/filestorage/resources/folders/types/FoldersRetrieveRequestExpand.ts index 8bf071dba..b1f8d5814 100644 --- a/src/api/resources/filestorage/resources/folders/types/FoldersRetrieveRequestExpand.ts +++ b/src/api/resources/filestorage/resources/folders/types/FoldersRetrieveRequestExpand.ts @@ -10,7 +10,6 @@ export type FoldersRetrieveRequestExpand = | "permissions,drive" | "permissions,parent_folder" | "permissions,parent_folder,drive"; - export const FoldersRetrieveRequestExpand = { Drive: "drive", ParentFolder: "parent_folder", diff --git a/src/api/resources/filestorage/resources/forceResync/client/Client.ts b/src/api/resources/filestorage/resources/forceResync/client/Client.ts index cb5c4a70f..17231b9a3 100644 --- a/src/api/resources/filestorage/resources/forceResync/client/Client.ts +++ b/src/api/resources/filestorage/resources/forceResync/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace ForceResync { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,13 +45,21 @@ export class ForceResync { * @example * await client.filestorage.forceResync.syncStatusResyncCreate() */ - public async syncStatusResyncCreate( - requestOptions?: ForceResync.RequestOptions - ): Promise { + public syncStatusResyncCreate( + requestOptions?: ForceResync.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__syncStatusResyncCreate(requestOptions)); + } + + private async __syncStatusResyncCreate( + requestOptions?: ForceResync.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/sync-status/resync" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/sync-status/resync", ), method: "POST", headers: { @@ -60,8 +70,8 @@ export class ForceResync { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -73,13 +83,16 @@ export class ForceResync { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -97,7 +110,7 @@ export class ForceResync { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /filestorage/v1/sync-status/resync." + "Timeout exceeded when calling POST /filestorage/v1/sync-status/resync.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/filestorage/resources/generateKey/client/Client.ts b/src/api/resources/filestorage/resources/generateKey/client/Client.ts index 2e4894023..e966fb011 100644 --- a/src/api/resources/filestorage/resources/generateKey/client/Client.ts +++ b/src/api/resources/filestorage/resources/generateKey/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace GenerateKey { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -46,14 +48,23 @@ export class GenerateKey { * name: "Remote Deployment Key 1" * }) */ - public async create( + public create( request: Merge.filestorage.GenerateRemoteKeyRequest, - requestOptions?: GenerateKey.RequestOptions - ): Promise { + requestOptions?: GenerateKey.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.filestorage.GenerateRemoteKeyRequest, + requestOptions?: GenerateKey.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/generate-key" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/generate-key", ), method: "POST", headers: { @@ -64,8 +75,8 @@ export class GenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -80,13 +91,16 @@ export class GenerateKey { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.RemoteKey.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.RemoteKey.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/filestorage/resources/groups/client/Client.ts b/src/api/resources/filestorage/resources/groups/client/Client.ts index f7e20f6a3..fbff66fa6 100644 --- a/src/api/resources/filestorage/resources/groups/client/Client.ts +++ b/src/api/resources/filestorage/resources/groups/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Groups { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Groups { * @example * await client.filestorage.groups.list() */ - public async list( + public list( request: Merge.filestorage.GroupsListRequest = {}, - requestOptions?: Groups.RequestOptions - ): Promise { + requestOptions?: Groups.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.filestorage.GroupsListRequest = {}, + requestOptions?: Groups.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -61,7 +70,7 @@ export class Groups { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,8 +117,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/groups", ), method: "GET", headers: { @@ -120,8 +131,8 @@ export class Groups { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -134,13 +145,16 @@ export class Groups { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.PaginatedGroupList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.PaginatedGroupList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -175,13 +189,21 @@ export class Groups { * @example * await client.filestorage.groups.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.filestorage.GroupsRetrieveRequest = {}, - requestOptions?: Groups.RequestOptions - ): Promise { + requestOptions?: Groups.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.filestorage.GroupsRetrieveRequest = {}, + requestOptions?: Groups.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -196,8 +218,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `filestorage/v1/groups/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -208,8 +232,8 @@ export class Groups { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -222,13 +246,16 @@ export class Groups { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.Group.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.Group.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/filestorage/resources/issues/client/Client.ts b/src/api/resources/filestorage/resources/issues/client/Client.ts index b32f461e6..e14a3bc1d 100644 --- a/src/api/resources/filestorage/resources/issues/client/Client.ts +++ b/src/api/resources/filestorage/resources/issues/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Issues { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Issues { * @example * await client.filestorage.issues.list() */ - public async list( + public list( + request: Merge.filestorage.IssuesListRequest = {}, + requestOptions?: Issues.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.filestorage.IssuesListRequest = {}, - requestOptions?: Issues.RequestOptions - ): Promise { + requestOptions?: Issues.RequestOptions, + ): Promise> { const { accountToken, cursor, @@ -64,7 +73,7 @@ export class Issues { startDate, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountToken != null) { _queryParams["account_token"] = accountToken; } @@ -118,13 +127,17 @@ export class Issues { } if (status != null) { - _queryParams["status"] = status; + _queryParams["status"] = serializers.filestorage.IssuesListRequestStatus.jsonOrThrow(status, { + unrecognizedObjectKeys: "strip", + }); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/issues" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/issues", ), method: "GET", headers: { @@ -135,8 +148,8 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +162,16 @@ export class Issues { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.PaginatedIssueList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.PaginatedIssueList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -189,11 +205,23 @@ export class Issues { * @example * await client.filestorage.issues.retrieve("id") */ - public async retrieve(id: string, requestOptions?: Issues.RequestOptions): Promise { + public retrieve( + id: string, + requestOptions?: Issues.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, requestOptions)); + } + + private 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `filestorage/v1/issues/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -204,8 +232,8 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -217,13 +245,16 @@ export class Issues { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.Issue.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.Issue.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/filestorage/resources/issues/types/IssuesListRequestStatus.ts b/src/api/resources/filestorage/resources/issues/types/IssuesListRequestStatus.ts index b2d4f1b76..a35e3e193 100644 --- a/src/api/resources/filestorage/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/api/resources/filestorage/resources/issues/types/IssuesListRequestStatus.ts @@ -3,7 +3,6 @@ */ export type IssuesListRequestStatus = "ONGOING" | "RESOLVED"; - export const IssuesListRequestStatus = { Ongoing: "ONGOING", Resolved: "RESOLVED", diff --git a/src/api/resources/filestorage/resources/linkToken/client/Client.ts b/src/api/resources/filestorage/resources/linkToken/client/Client.ts index 8a60d5154..2d052f56c 100644 --- a/src/api/resources/filestorage/resources/linkToken/client/Client.ts +++ b/src/api/resources/filestorage/resources/linkToken/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace LinkToken { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -49,14 +51,23 @@ export class LinkToken { * categories: ["hris", "ats"] * }) */ - public async create( + public create( request: Merge.filestorage.EndUserDetailsRequest, - requestOptions?: LinkToken.RequestOptions - ): Promise { + requestOptions?: LinkToken.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.filestorage.EndUserDetailsRequest, + requestOptions?: LinkToken.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/link-token" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/link-token", ), method: "POST", headers: { @@ -67,8 +78,8 @@ export class LinkToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -83,13 +94,16 @@ export class LinkToken { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.LinkToken.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.LinkToken.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/filestorage/resources/linkedAccounts/client/Client.ts b/src/api/resources/filestorage/resources/linkedAccounts/client/Client.ts index d0f01ccab..5c137dda4 100644 --- a/src/api/resources/filestorage/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/filestorage/resources/linkedAccounts/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace LinkedAccounts { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class LinkedAccounts { * @example * await client.filestorage.linkedAccounts.list() */ - public async list( + public list( request: Merge.filestorage.LinkedAccountsListRequest = {}, - requestOptions?: LinkedAccounts.RequestOptions - ): Promise { + requestOptions?: LinkedAccounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.filestorage.LinkedAccountsListRequest = {}, + requestOptions?: LinkedAccounts.RequestOptions, + ): Promise> { const { category, cursor, @@ -63,9 +72,11 @@ export class LinkedAccounts { pageSize, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (category != null) { - _queryParams["category"] = category; + _queryParams["category"] = serializers.filestorage.LinkedAccountsListRequestCategory.jsonOrThrow(category, { + unrecognizedObjectKeys: "strip", + }); } if (cursor != null) { @@ -118,8 +129,10 @@ export class LinkedAccounts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/linked-accounts" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/linked-accounts", ), method: "GET", headers: { @@ -130,8 +143,8 @@ export class LinkedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -144,13 +157,16 @@ export class LinkedAccounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -168,7 +184,7 @@ export class LinkedAccounts { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /filestorage/v1/linked-accounts." + "Timeout exceeded when calling GET /filestorage/v1/linked-accounts.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/filestorage/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/api/resources/filestorage/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index edeb3e1d1..7474691d1 100644 --- a/src/api/resources/filestorage/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/api/resources/filestorage/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -10,7 +10,6 @@ export type LinkedAccountsListRequestCategory = | "hris" | "mktg" | "ticketing"; - export const LinkedAccountsListRequestCategory = { Accounting: "accounting", Ats: "ats", diff --git a/src/api/resources/filestorage/resources/passthrough/client/Client.ts b/src/api/resources/filestorage/resources/passthrough/client/Client.ts index f13a10a2e..55a05019e 100644 --- a/src/api/resources/filestorage/resources/passthrough/client/Client.ts +++ b/src/api/resources/filestorage/resources/passthrough/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Passthrough { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -47,14 +49,23 @@ export class Passthrough { * path: "/scooters" * }) */ - public async create( + public create( request: Merge.filestorage.DataPassthroughRequest, - requestOptions?: Passthrough.RequestOptions - ): Promise { + requestOptions?: Passthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.filestorage.DataPassthroughRequest, + requestOptions?: Passthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/passthrough" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/passthrough", ), method: "POST", headers: { @@ -65,8 +76,8 @@ export class Passthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -81,13 +92,16 @@ export class Passthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.RemoteResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.RemoteResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/filestorage/resources/regenerateKey/client/Client.ts b/src/api/resources/filestorage/resources/regenerateKey/client/Client.ts index ce01acb55..1cc054409 100644 --- a/src/api/resources/filestorage/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/filestorage/resources/regenerateKey/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace RegenerateKey { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -46,14 +48,23 @@ export class RegenerateKey { * name: "Remote Deployment Key 1" * }) */ - public async create( + public create( request: Merge.filestorage.RemoteKeyForRegenerationRequest, - requestOptions?: RegenerateKey.RequestOptions - ): Promise { + requestOptions?: RegenerateKey.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.filestorage.RemoteKeyForRegenerationRequest, + requestOptions?: RegenerateKey.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/regenerate-key" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/regenerate-key", ), method: "POST", headers: { @@ -64,8 +75,8 @@ export class RegenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -80,13 +91,16 @@ export class RegenerateKey { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.RemoteKey.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.RemoteKey.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -104,7 +118,7 @@ export class RegenerateKey { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /filestorage/v1/regenerate-key." + "Timeout exceeded when calling POST /filestorage/v1/regenerate-key.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/filestorage/resources/scopes/client/Client.ts b/src/api/resources/filestorage/resources/scopes/client/Client.ts index 97acd66a8..b6d821688 100644 --- a/src/api/resources/filestorage/resources/scopes/client/Client.ts +++ b/src/api/resources/filestorage/resources/scopes/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Scopes { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,13 +45,21 @@ export class Scopes { * @example * await client.filestorage.scopes.defaultScopesRetrieve() */ - public async defaultScopesRetrieve( - requestOptions?: Scopes.RequestOptions - ): Promise { + public defaultScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__defaultScopesRetrieve(requestOptions)); + } + + private async __defaultScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/default-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/default-scopes", ), method: "GET", headers: { @@ -60,8 +70,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -73,13 +83,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -112,13 +125,21 @@ export class Scopes { * @example * await client.filestorage.scopes.linkedAccountScopesRetrieve() */ - public async linkedAccountScopesRetrieve( - requestOptions?: Scopes.RequestOptions - ): Promise { + public linkedAccountScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linkedAccountScopesRetrieve(requestOptions)); + } + + private async __linkedAccountScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/linked-account-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/linked-account-scopes", ), method: "GET", headers: { @@ -129,8 +150,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -142,13 +163,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -166,7 +190,7 @@ export class Scopes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /filestorage/v1/linked-account-scopes." + "Timeout exceeded when calling GET /filestorage/v1/linked-account-scopes.", ); case "unknown": throw new errors.MergeError({ @@ -207,14 +231,23 @@ export class Scopes { * }] * }) */ - public async linkedAccountScopesCreate( + public linkedAccountScopesCreate( request: Merge.filestorage.LinkedAccountCommonModelScopeDeserializerRequest, - requestOptions?: Scopes.RequestOptions - ): Promise { + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linkedAccountScopesCreate(request, requestOptions)); + } + + private async __linkedAccountScopesCreate( + request: Merge.filestorage.LinkedAccountCommonModelScopeDeserializerRequest, + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/linked-account-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/linked-account-scopes", ), method: "POST", headers: { @@ -225,8 +258,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -241,13 +274,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -265,7 +301,7 @@ export class Scopes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /filestorage/v1/linked-account-scopes." + "Timeout exceeded when calling POST /filestorage/v1/linked-account-scopes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/filestorage/resources/syncStatus/client/Client.ts b/src/api/resources/filestorage/resources/syncStatus/client/Client.ts index dc343369e..5f4b08f48 100644 --- a/src/api/resources/filestorage/resources/syncStatus/client/Client.ts +++ b/src/api/resources/filestorage/resources/syncStatus/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace SyncStatus { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class SyncStatus { * @example * await client.filestorage.syncStatus.list() */ - public async list( + public list( request: Merge.filestorage.SyncStatusListRequest = {}, - requestOptions?: SyncStatus.RequestOptions - ): Promise { + requestOptions?: SyncStatus.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private 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,8 +69,10 @@ export class SyncStatus { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/sync-status" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/sync-status", ), method: "GET", headers: { @@ -72,8 +83,8 @@ export class SyncStatus { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -86,13 +97,16 @@ export class SyncStatus { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.PaginatedSyncStatusList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.PaginatedSyncStatusList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/filestorage/resources/users/client/Client.ts b/src/api/resources/filestorage/resources/users/client/Client.ts index 277788aeb..1b8c42e40 100644 --- a/src/api/resources/filestorage/resources/users/client/Client.ts +++ b/src/api/resources/filestorage/resources/users/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Users { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Users { * @example * await client.filestorage.users.list() */ - public async list( + public list( request: Merge.filestorage.UsersListRequest = {}, - requestOptions?: Users.RequestOptions - ): Promise { + requestOptions?: Users.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.filestorage.UsersListRequest = {}, + requestOptions?: Users.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -61,7 +70,7 @@ export class Users { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,8 +117,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/users", ), method: "GET", headers: { @@ -120,8 +131,8 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -134,13 +145,16 @@ export class Users { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.PaginatedUserList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.PaginatedUserList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -175,13 +189,21 @@ export class Users { * @example * await client.filestorage.users.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.filestorage.UsersRetrieveRequest = {}, - requestOptions?: Users.RequestOptions - ): Promise { + requestOptions?: Users.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.filestorage.UsersRetrieveRequest = {}, + requestOptions?: Users.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -192,8 +214,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `filestorage/v1/users/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -204,8 +228,8 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -218,13 +242,16 @@ export class Users { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.User.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.User.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/filestorage/resources/webhookReceivers/client/Client.ts b/src/api/resources/filestorage/resources/webhookReceivers/client/Client.ts index 53e7c4b26..b9b2640ab 100644 --- a/src/api/resources/filestorage/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/filestorage/resources/webhookReceivers/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace WebhookReceivers { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class WebhookReceivers { * @example * await client.filestorage.webhookReceivers.list() */ - public async list(requestOptions?: WebhookReceivers.RequestOptions): Promise { + public list( + requestOptions?: WebhookReceivers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(requestOptions)); + } + + private async __list( + requestOptions?: WebhookReceivers.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/webhook-receivers" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/webhook-receivers", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class WebhookReceivers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.webhookReceivers.list.Response.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.webhookReceivers.list.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -95,7 +110,7 @@ export class WebhookReceivers { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /filestorage/v1/webhook-receivers." + "Timeout exceeded when calling GET /filestorage/v1/webhook-receivers.", ); case "unknown": throw new errors.MergeError({ @@ -116,14 +131,23 @@ export class WebhookReceivers { * isActive: true * }) */ - public async create( + public create( request: Merge.filestorage.WebhookReceiverRequest, - requestOptions?: WebhookReceivers.RequestOptions - ): Promise { + requestOptions?: WebhookReceivers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.filestorage.WebhookReceiverRequest, + requestOptions?: WebhookReceivers.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "filestorage/v1/webhook-receivers" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "filestorage/v1/webhook-receivers", ), method: "POST", headers: { @@ -134,8 +158,8 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -150,13 +174,16 @@ export class WebhookReceivers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.filestorage.WebhookReceiver.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.filestorage.WebhookReceiver.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -174,7 +201,7 @@ export class WebhookReceivers { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /filestorage/v1/webhook-receivers." + "Timeout exceeded when calling POST /filestorage/v1/webhook-receivers.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/filestorage/types/AccountDetailsAndActionsStatusEnum.ts b/src/api/resources/filestorage/types/AccountDetailsAndActionsStatusEnum.ts index 084a62d2f..c0020279f 100644 --- a/src/api/resources/filestorage/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/api/resources/filestorage/types/AccountDetailsAndActionsStatusEnum.ts @@ -9,7 +9,6 @@ * - `IDLE` - IDLE */ export type AccountDetailsAndActionsStatusEnum = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; - export const AccountDetailsAndActionsStatusEnum = { Complete: "COMPLETE", Incomplete: "INCOMPLETE", diff --git a/src/api/resources/filestorage/types/CategoriesEnum.ts b/src/api/resources/filestorage/types/CategoriesEnum.ts index 25eba4836..a5eb57230 100644 --- a/src/api/resources/filestorage/types/CategoriesEnum.ts +++ b/src/api/resources/filestorage/types/CategoriesEnum.ts @@ -12,7 +12,6 @@ * - `filestorage` - filestorage */ export type CategoriesEnum = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; - export const CategoriesEnum = { Hris: "hris", Ats: "ats", diff --git a/src/api/resources/filestorage/types/CategoryEnum.ts b/src/api/resources/filestorage/types/CategoryEnum.ts index 263fc40b8..6d3d6d6ae 100644 --- a/src/api/resources/filestorage/types/CategoryEnum.ts +++ b/src/api/resources/filestorage/types/CategoryEnum.ts @@ -12,7 +12,6 @@ * - `filestorage` - filestorage */ export type CategoryEnum = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; - export const CategoryEnum = { Hris: "hris", Ats: "ats", diff --git a/src/api/resources/filestorage/types/EnabledActionsEnum.ts b/src/api/resources/filestorage/types/EnabledActionsEnum.ts index 73d70210e..24418b130 100644 --- a/src/api/resources/filestorage/types/EnabledActionsEnum.ts +++ b/src/api/resources/filestorage/types/EnabledActionsEnum.ts @@ -7,7 +7,6 @@ * - `WRITE` - WRITE */ export type EnabledActionsEnum = "READ" | "WRITE"; - export const EnabledActionsEnum = { Read: "READ", Write: "WRITE", diff --git a/src/api/resources/filestorage/types/EncodingEnum.ts b/src/api/resources/filestorage/types/EncodingEnum.ts index 3defec583..a828347f8 100644 --- a/src/api/resources/filestorage/types/EncodingEnum.ts +++ b/src/api/resources/filestorage/types/EncodingEnum.ts @@ -8,7 +8,6 @@ * - `GZIP_BASE64` - GZIP_BASE64 */ export type EncodingEnum = "RAW" | "BASE64" | "GZIP_BASE64"; - export const EncodingEnum = { Raw: "RAW", Base64: "BASE64", diff --git a/src/api/resources/filestorage/types/EventTypeEnum.ts b/src/api/resources/filestorage/types/EventTypeEnum.ts index eb3218428..08d0f1ce3 100644 --- a/src/api/resources/filestorage/types/EventTypeEnum.ts +++ b/src/api/resources/filestorage/types/EventTypeEnum.ts @@ -89,7 +89,6 @@ export type EventTypeEnum = | "DISABLED_MERGE_WEBHOOK" | "MERGE_WEBHOOK_TARGET_CHANGED" | "END_USER_CREDENTIALS_ACCESSED"; - export const EventTypeEnum = { CreatedRemoteProductionApiKey: "CREATED_REMOTE_PRODUCTION_API_KEY", DeletedRemoteProductionApiKey: "DELETED_REMOTE_PRODUCTION_API_KEY", diff --git a/src/api/resources/filestorage/types/FilePermissions.ts b/src/api/resources/filestorage/types/FilePermissions.ts index 5d5636f69..86cdf0680 100644 --- a/src/api/resources/filestorage/types/FilePermissions.ts +++ b/src/api/resources/filestorage/types/FilePermissions.ts @@ -7,4 +7,4 @@ 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`. */ -export type FilePermissions = string | Merge.filestorage.PermissionRequest | Merge.filestorage.FilePermissionsItem[]; +export type FilePermissions = string | Merge.filestorage.Permission | Merge.filestorage.FilePermissionsItem[]; diff --git a/src/api/resources/filestorage/types/FilePermissionsItem.ts b/src/api/resources/filestorage/types/FilePermissionsItem.ts index 9caa71974..29146f6c3 100644 --- a/src/api/resources/filestorage/types/FilePermissionsItem.ts +++ b/src/api/resources/filestorage/types/FilePermissionsItem.ts @@ -4,4 +4,4 @@ import * as Merge from "../../../index"; -export type FilePermissionsItem = string | Merge.filestorage.PermissionRequest; +export type FilePermissionsItem = string | Merge.filestorage.Permission; diff --git a/src/api/resources/filestorage/types/FolderPermissions.ts b/src/api/resources/filestorage/types/FolderPermissions.ts index e3be80ca9..fb0c71b3b 100644 --- a/src/api/resources/filestorage/types/FolderPermissions.ts +++ b/src/api/resources/filestorage/types/FolderPermissions.ts @@ -7,7 +7,4 @@ 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`. */ -export type FolderPermissions = - | string - | Merge.filestorage.PermissionRequest - | Merge.filestorage.FolderPermissionsItem[]; +export type FolderPermissions = string | Merge.filestorage.Permission | Merge.filestorage.FolderPermissionsItem[]; diff --git a/src/api/resources/filestorage/types/FolderPermissionsItem.ts b/src/api/resources/filestorage/types/FolderPermissionsItem.ts index 18e37fa68..4c5f84016 100644 --- a/src/api/resources/filestorage/types/FolderPermissionsItem.ts +++ b/src/api/resources/filestorage/types/FolderPermissionsItem.ts @@ -4,4 +4,4 @@ import * as Merge from "../../../index"; -export type FolderPermissionsItem = string | Merge.filestorage.PermissionRequest; +export type FolderPermissionsItem = string | Merge.filestorage.Permission; diff --git a/src/api/resources/filestorage/types/IssueStatusEnum.ts b/src/api/resources/filestorage/types/IssueStatusEnum.ts index 9536a7b6d..56fc6d5fa 100644 --- a/src/api/resources/filestorage/types/IssueStatusEnum.ts +++ b/src/api/resources/filestorage/types/IssueStatusEnum.ts @@ -7,7 +7,6 @@ * - `RESOLVED` - RESOLVED */ export type IssueStatusEnum = "ONGOING" | "RESOLVED"; - export const IssueStatusEnum = { Ongoing: "ONGOING", Resolved: "RESOLVED", diff --git a/src/api/resources/filestorage/types/LanguageEnum.ts b/src/api/resources/filestorage/types/LanguageEnum.ts index 92c0e5778..180002115 100644 --- a/src/api/resources/filestorage/types/LanguageEnum.ts +++ b/src/api/resources/filestorage/types/LanguageEnum.ts @@ -7,7 +7,6 @@ * - `de` - de */ export type LanguageEnum = "en" | "de"; - export const LanguageEnum = { En: "en", De: "de", diff --git a/src/api/resources/filestorage/types/LastSyncResultEnum.ts b/src/api/resources/filestorage/types/LastSyncResultEnum.ts index 2617afd73..e14779ef7 100644 --- a/src/api/resources/filestorage/types/LastSyncResultEnum.ts +++ b/src/api/resources/filestorage/types/LastSyncResultEnum.ts @@ -11,7 +11,6 @@ * - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED */ export type LastSyncResultEnum = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; - export const LastSyncResultEnum = { Syncing: "SYNCING", Done: "DONE", diff --git a/src/api/resources/filestorage/types/MethodEnum.ts b/src/api/resources/filestorage/types/MethodEnum.ts index 5fb2be8d3..5d8dae516 100644 --- a/src/api/resources/filestorage/types/MethodEnum.ts +++ b/src/api/resources/filestorage/types/MethodEnum.ts @@ -12,7 +12,6 @@ * - `DELETE` - DELETE */ export type MethodEnum = "GET" | "OPTIONS" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE"; - export const MethodEnum = { Get: "GET", Options: "OPTIONS", diff --git a/src/api/resources/filestorage/types/RequestFormatEnum.ts b/src/api/resources/filestorage/types/RequestFormatEnum.ts index 4b66af670..6c5f28198 100644 --- a/src/api/resources/filestorage/types/RequestFormatEnum.ts +++ b/src/api/resources/filestorage/types/RequestFormatEnum.ts @@ -8,7 +8,6 @@ * - `MULTIPART` - MULTIPART */ export type RequestFormatEnum = "JSON" | "XML" | "MULTIPART"; - export const RequestFormatEnum = { Json: "JSON", Xml: "XML", diff --git a/src/api/resources/filestorage/types/ResponseTypeEnum.ts b/src/api/resources/filestorage/types/ResponseTypeEnum.ts index 91a373778..e123001a6 100644 --- a/src/api/resources/filestorage/types/ResponseTypeEnum.ts +++ b/src/api/resources/filestorage/types/ResponseTypeEnum.ts @@ -7,7 +7,6 @@ * - `BASE64_GZIP` - BASE64_GZIP */ export type ResponseTypeEnum = "JSON" | "BASE64_GZIP"; - export const ResponseTypeEnum = { Json: "JSON", Base64Gzip: "BASE64_GZIP", diff --git a/src/api/resources/filestorage/types/RoleEnum.ts b/src/api/resources/filestorage/types/RoleEnum.ts index 5792757ea..d7b99ac49 100644 --- a/src/api/resources/filestorage/types/RoleEnum.ts +++ b/src/api/resources/filestorage/types/RoleEnum.ts @@ -11,7 +11,6 @@ * - `MERGE_TEAM` - MERGE_TEAM */ export type RoleEnum = "ADMIN" | "DEVELOPER" | "MEMBER" | "API" | "SYSTEM" | "MERGE_TEAM"; - export const RoleEnum = { Admin: "ADMIN", Developer: "DEVELOPER", diff --git a/src/api/resources/filestorage/types/RolesEnum.ts b/src/api/resources/filestorage/types/RolesEnum.ts index 92a527877..d3f203a33 100644 --- a/src/api/resources/filestorage/types/RolesEnum.ts +++ b/src/api/resources/filestorage/types/RolesEnum.ts @@ -8,7 +8,6 @@ * - `OWNER` - OWNER */ export type RolesEnum = "READ" | "WRITE" | "OWNER"; - export const RolesEnum = { Read: "READ", Write: "WRITE", diff --git a/src/api/resources/filestorage/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/api/resources/filestorage/types/SelectiveSyncConfigurationsUsageEnum.ts index 93a6bf0bf..db8508f89 100644 --- a/src/api/resources/filestorage/types/SelectiveSyncConfigurationsUsageEnum.ts +++ b/src/api/resources/filestorage/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -7,7 +7,6 @@ * - `IN_LAST_SYNC` - IN_LAST_SYNC */ export type SelectiveSyncConfigurationsUsageEnum = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; - export const SelectiveSyncConfigurationsUsageEnum = { InNextSync: "IN_NEXT_SYNC", InLastSync: "IN_LAST_SYNC", diff --git a/src/api/resources/filestorage/types/StatusFd5Enum.ts b/src/api/resources/filestorage/types/StatusFd5Enum.ts index dfb75bf03..837436325 100644 --- a/src/api/resources/filestorage/types/StatusFd5Enum.ts +++ b/src/api/resources/filestorage/types/StatusFd5Enum.ts @@ -11,7 +11,6 @@ * - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED */ export type StatusFd5Enum = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; - export const StatusFd5Enum = { Syncing: "SYNCING", Done: "DONE", diff --git a/src/api/resources/filestorage/types/TypeEnum.ts b/src/api/resources/filestorage/types/TypeEnum.ts index 6fc00f94d..5eac15f0d 100644 --- a/src/api/resources/filestorage/types/TypeEnum.ts +++ b/src/api/resources/filestorage/types/TypeEnum.ts @@ -9,7 +9,6 @@ * - `ANYONE` - ANYONE */ export type TypeEnum = "USER" | "GROUP" | "COMPANY" | "ANYONE"; - export const TypeEnum = { User: "USER", Group: "GROUP", diff --git a/src/api/resources/hris/client/Client.ts b/src/api/resources/hris/client/Client.ts index 6ede27395..e87dba976 100644 --- a/src/api/resources/hris/client/Client.ts +++ b/src/api/resources/hris/client/Client.ts @@ -39,225 +39,182 @@ import { TimesheetEntries } from "../resources/timesheetEntries/client/Client"; import { WebhookReceivers } from "../resources/webhookReceivers/client/Client"; export declare namespace Hris { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: 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 Hris { - constructor(protected readonly _options: Hris.Options) {} - protected _accountDetails: AccountDetails | undefined; + protected _accountToken: AccountToken | undefined; + protected _asyncPassthrough: AsyncPassthrough | undefined; + protected _auditTrail: AuditTrail | undefined; + protected _availableActions: AvailableActions | undefined; + protected _bankInfo: BankInfo | undefined; + protected _benefits: Benefits | undefined; + protected _companies: Companies | undefined; + protected _scopes: Scopes | undefined; + protected _deleteAccount: DeleteAccount | undefined; + protected _dependents: Dependents | undefined; + protected _employeePayrollRuns: EmployeePayrollRuns | undefined; + protected _employees: Employees | undefined; + protected _employerBenefits: EmployerBenefits | undefined; + protected _employments: Employments | undefined; + protected _fieldMapping: FieldMapping | undefined; + protected _generateKey: GenerateKey | undefined; + protected _groups: Groups | undefined; + protected _issues: Issues | undefined; + protected _linkToken: LinkToken | undefined; + protected _linkedAccounts: LinkedAccounts | undefined; + protected _locations: Locations | undefined; + protected _passthrough: Passthrough | undefined; + protected _payGroups: PayGroups | undefined; + protected _payrollRuns: PayrollRuns | undefined; + protected _regenerateKey: RegenerateKey | undefined; + protected _syncStatus: SyncStatus | undefined; + protected _forceResync: ForceResync | undefined; + protected _teams: Teams | undefined; + protected _timeOff: TimeOff | undefined; + protected _timeOffBalances: TimeOffBalances | undefined; + protected _timesheetEntries: TimesheetEntries | undefined; + protected _webhookReceivers: WebhookReceivers | undefined; + + constructor(protected readonly _options: Hris.Options) {} public get accountDetails(): AccountDetails { return (this._accountDetails ??= new AccountDetails(this._options)); } - protected _accountToken: AccountToken | undefined; - public get accountToken(): AccountToken { return (this._accountToken ??= new AccountToken(this._options)); } - protected _asyncPassthrough: AsyncPassthrough | undefined; - public get asyncPassthrough(): AsyncPassthrough { return (this._asyncPassthrough ??= new AsyncPassthrough(this._options)); } - protected _auditTrail: AuditTrail | undefined; - public get auditTrail(): AuditTrail { return (this._auditTrail ??= new AuditTrail(this._options)); } - protected _availableActions: AvailableActions | undefined; - public get availableActions(): AvailableActions { return (this._availableActions ??= new AvailableActions(this._options)); } - protected _bankInfo: BankInfo | undefined; - public get bankInfo(): BankInfo { return (this._bankInfo ??= new BankInfo(this._options)); } - protected _benefits: Benefits | undefined; - public get benefits(): Benefits { return (this._benefits ??= new Benefits(this._options)); } - protected _companies: Companies | undefined; - public get companies(): Companies { return (this._companies ??= new Companies(this._options)); } - protected _scopes: Scopes | undefined; - public get scopes(): Scopes { return (this._scopes ??= new Scopes(this._options)); } - protected _deleteAccount: DeleteAccount | undefined; - public get deleteAccount(): DeleteAccount { return (this._deleteAccount ??= new DeleteAccount(this._options)); } - protected _dependents: Dependents | undefined; - public get dependents(): Dependents { return (this._dependents ??= new Dependents(this._options)); } - protected _employeePayrollRuns: EmployeePayrollRuns | undefined; - public get employeePayrollRuns(): EmployeePayrollRuns { return (this._employeePayrollRuns ??= new EmployeePayrollRuns(this._options)); } - protected _employees: Employees | undefined; - public get employees(): Employees { return (this._employees ??= new Employees(this._options)); } - protected _employerBenefits: EmployerBenefits | undefined; - public get employerBenefits(): EmployerBenefits { return (this._employerBenefits ??= new EmployerBenefits(this._options)); } - protected _employments: Employments | undefined; - public get employments(): Employments { return (this._employments ??= new Employments(this._options)); } - protected _fieldMapping: FieldMapping | undefined; - public get fieldMapping(): FieldMapping { return (this._fieldMapping ??= new FieldMapping(this._options)); } - protected _generateKey: GenerateKey | undefined; - public get generateKey(): GenerateKey { return (this._generateKey ??= new GenerateKey(this._options)); } - protected _groups: Groups | undefined; - public get groups(): Groups { return (this._groups ??= new Groups(this._options)); } - protected _issues: Issues | undefined; - public get issues(): Issues { return (this._issues ??= new Issues(this._options)); } - protected _linkToken: LinkToken | undefined; - public get linkToken(): LinkToken { return (this._linkToken ??= new LinkToken(this._options)); } - protected _linkedAccounts: LinkedAccounts | undefined; - public get linkedAccounts(): LinkedAccounts { return (this._linkedAccounts ??= new LinkedAccounts(this._options)); } - protected _locations: Locations | undefined; - public get locations(): Locations { return (this._locations ??= new Locations(this._options)); } - protected _passthrough: Passthrough | undefined; - public get passthrough(): Passthrough { return (this._passthrough ??= new Passthrough(this._options)); } - protected _payGroups: PayGroups | undefined; - public get payGroups(): PayGroups { return (this._payGroups ??= new PayGroups(this._options)); } - protected _payrollRuns: PayrollRuns | undefined; - public get payrollRuns(): PayrollRuns { return (this._payrollRuns ??= new PayrollRuns(this._options)); } - protected _regenerateKey: RegenerateKey | undefined; - public get regenerateKey(): RegenerateKey { return (this._regenerateKey ??= new RegenerateKey(this._options)); } - protected _syncStatus: SyncStatus | undefined; - public get syncStatus(): SyncStatus { return (this._syncStatus ??= new SyncStatus(this._options)); } - protected _forceResync: ForceResync | undefined; - public get forceResync(): ForceResync { return (this._forceResync ??= new ForceResync(this._options)); } - protected _teams: Teams | undefined; - public get teams(): Teams { return (this._teams ??= new Teams(this._options)); } - protected _timeOff: TimeOff | undefined; - public get timeOff(): TimeOff { return (this._timeOff ??= new TimeOff(this._options)); } - protected _timeOffBalances: TimeOffBalances | undefined; - public get timeOffBalances(): TimeOffBalances { return (this._timeOffBalances ??= new TimeOffBalances(this._options)); } - protected _timesheetEntries: TimesheetEntries | undefined; - public get timesheetEntries(): TimesheetEntries { return (this._timesheetEntries ??= new TimesheetEntries(this._options)); } - protected _webhookReceivers: WebhookReceivers | undefined; - public get webhookReceivers(): WebhookReceivers { return (this._webhookReceivers ??= new WebhookReceivers(this._options)); } diff --git a/src/api/resources/hris/resources/accountDetails/client/Client.ts b/src/api/resources/hris/resources/accountDetails/client/Client.ts index 8f7e2bdd7..6d0195c96 100644 --- a/src/api/resources/hris/resources/accountDetails/client/Client.ts +++ b/src/api/resources/hris/resources/accountDetails/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AccountDetails { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class AccountDetails { * @example * await client.hris.accountDetails.retrieve() */ - public async retrieve(requestOptions?: AccountDetails.RequestOptions): Promise { + public retrieve( + requestOptions?: AccountDetails.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(requestOptions)); + } + + private async __retrieve( + requestOptions?: AccountDetails.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/account-details" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/account-details", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class AccountDetails { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class AccountDetails { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.AccountDetails.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.AccountDetails.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/accountToken/client/Client.ts b/src/api/resources/hris/resources/accountToken/client/Client.ts index 56b46472c..a69b4795d 100644 --- a/src/api/resources/hris/resources/accountToken/client/Client.ts +++ b/src/api/resources/hris/resources/accountToken/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AccountToken { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,14 +46,23 @@ export class AccountToken { * @example * await client.hris.accountToken.retrieve("public_token") */ - public async retrieve( + public retrieve( publicToken: string, - requestOptions?: AccountToken.RequestOptions - ): Promise { + requestOptions?: AccountToken.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(publicToken, requestOptions)); + } + + private async __retrieve( + publicToken: string, + requestOptions?: AccountToken.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/account-token/${encodeURIComponent(publicToken)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/account-token/${encodeURIComponent(publicToken)}`, ), method: "GET", headers: { @@ -62,8 +73,8 @@ export class AccountToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -75,13 +86,16 @@ export class AccountToken { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.AccountToken.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.AccountToken.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -99,7 +113,7 @@ export class AccountToken { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /hris/v1/account-token/{public_token}." + "Timeout exceeded when calling GET /hris/v1/account-token/{public_token}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/hris/resources/asyncPassthrough/client/Client.ts b/src/api/resources/hris/resources/asyncPassthrough/client/Client.ts index dccfbbe00..2d8c13040 100644 --- a/src/api/resources/hris/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/hris/resources/asyncPassthrough/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace AsyncPassthrough { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -47,14 +49,23 @@ export class AsyncPassthrough { * path: "/scooters" * }) */ - public async create( + public create( request: Merge.hris.DataPassthroughRequest, - requestOptions?: AsyncPassthrough.RequestOptions - ): Promise { + requestOptions?: AsyncPassthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.hris.DataPassthroughRequest, + requestOptions?: AsyncPassthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/async-passthrough" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/async-passthrough", ), method: "POST", headers: { @@ -65,8 +76,8 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -79,13 +90,16 @@ export class AsyncPassthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.AsyncPassthroughReciept.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.AsyncPassthroughReciept.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -119,14 +133,23 @@ export class AsyncPassthrough { * @example * await client.hris.asyncPassthrough.retrieve("async_passthrough_receipt_id") */ - public async retrieve( + public retrieve( asyncPassthroughReceiptId: string, - requestOptions?: AsyncPassthrough.RequestOptions - ): Promise { + requestOptions?: AsyncPassthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(asyncPassthroughReceiptId, requestOptions)); + } + + private async __retrieve( + asyncPassthroughReceiptId: string, + requestOptions?: AsyncPassthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}`, ), method: "GET", headers: { @@ -137,8 +160,8 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -150,13 +173,16 @@ export class AsyncPassthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -174,7 +200,7 @@ export class AsyncPassthrough { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /hris/v1/async-passthrough/{async_passthrough_receipt_id}." + "Timeout exceeded when calling GET /hris/v1/async-passthrough/{async_passthrough_receipt_id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/hris/resources/auditTrail/client/Client.ts b/src/api/resources/hris/resources/auditTrail/client/Client.ts index 0456f6f41..dfd2f49ac 100644 --- a/src/api/resources/hris/resources/auditTrail/client/Client.ts +++ b/src/api/resources/hris/resources/auditTrail/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AuditTrail { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class AuditTrail { * @example * await client.hris.auditTrail.list() */ - public async list( + public list( request: Merge.hris.AuditTrailListRequest = {}, - requestOptions?: AuditTrail.RequestOptions - ): Promise { + requestOptions?: AuditTrail.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private 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,8 +85,10 @@ export class AuditTrail { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/audit-trail" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/audit-trail", ), method: "GET", headers: { @@ -88,8 +99,8 @@ export class AuditTrail { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -102,13 +113,16 @@ export class AuditTrail { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedAuditLogEventList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedAuditLogEventList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/availableActions/client/Client.ts b/src/api/resources/hris/resources/availableActions/client/Client.ts index 53cb11cdb..7771c9a77 100644 --- a/src/api/resources/hris/resources/availableActions/client/Client.ts +++ b/src/api/resources/hris/resources/availableActions/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AvailableActions { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class AvailableActions { * @example * await client.hris.availableActions.retrieve() */ - public async retrieve(requestOptions?: AvailableActions.RequestOptions): Promise { + public retrieve( + requestOptions?: AvailableActions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(requestOptions)); + } + + private async __retrieve( + requestOptions?: AvailableActions.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/available-actions" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/available-actions", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class AvailableActions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class AvailableActions { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.AvailableActions.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.AvailableActions.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/bankInfo/client/Client.ts b/src/api/resources/hris/resources/bankInfo/client/Client.ts index 74dcca5b2..87a6a219b 100644 --- a/src/api/resources/hris/resources/bankInfo/client/Client.ts +++ b/src/api/resources/hris/resources/bankInfo/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace BankInfo { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class BankInfo { * @example * await client.hris.bankInfo.list() */ - public async list( + public list( request: Merge.hris.BankInfoListRequest = {}, - requestOptions?: BankInfo.RequestOptions - ): Promise { + requestOptions?: BankInfo.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.hris.BankInfoListRequest = {}, + requestOptions?: BankInfo.RequestOptions, + ): Promise> { const { accountType, bankName, @@ -67,9 +76,11 @@ export class BankInfo { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountType != null) { - _queryParams["account_type"] = accountType; + _queryParams["account_type"] = serializers.hris.BankInfoListRequestAccountType.jsonOrThrow(accountType, { + unrecognizedObjectKeys: "strip", + }); } if (bankName != null) { @@ -117,7 +128,9 @@ export class BankInfo { } if (orderBy != null) { - _queryParams["order_by"] = orderBy; + _queryParams["order_by"] = serializers.hris.BankInfoListRequestOrderBy.jsonOrThrow(orderBy, { + unrecognizedObjectKeys: "strip", + }); } if (pageSize != null) { @@ -138,8 +151,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/bank-info", ), method: "GET", headers: { @@ -150,8 +165,8 @@ export class BankInfo { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -164,13 +179,16 @@ export class BankInfo { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedBankInfoList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedBankInfoList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -205,13 +223,21 @@ export class BankInfo { * @example * await client.hris.bankInfo.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.hris.BankInfoRetrieveRequest = {}, + requestOptions?: BankInfo.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.hris.BankInfoRetrieveRequest = {}, - requestOptions?: BankInfo.RequestOptions - ): Promise { + requestOptions?: BankInfo.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -234,8 +260,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/bank-info/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -246,8 +274,8 @@ export class BankInfo { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -260,13 +288,16 @@ export class BankInfo { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.BankInfo.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.BankInfo.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/bankInfo/types/BankInfoListRequestAccountType.ts b/src/api/resources/hris/resources/bankInfo/types/BankInfoListRequestAccountType.ts index 63d1f6f02..acffbf578 100644 --- a/src/api/resources/hris/resources/bankInfo/types/BankInfoListRequestAccountType.ts +++ b/src/api/resources/hris/resources/bankInfo/types/BankInfoListRequestAccountType.ts @@ -3,7 +3,6 @@ */ export type BankInfoListRequestAccountType = "CHECKING" | "SAVINGS"; - export const BankInfoListRequestAccountType = { Checking: "CHECKING", Savings: "SAVINGS", diff --git a/src/api/resources/hris/resources/bankInfo/types/BankInfoListRequestOrderBy.ts b/src/api/resources/hris/resources/bankInfo/types/BankInfoListRequestOrderBy.ts index cb39a9652..719c6abb5 100644 --- a/src/api/resources/hris/resources/bankInfo/types/BankInfoListRequestOrderBy.ts +++ b/src/api/resources/hris/resources/bankInfo/types/BankInfoListRequestOrderBy.ts @@ -3,7 +3,6 @@ */ export type BankInfoListRequestOrderBy = "-remote_created_at" | "remote_created_at"; - export const BankInfoListRequestOrderBy = { RemoteCreatedAtDescending: "-remote_created_at", RemoteCreatedAtAscending: "remote_created_at", diff --git a/src/api/resources/hris/resources/benefits/client/Client.ts b/src/api/resources/hris/resources/benefits/client/Client.ts index 8434f610d..5a5cc4938 100644 --- a/src/api/resources/hris/resources/benefits/client/Client.ts +++ b/src/api/resources/hris/resources/benefits/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Benefits { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Benefits { * @example * await client.hris.benefits.list() */ - public async list( + public list( request: Merge.hris.BenefitsListRequest = {}, - requestOptions?: Benefits.RequestOptions - ): Promise { + requestOptions?: Benefits.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.hris.BenefitsListRequest = {}, + requestOptions?: Benefits.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -62,7 +71,7 @@ export class Benefits { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -113,8 +122,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/benefits", ), method: "GET", headers: { @@ -125,8 +136,8 @@ export class Benefits { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -139,13 +150,16 @@ export class Benefits { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedBenefitList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedBenefitList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -180,13 +194,21 @@ export class Benefits { * @example * await client.hris.benefits.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.hris.BenefitsRetrieveRequest = {}, - requestOptions?: Benefits.RequestOptions - ): Promise { + requestOptions?: Benefits.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.hris.BenefitsRetrieveRequest = {}, + requestOptions?: Benefits.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -201,8 +223,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/benefits/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -213,8 +237,8 @@ export class Benefits { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -227,13 +251,16 @@ export class Benefits { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.Benefit.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.Benefit.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/companies/client/Client.ts b/src/api/resources/hris/resources/companies/client/Client.ts index b42e88009..5fde7880f 100644 --- a/src/api/resources/hris/resources/companies/client/Client.ts +++ b/src/api/resources/hris/resources/companies/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Companies { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Companies { * @example * await client.hris.companies.list() */ - public async list( + public list( request: Merge.hris.CompaniesListRequest = {}, - requestOptions?: Companies.RequestOptions - ): Promise { + requestOptions?: Companies.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.hris.CompaniesListRequest = {}, + requestOptions?: Companies.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -60,7 +69,7 @@ export class Companies { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,8 +112,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/companies", ), method: "GET", headers: { @@ -115,8 +126,8 @@ export class Companies { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -129,13 +140,16 @@ export class Companies { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedCompanyList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedCompanyList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -170,13 +184,21 @@ export class Companies { * @example * await client.hris.companies.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.hris.CompaniesRetrieveRequest = {}, - requestOptions?: Companies.RequestOptions - ): Promise { + requestOptions?: Companies.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.hris.CompaniesRetrieveRequest = {}, + requestOptions?: Companies.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -187,8 +209,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/companies/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -199,8 +223,8 @@ export class Companies { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -213,13 +237,16 @@ export class Companies { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.Company.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.Company.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/deleteAccount/client/Client.ts b/src/api/resources/hris/resources/deleteAccount/client/Client.ts index 6b02606ff..9852fd243 100644 --- a/src/api/resources/hris/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/hris/resources/deleteAccount/client/Client.ts @@ -8,15 +8,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace DeleteAccount { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -41,11 +43,17 @@ export class DeleteAccount { * @example * await client.hris.deleteAccount.delete() */ - public async delete(requestOptions?: DeleteAccount.RequestOptions): Promise { + public delete(requestOptions?: DeleteAccount.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(requestOptions)); + } + + private async __delete(requestOptions?: DeleteAccount.RequestOptions): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/delete-account" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/delete-account", ), method: "POST", headers: { @@ -56,8 +64,8 @@ export class DeleteAccount { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -69,7 +77,7 @@ export class DeleteAccount { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return { data: undefined, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/dependents/client/Client.ts b/src/api/resources/hris/resources/dependents/client/Client.ts index 63beb5e4a..3e88fd8f9 100644 --- a/src/api/resources/hris/resources/dependents/client/Client.ts +++ b/src/api/resources/hris/resources/dependents/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Dependents { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Dependents { * @example * await client.hris.dependents.list() */ - public async list( + public list( request: Merge.hris.DependentsListRequest = {}, - requestOptions?: Dependents.RequestOptions - ): Promise { + requestOptions?: Dependents.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.hris.DependentsListRequest = {}, + requestOptions?: Dependents.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -61,7 +70,7 @@ export class Dependents { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,8 +117,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/dependents", ), method: "GET", headers: { @@ -120,8 +131,8 @@ export class Dependents { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -134,13 +145,16 @@ export class Dependents { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedDependentList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedDependentList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -175,13 +189,21 @@ export class Dependents { * @example * await client.hris.dependents.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.hris.DependentsRetrieveRequest = {}, - requestOptions?: Dependents.RequestOptions - ): Promise { + requestOptions?: Dependents.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.hris.DependentsRetrieveRequest = {}, + requestOptions?: Dependents.RequestOptions, + ): Promise> { const { includeRemoteData, includeSensitiveFields, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -196,8 +218,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/dependents/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -208,8 +232,8 @@ export class Dependents { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -222,13 +246,16 @@ export class Dependents { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.Dependent.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.Dependent.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/employeePayrollRuns/client/Client.ts b/src/api/resources/hris/resources/employeePayrollRuns/client/Client.ts index f41765ad6..1d752e7c8 100644 --- a/src/api/resources/hris/resources/employeePayrollRuns/client/Client.ts +++ b/src/api/resources/hris/resources/employeePayrollRuns/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace EmployeePayrollRuns { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class EmployeePayrollRuns { * @example * await client.hris.employeePayrollRuns.list() */ - public async list( + public list( request: Merge.hris.EmployeePayrollRunsListRequest = {}, - requestOptions?: EmployeePayrollRuns.RequestOptions - ): Promise { + requestOptions?: EmployeePayrollRuns.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.hris.EmployeePayrollRunsListRequest = {}, + requestOptions?: EmployeePayrollRuns.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -67,7 +76,7 @@ export class EmployeePayrollRuns { startedAfter, startedBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -93,7 +102,9 @@ export class EmployeePayrollRuns { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.hris.EmployeePayrollRunsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -138,8 +149,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/employee-payroll-runs", ), method: "GET", headers: { @@ -150,8 +163,8 @@ export class EmployeePayrollRuns { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -164,13 +177,16 @@ export class EmployeePayrollRuns { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedEmployeePayrollRunList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedEmployeePayrollRunList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -205,15 +221,25 @@ export class EmployeePayrollRuns { * @example * await client.hris.employeePayrollRuns.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.hris.EmployeePayrollRunsRetrieveRequest = {}, - requestOptions?: EmployeePayrollRuns.RequestOptions - ): Promise { + requestOptions?: EmployeePayrollRuns.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.hris.EmployeePayrollRunsRetrieveRequest = {}, + requestOptions?: EmployeePayrollRuns.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.hris.EmployeePayrollRunsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -226,8 +252,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/employee-payroll-runs/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -238,8 +266,8 @@ export class EmployeePayrollRuns { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -252,13 +280,16 @@ export class EmployeePayrollRuns { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.EmployeePayrollRun.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.EmployeePayrollRun.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -276,7 +307,7 @@ export class EmployeePayrollRuns { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /hris/v1/employee-payroll-runs/{id}." + "Timeout exceeded when calling GET /hris/v1/employee-payroll-runs/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsListRequestExpand.ts b/src/api/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsListRequestExpand.ts index 000487478..623bce698 100644 --- a/src/api/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsListRequestExpand.ts +++ b/src/api/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsListRequestExpand.ts @@ -3,7 +3,6 @@ */ export type EmployeePayrollRunsListRequestExpand = "employee" | "employee,payroll_run" | "payroll_run"; - export const EmployeePayrollRunsListRequestExpand = { Employee: "employee", EmployeePayrollRun: "employee,payroll_run", diff --git a/src/api/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsRetrieveRequestExpand.ts b/src/api/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsRetrieveRequestExpand.ts index 7eabdee77..6d9aed2c8 100644 --- a/src/api/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsRetrieveRequestExpand.ts +++ b/src/api/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsRetrieveRequestExpand.ts @@ -3,7 +3,6 @@ */ export type EmployeePayrollRunsRetrieveRequestExpand = "employee" | "employee,payroll_run" | "payroll_run"; - export const EmployeePayrollRunsRetrieveRequestExpand = { Employee: "employee", EmployeePayrollRun: "employee,payroll_run", diff --git a/src/api/resources/hris/resources/employees/client/Client.ts b/src/api/resources/hris/resources/employees/client/Client.ts index 179cfea41..861d06a88 100644 --- a/src/api/resources/hris/resources/employees/client/Client.ts +++ b/src/api/resources/hris/resources/employees/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Employees { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Employees { * @example * await client.hris.employees.list() */ - public async list( + public list( + request: Merge.hris.EmployeesListRequest = {}, + requestOptions?: Employees.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.hris.EmployeesListRequest = {}, - requestOptions?: Employees.RequestOptions - ): Promise { + requestOptions?: Employees.RequestOptions, + ): Promise> { const { companyId, createdAfter, @@ -83,7 +92,7 @@ export class Employees { workEmail, workLocationId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (companyId != null) { _queryParams["company_id"] = companyId; } @@ -105,7 +114,10 @@ export class Employees { } if (employmentStatus != null) { - _queryParams["employment_status"] = employmentStatus; + _queryParams["employment_status"] = serializers.hris.EmployeesListRequestEmploymentStatus.jsonOrThrow( + employmentStatus, + { unrecognizedObjectKeys: "strip" }, + ); } if (employmentType != null) { @@ -113,7 +125,9 @@ export class Employees { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.hris.EmployeesListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (firstName != null) { @@ -177,7 +191,10 @@ export class Employees { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.hris.EmployeesListRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (remoteId != null) { @@ -185,7 +202,10 @@ export class Employees { } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.hris.EmployeesListRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } if (startedAfter != null) { @@ -218,8 +238,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/employees", ), method: "GET", headers: { @@ -230,8 +252,8 @@ export class Employees { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -244,13 +266,16 @@ export class Employees { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedEmployeeList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedEmployeeList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -286,12 +311,19 @@ export class Employees { * model: {} * }) */ - public async create( + public create( + request: Merge.hris.EmployeeEndpointRequest, + requestOptions?: Employees.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.hris.EmployeeEndpointRequest, - requestOptions?: Employees.RequestOptions - ): Promise { + requestOptions?: Employees.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -302,8 +334,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/employees", ), method: "POST", headers: { @@ -314,8 +348,8 @@ export class Employees { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -329,13 +363,16 @@ export class Employees { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.EmployeeResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.EmployeeResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -370,16 +407,26 @@ export class Employees { * @example * await client.hris.employees.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.hris.EmployeesRetrieveRequest = {}, + requestOptions?: Employees.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.hris.EmployeesRetrieveRequest = {}, - requestOptions?: Employees.RequestOptions - ): Promise { + requestOptions?: Employees.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeSensitiveFields, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.hris.EmployeesRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -395,17 +442,25 @@ export class Employees { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.hris.EmployeesRetrieveRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.hris.EmployeesRetrieveRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/employees/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/employees/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -416,8 +471,8 @@ export class Employees { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -430,13 +485,16 @@ export class Employees { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.Employee.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.Employee.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -473,15 +531,25 @@ export class Employees { * reason: "GENERAL_CUSTOMER_REQUEST" * }) */ - public async ignoreCreate( + public ignoreCreate( + modelId: string, + request: Merge.hris.IgnoreCommonModelRequest, + requestOptions?: Employees.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__ignoreCreate(modelId, request, requestOptions)); + } + + private async __ignoreCreate( modelId: string, request: Merge.hris.IgnoreCommonModelRequest, - requestOptions?: Employees.RequestOptions - ): Promise { + requestOptions?: Employees.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/employees/ignore/${encodeURIComponent(modelId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/employees/ignore/${encodeURIComponent(modelId)}`, ), method: "POST", headers: { @@ -492,8 +560,8 @@ export class Employees { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -506,7 +574,7 @@ export class Employees { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return { data: undefined, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -524,7 +592,7 @@ export class Employees { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /hris/v1/employees/ignore/{model_id}." + "Timeout exceeded when calling POST /hris/v1/employees/ignore/{model_id}.", ); case "unknown": throw new errors.MergeError({ @@ -541,11 +609,21 @@ export class Employees { * @example * await client.hris.employees.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Employees.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Employees.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Employees.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/employees/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/employees/meta/post", ), method: "GET", headers: { @@ -556,8 +634,8 @@ export class Employees { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -569,13 +647,16 @@ export class Employees { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/employees/types/EmployeesListRequestEmploymentStatus.ts b/src/api/resources/hris/resources/employees/types/EmployeesListRequestEmploymentStatus.ts index 876bfa08c..fc8c0135f 100644 --- a/src/api/resources/hris/resources/employees/types/EmployeesListRequestEmploymentStatus.ts +++ b/src/api/resources/hris/resources/employees/types/EmployeesListRequestEmploymentStatus.ts @@ -3,7 +3,6 @@ */ export type EmployeesListRequestEmploymentStatus = "ACTIVE" | "INACTIVE" | "PENDING"; - export const EmployeesListRequestEmploymentStatus = { Active: "ACTIVE", Inactive: "INACTIVE", diff --git a/src/api/resources/hris/resources/employees/types/EmployeesListRequestExpand.ts b/src/api/resources/hris/resources/employees/types/EmployeesListRequestExpand.ts index dd40818df..78cc1ae88 100644 --- a/src/api/resources/hris/resources/employees/types/EmployeesListRequestExpand.ts +++ b/src/api/resources/hris/resources/employees/types/EmployeesListRequestExpand.ts @@ -258,7 +258,6 @@ export type EmployeesListRequestExpand = | "work_location,team,company" | "work_location,team,company,pay_group" | "work_location,team,pay_group"; - export const EmployeesListRequestExpand = { Company: "company", CompanyPayGroup: "company,pay_group", diff --git a/src/api/resources/hris/resources/employees/types/EmployeesListRequestRemoteFields.ts b/src/api/resources/hris/resources/employees/types/EmployeesListRequestRemoteFields.ts index 5ad5bbb9a..059b02555 100644 --- a/src/api/resources/hris/resources/employees/types/EmployeesListRequestRemoteFields.ts +++ b/src/api/resources/hris/resources/employees/types/EmployeesListRequestRemoteFields.ts @@ -18,7 +18,6 @@ export type EmployeesListRequestRemoteFields = | "gender" | "gender,marital_status" | "marital_status"; - export const EmployeesListRequestRemoteFields = { EmploymentStatus: "employment_status", EmploymentStatusEthnicity: "employment_status,ethnicity", diff --git a/src/api/resources/hris/resources/employees/types/EmployeesListRequestShowEnumOrigins.ts b/src/api/resources/hris/resources/employees/types/EmployeesListRequestShowEnumOrigins.ts index de82f436a..baf811268 100644 --- a/src/api/resources/hris/resources/employees/types/EmployeesListRequestShowEnumOrigins.ts +++ b/src/api/resources/hris/resources/employees/types/EmployeesListRequestShowEnumOrigins.ts @@ -18,7 +18,6 @@ export type EmployeesListRequestShowEnumOrigins = | "gender" | "gender,marital_status" | "marital_status"; - export const EmployeesListRequestShowEnumOrigins = { EmploymentStatus: "employment_status", EmploymentStatusEthnicity: "employment_status,ethnicity", diff --git a/src/api/resources/hris/resources/employees/types/EmployeesRetrieveRequestExpand.ts b/src/api/resources/hris/resources/employees/types/EmployeesRetrieveRequestExpand.ts index 128030be1..84e8cbc9d 100644 --- a/src/api/resources/hris/resources/employees/types/EmployeesRetrieveRequestExpand.ts +++ b/src/api/resources/hris/resources/employees/types/EmployeesRetrieveRequestExpand.ts @@ -258,7 +258,6 @@ export type EmployeesRetrieveRequestExpand = | "work_location,team,company" | "work_location,team,company,pay_group" | "work_location,team,pay_group"; - export const EmployeesRetrieveRequestExpand = { Company: "company", CompanyPayGroup: "company,pay_group", diff --git a/src/api/resources/hris/resources/employees/types/EmployeesRetrieveRequestRemoteFields.ts b/src/api/resources/hris/resources/employees/types/EmployeesRetrieveRequestRemoteFields.ts index 864b0134c..76ffdf65c 100644 --- a/src/api/resources/hris/resources/employees/types/EmployeesRetrieveRequestRemoteFields.ts +++ b/src/api/resources/hris/resources/employees/types/EmployeesRetrieveRequestRemoteFields.ts @@ -18,7 +18,6 @@ export type EmployeesRetrieveRequestRemoteFields = | "gender" | "gender,marital_status" | "marital_status"; - export const EmployeesRetrieveRequestRemoteFields = { EmploymentStatus: "employment_status", EmploymentStatusEthnicity: "employment_status,ethnicity", diff --git a/src/api/resources/hris/resources/employees/types/EmployeesRetrieveRequestShowEnumOrigins.ts b/src/api/resources/hris/resources/employees/types/EmployeesRetrieveRequestShowEnumOrigins.ts index 4c5b244e5..16135eceb 100644 --- a/src/api/resources/hris/resources/employees/types/EmployeesRetrieveRequestShowEnumOrigins.ts +++ b/src/api/resources/hris/resources/employees/types/EmployeesRetrieveRequestShowEnumOrigins.ts @@ -18,7 +18,6 @@ export type EmployeesRetrieveRequestShowEnumOrigins = | "gender" | "gender,marital_status" | "marital_status"; - export const EmployeesRetrieveRequestShowEnumOrigins = { EmploymentStatus: "employment_status", EmploymentStatusEthnicity: "employment_status,ethnicity", diff --git a/src/api/resources/hris/resources/employerBenefits/client/Client.ts b/src/api/resources/hris/resources/employerBenefits/client/Client.ts index d92079262..5c7271654 100644 --- a/src/api/resources/hris/resources/employerBenefits/client/Client.ts +++ b/src/api/resources/hris/resources/employerBenefits/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace EmployerBenefits { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class EmployerBenefits { * @example * await client.hris.employerBenefits.list() */ - public async list( + public list( request: Merge.hris.EmployerBenefitsListRequest = {}, - requestOptions?: EmployerBenefits.RequestOptions - ): Promise { + requestOptions?: EmployerBenefits.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.hris.EmployerBenefitsListRequest = {}, + requestOptions?: EmployerBenefits.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -60,7 +69,7 @@ export class EmployerBenefits { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,8 +112,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/employer-benefits", ), method: "GET", headers: { @@ -115,8 +126,8 @@ export class EmployerBenefits { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -129,13 +140,16 @@ export class EmployerBenefits { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedEmployerBenefitList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedEmployerBenefitList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -170,13 +184,21 @@ export class EmployerBenefits { * @example * await client.hris.employerBenefits.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.hris.EmployerBenefitsRetrieveRequest = {}, - requestOptions?: EmployerBenefits.RequestOptions - ): Promise { + requestOptions?: EmployerBenefits.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.hris.EmployerBenefitsRetrieveRequest = {}, + requestOptions?: EmployerBenefits.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -187,8 +209,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/employer-benefits/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -199,8 +223,8 @@ export class EmployerBenefits { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -213,13 +237,16 @@ export class EmployerBenefits { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.EmployerBenefit.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.EmployerBenefit.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -237,7 +264,7 @@ export class EmployerBenefits { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /hris/v1/employer-benefits/{id}." + "Timeout exceeded when calling GET /hris/v1/employer-benefits/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/hris/resources/employments/client/Client.ts b/src/api/resources/hris/resources/employments/client/Client.ts index 0030937e1..37ca50204 100644 --- a/src/api/resources/hris/resources/employments/client/Client.ts +++ b/src/api/resources/hris/resources/employments/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Employments { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Employments { * @example * await client.hris.employments.list() */ - public async list( + public list( request: Merge.hris.EmploymentsListRequest = {}, - requestOptions?: Employments.RequestOptions - ): Promise { + requestOptions?: Employments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.hris.EmploymentsListRequest = {}, + requestOptions?: Employments.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -65,7 +74,7 @@ export class Employments { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -83,7 +92,9 @@ export class Employments { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.hris.EmploymentsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -107,7 +118,9 @@ export class Employments { } if (orderBy != null) { - _queryParams["order_by"] = orderBy; + _queryParams["order_by"] = serializers.hris.EmploymentsListRequestOrderBy.jsonOrThrow(orderBy, { + unrecognizedObjectKeys: "strip", + }); } if (pageSize != null) { @@ -115,7 +128,10 @@ export class Employments { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.hris.EmploymentsListRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (remoteId != null) { @@ -123,13 +139,18 @@ export class Employments { } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.hris.EmploymentsListRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/employments" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/employments", ), method: "GET", headers: { @@ -140,8 +161,8 @@ export class Employments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -154,13 +175,16 @@ export class Employments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedEmploymentList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedEmploymentList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -195,15 +219,25 @@ export class Employments { * @example * await client.hris.employments.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.hris.EmploymentsRetrieveRequest = {}, - requestOptions?: Employments.RequestOptions - ): Promise { + requestOptions?: Employments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.hris.EmploymentsRetrieveRequest = {}, + requestOptions?: Employments.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.hris.EmploymentsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -215,17 +249,25 @@ export class Employments { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.hris.EmploymentsRetrieveRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.hris.EmploymentsRetrieveRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/employments/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/employments/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -236,8 +278,8 @@ export class Employments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -250,13 +292,16 @@ export class Employments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.Employment.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.Employment.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/employments/types/EmploymentsListRequestExpand.ts b/src/api/resources/hris/resources/employments/types/EmploymentsListRequestExpand.ts index 5d47355b5..e2d8718e2 100644 --- a/src/api/resources/hris/resources/employments/types/EmploymentsListRequestExpand.ts +++ b/src/api/resources/hris/resources/employments/types/EmploymentsListRequestExpand.ts @@ -3,7 +3,6 @@ */ export type EmploymentsListRequestExpand = "employee" | "employee,pay_group" | "pay_group"; - export const EmploymentsListRequestExpand = { Employee: "employee", EmployeePayGroup: "employee,pay_group", diff --git a/src/api/resources/hris/resources/employments/types/EmploymentsListRequestOrderBy.ts b/src/api/resources/hris/resources/employments/types/EmploymentsListRequestOrderBy.ts index 675f3d47d..3f884c352 100644 --- a/src/api/resources/hris/resources/employments/types/EmploymentsListRequestOrderBy.ts +++ b/src/api/resources/hris/resources/employments/types/EmploymentsListRequestOrderBy.ts @@ -3,7 +3,6 @@ */ export type EmploymentsListRequestOrderBy = "-effective_date" | "effective_date"; - export const EmploymentsListRequestOrderBy = { EffectiveDateDescending: "-effective_date", EffectiveDateAscending: "effective_date", diff --git a/src/api/resources/hris/resources/employments/types/EmploymentsListRequestRemoteFields.ts b/src/api/resources/hris/resources/employments/types/EmploymentsListRequestRemoteFields.ts index 5b5cbb55f..a96d58e9e 100644 --- a/src/api/resources/hris/resources/employments/types/EmploymentsListRequestRemoteFields.ts +++ b/src/api/resources/hris/resources/employments/types/EmploymentsListRequestRemoteFields.ts @@ -18,7 +18,6 @@ export type EmploymentsListRequestRemoteFields = | "pay_frequency" | "pay_frequency,pay_period" | "pay_period"; - export const EmploymentsListRequestRemoteFields = { EmploymentType: "employment_type", EmploymentTypeFlsaStatus: "employment_type,flsa_status", diff --git a/src/api/resources/hris/resources/employments/types/EmploymentsListRequestShowEnumOrigins.ts b/src/api/resources/hris/resources/employments/types/EmploymentsListRequestShowEnumOrigins.ts index 625ae62aa..5671e103f 100644 --- a/src/api/resources/hris/resources/employments/types/EmploymentsListRequestShowEnumOrigins.ts +++ b/src/api/resources/hris/resources/employments/types/EmploymentsListRequestShowEnumOrigins.ts @@ -18,7 +18,6 @@ export type EmploymentsListRequestShowEnumOrigins = | "pay_frequency" | "pay_frequency,pay_period" | "pay_period"; - export const EmploymentsListRequestShowEnumOrigins = { EmploymentType: "employment_type", EmploymentTypeFlsaStatus: "employment_type,flsa_status", diff --git a/src/api/resources/hris/resources/employments/types/EmploymentsRetrieveRequestExpand.ts b/src/api/resources/hris/resources/employments/types/EmploymentsRetrieveRequestExpand.ts index 118da3e14..10c5d2967 100644 --- a/src/api/resources/hris/resources/employments/types/EmploymentsRetrieveRequestExpand.ts +++ b/src/api/resources/hris/resources/employments/types/EmploymentsRetrieveRequestExpand.ts @@ -3,7 +3,6 @@ */ export type EmploymentsRetrieveRequestExpand = "employee" | "employee,pay_group" | "pay_group"; - export const EmploymentsRetrieveRequestExpand = { Employee: "employee", EmployeePayGroup: "employee,pay_group", diff --git a/src/api/resources/hris/resources/employments/types/EmploymentsRetrieveRequestRemoteFields.ts b/src/api/resources/hris/resources/employments/types/EmploymentsRetrieveRequestRemoteFields.ts index 88381741f..bec4c123b 100644 --- a/src/api/resources/hris/resources/employments/types/EmploymentsRetrieveRequestRemoteFields.ts +++ b/src/api/resources/hris/resources/employments/types/EmploymentsRetrieveRequestRemoteFields.ts @@ -18,7 +18,6 @@ export type EmploymentsRetrieveRequestRemoteFields = | "pay_frequency" | "pay_frequency,pay_period" | "pay_period"; - export const EmploymentsRetrieveRequestRemoteFields = { EmploymentType: "employment_type", EmploymentTypeFlsaStatus: "employment_type,flsa_status", diff --git a/src/api/resources/hris/resources/employments/types/EmploymentsRetrieveRequestShowEnumOrigins.ts b/src/api/resources/hris/resources/employments/types/EmploymentsRetrieveRequestShowEnumOrigins.ts index e6b1dd75a..24d5f42f7 100644 --- a/src/api/resources/hris/resources/employments/types/EmploymentsRetrieveRequestShowEnumOrigins.ts +++ b/src/api/resources/hris/resources/employments/types/EmploymentsRetrieveRequestShowEnumOrigins.ts @@ -18,7 +18,6 @@ export type EmploymentsRetrieveRequestShowEnumOrigins = | "pay_frequency" | "pay_frequency,pay_period" | "pay_period"; - export const EmploymentsRetrieveRequestShowEnumOrigins = { EmploymentType: "employment_type", EmploymentTypeFlsaStatus: "employment_type,flsa_status", diff --git a/src/api/resources/hris/resources/fieldMapping/client/Client.ts b/src/api/resources/hris/resources/fieldMapping/client/Client.ts index bec48fdcd..138f622b2 100644 --- a/src/api/resources/hris/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/hris/resources/fieldMapping/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace FieldMapping { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,20 +46,29 @@ export class FieldMapping { * @example * await client.hris.fieldMapping.fieldMappingsRetrieve() */ - public async fieldMappingsRetrieve( + public fieldMappingsRetrieve( request: Merge.hris.FieldMappingsRetrieveRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsRetrieve(request, requestOptions)); + } + + private async __fieldMappingsRetrieve( + request: Merge.hris.FieldMappingsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { excludeRemoteFieldMetadata } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (excludeRemoteFieldMetadata != null) { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/field-mappings" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/field-mappings", ), method: "GET", headers: { @@ -68,8 +79,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -82,13 +93,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -129,20 +143,29 @@ export class FieldMapping { * commonModelName: "ExampleCommonModel" * }) */ - public async fieldMappingsCreate( + public fieldMappingsCreate( + request: Merge.hris.CreateFieldMappingRequest, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsCreate(request, requestOptions)); + } + + private async __fieldMappingsCreate( request: Merge.hris.CreateFieldMappingRequest, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { excludeRemoteFieldMetadata, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (excludeRemoteFieldMetadata != null) { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/field-mappings" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/field-mappings", ), method: "POST", headers: { @@ -153,8 +176,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -168,13 +191,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -208,14 +234,23 @@ export class FieldMapping { * @example * await client.hris.fieldMapping.fieldMappingsDestroy("field_mapping_id") */ - public async fieldMappingsDestroy( + public fieldMappingsDestroy( + fieldMappingId: string, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsDestroy(fieldMappingId, requestOptions)); + } + + private async __fieldMappingsDestroy( fieldMappingId: string, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "DELETE", headers: { @@ -226,8 +261,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -239,13 +274,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -263,7 +301,7 @@ export class FieldMapping { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling DELETE /hris/v1/field-mappings/{field_mapping_id}." + "Timeout exceeded when calling DELETE /hris/v1/field-mappings/{field_mapping_id}.", ); case "unknown": throw new errors.MergeError({ @@ -282,15 +320,27 @@ export class FieldMapping { * @example * await client.hris.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id") */ - public async fieldMappingsPartialUpdate( + public fieldMappingsPartialUpdate( fieldMappingId: string, request: Merge.hris.PatchedEditFieldMappingRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__fieldMappingsPartialUpdate(fieldMappingId, request, requestOptions), + ); + } + + private async __fieldMappingsPartialUpdate( + fieldMappingId: string, + request: Merge.hris.PatchedEditFieldMappingRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "PATCH", headers: { @@ -301,8 +351,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -317,13 +367,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -341,7 +394,7 @@ export class FieldMapping { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling PATCH /hris/v1/field-mappings/{field_mapping_id}." + "Timeout exceeded when calling PATCH /hris/v1/field-mappings/{field_mapping_id}.", ); case "unknown": throw new errors.MergeError({ @@ -359,12 +412,19 @@ export class FieldMapping { * @example * await client.hris.fieldMapping.remoteFieldsRetrieve() */ - public async remoteFieldsRetrieve( + public remoteFieldsRetrieve( + request: Merge.hris.RemoteFieldsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldsRetrieve(request, requestOptions)); + } + + private async __remoteFieldsRetrieve( request: Merge.hris.RemoteFieldsRetrieveRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { commonModels, includeExampleValues } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (commonModels != null) { _queryParams["common_models"] = commonModels; } @@ -375,8 +435,10 @@ 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/remote-fields" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/remote-fields", ), method: "GET", headers: { @@ -387,8 +449,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -401,13 +463,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.RemoteFieldApiResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.RemoteFieldApiResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -440,13 +505,21 @@ export class FieldMapping { * @example * await client.hris.fieldMapping.targetFieldsRetrieve() */ - public async targetFieldsRetrieve( - requestOptions?: FieldMapping.RequestOptions - ): Promise { + public targetFieldsRetrieve( + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__targetFieldsRetrieve(requestOptions)); + } + + private async __targetFieldsRetrieve( + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/target-fields" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/target-fields", ), method: "GET", headers: { @@ -457,8 +530,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -470,13 +543,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/forceResync/client/Client.ts b/src/api/resources/hris/resources/forceResync/client/Client.ts index 46f90765e..6708380ac 100644 --- a/src/api/resources/hris/resources/forceResync/client/Client.ts +++ b/src/api/resources/hris/resources/forceResync/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace ForceResync { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class ForceResync { * @example * await client.hris.forceResync.syncStatusResyncCreate() */ - public async syncStatusResyncCreate(requestOptions?: ForceResync.RequestOptions): Promise { + public syncStatusResyncCreate( + requestOptions?: ForceResync.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__syncStatusResyncCreate(requestOptions)); + } + + private async __syncStatusResyncCreate( + requestOptions?: ForceResync.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/sync-status/resync" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/sync-status/resync", ), method: "POST", headers: { @@ -58,8 +70,8 @@ export class ForceResync { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class ForceResync { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/generateKey/client/Client.ts b/src/api/resources/hris/resources/generateKey/client/Client.ts index 2718d1b63..673577dc8 100644 --- a/src/api/resources/hris/resources/generateKey/client/Client.ts +++ b/src/api/resources/hris/resources/generateKey/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace GenerateKey { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -46,14 +48,23 @@ export class GenerateKey { * name: "Remote Deployment Key 1" * }) */ - public async create( + public create( request: Merge.hris.GenerateRemoteKeyRequest, - requestOptions?: GenerateKey.RequestOptions - ): Promise { + requestOptions?: GenerateKey.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.hris.GenerateRemoteKeyRequest, + requestOptions?: GenerateKey.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/generate-key" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/generate-key", ), method: "POST", headers: { @@ -64,8 +75,8 @@ export class GenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -78,13 +89,16 @@ export class GenerateKey { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.RemoteKey.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.RemoteKey.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/groups/client/Client.ts b/src/api/resources/hris/resources/groups/client/Client.ts index b43322bed..f38342c6d 100644 --- a/src/api/resources/hris/resources/groups/client/Client.ts +++ b/src/api/resources/hris/resources/groups/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Groups { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Groups { * @example * await client.hris.groups.list() */ - public async list( + public list( request: Merge.hris.GroupsListRequest = {}, - requestOptions?: Groups.RequestOptions - ): Promise { + requestOptions?: Groups.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.hris.GroupsListRequest = {}, + requestOptions?: Groups.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -65,7 +74,7 @@ export class Groups { showEnumOrigins, types, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -128,8 +137,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/groups", ), method: "GET", headers: { @@ -140,8 +151,8 @@ export class Groups { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -154,13 +165,16 @@ export class Groups { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedGroupList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedGroupList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -195,13 +209,21 @@ export class Groups { * @example * await client.hris.groups.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.hris.GroupsRetrieveRequest = {}, - requestOptions?: Groups.RequestOptions - ): Promise { + requestOptions?: Groups.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.hris.GroupsRetrieveRequest = {}, + requestOptions?: Groups.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -220,8 +242,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/groups/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -232,8 +256,8 @@ export class Groups { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -246,13 +270,16 @@ export class Groups { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.Group.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.Group.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/issues/client/Client.ts b/src/api/resources/hris/resources/issues/client/Client.ts index 35b7c6331..a8f9e7308 100644 --- a/src/api/resources/hris/resources/issues/client/Client.ts +++ b/src/api/resources/hris/resources/issues/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Issues { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Issues { * @example * await client.hris.issues.list() */ - public async list( + public list( + request: Merge.hris.IssuesListRequest = {}, + requestOptions?: Issues.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.hris.IssuesListRequest = {}, - requestOptions?: Issues.RequestOptions - ): Promise { + requestOptions?: Issues.RequestOptions, + ): Promise> { const { accountToken, cursor, @@ -64,7 +73,7 @@ export class Issues { startDate, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountToken != null) { _queryParams["account_token"] = accountToken; } @@ -118,13 +127,17 @@ export class Issues { } if (status != null) { - _queryParams["status"] = status; + _queryParams["status"] = serializers.hris.IssuesListRequestStatus.jsonOrThrow(status, { + unrecognizedObjectKeys: "strip", + }); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/issues" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/issues", ), method: "GET", headers: { @@ -135,8 +148,8 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +162,16 @@ export class Issues { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedIssueList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedIssueList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -189,11 +205,20 @@ export class Issues { * @example * await client.hris.issues.retrieve("id") */ - public async retrieve(id: string, requestOptions?: Issues.RequestOptions): Promise { + public retrieve(id: string, requestOptions?: Issues.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, requestOptions)); + } + + private 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/issues/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -204,8 +229,8 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -217,13 +242,16 @@ export class Issues { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.Issue.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.Issue.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/issues/types/IssuesListRequestStatus.ts b/src/api/resources/hris/resources/issues/types/IssuesListRequestStatus.ts index b2d4f1b76..a35e3e193 100644 --- a/src/api/resources/hris/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/api/resources/hris/resources/issues/types/IssuesListRequestStatus.ts @@ -3,7 +3,6 @@ */ export type IssuesListRequestStatus = "ONGOING" | "RESOLVED"; - export const IssuesListRequestStatus = { Ongoing: "ONGOING", Resolved: "RESOLVED", diff --git a/src/api/resources/hris/resources/linkToken/client/Client.ts b/src/api/resources/hris/resources/linkToken/client/Client.ts index bd8526630..01d6907a3 100644 --- a/src/api/resources/hris/resources/linkToken/client/Client.ts +++ b/src/api/resources/hris/resources/linkToken/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace LinkToken { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -49,14 +51,23 @@ export class LinkToken { * categories: ["hris", "ats"] * }) */ - public async create( + public create( request: Merge.hris.EndUserDetailsRequest, - requestOptions?: LinkToken.RequestOptions - ): Promise { + requestOptions?: LinkToken.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.hris.EndUserDetailsRequest, + requestOptions?: LinkToken.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/link-token" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/link-token", ), method: "POST", headers: { @@ -67,8 +78,8 @@ export class LinkToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -81,13 +92,16 @@ export class LinkToken { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.LinkToken.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.LinkToken.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/linkedAccounts/client/Client.ts b/src/api/resources/hris/resources/linkedAccounts/client/Client.ts index 49b6fc62d..cb16e4760 100644 --- a/src/api/resources/hris/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/hris/resources/linkedAccounts/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace LinkedAccounts { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class LinkedAccounts { * @example * await client.hris.linkedAccounts.list() */ - public async list( + public list( request: Merge.hris.LinkedAccountsListRequest = {}, - requestOptions?: LinkedAccounts.RequestOptions - ): Promise { + requestOptions?: LinkedAccounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.hris.LinkedAccountsListRequest = {}, + requestOptions?: LinkedAccounts.RequestOptions, + ): Promise> { const { category, cursor, @@ -63,9 +72,11 @@ export class LinkedAccounts { pageSize, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (category != null) { - _queryParams["category"] = category; + _queryParams["category"] = serializers.hris.LinkedAccountsListRequestCategory.jsonOrThrow(category, { + unrecognizedObjectKeys: "strip", + }); } if (cursor != null) { @@ -118,8 +129,10 @@ export class LinkedAccounts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/linked-accounts" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/linked-accounts", ), method: "GET", headers: { @@ -130,8 +143,8 @@ export class LinkedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -144,13 +157,16 @@ export class LinkedAccounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/api/resources/hris/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index edeb3e1d1..7474691d1 100644 --- a/src/api/resources/hris/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/api/resources/hris/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -10,7 +10,6 @@ export type LinkedAccountsListRequestCategory = | "hris" | "mktg" | "ticketing"; - export const LinkedAccountsListRequestCategory = { Accounting: "accounting", Ats: "ats", diff --git a/src/api/resources/hris/resources/locations/client/Client.ts b/src/api/resources/hris/resources/locations/client/Client.ts index 1ff334f0f..d627080bd 100644 --- a/src/api/resources/hris/resources/locations/client/Client.ts +++ b/src/api/resources/hris/resources/locations/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Locations { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Locations { * @example * await client.hris.locations.list() */ - public async list( + public list( + request: Merge.hris.LocationsListRequest = {}, + requestOptions?: Locations.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.hris.LocationsListRequest = {}, - requestOptions?: Locations.RequestOptions - ): Promise { + requestOptions?: Locations.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -63,7 +72,7 @@ export class Locations { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -89,7 +98,10 @@ export class Locations { } if (locationType != null) { - _queryParams["location_type"] = locationType; + _queryParams["location_type"] = serializers.hris.LocationsListRequestLocationType.jsonOrThrow( + locationType, + { unrecognizedObjectKeys: "strip" }, + ); } if (modifiedAfter != null) { @@ -105,7 +117,10 @@ export class Locations { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.hris.LocationsListRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (remoteId != null) { @@ -113,13 +128,18 @@ export class Locations { } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.hris.LocationsListRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/locations" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/locations", ), method: "GET", headers: { @@ -130,8 +150,8 @@ export class Locations { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -144,13 +164,16 @@ export class Locations { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedLocationList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedLocationList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -185,13 +208,21 @@ export class Locations { * @example * await client.hris.locations.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.hris.LocationsRetrieveRequest = {}, - requestOptions?: Locations.RequestOptions - ): Promise { + requestOptions?: Locations.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.hris.LocationsRetrieveRequest = {}, + requestOptions?: Locations.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -201,17 +232,25 @@ export class Locations { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.hris.LocationsRetrieveRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.hris.LocationsRetrieveRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/locations/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/locations/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -222,8 +261,8 @@ export class Locations { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -236,13 +275,16 @@ export class Locations { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.Location.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.Location.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/locations/types/LocationsListRequestLocationType.ts b/src/api/resources/hris/resources/locations/types/LocationsListRequestLocationType.ts index c4ec459d2..bb88c52e7 100644 --- a/src/api/resources/hris/resources/locations/types/LocationsListRequestLocationType.ts +++ b/src/api/resources/hris/resources/locations/types/LocationsListRequestLocationType.ts @@ -3,7 +3,6 @@ */ export type LocationsListRequestLocationType = "HOME" | "WORK"; - export const LocationsListRequestLocationType = { Home: "HOME", Work: "WORK", diff --git a/src/api/resources/hris/resources/locations/types/LocationsListRequestRemoteFields.ts b/src/api/resources/hris/resources/locations/types/LocationsListRequestRemoteFields.ts index 39d546c46..074eeeb22 100644 --- a/src/api/resources/hris/resources/locations/types/LocationsListRequestRemoteFields.ts +++ b/src/api/resources/hris/resources/locations/types/LocationsListRequestRemoteFields.ts @@ -3,7 +3,6 @@ */ export type LocationsListRequestRemoteFields = "country" | "country,location_type" | "location_type"; - export const LocationsListRequestRemoteFields = { Country: "country", CountryLocationType: "country,location_type", diff --git a/src/api/resources/hris/resources/locations/types/LocationsListRequestShowEnumOrigins.ts b/src/api/resources/hris/resources/locations/types/LocationsListRequestShowEnumOrigins.ts index 5aa2eec75..600854b41 100644 --- a/src/api/resources/hris/resources/locations/types/LocationsListRequestShowEnumOrigins.ts +++ b/src/api/resources/hris/resources/locations/types/LocationsListRequestShowEnumOrigins.ts @@ -3,7 +3,6 @@ */ export type LocationsListRequestShowEnumOrigins = "country" | "country,location_type" | "location_type"; - export const LocationsListRequestShowEnumOrigins = { Country: "country", CountryLocationType: "country,location_type", diff --git a/src/api/resources/hris/resources/locations/types/LocationsRetrieveRequestRemoteFields.ts b/src/api/resources/hris/resources/locations/types/LocationsRetrieveRequestRemoteFields.ts index a45690570..f0c278370 100644 --- a/src/api/resources/hris/resources/locations/types/LocationsRetrieveRequestRemoteFields.ts +++ b/src/api/resources/hris/resources/locations/types/LocationsRetrieveRequestRemoteFields.ts @@ -3,7 +3,6 @@ */ export type LocationsRetrieveRequestRemoteFields = "country" | "country,location_type" | "location_type"; - export const LocationsRetrieveRequestRemoteFields = { Country: "country", CountryLocationType: "country,location_type", diff --git a/src/api/resources/hris/resources/locations/types/LocationsRetrieveRequestShowEnumOrigins.ts b/src/api/resources/hris/resources/locations/types/LocationsRetrieveRequestShowEnumOrigins.ts index 6ad16ef96..72deabd26 100644 --- a/src/api/resources/hris/resources/locations/types/LocationsRetrieveRequestShowEnumOrigins.ts +++ b/src/api/resources/hris/resources/locations/types/LocationsRetrieveRequestShowEnumOrigins.ts @@ -3,7 +3,6 @@ */ export type LocationsRetrieveRequestShowEnumOrigins = "country" | "country,location_type" | "location_type"; - export const LocationsRetrieveRequestShowEnumOrigins = { Country: "country", CountryLocationType: "country,location_type", diff --git a/src/api/resources/hris/resources/passthrough/client/Client.ts b/src/api/resources/hris/resources/passthrough/client/Client.ts index 47086a742..789b9d4b3 100644 --- a/src/api/resources/hris/resources/passthrough/client/Client.ts +++ b/src/api/resources/hris/resources/passthrough/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Passthrough { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -47,14 +49,23 @@ export class Passthrough { * path: "/scooters" * }) */ - public async create( + public create( request: Merge.hris.DataPassthroughRequest, - requestOptions?: Passthrough.RequestOptions - ): Promise { + requestOptions?: Passthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.hris.DataPassthroughRequest, + requestOptions?: Passthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/passthrough" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/passthrough", ), method: "POST", headers: { @@ -65,8 +76,8 @@ export class Passthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -79,13 +90,16 @@ export class Passthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.RemoteResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.RemoteResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/payGroups/client/Client.ts b/src/api/resources/hris/resources/payGroups/client/Client.ts index d0f589911..16d4c4931 100644 --- a/src/api/resources/hris/resources/payGroups/client/Client.ts +++ b/src/api/resources/hris/resources/payGroups/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace PayGroups { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class PayGroups { * @example * await client.hris.payGroups.list() */ - public async list( + public list( request: Merge.hris.PayGroupsListRequest = {}, - requestOptions?: PayGroups.RequestOptions - ): Promise { + requestOptions?: PayGroups.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.hris.PayGroupsListRequest = {}, + requestOptions?: PayGroups.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -60,7 +69,7 @@ export class PayGroups { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,8 +112,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/pay-groups", ), method: "GET", headers: { @@ -115,8 +126,8 @@ export class PayGroups { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -129,13 +140,16 @@ export class PayGroups { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedPayGroupList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedPayGroupList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -170,13 +184,21 @@ export class PayGroups { * @example * await client.hris.payGroups.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.hris.PayGroupsRetrieveRequest = {}, - requestOptions?: PayGroups.RequestOptions - ): Promise { + requestOptions?: PayGroups.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.hris.PayGroupsRetrieveRequest = {}, + requestOptions?: PayGroups.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -187,8 +209,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/pay-groups/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -199,8 +223,8 @@ export class PayGroups { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -213,13 +237,16 @@ export class PayGroups { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PayGroup.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PayGroup.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/payrollRuns/client/Client.ts b/src/api/resources/hris/resources/payrollRuns/client/Client.ts index a92115fa0..968522f59 100644 --- a/src/api/resources/hris/resources/payrollRuns/client/Client.ts +++ b/src/api/resources/hris/resources/payrollRuns/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace PayrollRuns { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class PayrollRuns { * @example * await client.hris.payrollRuns.list() */ - public async list( + public list( + request: Merge.hris.PayrollRunsListRequest = {}, + requestOptions?: PayrollRuns.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.hris.PayrollRunsListRequest = {}, - requestOptions?: PayrollRuns.RequestOptions - ): Promise { + requestOptions?: PayrollRuns.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -67,7 +76,7 @@ export class PayrollRuns { startedAfter, startedBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -113,7 +122,10 @@ export class PayrollRuns { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.hris.PayrollRunsListRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (remoteId != null) { @@ -121,11 +133,16 @@ export class PayrollRuns { } if (runType != null) { - _queryParams["run_type"] = runType; + _queryParams["run_type"] = serializers.hris.PayrollRunsListRequestRunType.jsonOrThrow(runType, { + unrecognizedObjectKeys: "strip", + }); } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.hris.PayrollRunsListRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } if (startedAfter != null) { @@ -138,8 +155,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/payroll-runs", ), method: "GET", headers: { @@ -150,8 +169,8 @@ export class PayrollRuns { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -164,13 +183,16 @@ export class PayrollRuns { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedPayrollRunList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedPayrollRunList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -205,13 +227,21 @@ export class PayrollRuns { * @example * await client.hris.payrollRuns.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.hris.PayrollRunsRetrieveRequest = {}, + requestOptions?: PayrollRuns.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.hris.PayrollRunsRetrieveRequest = {}, - requestOptions?: PayrollRuns.RequestOptions - ): Promise { + requestOptions?: PayrollRuns.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -221,17 +251,25 @@ export class PayrollRuns { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.hris.PayrollRunsRetrieveRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.hris.PayrollRunsRetrieveRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/payroll-runs/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/payroll-runs/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -242,8 +280,8 @@ export class PayrollRuns { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -256,13 +294,16 @@ export class PayrollRuns { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PayrollRun.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PayrollRun.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRemoteFields.ts b/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRemoteFields.ts index 2087801c1..327e02303 100644 --- a/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRemoteFields.ts +++ b/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRemoteFields.ts @@ -3,7 +3,6 @@ */ export type PayrollRunsListRequestRemoteFields = "run_state" | "run_state,run_type" | "run_type"; - export const PayrollRunsListRequestRemoteFields = { RunState: "run_state", RunStateRunType: "run_state,run_type", diff --git a/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRunType.ts b/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRunType.ts index c62dc1086..d1d4cc6dd 100644 --- a/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRunType.ts +++ b/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRunType.ts @@ -3,7 +3,6 @@ */ export type PayrollRunsListRequestRunType = "CORRECTION" | "OFF_CYCLE" | "REGULAR" | "SIGN_ON_BONUS" | "TERMINATION"; - export const PayrollRunsListRequestRunType = { Correction: "CORRECTION", OffCycle: "OFF_CYCLE", diff --git a/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestShowEnumOrigins.ts b/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestShowEnumOrigins.ts index a23c40134..9a0ab53a4 100644 --- a/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestShowEnumOrigins.ts +++ b/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestShowEnumOrigins.ts @@ -3,7 +3,6 @@ */ export type PayrollRunsListRequestShowEnumOrigins = "run_state" | "run_state,run_type" | "run_type"; - export const PayrollRunsListRequestShowEnumOrigins = { RunState: "run_state", RunStateRunType: "run_state,run_type", diff --git a/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestRemoteFields.ts b/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestRemoteFields.ts index a37e905cc..7c149cf10 100644 --- a/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestRemoteFields.ts +++ b/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestRemoteFields.ts @@ -3,7 +3,6 @@ */ export type PayrollRunsRetrieveRequestRemoteFields = "run_state" | "run_state,run_type" | "run_type"; - export const PayrollRunsRetrieveRequestRemoteFields = { RunState: "run_state", RunStateRunType: "run_state,run_type", diff --git a/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestShowEnumOrigins.ts b/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestShowEnumOrigins.ts index 0da0a05ab..7a0856279 100644 --- a/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestShowEnumOrigins.ts +++ b/src/api/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestShowEnumOrigins.ts @@ -3,7 +3,6 @@ */ export type PayrollRunsRetrieveRequestShowEnumOrigins = "run_state" | "run_state,run_type" | "run_type"; - export const PayrollRunsRetrieveRequestShowEnumOrigins = { RunState: "run_state", RunStateRunType: "run_state,run_type", diff --git a/src/api/resources/hris/resources/regenerateKey/client/Client.ts b/src/api/resources/hris/resources/regenerateKey/client/Client.ts index 233f670d0..bc02c82fa 100644 --- a/src/api/resources/hris/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/hris/resources/regenerateKey/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace RegenerateKey { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -46,14 +48,23 @@ export class RegenerateKey { * name: "Remote Deployment Key 1" * }) */ - public async create( + public create( request: Merge.hris.RemoteKeyForRegenerationRequest, - requestOptions?: RegenerateKey.RequestOptions - ): Promise { + requestOptions?: RegenerateKey.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.hris.RemoteKeyForRegenerationRequest, + requestOptions?: RegenerateKey.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/regenerate-key" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/regenerate-key", ), method: "POST", headers: { @@ -64,8 +75,8 @@ export class RegenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -80,13 +91,16 @@ export class RegenerateKey { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.RemoteKey.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.RemoteKey.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/scopes/client/Client.ts b/src/api/resources/hris/resources/scopes/client/Client.ts index 33e731a27..d0488613f 100644 --- a/src/api/resources/hris/resources/scopes/client/Client.ts +++ b/src/api/resources/hris/resources/scopes/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Scopes { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,13 +45,21 @@ export class Scopes { * @example * await client.hris.scopes.defaultScopesRetrieve() */ - public async defaultScopesRetrieve( - requestOptions?: Scopes.RequestOptions - ): Promise { + public defaultScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__defaultScopesRetrieve(requestOptions)); + } + + private async __defaultScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/default-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/default-scopes", ), method: "GET", headers: { @@ -60,8 +70,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -73,13 +83,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -112,13 +125,21 @@ export class Scopes { * @example * await client.hris.scopes.linkedAccountScopesRetrieve() */ - public async linkedAccountScopesRetrieve( - requestOptions?: Scopes.RequestOptions - ): Promise { + public linkedAccountScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linkedAccountScopesRetrieve(requestOptions)); + } + + private async __linkedAccountScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/linked-account-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/linked-account-scopes", ), method: "GET", headers: { @@ -129,8 +150,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -142,13 +163,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -205,14 +229,23 @@ export class Scopes { * }] * }) */ - public async linkedAccountScopesCreate( + public linkedAccountScopesCreate( request: Merge.hris.LinkedAccountCommonModelScopeDeserializerRequest, - requestOptions?: Scopes.RequestOptions - ): Promise { + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linkedAccountScopesCreate(request, requestOptions)); + } + + private async __linkedAccountScopesCreate( + request: Merge.hris.LinkedAccountCommonModelScopeDeserializerRequest, + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/linked-account-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/linked-account-scopes", ), method: "POST", headers: { @@ -223,8 +256,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -239,13 +272,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -263,7 +299,7 @@ export class Scopes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /hris/v1/linked-account-scopes." + "Timeout exceeded when calling POST /hris/v1/linked-account-scopes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/hris/resources/syncStatus/client/Client.ts b/src/api/resources/hris/resources/syncStatus/client/Client.ts index 47fa5de45..a9c7a5581 100644 --- a/src/api/resources/hris/resources/syncStatus/client/Client.ts +++ b/src/api/resources/hris/resources/syncStatus/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace SyncStatus { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class SyncStatus { * @example * await client.hris.syncStatus.list() */ - public async list( + public list( request: Merge.hris.SyncStatusListRequest = {}, - requestOptions?: SyncStatus.RequestOptions - ): Promise { + requestOptions?: SyncStatus.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private 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,8 +69,10 @@ export class SyncStatus { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/sync-status" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/sync-status", ), method: "GET", headers: { @@ -72,8 +83,8 @@ export class SyncStatus { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -86,13 +97,16 @@ export class SyncStatus { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedSyncStatusList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedSyncStatusList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/teams/client/Client.ts b/src/api/resources/hris/resources/teams/client/Client.ts index bd13ec283..26a0025f2 100644 --- a/src/api/resources/hris/resources/teams/client/Client.ts +++ b/src/api/resources/hris/resources/teams/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Teams { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Teams { * @example * await client.hris.teams.list() */ - public async list( + public list( request: Merge.hris.TeamsListRequest = {}, - requestOptions?: Teams.RequestOptions - ): Promise { + requestOptions?: Teams.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.hris.TeamsListRequest = {}, + requestOptions?: Teams.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -62,7 +71,7 @@ export class Teams { parentTeamId, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -113,8 +122,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/teams", ), method: "GET", headers: { @@ -125,8 +136,8 @@ export class Teams { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -139,13 +150,16 @@ export class Teams { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedTeamList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedTeamList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -180,13 +194,21 @@ export class Teams { * @example * await client.hris.teams.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.hris.TeamsRetrieveRequest = {}, - requestOptions?: Teams.RequestOptions - ): Promise { + requestOptions?: Teams.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.hris.TeamsRetrieveRequest = {}, + requestOptions?: Teams.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -201,8 +223,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/teams/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -213,8 +237,8 @@ export class Teams { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -227,13 +251,16 @@ export class Teams { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.Team.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.Team.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/timeOff/client/Client.ts b/src/api/resources/hris/resources/timeOff/client/Client.ts index 67a07742b..99b33317d 100644 --- a/src/api/resources/hris/resources/timeOff/client/Client.ts +++ b/src/api/resources/hris/resources/timeOff/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace TimeOff { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class TimeOff { * @example * await client.hris.timeOff.list() */ - public async list( + public list( + request: Merge.hris.TimeOffListRequest = {}, + requestOptions?: TimeOff.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.hris.TimeOffListRequest = {}, - requestOptions?: TimeOff.RequestOptions - ): Promise { + requestOptions?: TimeOff.RequestOptions, + ): Promise> { const { approverId, createdAfter, @@ -71,7 +80,7 @@ export class TimeOff { startedBefore, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (approverId != null) { _queryParams["approver_id"] = approverId; } @@ -101,7 +110,9 @@ export class TimeOff { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.hris.TimeOffListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -129,7 +140,9 @@ export class TimeOff { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.hris.TimeOffListRequestRemoteFields.jsonOrThrow(remoteFields, { + unrecognizedObjectKeys: "strip", + }); } if (remoteId != null) { @@ -137,11 +150,16 @@ export class TimeOff { } if (requestType != null) { - _queryParams["request_type"] = requestType; + _queryParams["request_type"] = serializers.hris.TimeOffListRequestRequestType.jsonOrThrow(requestType, { + unrecognizedObjectKeys: "strip", + }); } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.hris.TimeOffListRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } if (startedAfter != null) { @@ -153,13 +171,17 @@ export class TimeOff { } if (status != null) { - _queryParams["status"] = status; + _queryParams["status"] = serializers.hris.TimeOffListRequestStatus.jsonOrThrow(status, { + unrecognizedObjectKeys: "strip", + }); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/time-off" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/time-off", ), method: "GET", headers: { @@ -170,8 +192,8 @@ export class TimeOff { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -184,13 +206,16 @@ export class TimeOff { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedTimeOffList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedTimeOffList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -226,12 +251,19 @@ export class TimeOff { * model: {} * }) */ - public async create( + public create( request: Merge.hris.TimeOffEndpointRequest, - requestOptions?: TimeOff.RequestOptions - ): Promise { + requestOptions?: TimeOff.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.hris.TimeOffEndpointRequest, + requestOptions?: TimeOff.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -242,8 +274,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/time-off", ), method: "POST", headers: { @@ -254,8 +288,8 @@ export class TimeOff { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -269,13 +303,16 @@ export class TimeOff { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.TimeOffResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.TimeOffResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -310,15 +347,25 @@ export class TimeOff { * @example * await client.hris.timeOff.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.hris.TimeOffRetrieveRequest = {}, + requestOptions?: TimeOff.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.hris.TimeOffRetrieveRequest = {}, - requestOptions?: TimeOff.RequestOptions - ): Promise { + requestOptions?: TimeOff.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.hris.TimeOffRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -330,17 +377,25 @@ export class TimeOff { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.hris.TimeOffRetrieveRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.hris.TimeOffRetrieveRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `hris/v1/time-off/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/time-off/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -351,8 +406,8 @@ export class TimeOff { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -365,13 +420,16 @@ export class TimeOff { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.TimeOff.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.TimeOff.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -404,11 +462,21 @@ export class TimeOff { * @example * await client.hris.timeOff.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: TimeOff.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: TimeOff.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: TimeOff.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/time-off/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/time-off/meta/post", ), method: "GET", headers: { @@ -419,8 +487,8 @@ export class TimeOff { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -432,13 +500,16 @@ export class TimeOff { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestExpand.ts b/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestExpand.ts index 2a23030e8..9a42306be 100644 --- a/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestExpand.ts +++ b/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestExpand.ts @@ -3,7 +3,6 @@ */ export type TimeOffListRequestExpand = "approver" | "employee" | "employee,approver"; - export const TimeOffListRequestExpand = { Approver: "approver", Employee: "employee", diff --git a/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestRemoteFields.ts b/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestRemoteFields.ts index 13bfbd058..b6e627fe9 100644 --- a/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestRemoteFields.ts +++ b/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestRemoteFields.ts @@ -10,7 +10,6 @@ export type TimeOffListRequestRemoteFields = | "status" | "status,units" | "units"; - export const TimeOffListRequestRemoteFields = { RequestType: "request_type", RequestTypeStatus: "request_type,status", diff --git a/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestRequestType.ts b/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestRequestType.ts index 50338206d..5d3a19d1f 100644 --- a/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestRequestType.ts +++ b/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestRequestType.ts @@ -9,7 +9,6 @@ export type TimeOffListRequestRequestType = | "SICK" | "VACATION" | "VOLUNTEER"; - export const TimeOffListRequestRequestType = { Bereavement: "BEREAVEMENT", JuryDuty: "JURY_DUTY", diff --git a/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestShowEnumOrigins.ts b/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestShowEnumOrigins.ts index 05fca68ad..9b9831fe2 100644 --- a/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestShowEnumOrigins.ts +++ b/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestShowEnumOrigins.ts @@ -10,7 +10,6 @@ export type TimeOffListRequestShowEnumOrigins = | "status" | "status,units" | "units"; - export const TimeOffListRequestShowEnumOrigins = { RequestType: "request_type", RequestTypeStatus: "request_type,status", diff --git a/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestStatus.ts b/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestStatus.ts index ad9e41e66..9a1010fc7 100644 --- a/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestStatus.ts +++ b/src/api/resources/hris/resources/timeOff/types/TimeOffListRequestStatus.ts @@ -3,7 +3,6 @@ */ export type TimeOffListRequestStatus = "APPROVED" | "CANCELLED" | "DECLINED" | "DELETED" | "REQUESTED"; - export const TimeOffListRequestStatus = { Approved: "APPROVED", Cancelled: "CANCELLED", diff --git a/src/api/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestExpand.ts b/src/api/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestExpand.ts index 7a488b3a2..6026eee61 100644 --- a/src/api/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestExpand.ts +++ b/src/api/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestExpand.ts @@ -3,7 +3,6 @@ */ export type TimeOffRetrieveRequestExpand = "approver" | "employee" | "employee,approver"; - export const TimeOffRetrieveRequestExpand = { Approver: "approver", Employee: "employee", diff --git a/src/api/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestRemoteFields.ts b/src/api/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestRemoteFields.ts index 7665e222a..7aafd1558 100644 --- a/src/api/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestRemoteFields.ts +++ b/src/api/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestRemoteFields.ts @@ -10,7 +10,6 @@ export type TimeOffRetrieveRequestRemoteFields = | "status" | "status,units" | "units"; - export const TimeOffRetrieveRequestRemoteFields = { RequestType: "request_type", RequestTypeStatus: "request_type,status", diff --git a/src/api/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestShowEnumOrigins.ts b/src/api/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestShowEnumOrigins.ts index 729a9b2a5..ab2242ee3 100644 --- a/src/api/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestShowEnumOrigins.ts +++ b/src/api/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestShowEnumOrigins.ts @@ -10,7 +10,6 @@ export type TimeOffRetrieveRequestShowEnumOrigins = | "status" | "status,units" | "units"; - export const TimeOffRetrieveRequestShowEnumOrigins = { RequestType: "request_type", RequestTypeStatus: "request_type,status", diff --git a/src/api/resources/hris/resources/timeOffBalances/client/Client.ts b/src/api/resources/hris/resources/timeOffBalances/client/Client.ts index 04d56f1a1..0adf59477 100644 --- a/src/api/resources/hris/resources/timeOffBalances/client/Client.ts +++ b/src/api/resources/hris/resources/timeOffBalances/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace TimeOffBalances { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class TimeOffBalances { * @example * await client.hris.timeOffBalances.list() */ - public async list( + public list( + request: Merge.hris.TimeOffBalancesListRequest = {}, + requestOptions?: TimeOffBalances.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.hris.TimeOffBalancesListRequest = {}, - requestOptions?: TimeOffBalances.RequestOptions - ): Promise { + requestOptions?: TimeOffBalances.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -65,7 +74,7 @@ export class TimeOffBalances { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -111,7 +120,10 @@ export class TimeOffBalances { } if (policyType != null) { - _queryParams["policy_type"] = policyType; + _queryParams["policy_type"] = serializers.hris.TimeOffBalancesListRequestPolicyType.jsonOrThrow( + policyType, + { unrecognizedObjectKeys: "strip" }, + ); } if (remoteFields != null) { @@ -128,8 +140,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/time-off-balances", ), method: "GET", headers: { @@ -140,8 +154,8 @@ export class TimeOffBalances { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -154,13 +168,16 @@ export class TimeOffBalances { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedTimeOffBalanceList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedTimeOffBalanceList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -195,13 +212,21 @@ export class TimeOffBalances { * @example * await client.hris.timeOffBalances.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.hris.TimeOffBalancesRetrieveRequest = {}, - requestOptions?: TimeOffBalances.RequestOptions - ): Promise { + requestOptions?: TimeOffBalances.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.hris.TimeOffBalancesRetrieveRequest = {}, + requestOptions?: TimeOffBalances.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -224,8 +249,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/time-off-balances/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -236,8 +263,8 @@ export class TimeOffBalances { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -250,13 +277,16 @@ export class TimeOffBalances { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.TimeOffBalance.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.TimeOffBalance.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -274,7 +304,7 @@ export class TimeOffBalances { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /hris/v1/time-off-balances/{id}." + "Timeout exceeded when calling GET /hris/v1/time-off-balances/{id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/hris/resources/timeOffBalances/types/TimeOffBalancesListRequestPolicyType.ts b/src/api/resources/hris/resources/timeOffBalances/types/TimeOffBalancesListRequestPolicyType.ts index 113a7d621..5b8d27530 100644 --- a/src/api/resources/hris/resources/timeOffBalances/types/TimeOffBalancesListRequestPolicyType.ts +++ b/src/api/resources/hris/resources/timeOffBalances/types/TimeOffBalancesListRequestPolicyType.ts @@ -9,7 +9,6 @@ export type TimeOffBalancesListRequestPolicyType = | "SICK" | "VACATION" | "VOLUNTEER"; - export const TimeOffBalancesListRequestPolicyType = { Bereavement: "BEREAVEMENT", JuryDuty: "JURY_DUTY", diff --git a/src/api/resources/hris/resources/timesheetEntries/client/Client.ts b/src/api/resources/hris/resources/timesheetEntries/client/Client.ts index 5054de4ec..31b0e6935 100644 --- a/src/api/resources/hris/resources/timesheetEntries/client/Client.ts +++ b/src/api/resources/hris/resources/timesheetEntries/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace TimesheetEntries { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class TimesheetEntries { * @example * await client.hris.timesheetEntries.list() */ - public async list( + public list( + request: Merge.hris.TimesheetEntriesListRequest = {}, + requestOptions?: TimesheetEntries.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.hris.TimesheetEntriesListRequest = {}, - requestOptions?: TimesheetEntries.RequestOptions - ): Promise { + requestOptions?: TimesheetEntries.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -67,7 +76,7 @@ export class TimesheetEntries { startedAfter, startedBefore, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -117,7 +126,9 @@ export class TimesheetEntries { } if (orderBy != null) { - _queryParams["order_by"] = orderBy; + _queryParams["order_by"] = serializers.hris.TimesheetEntriesListRequestOrderBy.jsonOrThrow(orderBy, { + unrecognizedObjectKeys: "strip", + }); } if (pageSize != null) { @@ -138,8 +149,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/timesheet-entries", ), method: "GET", headers: { @@ -150,8 +163,8 @@ export class TimesheetEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -164,13 +177,16 @@ export class TimesheetEntries { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.PaginatedTimesheetEntryList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.PaginatedTimesheetEntryList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -206,12 +222,19 @@ export class TimesheetEntries { * model: {} * }) */ - public async create( + public create( + request: Merge.hris.TimesheetEntryEndpointRequest, + requestOptions?: TimesheetEntries.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.hris.TimesheetEntryEndpointRequest, - requestOptions?: TimesheetEntries.RequestOptions - ): Promise { + requestOptions?: TimesheetEntries.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -222,8 +245,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/timesheet-entries", ), method: "POST", headers: { @@ -234,8 +259,8 @@ export class TimesheetEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -251,13 +276,16 @@ export class TimesheetEntries { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.TimesheetEntryResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.TimesheetEntryResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -292,13 +320,21 @@ export class TimesheetEntries { * @example * await client.hris.timesheetEntries.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.hris.TimesheetEntriesRetrieveRequest = {}, + requestOptions?: TimesheetEntries.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.hris.TimesheetEntriesRetrieveRequest = {}, - requestOptions?: TimesheetEntries.RequestOptions - ): Promise { + requestOptions?: TimesheetEntries.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -313,8 +349,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `hris/v1/timesheet-entries/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -325,8 +363,8 @@ export class TimesheetEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -339,13 +377,16 @@ export class TimesheetEntries { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.TimesheetEntry.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.TimesheetEntry.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -363,7 +404,7 @@ export class TimesheetEntries { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /hris/v1/timesheet-entries/{id}." + "Timeout exceeded when calling GET /hris/v1/timesheet-entries/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -380,11 +421,21 @@ export class TimesheetEntries { * @example * await client.hris.timesheetEntries.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: TimesheetEntries.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: TimesheetEntries.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: TimesheetEntries.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/timesheet-entries/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/timesheet-entries/meta/post", ), method: "GET", headers: { @@ -395,8 +446,8 @@ export class TimesheetEntries { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -408,13 +459,16 @@ export class TimesheetEntries { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -432,7 +486,7 @@ export class TimesheetEntries { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /hris/v1/timesheet-entries/meta/post." + "Timeout exceeded when calling GET /hris/v1/timesheet-entries/meta/post.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/hris/resources/timesheetEntries/types/TimesheetEntriesListRequestOrderBy.ts b/src/api/resources/hris/resources/timesheetEntries/types/TimesheetEntriesListRequestOrderBy.ts index c67a3a1b0..75d2250fe 100644 --- a/src/api/resources/hris/resources/timesheetEntries/types/TimesheetEntriesListRequestOrderBy.ts +++ b/src/api/resources/hris/resources/timesheetEntries/types/TimesheetEntriesListRequestOrderBy.ts @@ -3,7 +3,6 @@ */ export type TimesheetEntriesListRequestOrderBy = "-start_time" | "start_time"; - export const TimesheetEntriesListRequestOrderBy = { StartTimeDescending: "-start_time", StartTimeAscending: "start_time", diff --git a/src/api/resources/hris/resources/webhookReceivers/client/Client.ts b/src/api/resources/hris/resources/webhookReceivers/client/Client.ts index 227fec015..b8f24ed6c 100644 --- a/src/api/resources/hris/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/hris/resources/webhookReceivers/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace WebhookReceivers { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class WebhookReceivers { * @example * await client.hris.webhookReceivers.list() */ - public async list(requestOptions?: WebhookReceivers.RequestOptions): Promise { + public list( + requestOptions?: WebhookReceivers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(requestOptions)); + } + + private async __list( + requestOptions?: WebhookReceivers.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/webhook-receivers" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/webhook-receivers", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class WebhookReceivers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.webhookReceivers.list.Response.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.webhookReceivers.list.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -114,14 +129,23 @@ export class WebhookReceivers { * isActive: true * }) */ - public async create( + public create( request: Merge.hris.WebhookReceiverRequest, - requestOptions?: WebhookReceivers.RequestOptions - ): Promise { + requestOptions?: WebhookReceivers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.hris.WebhookReceiverRequest, + requestOptions?: WebhookReceivers.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "hris/v1/webhook-receivers" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "hris/v1/webhook-receivers", ), method: "POST", headers: { @@ -132,8 +156,8 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -146,13 +170,16 @@ export class WebhookReceivers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.hris.WebhookReceiver.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.hris.WebhookReceiver.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/hris/types/AccountDetailsAndActionsStatusEnum.ts b/src/api/resources/hris/types/AccountDetailsAndActionsStatusEnum.ts index 084a62d2f..c0020279f 100644 --- a/src/api/resources/hris/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/api/resources/hris/types/AccountDetailsAndActionsStatusEnum.ts @@ -9,7 +9,6 @@ * - `IDLE` - IDLE */ export type AccountDetailsAndActionsStatusEnum = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; - export const AccountDetailsAndActionsStatusEnum = { Complete: "COMPLETE", Incomplete: "INCOMPLETE", diff --git a/src/api/resources/hris/types/AccountTypeEnum.ts b/src/api/resources/hris/types/AccountTypeEnum.ts index 2fdc2e79e..2c5996aca 100644 --- a/src/api/resources/hris/types/AccountTypeEnum.ts +++ b/src/api/resources/hris/types/AccountTypeEnum.ts @@ -7,7 +7,6 @@ * - `CHECKING` - CHECKING */ export type AccountTypeEnum = "SAVINGS" | "CHECKING"; - export const AccountTypeEnum = { Savings: "SAVINGS", Checking: "CHECKING", diff --git a/src/api/resources/hris/types/BenefitPlanTypeEnum.ts b/src/api/resources/hris/types/BenefitPlanTypeEnum.ts index cb8edd82f..385663ad0 100644 --- a/src/api/resources/hris/types/BenefitPlanTypeEnum.ts +++ b/src/api/resources/hris/types/BenefitPlanTypeEnum.ts @@ -10,7 +10,6 @@ * - `OTHER` - OTHER */ export type BenefitPlanTypeEnum = "MEDICAL" | "HEALTH_SAVINGS" | "INSURANCE" | "RETIREMENT" | "OTHER"; - export const BenefitPlanTypeEnum = { Medical: "MEDICAL", HealthSavings: "HEALTH_SAVINGS", diff --git a/src/api/resources/hris/types/CategoriesEnum.ts b/src/api/resources/hris/types/CategoriesEnum.ts index 25eba4836..a5eb57230 100644 --- a/src/api/resources/hris/types/CategoriesEnum.ts +++ b/src/api/resources/hris/types/CategoriesEnum.ts @@ -12,7 +12,6 @@ * - `filestorage` - filestorage */ export type CategoriesEnum = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; - export const CategoriesEnum = { Hris: "hris", Ats: "ats", diff --git a/src/api/resources/hris/types/CategoryEnum.ts b/src/api/resources/hris/types/CategoryEnum.ts index 263fc40b8..6d3d6d6ae 100644 --- a/src/api/resources/hris/types/CategoryEnum.ts +++ b/src/api/resources/hris/types/CategoryEnum.ts @@ -12,7 +12,6 @@ * - `filestorage` - filestorage */ export type CategoryEnum = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; - export const CategoryEnum = { Hris: "hris", Ats: "ats", diff --git a/src/api/resources/hris/types/CountryEnum.ts b/src/api/resources/hris/types/CountryEnum.ts index e21e6bb70..46d4e560b 100644 --- a/src/api/resources/hris/types/CountryEnum.ts +++ b/src/api/resources/hris/types/CountryEnum.ts @@ -503,7 +503,6 @@ export type CountryEnum = | "YE" | "ZM" | "ZW"; - export const CountryEnum = { Af: "AF", Ax: "AX", diff --git a/src/api/resources/hris/types/EarningTypeEnum.ts b/src/api/resources/hris/types/EarningTypeEnum.ts index d9d36ad73..17b210fb3 100644 --- a/src/api/resources/hris/types/EarningTypeEnum.ts +++ b/src/api/resources/hris/types/EarningTypeEnum.ts @@ -9,7 +9,6 @@ * - `BONUS` - BONUS */ export type EarningTypeEnum = "SALARY" | "REIMBURSEMENT" | "OVERTIME" | "BONUS"; - export const EarningTypeEnum = { Salary: "SALARY", Reimbursement: "REIMBURSEMENT", diff --git a/src/api/resources/hris/types/EmploymentStatusEnum.ts b/src/api/resources/hris/types/EmploymentStatusEnum.ts index f86b4a685..7cbe9855c 100644 --- a/src/api/resources/hris/types/EmploymentStatusEnum.ts +++ b/src/api/resources/hris/types/EmploymentStatusEnum.ts @@ -8,7 +8,6 @@ * - `INACTIVE` - INACTIVE */ export type EmploymentStatusEnum = "ACTIVE" | "PENDING" | "INACTIVE"; - export const EmploymentStatusEnum = { Active: "ACTIVE", Pending: "PENDING", diff --git a/src/api/resources/hris/types/EmploymentTypeEnum.ts b/src/api/resources/hris/types/EmploymentTypeEnum.ts index 074a07811..71ce0034d 100644 --- a/src/api/resources/hris/types/EmploymentTypeEnum.ts +++ b/src/api/resources/hris/types/EmploymentTypeEnum.ts @@ -10,7 +10,6 @@ * - `FREELANCE` - FREELANCE */ export type EmploymentTypeEnum = "FULL_TIME" | "PART_TIME" | "INTERN" | "CONTRACTOR" | "FREELANCE"; - export const EmploymentTypeEnum = { FullTime: "FULL_TIME", PartTime: "PART_TIME", diff --git a/src/api/resources/hris/types/EnabledActionsEnum.ts b/src/api/resources/hris/types/EnabledActionsEnum.ts index 73d70210e..24418b130 100644 --- a/src/api/resources/hris/types/EnabledActionsEnum.ts +++ b/src/api/resources/hris/types/EnabledActionsEnum.ts @@ -7,7 +7,6 @@ * - `WRITE` - WRITE */ export type EnabledActionsEnum = "READ" | "WRITE"; - export const EnabledActionsEnum = { Read: "READ", Write: "WRITE", diff --git a/src/api/resources/hris/types/EncodingEnum.ts b/src/api/resources/hris/types/EncodingEnum.ts index 3defec583..a828347f8 100644 --- a/src/api/resources/hris/types/EncodingEnum.ts +++ b/src/api/resources/hris/types/EncodingEnum.ts @@ -8,7 +8,6 @@ * - `GZIP_BASE64` - GZIP_BASE64 */ export type EncodingEnum = "RAW" | "BASE64" | "GZIP_BASE64"; - export const EncodingEnum = { Raw: "RAW", Base64: "BASE64", diff --git a/src/api/resources/hris/types/EthnicityEnum.ts b/src/api/resources/hris/types/EthnicityEnum.ts index d8765cae8..1143997ae 100644 --- a/src/api/resources/hris/types/EthnicityEnum.ts +++ b/src/api/resources/hris/types/EthnicityEnum.ts @@ -21,7 +21,6 @@ export type EthnicityEnum = | "TWO_OR_MORE_RACES" | "WHITE" | "PREFER_NOT_TO_DISCLOSE"; - export const EthnicityEnum = { AmericanIndianOrAlaskaNative: "AMERICAN_INDIAN_OR_ALASKA_NATIVE", AsianOrIndianSubcontinent: "ASIAN_OR_INDIAN_SUBCONTINENT", diff --git a/src/api/resources/hris/types/EventTypeEnum.ts b/src/api/resources/hris/types/EventTypeEnum.ts index eb3218428..08d0f1ce3 100644 --- a/src/api/resources/hris/types/EventTypeEnum.ts +++ b/src/api/resources/hris/types/EventTypeEnum.ts @@ -89,7 +89,6 @@ export type EventTypeEnum = | "DISABLED_MERGE_WEBHOOK" | "MERGE_WEBHOOK_TARGET_CHANGED" | "END_USER_CREDENTIALS_ACCESSED"; - export const EventTypeEnum = { CreatedRemoteProductionApiKey: "CREATED_REMOTE_PRODUCTION_API_KEY", DeletedRemoteProductionApiKey: "DELETED_REMOTE_PRODUCTION_API_KEY", diff --git a/src/api/resources/hris/types/FlsaStatusEnum.ts b/src/api/resources/hris/types/FlsaStatusEnum.ts index 1f9cb1cbd..bedaf430b 100644 --- a/src/api/resources/hris/types/FlsaStatusEnum.ts +++ b/src/api/resources/hris/types/FlsaStatusEnum.ts @@ -9,7 +9,6 @@ * - `OWNER` - OWNER */ export type FlsaStatusEnum = "EXEMPT" | "SALARIED_NONEXEMPT" | "NONEXEMPT" | "OWNER"; - export const FlsaStatusEnum = { Exempt: "EXEMPT", SalariedNonexempt: "SALARIED_NONEXEMPT", diff --git a/src/api/resources/hris/types/GenderEnum.ts b/src/api/resources/hris/types/GenderEnum.ts index eee98747d..26d8e676e 100644 --- a/src/api/resources/hris/types/GenderEnum.ts +++ b/src/api/resources/hris/types/GenderEnum.ts @@ -10,7 +10,6 @@ * - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE */ export type GenderEnum = "MALE" | "FEMALE" | "NON-BINARY" | "OTHER" | "PREFER_NOT_TO_DISCLOSE"; - export const GenderEnum = { Male: "MALE", Female: "FEMALE", diff --git a/src/api/resources/hris/types/GroupTypeEnum.ts b/src/api/resources/hris/types/GroupTypeEnum.ts index d6ad68af6..3918a10ba 100644 --- a/src/api/resources/hris/types/GroupTypeEnum.ts +++ b/src/api/resources/hris/types/GroupTypeEnum.ts @@ -10,7 +10,6 @@ * - `GROUP` - GROUP */ export type GroupTypeEnum = "TEAM" | "DEPARTMENT" | "COST_CENTER" | "BUSINESS_UNIT" | "GROUP"; - export const GroupTypeEnum = { Team: "TEAM", Department: "DEPARTMENT", diff --git a/src/api/resources/hris/types/IssueStatusEnum.ts b/src/api/resources/hris/types/IssueStatusEnum.ts index 9536a7b6d..56fc6d5fa 100644 --- a/src/api/resources/hris/types/IssueStatusEnum.ts +++ b/src/api/resources/hris/types/IssueStatusEnum.ts @@ -7,7 +7,6 @@ * - `RESOLVED` - RESOLVED */ export type IssueStatusEnum = "ONGOING" | "RESOLVED"; - export const IssueStatusEnum = { Ongoing: "ONGOING", Resolved: "RESOLVED", diff --git a/src/api/resources/hris/types/LanguageEnum.ts b/src/api/resources/hris/types/LanguageEnum.ts index 92c0e5778..180002115 100644 --- a/src/api/resources/hris/types/LanguageEnum.ts +++ b/src/api/resources/hris/types/LanguageEnum.ts @@ -7,7 +7,6 @@ * - `de` - de */ export type LanguageEnum = "en" | "de"; - export const LanguageEnum = { En: "en", De: "de", diff --git a/src/api/resources/hris/types/LastSyncResultEnum.ts b/src/api/resources/hris/types/LastSyncResultEnum.ts index 2617afd73..e14779ef7 100644 --- a/src/api/resources/hris/types/LastSyncResultEnum.ts +++ b/src/api/resources/hris/types/LastSyncResultEnum.ts @@ -11,7 +11,6 @@ * - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED */ export type LastSyncResultEnum = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; - export const LastSyncResultEnum = { Syncing: "SYNCING", Done: "DONE", diff --git a/src/api/resources/hris/types/LocationTypeEnum.ts b/src/api/resources/hris/types/LocationTypeEnum.ts index 2846de0eb..1c2acd82b 100644 --- a/src/api/resources/hris/types/LocationTypeEnum.ts +++ b/src/api/resources/hris/types/LocationTypeEnum.ts @@ -7,7 +7,6 @@ * - `WORK` - WORK */ export type LocationTypeEnum = "HOME" | "WORK"; - export const LocationTypeEnum = { Home: "HOME", Work: "WORK", diff --git a/src/api/resources/hris/types/MaritalStatusEnum.ts b/src/api/resources/hris/types/MaritalStatusEnum.ts index 37f632ba6..52f8bb6fc 100644 --- a/src/api/resources/hris/types/MaritalStatusEnum.ts +++ b/src/api/resources/hris/types/MaritalStatusEnum.ts @@ -15,7 +15,6 @@ export type MaritalStatusEnum = | "MARRIED_FILING_SEPARATELY" | "HEAD_OF_HOUSEHOLD" | "QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD"; - export const MaritalStatusEnum = { Single: "SINGLE", MarriedFilingJointly: "MARRIED_FILING_JOINTLY", diff --git a/src/api/resources/hris/types/MethodEnum.ts b/src/api/resources/hris/types/MethodEnum.ts index 5fb2be8d3..5d8dae516 100644 --- a/src/api/resources/hris/types/MethodEnum.ts +++ b/src/api/resources/hris/types/MethodEnum.ts @@ -12,7 +12,6 @@ * - `DELETE` - DELETE */ export type MethodEnum = "GET" | "OPTIONS" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE"; - export const MethodEnum = { Get: "GET", Options: "OPTIONS", diff --git a/src/api/resources/hris/types/PayCurrencyEnum.ts b/src/api/resources/hris/types/PayCurrencyEnum.ts index c0ddb86c5..2d95c9365 100644 --- a/src/api/resources/hris/types/PayCurrencyEnum.ts +++ b/src/api/resources/hris/types/PayCurrencyEnum.ts @@ -617,7 +617,6 @@ export type PayCurrencyEnum = | "ZWD" | "ZWR" | "ZWL"; - export const PayCurrencyEnum = { Xua: "XUA", Afn: "AFN", diff --git a/src/api/resources/hris/types/PayFrequencyEnum.ts b/src/api/resources/hris/types/PayFrequencyEnum.ts index c358b4e69..b482c593f 100644 --- a/src/api/resources/hris/types/PayFrequencyEnum.ts +++ b/src/api/resources/hris/types/PayFrequencyEnum.ts @@ -23,7 +23,6 @@ export type PayFrequencyEnum = | "THIRTEEN-MONTHLY" | "PRO_RATA" | "SEMIMONTHLY"; - export const PayFrequencyEnum = { Weekly: "WEEKLY", Biweekly: "BIWEEKLY", diff --git a/src/api/resources/hris/types/PayPeriodEnum.ts b/src/api/resources/hris/types/PayPeriodEnum.ts index 59437c40e..68001a2df 100644 --- a/src/api/resources/hris/types/PayPeriodEnum.ts +++ b/src/api/resources/hris/types/PayPeriodEnum.ts @@ -23,7 +23,6 @@ export type PayPeriodEnum = | "QUARTER" | "EVERY_SIX_MONTHS" | "YEAR"; - export const PayPeriodEnum = { Hour: "HOUR", Day: "DAY", diff --git a/src/api/resources/hris/types/PolicyTypeEnum.ts b/src/api/resources/hris/types/PolicyTypeEnum.ts index 3c8923589..17546f254 100644 --- a/src/api/resources/hris/types/PolicyTypeEnum.ts +++ b/src/api/resources/hris/types/PolicyTypeEnum.ts @@ -11,7 +11,6 @@ * - `BEREAVEMENT` - BEREAVEMENT */ export type PolicyTypeEnum = "VACATION" | "SICK" | "PERSONAL" | "JURY_DUTY" | "VOLUNTEER" | "BEREAVEMENT"; - export const PolicyTypeEnum = { Vacation: "VACATION", Sick: "SICK", diff --git a/src/api/resources/hris/types/ReasonEnum.ts b/src/api/resources/hris/types/ReasonEnum.ts index 28995e0a8..6298f17e7 100644 --- a/src/api/resources/hris/types/ReasonEnum.ts +++ b/src/api/resources/hris/types/ReasonEnum.ts @@ -8,7 +8,6 @@ * - `OTHER` - OTHER */ export type ReasonEnum = "GENERAL_CUSTOMER_REQUEST" | "GDPR" | "OTHER"; - export const ReasonEnum = { GeneralCustomerRequest: "GENERAL_CUSTOMER_REQUEST", Gdpr: "GDPR", diff --git a/src/api/resources/hris/types/RelationshipEnum.ts b/src/api/resources/hris/types/RelationshipEnum.ts index e593eb955..c63b0c17f 100644 --- a/src/api/resources/hris/types/RelationshipEnum.ts +++ b/src/api/resources/hris/types/RelationshipEnum.ts @@ -8,7 +8,6 @@ * - `DOMESTIC_PARTNER` - DOMESTIC_PARTNER */ export type RelationshipEnum = "CHILD" | "SPOUSE" | "DOMESTIC_PARTNER"; - export const RelationshipEnum = { Child: "CHILD", Spouse: "SPOUSE", diff --git a/src/api/resources/hris/types/RequestFormatEnum.ts b/src/api/resources/hris/types/RequestFormatEnum.ts index 4b66af670..6c5f28198 100644 --- a/src/api/resources/hris/types/RequestFormatEnum.ts +++ b/src/api/resources/hris/types/RequestFormatEnum.ts @@ -8,7 +8,6 @@ * - `MULTIPART` - MULTIPART */ export type RequestFormatEnum = "JSON" | "XML" | "MULTIPART"; - export const RequestFormatEnum = { Json: "JSON", Xml: "XML", diff --git a/src/api/resources/hris/types/RequestTypeEnum.ts b/src/api/resources/hris/types/RequestTypeEnum.ts index f11282935..addb8fafc 100644 --- a/src/api/resources/hris/types/RequestTypeEnum.ts +++ b/src/api/resources/hris/types/RequestTypeEnum.ts @@ -11,7 +11,6 @@ * - `BEREAVEMENT` - BEREAVEMENT */ export type RequestTypeEnum = "VACATION" | "SICK" | "PERSONAL" | "JURY_DUTY" | "VOLUNTEER" | "BEREAVEMENT"; - export const RequestTypeEnum = { Vacation: "VACATION", Sick: "SICK", diff --git a/src/api/resources/hris/types/ResponseTypeEnum.ts b/src/api/resources/hris/types/ResponseTypeEnum.ts index 91a373778..e123001a6 100644 --- a/src/api/resources/hris/types/ResponseTypeEnum.ts +++ b/src/api/resources/hris/types/ResponseTypeEnum.ts @@ -7,7 +7,6 @@ * - `BASE64_GZIP` - BASE64_GZIP */ export type ResponseTypeEnum = "JSON" | "BASE64_GZIP"; - export const ResponseTypeEnum = { Json: "JSON", Base64Gzip: "BASE64_GZIP", diff --git a/src/api/resources/hris/types/RoleEnum.ts b/src/api/resources/hris/types/RoleEnum.ts index 5792757ea..d7b99ac49 100644 --- a/src/api/resources/hris/types/RoleEnum.ts +++ b/src/api/resources/hris/types/RoleEnum.ts @@ -11,7 +11,6 @@ * - `MERGE_TEAM` - MERGE_TEAM */ export type RoleEnum = "ADMIN" | "DEVELOPER" | "MEMBER" | "API" | "SYSTEM" | "MERGE_TEAM"; - export const RoleEnum = { Admin: "ADMIN", Developer: "DEVELOPER", diff --git a/src/api/resources/hris/types/RunStateEnum.ts b/src/api/resources/hris/types/RunStateEnum.ts index 0738bf3f4..385769609 100644 --- a/src/api/resources/hris/types/RunStateEnum.ts +++ b/src/api/resources/hris/types/RunStateEnum.ts @@ -10,7 +10,6 @@ * - `CLOSED` - CLOSED */ export type RunStateEnum = "PAID" | "DRAFT" | "APPROVED" | "FAILED" | "CLOSED"; - export const RunStateEnum = { Paid: "PAID", Draft: "DRAFT", diff --git a/src/api/resources/hris/types/RunTypeEnum.ts b/src/api/resources/hris/types/RunTypeEnum.ts index 6c773999a..21e27513b 100644 --- a/src/api/resources/hris/types/RunTypeEnum.ts +++ b/src/api/resources/hris/types/RunTypeEnum.ts @@ -10,7 +10,6 @@ * - `SIGN_ON_BONUS` - SIGN_ON_BONUS */ export type RunTypeEnum = "REGULAR" | "OFF_CYCLE" | "CORRECTION" | "TERMINATION" | "SIGN_ON_BONUS"; - export const RunTypeEnum = { Regular: "REGULAR", OffCycle: "OFF_CYCLE", diff --git a/src/api/resources/hris/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/api/resources/hris/types/SelectiveSyncConfigurationsUsageEnum.ts index 93a6bf0bf..db8508f89 100644 --- a/src/api/resources/hris/types/SelectiveSyncConfigurationsUsageEnum.ts +++ b/src/api/resources/hris/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -7,7 +7,6 @@ * - `IN_LAST_SYNC` - IN_LAST_SYNC */ export type SelectiveSyncConfigurationsUsageEnum = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; - export const SelectiveSyncConfigurationsUsageEnum = { InNextSync: "IN_NEXT_SYNC", InLastSync: "IN_LAST_SYNC", diff --git a/src/api/resources/hris/types/StatusFd5Enum.ts b/src/api/resources/hris/types/StatusFd5Enum.ts index dfb75bf03..837436325 100644 --- a/src/api/resources/hris/types/StatusFd5Enum.ts +++ b/src/api/resources/hris/types/StatusFd5Enum.ts @@ -11,7 +11,6 @@ * - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED */ export type StatusFd5Enum = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; - export const StatusFd5Enum = { Syncing: "SYNCING", Done: "DONE", diff --git a/src/api/resources/hris/types/TimeOffStatusEnum.ts b/src/api/resources/hris/types/TimeOffStatusEnum.ts index 9a1662b2e..df6d9eb8c 100644 --- a/src/api/resources/hris/types/TimeOffStatusEnum.ts +++ b/src/api/resources/hris/types/TimeOffStatusEnum.ts @@ -10,7 +10,6 @@ * - `DELETED` - DELETED */ export type TimeOffStatusEnum = "REQUESTED" | "APPROVED" | "DECLINED" | "CANCELLED" | "DELETED"; - export const TimeOffStatusEnum = { Requested: "REQUESTED", Approved: "APPROVED", diff --git a/src/api/resources/hris/types/UnitsEnum.ts b/src/api/resources/hris/types/UnitsEnum.ts index 3b91eda32..6d153f70a 100644 --- a/src/api/resources/hris/types/UnitsEnum.ts +++ b/src/api/resources/hris/types/UnitsEnum.ts @@ -7,7 +7,6 @@ * - `DAYS` - DAYS */ export type UnitsEnum = "HOURS" | "DAYS"; - export const UnitsEnum = { Hours: "HOURS", Days: "DAYS", diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index aaf905177..822a7f79d 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -1,6 +1,6 @@ -export * as crm from "./crm"; -export * as ats from "./ats"; export * as filestorage from "./filestorage"; +export * as ats from "./ats"; +export * as crm from "./crm"; export * as hris from "./hris"; export * as ticketing from "./ticketing"; export * as accounting from "./accounting"; diff --git a/src/api/resources/ticketing/client/Client.ts b/src/api/resources/ticketing/client/Client.ts index ca680e703..149776271 100644 --- a/src/api/resources/ticketing/client/Client.ts +++ b/src/api/resources/ticketing/client/Client.ts @@ -34,195 +34,157 @@ import { Users } from "../resources/users/client/Client"; import { WebhookReceivers } from "../resources/webhookReceivers/client/Client"; export declare namespace Ticketing { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: 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 Ticketing { - constructor(protected readonly _options: Ticketing.Options) {} - protected _accountDetails: AccountDetails | undefined; + protected _accountToken: AccountToken | undefined; + protected _accounts: Accounts | undefined; + protected _asyncPassthrough: AsyncPassthrough | undefined; + protected _attachments: Attachments | undefined; + protected _auditTrail: AuditTrail | undefined; + protected _availableActions: AvailableActions | undefined; + protected _collections: Collections | undefined; + protected _comments: Comments | undefined; + protected _contacts: Contacts | undefined; + protected _scopes: Scopes | undefined; + protected _deleteAccount: DeleteAccount | undefined; + protected _fieldMapping: FieldMapping | undefined; + protected _generateKey: GenerateKey | undefined; + protected _issues: Issues | undefined; + protected _linkToken: LinkToken | undefined; + protected _linkedAccounts: LinkedAccounts | undefined; + protected _passthrough: Passthrough | undefined; + protected _projects: Projects | undefined; + protected _regenerateKey: RegenerateKey | undefined; + protected _roles: Roles | undefined; + protected _syncStatus: SyncStatus | undefined; + protected _forceResync: ForceResync | undefined; + protected _tags: Tags | undefined; + protected _teams: Teams | undefined; + protected _tickets: Tickets | undefined; + protected _users: Users | undefined; + protected _webhookReceivers: WebhookReceivers | undefined; + + constructor(protected readonly _options: Ticketing.Options) {} public get accountDetails(): AccountDetails { return (this._accountDetails ??= new AccountDetails(this._options)); } - protected _accountToken: AccountToken | undefined; - public get accountToken(): AccountToken { return (this._accountToken ??= new AccountToken(this._options)); } - protected _accounts: Accounts | undefined; - public get accounts(): Accounts { return (this._accounts ??= new Accounts(this._options)); } - protected _asyncPassthrough: AsyncPassthrough | undefined; - public get asyncPassthrough(): AsyncPassthrough { return (this._asyncPassthrough ??= new AsyncPassthrough(this._options)); } - protected _attachments: Attachments | undefined; - public get attachments(): Attachments { return (this._attachments ??= new Attachments(this._options)); } - protected _auditTrail: AuditTrail | undefined; - public get auditTrail(): AuditTrail { return (this._auditTrail ??= new AuditTrail(this._options)); } - protected _availableActions: AvailableActions | undefined; - public get availableActions(): AvailableActions { return (this._availableActions ??= new AvailableActions(this._options)); } - protected _collections: Collections | undefined; - public get collections(): Collections { return (this._collections ??= new Collections(this._options)); } - protected _comments: Comments | undefined; - public get comments(): Comments { return (this._comments ??= new Comments(this._options)); } - protected _contacts: Contacts | undefined; - public get contacts(): Contacts { return (this._contacts ??= new Contacts(this._options)); } - protected _scopes: Scopes | undefined; - public get scopes(): Scopes { return (this._scopes ??= new Scopes(this._options)); } - protected _deleteAccount: DeleteAccount | undefined; - public get deleteAccount(): DeleteAccount { return (this._deleteAccount ??= new DeleteAccount(this._options)); } - protected _fieldMapping: FieldMapping | undefined; - public get fieldMapping(): FieldMapping { return (this._fieldMapping ??= new FieldMapping(this._options)); } - protected _generateKey: GenerateKey | undefined; - public get generateKey(): GenerateKey { return (this._generateKey ??= new GenerateKey(this._options)); } - protected _issues: Issues | undefined; - public get issues(): Issues { return (this._issues ??= new Issues(this._options)); } - protected _linkToken: LinkToken | undefined; - public get linkToken(): LinkToken { return (this._linkToken ??= new LinkToken(this._options)); } - protected _linkedAccounts: LinkedAccounts | undefined; - public get linkedAccounts(): LinkedAccounts { return (this._linkedAccounts ??= new LinkedAccounts(this._options)); } - protected _passthrough: Passthrough | undefined; - public get passthrough(): Passthrough { return (this._passthrough ??= new Passthrough(this._options)); } - protected _projects: Projects | undefined; - public get projects(): Projects { return (this._projects ??= new Projects(this._options)); } - protected _regenerateKey: RegenerateKey | undefined; - public get regenerateKey(): RegenerateKey { return (this._regenerateKey ??= new RegenerateKey(this._options)); } - protected _roles: Roles | undefined; - public get roles(): Roles { return (this._roles ??= new Roles(this._options)); } - protected _syncStatus: SyncStatus | undefined; - public get syncStatus(): SyncStatus { return (this._syncStatus ??= new SyncStatus(this._options)); } - protected _forceResync: ForceResync | undefined; - public get forceResync(): ForceResync { return (this._forceResync ??= new ForceResync(this._options)); } - protected _tags: Tags | undefined; - public get tags(): Tags { return (this._tags ??= new Tags(this._options)); } - protected _teams: Teams | undefined; - public get teams(): Teams { return (this._teams ??= new Teams(this._options)); } - protected _tickets: Tickets | undefined; - public get tickets(): Tickets { return (this._tickets ??= new Tickets(this._options)); } - protected _users: Users | undefined; - public get users(): Users { return (this._users ??= new Users(this._options)); } - protected _webhookReceivers: WebhookReceivers | undefined; - public get webhookReceivers(): WebhookReceivers { return (this._webhookReceivers ??= new WebhookReceivers(this._options)); } diff --git a/src/api/resources/ticketing/resources/accountDetails/client/Client.ts b/src/api/resources/ticketing/resources/accountDetails/client/Client.ts index 694546e05..d4aade747 100644 --- a/src/api/resources/ticketing/resources/accountDetails/client/Client.ts +++ b/src/api/resources/ticketing/resources/accountDetails/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AccountDetails { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class AccountDetails { * @example * await client.ticketing.accountDetails.retrieve() */ - public async retrieve(requestOptions?: AccountDetails.RequestOptions): Promise { + public retrieve( + requestOptions?: AccountDetails.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(requestOptions)); + } + + private async __retrieve( + requestOptions?: AccountDetails.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/account-details" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/account-details", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class AccountDetails { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class AccountDetails { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.AccountDetails.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.AccountDetails.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/accountToken/client/Client.ts b/src/api/resources/ticketing/resources/accountToken/client/Client.ts index 0fc061880..9896ad333 100644 --- a/src/api/resources/ticketing/resources/accountToken/client/Client.ts +++ b/src/api/resources/ticketing/resources/accountToken/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AccountToken { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,14 +46,23 @@ export class AccountToken { * @example * await client.ticketing.accountToken.retrieve("public_token") */ - public async retrieve( + public retrieve( publicToken: string, - requestOptions?: AccountToken.RequestOptions - ): Promise { + requestOptions?: AccountToken.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(publicToken, requestOptions)); + } + + private async __retrieve( + publicToken: string, + requestOptions?: AccountToken.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/account-token/${encodeURIComponent(publicToken)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/account-token/${encodeURIComponent(publicToken)}`, ), method: "GET", headers: { @@ -62,8 +73,8 @@ export class AccountToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -75,13 +86,16 @@ export class AccountToken { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.AccountToken.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.AccountToken.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -99,7 +113,7 @@ export class AccountToken { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/account-token/{public_token}." + "Timeout exceeded when calling GET /ticketing/v1/account-token/{public_token}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ticketing/resources/accounts/client/Client.ts b/src/api/resources/ticketing/resources/accounts/client/Client.ts index 6a3d2d212..e27ff6b38 100644 --- a/src/api/resources/ticketing/resources/accounts/client/Client.ts +++ b/src/api/resources/ticketing/resources/accounts/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Accounts { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Accounts { * @example * await client.ticketing.accounts.list() */ - public async list( + public list( request: Merge.ticketing.AccountsListRequest = {}, - requestOptions?: Accounts.RequestOptions - ): Promise { + requestOptions?: Accounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ticketing.AccountsListRequest = {}, + requestOptions?: Accounts.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -60,7 +69,7 @@ export class Accounts { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,8 +112,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/accounts", ), method: "GET", headers: { @@ -115,8 +126,8 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -129,13 +140,16 @@ export class Accounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedAccountList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedAccountList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -170,13 +184,21 @@ export class Accounts { * @example * await client.ticketing.accounts.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ticketing.AccountsRetrieveRequest = {}, - requestOptions?: Accounts.RequestOptions - ): Promise { + requestOptions?: Accounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ticketing.AccountsRetrieveRequest = {}, + requestOptions?: Accounts.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -187,8 +209,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/accounts/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -199,8 +223,8 @@ export class Accounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -213,13 +237,16 @@ export class Accounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.Account.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.Account.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/asyncPassthrough/client/Client.ts b/src/api/resources/ticketing/resources/asyncPassthrough/client/Client.ts index 8da9df83b..8fa678432 100644 --- a/src/api/resources/ticketing/resources/asyncPassthrough/client/Client.ts +++ b/src/api/resources/ticketing/resources/asyncPassthrough/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace AsyncPassthrough { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -47,14 +49,23 @@ export class AsyncPassthrough { * path: "/scooters" * }) */ - public async create( + public create( request: Merge.ticketing.DataPassthroughRequest, - requestOptions?: AsyncPassthrough.RequestOptions - ): Promise { + requestOptions?: AsyncPassthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ticketing.DataPassthroughRequest, + requestOptions?: AsyncPassthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/async-passthrough" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/async-passthrough", ), method: "POST", headers: { @@ -65,8 +76,8 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -81,13 +92,16 @@ export class AsyncPassthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.AsyncPassthroughReciept.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.AsyncPassthroughReciept.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -105,7 +119,7 @@ export class AsyncPassthrough { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /ticketing/v1/async-passthrough." + "Timeout exceeded when calling POST /ticketing/v1/async-passthrough.", ); case "unknown": throw new errors.MergeError({ @@ -123,14 +137,23 @@ export class AsyncPassthrough { * @example * await client.ticketing.asyncPassthrough.retrieve("async_passthrough_receipt_id") */ - public async retrieve( + public retrieve( asyncPassthroughReceiptId: string, - requestOptions?: AsyncPassthrough.RequestOptions - ): Promise { + requestOptions?: AsyncPassthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(asyncPassthroughReceiptId, requestOptions)); + } + + private async __retrieve( + asyncPassthroughReceiptId: string, + requestOptions?: AsyncPassthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}`, ), method: "GET", headers: { @@ -141,8 +164,8 @@ export class AsyncPassthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -154,13 +177,16 @@ export class AsyncPassthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.AsyncPassthroughRetrieveResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -178,7 +204,7 @@ export class AsyncPassthrough { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/async-passthrough/{async_passthrough_receipt_id}." + "Timeout exceeded when calling GET /ticketing/v1/async-passthrough/{async_passthrough_receipt_id}.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ticketing/resources/attachments/client/Client.ts b/src/api/resources/ticketing/resources/attachments/client/Client.ts index 85d900daf..7616c6ed2 100644 --- a/src/api/resources/ticketing/resources/attachments/client/Client.ts +++ b/src/api/resources/ticketing/resources/attachments/client/Client.ts @@ -11,15 +11,17 @@ import * as errors from "../../../../../../errors/index"; import * as stream from "stream"; export declare namespace Attachments { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -45,10 +47,17 @@ export class Attachments { * @example * await client.ticketing.attachments.list() */ - public async list( + public list( request: Merge.ticketing.AttachmentsListRequest = {}, - requestOptions?: Attachments.RequestOptions - ): Promise { + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ticketing.AttachmentsListRequest = {}, + requestOptions?: Attachments.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -64,7 +73,7 @@ export class Attachments { remoteId, ticketId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -119,8 +128,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/attachments", ), method: "GET", headers: { @@ -131,8 +142,8 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -145,13 +156,16 @@ export class Attachments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedAttachmentList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedAttachmentList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -187,12 +201,19 @@ export class Attachments { * model: {} * }) */ - public async create( + public create( + request: Merge.ticketing.TicketingAttachmentEndpointRequest, + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.ticketing.TicketingAttachmentEndpointRequest, - requestOptions?: Attachments.RequestOptions - ): Promise { + requestOptions?: Attachments.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -203,8 +224,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/attachments", ), method: "POST", headers: { @@ -215,8 +238,8 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -232,13 +255,16 @@ export class Attachments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.TicketingAttachmentResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.TicketingAttachmentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -273,13 +299,21 @@ export class Attachments { * @example * await client.ticketing.attachments.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.ticketing.AttachmentsRetrieveRequest = {}, + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.ticketing.AttachmentsRetrieveRequest = {}, - requestOptions?: Attachments.RequestOptions - ): Promise { + requestOptions?: Attachments.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -294,8 +328,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/attachments/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -306,8 +342,8 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -320,13 +356,16 @@ export class Attachments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.Attachment.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.Attachment.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -354,13 +393,21 @@ export class Attachments { /** * Returns the `File` content with the given `id` as a stream of bytes. */ - public async downloadRetrieve( + public downloadRetrieve( + id: string, + request: Merge.ticketing.AttachmentsDownloadRetrieveRequest = {}, + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__downloadRetrieve(id, request, requestOptions)); + } + + private async __downloadRetrieve( id: string, request: Merge.ticketing.AttachmentsDownloadRetrieveRequest = {}, - requestOptions?: Attachments.RequestOptions - ): Promise { + requestOptions?: Attachments.RequestOptions, + ): Promise> { const { includeShellData, mimeType } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeShellData != null) { _queryParams["include_shell_data"] = includeShellData.toString(); } @@ -371,8 +418,10 @@ 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/${encodeURIComponent(id)}/download` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/attachments/${encodeURIComponent(id)}/download`, ), method: "GET", headers: { @@ -383,8 +432,8 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -398,7 +447,7 @@ export class Attachments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return _response.body; + return { data: _response.body, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -416,7 +465,7 @@ export class Attachments { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/attachments/{id}/download." + "Timeout exceeded when calling GET /ticketing/v1/attachments/{id}/download.", ); case "unknown": throw new errors.MergeError({ @@ -433,11 +482,21 @@ export class Attachments { * @example * await client.ticketing.attachments.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Attachments.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Attachments.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/attachments/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/attachments/meta/post", ), method: "GET", headers: { @@ -448,8 +507,8 @@ export class Attachments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -461,13 +520,16 @@ export class Attachments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -485,7 +547,7 @@ export class Attachments { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/attachments/meta/post." + "Timeout exceeded when calling GET /ticketing/v1/attachments/meta/post.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ticketing/resources/auditTrail/client/Client.ts b/src/api/resources/ticketing/resources/auditTrail/client/Client.ts index ee4176201..56c007ca9 100644 --- a/src/api/resources/ticketing/resources/auditTrail/client/Client.ts +++ b/src/api/resources/ticketing/resources/auditTrail/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AuditTrail { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class AuditTrail { * @example * await client.ticketing.auditTrail.list() */ - public async list( + public list( request: Merge.ticketing.AuditTrailListRequest = {}, - requestOptions?: AuditTrail.RequestOptions - ): Promise { + requestOptions?: AuditTrail.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private 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,8 +85,10 @@ export class AuditTrail { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/audit-trail" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/audit-trail", ), method: "GET", headers: { @@ -88,8 +99,8 @@ export class AuditTrail { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -102,13 +113,16 @@ export class AuditTrail { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedAuditLogEventList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedAuditLogEventList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/availableActions/client/Client.ts b/src/api/resources/ticketing/resources/availableActions/client/Client.ts index 61011aecb..5f4944758 100644 --- a/src/api/resources/ticketing/resources/availableActions/client/Client.ts +++ b/src/api/resources/ticketing/resources/availableActions/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace AvailableActions { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class AvailableActions { * @example * await client.ticketing.availableActions.retrieve() */ - public async retrieve(requestOptions?: AvailableActions.RequestOptions): Promise { + public retrieve( + requestOptions?: AvailableActions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(requestOptions)); + } + + private async __retrieve( + requestOptions?: AvailableActions.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/available-actions" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/available-actions", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class AvailableActions { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class AvailableActions { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.AvailableActions.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.AvailableActions.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -95,7 +110,7 @@ export class AvailableActions { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/available-actions." + "Timeout exceeded when calling GET /ticketing/v1/available-actions.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ticketing/resources/collections/client/Client.ts b/src/api/resources/ticketing/resources/collections/client/Client.ts index 18bcdfebf..5da668530 100644 --- a/src/api/resources/ticketing/resources/collections/client/Client.ts +++ b/src/api/resources/ticketing/resources/collections/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Collections { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Collections { * @example * await client.ticketing.collections.list() */ - public async list( + public list( request: Merge.ticketing.CollectionsListRequest = {}, - requestOptions?: Collections.RequestOptions - ): Promise { + requestOptions?: Collections.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ticketing.CollectionsListRequest = {}, + requestOptions?: Collections.RequestOptions, + ): Promise> { const { collectionType, createdAfter, @@ -65,7 +74,7 @@ export class Collections { remoteId, showEnumOrigins, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (collectionType != null) { _queryParams["collection_type"] = collectionType; } @@ -128,8 +137,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/collections", ), method: "GET", headers: { @@ -140,8 +151,8 @@ export class Collections { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -154,13 +165,16 @@ export class Collections { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedCollectionList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedCollectionList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -195,19 +209,29 @@ export class Collections { * @example * await client.ticketing.collections.viewersList("collection_id") */ - public async viewersList( + public viewersList( + collectionId: string, + request: Merge.ticketing.CollectionsViewersListRequest = {}, + requestOptions?: Collections.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__viewersList(collectionId, request, requestOptions)); + } + + private async __viewersList( collectionId: string, request: Merge.ticketing.CollectionsViewersListRequest = {}, - requestOptions?: Collections.RequestOptions - ): Promise { + requestOptions?: Collections.RequestOptions, + ): Promise> { const { cursor, expand, includeDeletedData, includeRemoteData, includeShellData, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ticketing.CollectionsViewersListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -228,8 +252,10 @@ 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/${encodeURIComponent(collectionId)}/viewers` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/collections/${encodeURIComponent(collectionId)}/viewers`, ), method: "GET", headers: { @@ -240,8 +266,8 @@ export class Collections { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -254,13 +280,16 @@ export class Collections { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedViewerList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedViewerList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -278,7 +307,7 @@ export class Collections { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/collections/{collection_id}/viewers." + "Timeout exceeded when calling GET /ticketing/v1/collections/{collection_id}/viewers.", ); case "unknown": throw new errors.MergeError({ @@ -297,13 +326,21 @@ export class Collections { * @example * await client.ticketing.collections.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.ticketing.CollectionsRetrieveRequest = {}, + requestOptions?: Collections.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.ticketing.CollectionsRetrieveRequest = {}, - requestOptions?: Collections.RequestOptions - ): Promise { + requestOptions?: Collections.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -326,8 +363,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/collections/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -338,8 +377,8 @@ export class Collections { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -352,13 +391,16 @@ export class Collections { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.Collection.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.Collection.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/collections/types/CollectionsViewersListRequestExpand.ts b/src/api/resources/ticketing/resources/collections/types/CollectionsViewersListRequestExpand.ts index b791668c1..548c9dc55 100644 --- a/src/api/resources/ticketing/resources/collections/types/CollectionsViewersListRequestExpand.ts +++ b/src/api/resources/ticketing/resources/collections/types/CollectionsViewersListRequestExpand.ts @@ -3,7 +3,6 @@ */ export type CollectionsViewersListRequestExpand = "team" | "user" | "user,team"; - export const CollectionsViewersListRequestExpand = { Team: "team", User: "user", diff --git a/src/api/resources/ticketing/resources/comments/client/Client.ts b/src/api/resources/ticketing/resources/comments/client/Client.ts index 2cadf0f76..ba3d08b66 100644 --- a/src/api/resources/ticketing/resources/comments/client/Client.ts +++ b/src/api/resources/ticketing/resources/comments/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Comments { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Comments { * @example * await client.ticketing.comments.list() */ - public async list( + public list( + request: Merge.ticketing.CommentsListRequest = {}, + requestOptions?: Comments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.ticketing.CommentsListRequest = {}, - requestOptions?: Comments.RequestOptions - ): Promise { + requestOptions?: Comments.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -63,7 +72,7 @@ export class Comments { remoteId, ticketId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -77,7 +86,9 @@ export class Comments { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ticketing.CommentsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -118,8 +129,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/comments", ), method: "GET", headers: { @@ -130,8 +143,8 @@ export class Comments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -144,13 +157,16 @@ export class Comments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedCommentList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedCommentList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -186,12 +202,19 @@ export class Comments { * model: {} * }) */ - public async create( + public create( + request: Merge.ticketing.CommentEndpointRequest, + requestOptions?: Comments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.ticketing.CommentEndpointRequest, - requestOptions?: Comments.RequestOptions - ): Promise { + requestOptions?: Comments.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -202,8 +225,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/comments", ), method: "POST", headers: { @@ -214,8 +239,8 @@ export class Comments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -229,13 +254,16 @@ export class Comments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.CommentResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.CommentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -270,15 +298,25 @@ export class Comments { * @example * await client.ticketing.comments.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.ticketing.CommentsRetrieveRequest = {}, + requestOptions?: Comments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.ticketing.CommentsRetrieveRequest = {}, - requestOptions?: Comments.RequestOptions - ): Promise { + requestOptions?: Comments.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ticketing.CommentsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -291,8 +329,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/comments/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -303,8 +343,8 @@ export class Comments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -317,13 +357,16 @@ export class Comments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.Comment.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.Comment.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -356,11 +399,21 @@ export class Comments { * @example * await client.ticketing.comments.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Comments.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Comments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Comments.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/comments/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/comments/meta/post", ), method: "GET", headers: { @@ -371,8 +424,8 @@ export class Comments { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -384,13 +437,16 @@ export class Comments { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -408,7 +464,7 @@ export class Comments { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/comments/meta/post." + "Timeout exceeded when calling GET /ticketing/v1/comments/meta/post.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ticketing/resources/comments/types/CommentsListRequestExpand.ts b/src/api/resources/ticketing/resources/comments/types/CommentsListRequestExpand.ts index 4bc50ff86..b5de64c12 100644 --- a/src/api/resources/ticketing/resources/comments/types/CommentsListRequestExpand.ts +++ b/src/api/resources/ticketing/resources/comments/types/CommentsListRequestExpand.ts @@ -10,7 +10,6 @@ export type CommentsListRequestExpand = | "user,contact" | "user,contact,ticket" | "user,ticket"; - export const CommentsListRequestExpand = { Contact: "contact", ContactTicket: "contact,ticket", diff --git a/src/api/resources/ticketing/resources/comments/types/CommentsRetrieveRequestExpand.ts b/src/api/resources/ticketing/resources/comments/types/CommentsRetrieveRequestExpand.ts index 4df0b5ce9..43bc2ddc2 100644 --- a/src/api/resources/ticketing/resources/comments/types/CommentsRetrieveRequestExpand.ts +++ b/src/api/resources/ticketing/resources/comments/types/CommentsRetrieveRequestExpand.ts @@ -10,7 +10,6 @@ export type CommentsRetrieveRequestExpand = | "user,contact" | "user,contact,ticket" | "user,ticket"; - export const CommentsRetrieveRequestExpand = { Contact: "contact", ContactTicket: "contact,ticket", diff --git a/src/api/resources/ticketing/resources/contacts/client/Client.ts b/src/api/resources/ticketing/resources/contacts/client/Client.ts index 848fa1e67..2bb1a20b0 100644 --- a/src/api/resources/ticketing/resources/contacts/client/Client.ts +++ b/src/api/resources/ticketing/resources/contacts/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Contacts { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Contacts { * @example * await client.ticketing.contacts.list() */ - public async list( + public list( request: Merge.ticketing.ContactsListRequest = {}, - requestOptions?: Contacts.RequestOptions - ): Promise { + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ticketing.ContactsListRequest = {}, + requestOptions?: Contacts.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -61,7 +70,7 @@ export class Contacts { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -108,8 +117,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/contacts", ), method: "GET", headers: { @@ -120,8 +131,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -134,13 +145,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedContactList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedContactList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -176,12 +190,19 @@ export class Contacts { * model: {} * }) */ - public async create( + public create( request: Merge.ticketing.TicketingContactEndpointRequest, - requestOptions?: Contacts.RequestOptions - ): Promise { + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ticketing.TicketingContactEndpointRequest, + requestOptions?: Contacts.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -192,8 +213,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/contacts", ), method: "POST", headers: { @@ -204,8 +227,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -221,13 +244,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.TicketingContactResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.TicketingContactResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -262,13 +288,21 @@ export class Contacts { * @example * await client.ticketing.contacts.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ticketing.ContactsRetrieveRequest = {}, - requestOptions?: Contacts.RequestOptions - ): Promise { + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ticketing.ContactsRetrieveRequest = {}, + requestOptions?: Contacts.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { _queryParams["expand"] = expand; } @@ -283,8 +317,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/contacts/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -295,8 +331,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -309,13 +345,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.Contact.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.Contact.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -348,11 +387,21 @@ export class Contacts { * @example * await client.ticketing.contacts.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Contacts.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Contacts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Contacts.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/contacts/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/contacts/meta/post", ), method: "GET", headers: { @@ -363,8 +412,8 @@ export class Contacts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -376,13 +425,16 @@ export class Contacts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -400,7 +452,7 @@ export class Contacts { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/contacts/meta/post." + "Timeout exceeded when calling GET /ticketing/v1/contacts/meta/post.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ticketing/resources/deleteAccount/client/Client.ts b/src/api/resources/ticketing/resources/deleteAccount/client/Client.ts index 093fd6d8e..6f2472d2b 100644 --- a/src/api/resources/ticketing/resources/deleteAccount/client/Client.ts +++ b/src/api/resources/ticketing/resources/deleteAccount/client/Client.ts @@ -8,15 +8,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace DeleteAccount { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -41,11 +43,17 @@ export class DeleteAccount { * @example * await client.ticketing.deleteAccount.delete() */ - public async delete(requestOptions?: DeleteAccount.RequestOptions): Promise { + public delete(requestOptions?: DeleteAccount.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(requestOptions)); + } + + private async __delete(requestOptions?: DeleteAccount.RequestOptions): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/delete-account" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/delete-account", ), method: "POST", headers: { @@ -56,8 +64,8 @@ export class DeleteAccount { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -69,7 +77,7 @@ export class DeleteAccount { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return { data: undefined, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/fieldMapping/client/Client.ts b/src/api/resources/ticketing/resources/fieldMapping/client/Client.ts index 33b88e8bc..20504be27 100644 --- a/src/api/resources/ticketing/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/ticketing/resources/fieldMapping/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace FieldMapping { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,20 +46,29 @@ export class FieldMapping { * @example * await client.ticketing.fieldMapping.fieldMappingsRetrieve() */ - public async fieldMappingsRetrieve( + public fieldMappingsRetrieve( request: Merge.ticketing.FieldMappingsRetrieveRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsRetrieve(request, requestOptions)); + } + + private async __fieldMappingsRetrieve( + request: Merge.ticketing.FieldMappingsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { excludeRemoteFieldMetadata } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (excludeRemoteFieldMetadata != null) { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/field-mappings" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/field-mappings", ), method: "GET", headers: { @@ -68,8 +79,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -82,13 +93,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.FieldMappingApiInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -129,20 +143,29 @@ export class FieldMapping { * commonModelName: "ExampleCommonModel" * }) */ - public async fieldMappingsCreate( + public fieldMappingsCreate( + request: Merge.ticketing.CreateFieldMappingRequest, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsCreate(request, requestOptions)); + } + + private async __fieldMappingsCreate( request: Merge.ticketing.CreateFieldMappingRequest, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { excludeRemoteFieldMetadata, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (excludeRemoteFieldMetadata != null) { _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/field-mappings" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/field-mappings", ), method: "POST", headers: { @@ -153,8 +176,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -170,13 +193,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -210,14 +236,23 @@ export class FieldMapping { * @example * await client.ticketing.fieldMapping.fieldMappingsDestroy("field_mapping_id") */ - public async fieldMappingsDestroy( + public fieldMappingsDestroy( + fieldMappingId: string, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsDestroy(fieldMappingId, requestOptions)); + } + + private async __fieldMappingsDestroy( fieldMappingId: string, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "DELETE", headers: { @@ -228,8 +263,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -241,13 +276,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -265,7 +303,7 @@ export class FieldMapping { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling DELETE /ticketing/v1/field-mappings/{field_mapping_id}." + "Timeout exceeded when calling DELETE /ticketing/v1/field-mappings/{field_mapping_id}.", ); case "unknown": throw new errors.MergeError({ @@ -284,15 +322,27 @@ export class FieldMapping { * @example * await client.ticketing.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id") */ - public async fieldMappingsPartialUpdate( + public fieldMappingsPartialUpdate( fieldMappingId: string, request: Merge.ticketing.PatchedEditFieldMappingRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__fieldMappingsPartialUpdate(fieldMappingId, request, requestOptions), + ); + } + + private async __fieldMappingsPartialUpdate( + fieldMappingId: string, + request: Merge.ticketing.PatchedEditFieldMappingRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/field-mappings/${encodeURIComponent(fieldMappingId)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, ), method: "PATCH", headers: { @@ -303,8 +353,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -319,13 +369,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.FieldMappingInstanceResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.FieldMappingInstanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -343,7 +396,7 @@ export class FieldMapping { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling PATCH /ticketing/v1/field-mappings/{field_mapping_id}." + "Timeout exceeded when calling PATCH /ticketing/v1/field-mappings/{field_mapping_id}.", ); case "unknown": throw new errors.MergeError({ @@ -361,12 +414,19 @@ export class FieldMapping { * @example * await client.ticketing.fieldMapping.remoteFieldsRetrieve() */ - public async remoteFieldsRetrieve( + public remoteFieldsRetrieve( + request: Merge.ticketing.RemoteFieldsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldsRetrieve(request, requestOptions)); + } + + private async __remoteFieldsRetrieve( request: Merge.ticketing.RemoteFieldsRetrieveRequest = {}, - requestOptions?: FieldMapping.RequestOptions - ): Promise { + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const { commonModels, includeExampleValues } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (commonModels != null) { _queryParams["common_models"] = commonModels; } @@ -377,8 +437,10 @@ 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/remote-fields" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/remote-fields", ), method: "GET", headers: { @@ -389,8 +451,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -403,13 +465,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.RemoteFieldApiResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.RemoteFieldApiResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -442,13 +507,21 @@ export class FieldMapping { * @example * await client.ticketing.fieldMapping.targetFieldsRetrieve() */ - public async targetFieldsRetrieve( - requestOptions?: FieldMapping.RequestOptions - ): Promise { + public targetFieldsRetrieve( + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__targetFieldsRetrieve(requestOptions)); + } + + private async __targetFieldsRetrieve( + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/target-fields" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/target-fields", ), method: "GET", headers: { @@ -459,8 +532,8 @@ export class FieldMapping { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -472,13 +545,16 @@ export class FieldMapping { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.ExternalTargetFieldApiResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/forceResync/client/Client.ts b/src/api/resources/ticketing/resources/forceResync/client/Client.ts index 16f025bac..b99d4948e 100644 --- a/src/api/resources/ticketing/resources/forceResync/client/Client.ts +++ b/src/api/resources/ticketing/resources/forceResync/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace ForceResync { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,13 +45,21 @@ export class ForceResync { * @example * await client.ticketing.forceResync.syncStatusResyncCreate() */ - public async syncStatusResyncCreate( - requestOptions?: ForceResync.RequestOptions - ): Promise { + public syncStatusResyncCreate( + requestOptions?: ForceResync.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__syncStatusResyncCreate(requestOptions)); + } + + private async __syncStatusResyncCreate( + requestOptions?: ForceResync.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/sync-status/resync" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/sync-status/resync", ), method: "POST", headers: { @@ -60,8 +70,8 @@ export class ForceResync { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -73,13 +83,16 @@ export class ForceResync { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.forceResync.syncStatusResyncCreate.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -97,7 +110,7 @@ export class ForceResync { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /ticketing/v1/sync-status/resync." + "Timeout exceeded when calling POST /ticketing/v1/sync-status/resync.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ticketing/resources/generateKey/client/Client.ts b/src/api/resources/ticketing/resources/generateKey/client/Client.ts index bbfb0d8c6..a97ae54f7 100644 --- a/src/api/resources/ticketing/resources/generateKey/client/Client.ts +++ b/src/api/resources/ticketing/resources/generateKey/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace GenerateKey { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -46,14 +48,23 @@ export class GenerateKey { * name: "Remote Deployment Key 1" * }) */ - public async create( + public create( request: Merge.ticketing.GenerateRemoteKeyRequest, - requestOptions?: GenerateKey.RequestOptions - ): Promise { + requestOptions?: GenerateKey.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ticketing.GenerateRemoteKeyRequest, + requestOptions?: GenerateKey.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/generate-key" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/generate-key", ), method: "POST", headers: { @@ -64,8 +75,8 @@ export class GenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -80,13 +91,16 @@ export class GenerateKey { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.RemoteKey.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.RemoteKey.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/issues/client/Client.ts b/src/api/resources/ticketing/resources/issues/client/Client.ts index 2d6c2bd39..bcdf62153 100644 --- a/src/api/resources/ticketing/resources/issues/client/Client.ts +++ b/src/api/resources/ticketing/resources/issues/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Issues { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Issues { * @example * await client.ticketing.issues.list() */ - public async list( + public list( + request: Merge.ticketing.IssuesListRequest = {}, + requestOptions?: Issues.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.ticketing.IssuesListRequest = {}, - requestOptions?: Issues.RequestOptions - ): Promise { + requestOptions?: Issues.RequestOptions, + ): Promise> { const { accountToken, cursor, @@ -64,7 +73,7 @@ export class Issues { startDate, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountToken != null) { _queryParams["account_token"] = accountToken; } @@ -118,13 +127,17 @@ export class Issues { } if (status != null) { - _queryParams["status"] = status; + _queryParams["status"] = serializers.ticketing.IssuesListRequestStatus.jsonOrThrow(status, { + unrecognizedObjectKeys: "strip", + }); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/issues" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/issues", ), method: "GET", headers: { @@ -135,8 +148,8 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -149,13 +162,16 @@ export class Issues { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedIssueList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedIssueList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -189,11 +205,23 @@ export class Issues { * @example * await client.ticketing.issues.retrieve("id") */ - public async retrieve(id: string, requestOptions?: Issues.RequestOptions): Promise { + public retrieve( + id: string, + requestOptions?: Issues.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, requestOptions)); + } + + private 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/issues/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -204,8 +232,8 @@ export class Issues { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -217,13 +245,16 @@ export class Issues { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.Issue.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.Issue.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/issues/types/IssuesListRequestStatus.ts b/src/api/resources/ticketing/resources/issues/types/IssuesListRequestStatus.ts index b2d4f1b76..a35e3e193 100644 --- a/src/api/resources/ticketing/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/api/resources/ticketing/resources/issues/types/IssuesListRequestStatus.ts @@ -3,7 +3,6 @@ */ export type IssuesListRequestStatus = "ONGOING" | "RESOLVED"; - export const IssuesListRequestStatus = { Ongoing: "ONGOING", Resolved: "RESOLVED", diff --git a/src/api/resources/ticketing/resources/linkToken/client/Client.ts b/src/api/resources/ticketing/resources/linkToken/client/Client.ts index ca420657c..6ddcdbcbe 100644 --- a/src/api/resources/ticketing/resources/linkToken/client/Client.ts +++ b/src/api/resources/ticketing/resources/linkToken/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace LinkToken { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -49,14 +51,23 @@ export class LinkToken { * categories: ["hris", "ats"] * }) */ - public async create( + public create( request: Merge.ticketing.EndUserDetailsRequest, - requestOptions?: LinkToken.RequestOptions - ): Promise { + requestOptions?: LinkToken.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ticketing.EndUserDetailsRequest, + requestOptions?: LinkToken.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/link-token" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/link-token", ), method: "POST", headers: { @@ -67,8 +78,8 @@ export class LinkToken { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -81,13 +92,16 @@ export class LinkToken { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.LinkToken.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.LinkToken.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/linkedAccounts/client/Client.ts b/src/api/resources/ticketing/resources/linkedAccounts/client/Client.ts index dd9b5507f..7a8ac5eea 100644 --- a/src/api/resources/ticketing/resources/linkedAccounts/client/Client.ts +++ b/src/api/resources/ticketing/resources/linkedAccounts/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace LinkedAccounts { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class LinkedAccounts { * @example * await client.ticketing.linkedAccounts.list() */ - public async list( + public list( request: Merge.ticketing.LinkedAccountsListRequest = {}, - requestOptions?: LinkedAccounts.RequestOptions - ): Promise { + requestOptions?: LinkedAccounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ticketing.LinkedAccountsListRequest = {}, + requestOptions?: LinkedAccounts.RequestOptions, + ): Promise> { const { category, cursor, @@ -63,9 +72,11 @@ export class LinkedAccounts { pageSize, status, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (category != null) { - _queryParams["category"] = category; + _queryParams["category"] = serializers.ticketing.LinkedAccountsListRequestCategory.jsonOrThrow(category, { + unrecognizedObjectKeys: "strip", + }); } if (cursor != null) { @@ -118,8 +129,10 @@ export class LinkedAccounts { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/linked-accounts" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/linked-accounts", ), method: "GET", headers: { @@ -130,8 +143,8 @@ export class LinkedAccounts { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -144,13 +157,16 @@ export class LinkedAccounts { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedAccountDetailsAndActionsList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/api/resources/ticketing/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index edeb3e1d1..7474691d1 100644 --- a/src/api/resources/ticketing/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/api/resources/ticketing/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -10,7 +10,6 @@ export type LinkedAccountsListRequestCategory = | "hris" | "mktg" | "ticketing"; - export const LinkedAccountsListRequestCategory = { Accounting: "accounting", Ats: "ats", diff --git a/src/api/resources/ticketing/resources/passthrough/client/Client.ts b/src/api/resources/ticketing/resources/passthrough/client/Client.ts index 489e75752..4bb156eb0 100644 --- a/src/api/resources/ticketing/resources/passthrough/client/Client.ts +++ b/src/api/resources/ticketing/resources/passthrough/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Passthrough { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -47,14 +49,23 @@ export class Passthrough { * path: "/scooters" * }) */ - public async create( + public create( request: Merge.ticketing.DataPassthroughRequest, - requestOptions?: Passthrough.RequestOptions - ): Promise { + requestOptions?: Passthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ticketing.DataPassthroughRequest, + requestOptions?: Passthrough.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/passthrough" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/passthrough", ), method: "POST", headers: { @@ -65,8 +76,8 @@ export class Passthrough { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -81,13 +92,16 @@ export class Passthrough { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.RemoteResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.RemoteResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/projects/client/Client.ts b/src/api/resources/ticketing/resources/projects/client/Client.ts index 4588d8526..71eeabf24 100644 --- a/src/api/resources/ticketing/resources/projects/client/Client.ts +++ b/src/api/resources/ticketing/resources/projects/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Projects { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Projects { * @example * await client.ticketing.projects.list() */ - public async list( + public list( request: Merge.ticketing.ProjectsListRequest = {}, - requestOptions?: Projects.RequestOptions - ): Promise { + requestOptions?: Projects.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ticketing.ProjectsListRequest = {}, + requestOptions?: Projects.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -60,7 +69,7 @@ export class Projects { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,8 +112,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/projects", ), method: "GET", headers: { @@ -115,8 +126,8 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -129,13 +140,16 @@ export class Projects { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedProjectList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedProjectList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -170,13 +184,21 @@ export class Projects { * @example * await client.ticketing.projects.retrieve("id") */ - public async retrieve( + public retrieve( + id: string, + request: Merge.ticketing.ProjectsRetrieveRequest = {}, + requestOptions?: Projects.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( id: string, request: Merge.ticketing.ProjectsRetrieveRequest = {}, - requestOptions?: Projects.RequestOptions - ): Promise { + requestOptions?: Projects.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -187,8 +209,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/projects/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -199,8 +223,8 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -213,13 +237,16 @@ export class Projects { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.Project.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.Project.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -254,19 +281,29 @@ export class Projects { * @example * await client.ticketing.projects.usersList("parent_id") */ - public async usersList( + public usersList( parentId: string, request: Merge.ticketing.ProjectsUsersListRequest = {}, - requestOptions?: Projects.RequestOptions - ): Promise { + requestOptions?: Projects.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__usersList(parentId, request, requestOptions)); + } + + private async __usersList( + parentId: string, + request: Merge.ticketing.ProjectsUsersListRequest = {}, + requestOptions?: Projects.RequestOptions, + ): Promise> { const { cursor, expand, includeDeletedData, includeRemoteData, includeShellData, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ticketing.ProjectsUsersListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -287,8 +324,10 @@ 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/${encodeURIComponent(parentId)}/users` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/projects/${encodeURIComponent(parentId)}/users`, ), method: "GET", headers: { @@ -299,8 +338,8 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -313,13 +352,16 @@ export class Projects { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedUserList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedUserList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -337,7 +379,7 @@ export class Projects { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/projects/{parent_id}/users." + "Timeout exceeded when calling GET /ticketing/v1/projects/{parent_id}/users.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ticketing/resources/projects/types/ProjectsUsersListRequestExpand.ts b/src/api/resources/ticketing/resources/projects/types/ProjectsUsersListRequestExpand.ts index 842887b08..c35706eea 100644 --- a/src/api/resources/ticketing/resources/projects/types/ProjectsUsersListRequestExpand.ts +++ b/src/api/resources/ticketing/resources/projects/types/ProjectsUsersListRequestExpand.ts @@ -3,7 +3,6 @@ */ export type ProjectsUsersListRequestExpand = "roles" | "teams" | "teams,roles"; - export const ProjectsUsersListRequestExpand = { Roles: "roles", Teams: "teams", diff --git a/src/api/resources/ticketing/resources/regenerateKey/client/Client.ts b/src/api/resources/ticketing/resources/regenerateKey/client/Client.ts index 7277da3fb..1050c9428 100644 --- a/src/api/resources/ticketing/resources/regenerateKey/client/Client.ts +++ b/src/api/resources/ticketing/resources/regenerateKey/client/Client.ts @@ -10,15 +10,17 @@ import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace RegenerateKey { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -46,14 +48,23 @@ export class RegenerateKey { * name: "Remote Deployment Key 1" * }) */ - public async create( + public create( request: Merge.ticketing.RemoteKeyForRegenerationRequest, - requestOptions?: RegenerateKey.RequestOptions - ): Promise { + requestOptions?: RegenerateKey.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ticketing.RemoteKeyForRegenerationRequest, + requestOptions?: RegenerateKey.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/regenerate-key" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/regenerate-key", ), method: "POST", headers: { @@ -64,8 +75,8 @@ export class RegenerateKey { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -80,13 +91,16 @@ export class RegenerateKey { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.RemoteKey.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.RemoteKey.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/roles/client/Client.ts b/src/api/resources/ticketing/resources/roles/client/Client.ts index 5e742a3d3..885c15831 100644 --- a/src/api/resources/ticketing/resources/roles/client/Client.ts +++ b/src/api/resources/ticketing/resources/roles/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Roles { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Roles { * @example * await client.ticketing.roles.list() */ - public async list( + public list( request: Merge.ticketing.RolesListRequest = {}, - requestOptions?: Roles.RequestOptions - ): Promise { + requestOptions?: Roles.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ticketing.RolesListRequest = {}, + requestOptions?: Roles.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -60,7 +69,7 @@ export class Roles { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,8 +112,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/roles", ), method: "GET", headers: { @@ -115,8 +126,8 @@ export class Roles { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -129,13 +140,16 @@ export class Roles { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedRoleList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedRoleList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -170,13 +184,21 @@ export class Roles { * @example * await client.ticketing.roles.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ticketing.RolesRetrieveRequest = {}, - requestOptions?: Roles.RequestOptions - ): Promise { + requestOptions?: Roles.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ticketing.RolesRetrieveRequest = {}, + requestOptions?: Roles.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -187,8 +209,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/roles/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -199,8 +223,8 @@ export class Roles { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -213,13 +237,16 @@ export class Roles { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.Role.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.Role.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/scopes/client/Client.ts b/src/api/resources/ticketing/resources/scopes/client/Client.ts index ada1ab1d5..d605768fc 100644 --- a/src/api/resources/ticketing/resources/scopes/client/Client.ts +++ b/src/api/resources/ticketing/resources/scopes/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Scopes { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,13 +45,21 @@ export class Scopes { * @example * await client.ticketing.scopes.defaultScopesRetrieve() */ - public async defaultScopesRetrieve( - requestOptions?: Scopes.RequestOptions - ): Promise { + public defaultScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__defaultScopesRetrieve(requestOptions)); + } + + private async __defaultScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/default-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/default-scopes", ), method: "GET", headers: { @@ -60,8 +70,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -73,13 +83,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -112,13 +125,21 @@ export class Scopes { * @example * await client.ticketing.scopes.linkedAccountScopesRetrieve() */ - public async linkedAccountScopesRetrieve( - requestOptions?: Scopes.RequestOptions - ): Promise { + public linkedAccountScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linkedAccountScopesRetrieve(requestOptions)); + } + + private async __linkedAccountScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/linked-account-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/linked-account-scopes", ), method: "GET", headers: { @@ -129,8 +150,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -142,13 +163,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -166,7 +190,7 @@ export class Scopes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/linked-account-scopes." + "Timeout exceeded when calling GET /ticketing/v1/linked-account-scopes.", ); case "unknown": throw new errors.MergeError({ @@ -207,14 +231,23 @@ export class Scopes { * }] * }) */ - public async linkedAccountScopesCreate( + public linkedAccountScopesCreate( request: Merge.ticketing.LinkedAccountCommonModelScopeDeserializerRequest, - requestOptions?: Scopes.RequestOptions - ): Promise { + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linkedAccountScopesCreate(request, requestOptions)); + } + + private async __linkedAccountScopesCreate( + request: Merge.ticketing.LinkedAccountCommonModelScopeDeserializerRequest, + requestOptions?: Scopes.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/linked-account-scopes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/linked-account-scopes", ), method: "POST", headers: { @@ -225,8 +258,8 @@ export class Scopes { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -241,13 +274,16 @@ export class Scopes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.CommonModelScopeApi.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.CommonModelScopeApi.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -265,7 +301,7 @@ export class Scopes { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /ticketing/v1/linked-account-scopes." + "Timeout exceeded when calling POST /ticketing/v1/linked-account-scopes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ticketing/resources/syncStatus/client/Client.ts b/src/api/resources/ticketing/resources/syncStatus/client/Client.ts index 284093a9f..1043d0c69 100644 --- a/src/api/resources/ticketing/resources/syncStatus/client/Client.ts +++ b/src/api/resources/ticketing/resources/syncStatus/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace SyncStatus { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,12 +46,19 @@ export class SyncStatus { * @example * await client.ticketing.syncStatus.list() */ - public async list( + public list( request: Merge.ticketing.SyncStatusListRequest = {}, - requestOptions?: SyncStatus.RequestOptions - ): Promise { + requestOptions?: SyncStatus.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private 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,8 +69,10 @@ export class SyncStatus { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/sync-status" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/sync-status", ), method: "GET", headers: { @@ -72,8 +83,8 @@ export class SyncStatus { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -86,13 +97,16 @@ export class SyncStatus { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedSyncStatusList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedSyncStatusList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/tags/client/Client.ts b/src/api/resources/ticketing/resources/tags/client/Client.ts index 7abb70f72..dddb65101 100644 --- a/src/api/resources/ticketing/resources/tags/client/Client.ts +++ b/src/api/resources/ticketing/resources/tags/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Tags { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Tags { * @example * await client.ticketing.tags.list() */ - public async list( + public list( request: Merge.ticketing.TagsListRequest = {}, - requestOptions?: Tags.RequestOptions - ): Promise { + requestOptions?: Tags.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ticketing.TagsListRequest = {}, + requestOptions?: Tags.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -60,7 +69,7 @@ export class Tags { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,8 +112,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/tags", ), method: "GET", headers: { @@ -115,8 +126,8 @@ export class Tags { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -129,13 +140,16 @@ export class Tags { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedTagList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedTagList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -170,13 +184,21 @@ export class Tags { * @example * await client.ticketing.tags.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ticketing.TagsRetrieveRequest = {}, - requestOptions?: Tags.RequestOptions - ): Promise { + requestOptions?: Tags.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ticketing.TagsRetrieveRequest = {}, + requestOptions?: Tags.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -187,8 +209,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/tags/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -199,8 +223,8 @@ export class Tags { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -213,13 +237,16 @@ export class Tags { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.Tag.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.Tag.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/teams/client/Client.ts b/src/api/resources/ticketing/resources/teams/client/Client.ts index e405b6cc2..a9c80a1bd 100644 --- a/src/api/resources/ticketing/resources/teams/client/Client.ts +++ b/src/api/resources/ticketing/resources/teams/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Teams { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Teams { * @example * await client.ticketing.teams.list() */ - public async list( + public list( request: Merge.ticketing.TeamsListRequest = {}, - requestOptions?: Teams.RequestOptions - ): Promise { + requestOptions?: Teams.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ticketing.TeamsListRequest = {}, + requestOptions?: Teams.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -60,7 +69,7 @@ export class Teams { pageSize, remoteId, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -103,8 +112,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/teams", ), method: "GET", headers: { @@ -115,8 +126,8 @@ export class Teams { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -129,13 +140,16 @@ export class Teams { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedTeamList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedTeamList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -170,13 +184,21 @@ export class Teams { * @example * await client.ticketing.teams.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ticketing.TeamsRetrieveRequest = {}, - requestOptions?: Teams.RequestOptions - ): Promise { + requestOptions?: Teams.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ticketing.TeamsRetrieveRequest = {}, + requestOptions?: Teams.RequestOptions, + ): Promise> { const { includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeRemoteData != null) { _queryParams["include_remote_data"] = includeRemoteData.toString(); } @@ -187,8 +209,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/teams/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -199,8 +223,8 @@ export class Teams { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -213,13 +237,16 @@ export class Teams { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.Team.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.Team.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/tickets/client/Client.ts b/src/api/resources/ticketing/resources/tickets/client/Client.ts index 1caa4a3df..76799f0df 100644 --- a/src/api/resources/ticketing/resources/tickets/client/Client.ts +++ b/src/api/resources/ticketing/resources/tickets/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Tickets { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Tickets { * @example * await client.ticketing.tickets.list() */ - public async list( + public list( + request: Merge.ticketing.TicketsListRequest = {}, + requestOptions?: Tickets.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( request: Merge.ticketing.TicketsListRequest = {}, - requestOptions?: Tickets.RequestOptions - ): Promise { + requestOptions?: Tickets.RequestOptions, + ): Promise> { const { accountId, assigneeIds, @@ -82,7 +91,7 @@ export class Tickets { ticketType, ticketUrl, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (accountId != null) { _queryParams["account_id"] = accountId; } @@ -128,7 +137,9 @@ export class Tickets { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ticketing.TicketsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -164,7 +175,9 @@ export class Tickets { } if (priority != null) { - _queryParams["priority"] = priority; + _queryParams["priority"] = serializers.ticketing.TicketsListRequestPriority.jsonOrThrow(priority, { + unrecognizedObjectKeys: "strip", + }); } if (remoteCreatedAfter != null) { @@ -176,7 +189,10 @@ export class Tickets { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.ticketing.TicketsListRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (remoteId != null) { @@ -192,7 +208,10 @@ export class Tickets { } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.ticketing.TicketsListRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } if (status != null) { @@ -213,8 +232,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/tickets", ), method: "GET", headers: { @@ -225,8 +246,8 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -239,13 +260,16 @@ export class Tickets { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedTicketList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedTicketList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -281,12 +305,19 @@ export class Tickets { * model: {} * }) */ - public async create( + public create( + request: Merge.ticketing.TicketEndpointRequest, + requestOptions?: Tickets.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( request: Merge.ticketing.TicketEndpointRequest, - requestOptions?: Tickets.RequestOptions - ): Promise { + requestOptions?: Tickets.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -297,8 +328,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/tickets", ), method: "POST", headers: { @@ -309,8 +342,8 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -324,13 +357,16 @@ export class Tickets { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.TicketResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.TicketResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -365,16 +401,26 @@ export class Tickets { * @example * await client.ticketing.tickets.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ticketing.TicketsRetrieveRequest = {}, - requestOptions?: Tickets.RequestOptions - ): Promise { + requestOptions?: Tickets.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ticketing.TicketsRetrieveRequest = {}, + requestOptions?: Tickets.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeRemoteFields, includeShellData, remoteFields, showEnumOrigins } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ticketing.TicketsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -390,17 +436,25 @@ export class Tickets { } if (remoteFields != null) { - _queryParams["remote_fields"] = remoteFields; + _queryParams["remote_fields"] = serializers.ticketing.TicketsRetrieveRequestRemoteFields.jsonOrThrow( + remoteFields, + { unrecognizedObjectKeys: "strip" }, + ); } if (showEnumOrigins != null) { - _queryParams["show_enum_origins"] = showEnumOrigins; + _queryParams["show_enum_origins"] = serializers.ticketing.TicketsRetrieveRequestShowEnumOrigins.jsonOrThrow( + showEnumOrigins, + { unrecognizedObjectKeys: "strip" }, + ); } const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - `ticketing/v1/tickets/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/tickets/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -411,8 +465,8 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -425,13 +479,16 @@ export class Tickets { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.Ticket.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.Ticket.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -468,13 +525,21 @@ export class Tickets { * model: {} * }) */ - public async partialUpdate( + public partialUpdate( + id: string, + request: Merge.ticketing.PatchedTicketEndpointRequest, + requestOptions?: Tickets.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__partialUpdate(id, request, requestOptions)); + } + + private async __partialUpdate( id: string, request: Merge.ticketing.PatchedTicketEndpointRequest, - requestOptions?: Tickets.RequestOptions - ): Promise { + requestOptions?: Tickets.RequestOptions, + ): Promise> { const { isDebugMode, runAsync, ..._body } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (isDebugMode != null) { _queryParams["is_debug_mode"] = isDebugMode.toString(); } @@ -485,8 +550,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/tickets/${encodeURIComponent(id)}`, ), method: "PATCH", headers: { @@ -497,8 +564,8 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -514,13 +581,16 @@ export class Tickets { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.TicketResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.TicketResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -555,19 +625,29 @@ export class Tickets { * @example * await client.ticketing.tickets.viewersList("ticket_id") */ - public async viewersList( + public viewersList( ticketId: string, request: Merge.ticketing.TicketsViewersListRequest = {}, - requestOptions?: Tickets.RequestOptions - ): Promise { + requestOptions?: Tickets.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__viewersList(ticketId, request, requestOptions)); + } + + private async __viewersList( + ticketId: string, + request: Merge.ticketing.TicketsViewersListRequest = {}, + requestOptions?: Tickets.RequestOptions, + ): Promise> { const { cursor, expand, includeDeletedData, includeRemoteData, includeShellData, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ticketing.TicketsViewersListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -588,8 +668,10 @@ 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/${encodeURIComponent(ticketId)}/viewers` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/tickets/${encodeURIComponent(ticketId)}/viewers`, ), method: "GET", headers: { @@ -600,8 +682,8 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -614,13 +696,16 @@ export class Tickets { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedViewerList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedViewerList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -638,7 +723,7 @@ export class Tickets { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/tickets/{ticket_id}/viewers." + "Timeout exceeded when calling GET /ticketing/v1/tickets/{ticket_id}/viewers.", ); case "unknown": throw new errors.MergeError({ @@ -656,14 +741,23 @@ export class Tickets { * @example * await client.ticketing.tickets.metaPatchRetrieve("id") */ - public async metaPatchRetrieve( + public metaPatchRetrieve( id: string, - requestOptions?: Tickets.RequestOptions - ): Promise { + requestOptions?: Tickets.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPatchRetrieve(id, requestOptions)); + } + + private async __metaPatchRetrieve( + id: string, + requestOptions?: Tickets.RequestOptions, + ): Promise> { 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/tickets/meta/patch/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -674,8 +768,8 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -687,13 +781,16 @@ export class Tickets { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -711,7 +808,7 @@ export class Tickets { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/tickets/meta/patch/{id}." + "Timeout exceeded when calling GET /ticketing/v1/tickets/meta/patch/{id}.", ); case "unknown": throw new errors.MergeError({ @@ -728,11 +825,21 @@ export class Tickets { * @example * await client.ticketing.tickets.metaPostRetrieve() */ - public async metaPostRetrieve(requestOptions?: Tickets.RequestOptions): Promise { + public metaPostRetrieve( + requestOptions?: Tickets.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__metaPostRetrieve(requestOptions)); + } + + private async __metaPostRetrieve( + requestOptions?: Tickets.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/tickets/meta/post" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/tickets/meta/post", ), method: "GET", headers: { @@ -743,8 +850,8 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -756,13 +863,16 @@ export class Tickets { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.MetaResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -780,7 +890,7 @@ export class Tickets { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/tickets/meta/post." + "Timeout exceeded when calling GET /ticketing/v1/tickets/meta/post.", ); case "unknown": throw new errors.MergeError({ @@ -798,13 +908,20 @@ export class Tickets { * @example * await client.ticketing.tickets.remoteFieldClassesList() */ - public async remoteFieldClassesList( + public remoteFieldClassesList( request: Merge.ticketing.TicketsRemoteFieldClassesListRequest = {}, - requestOptions?: Tickets.RequestOptions - ): Promise { + requestOptions?: Tickets.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldClassesList(request, requestOptions)); + } + + private async __remoteFieldClassesList( + request: Merge.ticketing.TicketsRemoteFieldClassesListRequest = {}, + requestOptions?: Tickets.RequestOptions, + ): Promise> { const { cursor, ids, includeDeletedData, includeRemoteData, includeShellData, isCommonModelField, pageSize } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (cursor != null) { _queryParams["cursor"] = cursor; } @@ -835,8 +952,10 @@ 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/remote-field-classes" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/tickets/remote-field-classes", ), method: "GET", headers: { @@ -847,8 +966,8 @@ export class Tickets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -861,13 +980,16 @@ export class Tickets { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedRemoteFieldClassList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -885,7 +1007,7 @@ export class Tickets { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/tickets/remote-field-classes." + "Timeout exceeded when calling GET /ticketing/v1/tickets/remote-field-classes.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestExpand.ts b/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestExpand.ts index fd8036e1d..6082954dc 100644 --- a/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestExpand.ts +++ b/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestExpand.ts @@ -258,7 +258,6 @@ export type TicketsListRequestExpand = | "creator" | "creator,parent_ticket" | "parent_ticket"; - export const TicketsListRequestExpand = { Account: "account", AccountContact: "account,contact", diff --git a/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestPriority.ts b/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestPriority.ts index e53ef05be..1d07dd72d 100644 --- a/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestPriority.ts +++ b/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestPriority.ts @@ -3,7 +3,6 @@ */ export type TicketsListRequestPriority = "HIGH" | "LOW" | "NORMAL" | "URGENT"; - export const TicketsListRequestPriority = { High: "HIGH", Low: "LOW", diff --git a/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestRemoteFields.ts b/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestRemoteFields.ts index bddb598a0..150510c41 100644 --- a/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestRemoteFields.ts +++ b/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestRemoteFields.ts @@ -10,7 +10,6 @@ export type TicketsListRequestRemoteFields = | "status" | "status,ticket_type" | "ticket_type"; - export const TicketsListRequestRemoteFields = { Priority: "priority", PriorityStatus: "priority,status", diff --git a/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestShowEnumOrigins.ts b/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestShowEnumOrigins.ts index bfd368ae6..8abe343b6 100644 --- a/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestShowEnumOrigins.ts +++ b/src/api/resources/ticketing/resources/tickets/types/TicketsListRequestShowEnumOrigins.ts @@ -10,7 +10,6 @@ export type TicketsListRequestShowEnumOrigins = | "status" | "status,ticket_type" | "ticket_type"; - export const TicketsListRequestShowEnumOrigins = { Priority: "priority", PriorityStatus: "priority,status", diff --git a/src/api/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestExpand.ts b/src/api/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestExpand.ts index 9af480bec..af663b632 100644 --- a/src/api/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestExpand.ts +++ b/src/api/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestExpand.ts @@ -258,7 +258,6 @@ export type TicketsRetrieveRequestExpand = | "creator" | "creator,parent_ticket" | "parent_ticket"; - export const TicketsRetrieveRequestExpand = { Account: "account", AccountContact: "account,contact", diff --git a/src/api/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestRemoteFields.ts b/src/api/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestRemoteFields.ts index 0af07b2e1..7dd40eae0 100644 --- a/src/api/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestRemoteFields.ts +++ b/src/api/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestRemoteFields.ts @@ -10,7 +10,6 @@ export type TicketsRetrieveRequestRemoteFields = | "status" | "status,ticket_type" | "ticket_type"; - export const TicketsRetrieveRequestRemoteFields = { Priority: "priority", PriorityStatus: "priority,status", diff --git a/src/api/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestShowEnumOrigins.ts b/src/api/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestShowEnumOrigins.ts index 82a3a17e4..dc2b4f583 100644 --- a/src/api/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestShowEnumOrigins.ts +++ b/src/api/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestShowEnumOrigins.ts @@ -10,7 +10,6 @@ export type TicketsRetrieveRequestShowEnumOrigins = | "status" | "status,ticket_type" | "ticket_type"; - export const TicketsRetrieveRequestShowEnumOrigins = { Priority: "priority", PriorityStatus: "priority,status", diff --git a/src/api/resources/ticketing/resources/tickets/types/TicketsViewersListRequestExpand.ts b/src/api/resources/ticketing/resources/tickets/types/TicketsViewersListRequestExpand.ts index b589efc9b..6264418cf 100644 --- a/src/api/resources/ticketing/resources/tickets/types/TicketsViewersListRequestExpand.ts +++ b/src/api/resources/ticketing/resources/tickets/types/TicketsViewersListRequestExpand.ts @@ -3,7 +3,6 @@ */ export type TicketsViewersListRequestExpand = "team" | "user" | "user,team"; - export const TicketsViewersListRequestExpand = { Team: "team", User: "user", diff --git a/src/api/resources/ticketing/resources/users/client/Client.ts b/src/api/resources/ticketing/resources/users/client/Client.ts index 8371e6f6a..62f383a76 100644 --- a/src/api/resources/ticketing/resources/users/client/Client.ts +++ b/src/api/resources/ticketing/resources/users/client/Client.ts @@ -5,20 +5,22 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Merge from "../../../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../../../errors/index"; export declare namespace Users { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -44,10 +46,17 @@ export class Users { * @example * await client.ticketing.users.list() */ - public async list( + public list( request: Merge.ticketing.UsersListRequest = {}, - requestOptions?: Users.RequestOptions - ): Promise { + requestOptions?: Users.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.ticketing.UsersListRequest = {}, + requestOptions?: Users.RequestOptions, + ): Promise> { const { createdAfter, createdBefore, @@ -63,7 +72,7 @@ export class Users { remoteId, team, } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (createdAfter != null) { _queryParams["created_after"] = createdAfter.toISOString(); } @@ -81,7 +90,9 @@ export class Users { } if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ticketing.UsersListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeDeletedData != null) { @@ -118,8 +129,10 @@ 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" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/users", ), method: "GET", headers: { @@ -130,8 +143,8 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -144,13 +157,16 @@ export class Users { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.PaginatedUserList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.PaginatedUserList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -185,15 +201,25 @@ export class Users { * @example * await client.ticketing.users.retrieve("id") */ - public async retrieve( + public retrieve( id: string, request: Merge.ticketing.UsersRetrieveRequest = {}, - requestOptions?: Users.RequestOptions - ): Promise { + requestOptions?: Users.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.ticketing.UsersRetrieveRequest = {}, + requestOptions?: Users.RequestOptions, + ): Promise> { const { expand, includeRemoteData, includeShellData } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (expand != null) { - _queryParams["expand"] = expand; + _queryParams["expand"] = serializers.ticketing.UsersRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); } if (includeRemoteData != null) { @@ -206,8 +232,10 @@ 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/${encodeURIComponent(id)}` + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `ticketing/v1/users/${encodeURIComponent(id)}`, ), method: "GET", headers: { @@ -218,8 +246,8 @@ export class Users { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -232,13 +260,16 @@ export class Users { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.User.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.User.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketing/resources/users/types/UsersListRequestExpand.ts b/src/api/resources/ticketing/resources/users/types/UsersListRequestExpand.ts index d9cb87fee..a51ea7d77 100644 --- a/src/api/resources/ticketing/resources/users/types/UsersListRequestExpand.ts +++ b/src/api/resources/ticketing/resources/users/types/UsersListRequestExpand.ts @@ -3,7 +3,6 @@ */ export type UsersListRequestExpand = "roles" | "teams" | "teams,roles"; - export const UsersListRequestExpand = { Roles: "roles", Teams: "teams", diff --git a/src/api/resources/ticketing/resources/users/types/UsersRetrieveRequestExpand.ts b/src/api/resources/ticketing/resources/users/types/UsersRetrieveRequestExpand.ts index a09efbe9d..6c111bd17 100644 --- a/src/api/resources/ticketing/resources/users/types/UsersRetrieveRequestExpand.ts +++ b/src/api/resources/ticketing/resources/users/types/UsersRetrieveRequestExpand.ts @@ -3,7 +3,6 @@ */ export type UsersRetrieveRequestExpand = "roles" | "teams" | "teams,roles"; - export const UsersRetrieveRequestExpand = { Roles: "roles", Teams: "teams", diff --git a/src/api/resources/ticketing/resources/webhookReceivers/client/Client.ts b/src/api/resources/ticketing/resources/webhookReceivers/client/Client.ts index db0380cdc..9864cd876 100644 --- a/src/api/resources/ticketing/resources/webhookReceivers/client/Client.ts +++ b/src/api/resources/ticketing/resources/webhookReceivers/client/Client.ts @@ -10,15 +10,17 @@ import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace WebhookReceivers { - interface Options { + export interface Options { environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-Account-Token header */ accountToken?: core.Supplier; fetcher?: core.FetchFunction; } - interface RequestOptions { + export 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. */ @@ -43,11 +45,21 @@ export class WebhookReceivers { * @example * await client.ticketing.webhookReceivers.list() */ - public async list(requestOptions?: WebhookReceivers.RequestOptions): Promise { + public list( + requestOptions?: WebhookReceivers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(requestOptions)); + } + + private async __list( + requestOptions?: WebhookReceivers.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/webhook-receivers" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/webhook-receivers", ), method: "GET", headers: { @@ -58,8 +70,8 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -71,13 +83,16 @@ export class WebhookReceivers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.webhookReceivers.list.Response.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.webhookReceivers.list.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -95,7 +110,7 @@ export class WebhookReceivers { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling GET /ticketing/v1/webhook-receivers." + "Timeout exceeded when calling GET /ticketing/v1/webhook-receivers.", ); case "unknown": throw new errors.MergeError({ @@ -116,14 +131,23 @@ export class WebhookReceivers { * isActive: true * }) */ - public async create( + public create( request: Merge.ticketing.WebhookReceiverRequest, - requestOptions?: WebhookReceivers.RequestOptions - ): Promise { + requestOptions?: WebhookReceivers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.ticketing.WebhookReceiverRequest, + requestOptions?: WebhookReceivers.RequestOptions, + ): Promise> { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.MergeEnvironment.Production, - "ticketing/v1/webhook-receivers" + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "ticketing/v1/webhook-receivers", ), method: "POST", headers: { @@ -134,8 +158,8 @@ export class WebhookReceivers { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@mergeapi/merge-node-client", - "X-Fern-SDK-Version": "1.1.6", - "User-Agent": "@mergeapi/merge-node-client/1.1.6", + "X-Fern-SDK-Version": "1.1.7", + "User-Agent": "@mergeapi/merge-node-client/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -150,13 +174,16 @@ export class WebhookReceivers { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ticketing.WebhookReceiver.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return { + data: serializers.ticketing.WebhookReceiver.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -174,7 +201,7 @@ export class WebhookReceivers { }); case "timeout": throw new errors.MergeTimeoutError( - "Timeout exceeded when calling POST /ticketing/v1/webhook-receivers." + "Timeout exceeded when calling POST /ticketing/v1/webhook-receivers.", ); case "unknown": throw new errors.MergeError({ diff --git a/src/api/resources/ticketing/types/AccessLevelEnum.ts b/src/api/resources/ticketing/types/AccessLevelEnum.ts index a8fd1bf1b..4f322882c 100644 --- a/src/api/resources/ticketing/types/AccessLevelEnum.ts +++ b/src/api/resources/ticketing/types/AccessLevelEnum.ts @@ -8,7 +8,6 @@ * - `PUBLIC` - PUBLIC */ export type AccessLevelEnum = "PRIVATE" | "COMPANY" | "PUBLIC"; - export const AccessLevelEnum = { Private: "PRIVATE", Company: "COMPANY", diff --git a/src/api/resources/ticketing/types/AccountDetailsAndActionsStatusEnum.ts b/src/api/resources/ticketing/types/AccountDetailsAndActionsStatusEnum.ts index 084a62d2f..c0020279f 100644 --- a/src/api/resources/ticketing/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/api/resources/ticketing/types/AccountDetailsAndActionsStatusEnum.ts @@ -9,7 +9,6 @@ * - `IDLE` - IDLE */ export type AccountDetailsAndActionsStatusEnum = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; - export const AccountDetailsAndActionsStatusEnum = { Complete: "COMPLETE", Incomplete: "INCOMPLETE", diff --git a/src/api/resources/ticketing/types/CategoriesEnum.ts b/src/api/resources/ticketing/types/CategoriesEnum.ts index 25eba4836..a5eb57230 100644 --- a/src/api/resources/ticketing/types/CategoriesEnum.ts +++ b/src/api/resources/ticketing/types/CategoriesEnum.ts @@ -12,7 +12,6 @@ * - `filestorage` - filestorage */ export type CategoriesEnum = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; - export const CategoriesEnum = { Hris: "hris", Ats: "ats", diff --git a/src/api/resources/ticketing/types/CategoryEnum.ts b/src/api/resources/ticketing/types/CategoryEnum.ts index 263fc40b8..6d3d6d6ae 100644 --- a/src/api/resources/ticketing/types/CategoryEnum.ts +++ b/src/api/resources/ticketing/types/CategoryEnum.ts @@ -12,7 +12,6 @@ * - `filestorage` - filestorage */ export type CategoryEnum = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; - export const CategoryEnum = { Hris: "hris", Ats: "ats", diff --git a/src/api/resources/ticketing/types/CollectionTypeEnum.ts b/src/api/resources/ticketing/types/CollectionTypeEnum.ts index 7ef16ed59..add6860b0 100644 --- a/src/api/resources/ticketing/types/CollectionTypeEnum.ts +++ b/src/api/resources/ticketing/types/CollectionTypeEnum.ts @@ -7,7 +7,6 @@ * - `PROJECT` - PROJECT */ export type CollectionTypeEnum = "LIST" | "PROJECT"; - export const CollectionTypeEnum = { List: "LIST", Project: "PROJECT", diff --git a/src/api/resources/ticketing/types/EnabledActionsEnum.ts b/src/api/resources/ticketing/types/EnabledActionsEnum.ts index 73d70210e..24418b130 100644 --- a/src/api/resources/ticketing/types/EnabledActionsEnum.ts +++ b/src/api/resources/ticketing/types/EnabledActionsEnum.ts @@ -7,7 +7,6 @@ * - `WRITE` - WRITE */ export type EnabledActionsEnum = "READ" | "WRITE"; - export const EnabledActionsEnum = { Read: "READ", Write: "WRITE", diff --git a/src/api/resources/ticketing/types/EncodingEnum.ts b/src/api/resources/ticketing/types/EncodingEnum.ts index 3defec583..a828347f8 100644 --- a/src/api/resources/ticketing/types/EncodingEnum.ts +++ b/src/api/resources/ticketing/types/EncodingEnum.ts @@ -8,7 +8,6 @@ * - `GZIP_BASE64` - GZIP_BASE64 */ export type EncodingEnum = "RAW" | "BASE64" | "GZIP_BASE64"; - export const EncodingEnum = { Raw: "RAW", Base64: "BASE64", diff --git a/src/api/resources/ticketing/types/EventTypeEnum.ts b/src/api/resources/ticketing/types/EventTypeEnum.ts index eb3218428..08d0f1ce3 100644 --- a/src/api/resources/ticketing/types/EventTypeEnum.ts +++ b/src/api/resources/ticketing/types/EventTypeEnum.ts @@ -89,7 +89,6 @@ export type EventTypeEnum = | "DISABLED_MERGE_WEBHOOK" | "MERGE_WEBHOOK_TARGET_CHANGED" | "END_USER_CREDENTIALS_ACCESSED"; - export const EventTypeEnum = { CreatedRemoteProductionApiKey: "CREATED_REMOTE_PRODUCTION_API_KEY", DeletedRemoteProductionApiKey: "DELETED_REMOTE_PRODUCTION_API_KEY", diff --git a/src/api/resources/ticketing/types/FieldFormatEnum.ts b/src/api/resources/ticketing/types/FieldFormatEnum.ts index a5b54cac7..351c87478 100644 --- a/src/api/resources/ticketing/types/FieldFormatEnum.ts +++ b/src/api/resources/ticketing/types/FieldFormatEnum.ts @@ -11,7 +11,6 @@ * - `list` - list */ export type FieldFormatEnum = "string" | "number" | "date" | "datetime" | "bool" | "list"; - export const FieldFormatEnum = { String: "string", Number: "number", diff --git a/src/api/resources/ticketing/types/FieldTypeEnum.ts b/src/api/resources/ticketing/types/FieldTypeEnum.ts index 39ace3972..e235eeea9 100644 --- a/src/api/resources/ticketing/types/FieldTypeEnum.ts +++ b/src/api/resources/ticketing/types/FieldTypeEnum.ts @@ -11,7 +11,6 @@ * - `list` - list */ export type FieldTypeEnum = "string" | "number" | "date" | "datetime" | "bool" | "list"; - export const FieldTypeEnum = { String: "string", Number: "number", diff --git a/src/api/resources/ticketing/types/IssueStatusEnum.ts b/src/api/resources/ticketing/types/IssueStatusEnum.ts index 9536a7b6d..56fc6d5fa 100644 --- a/src/api/resources/ticketing/types/IssueStatusEnum.ts +++ b/src/api/resources/ticketing/types/IssueStatusEnum.ts @@ -7,7 +7,6 @@ * - `RESOLVED` - RESOLVED */ export type IssueStatusEnum = "ONGOING" | "RESOLVED"; - export const IssueStatusEnum = { Ongoing: "ONGOING", Resolved: "RESOLVED", diff --git a/src/api/resources/ticketing/types/ItemFormatEnum.ts b/src/api/resources/ticketing/types/ItemFormatEnum.ts index efd0263ba..276d6e676 100644 --- a/src/api/resources/ticketing/types/ItemFormatEnum.ts +++ b/src/api/resources/ticketing/types/ItemFormatEnum.ts @@ -11,7 +11,6 @@ * - `list` - decimal */ export type ItemFormatEnum = "string" | "number" | "date" | "datetime" | "bool" | "list"; - export const ItemFormatEnum = { String: "string", Number: "number", diff --git a/src/api/resources/ticketing/types/ItemTypeEnum.ts b/src/api/resources/ticketing/types/ItemTypeEnum.ts index b2883ed82..815b6314e 100644 --- a/src/api/resources/ticketing/types/ItemTypeEnum.ts +++ b/src/api/resources/ticketing/types/ItemTypeEnum.ts @@ -11,7 +11,6 @@ * - `list` - list */ export type ItemTypeEnum = "string" | "number" | "date" | "datetime" | "bool" | "list"; - export const ItemTypeEnum = { String: "string", Number: "number", diff --git a/src/api/resources/ticketing/types/LanguageEnum.ts b/src/api/resources/ticketing/types/LanguageEnum.ts index 92c0e5778..180002115 100644 --- a/src/api/resources/ticketing/types/LanguageEnum.ts +++ b/src/api/resources/ticketing/types/LanguageEnum.ts @@ -7,7 +7,6 @@ * - `de` - de */ export type LanguageEnum = "en" | "de"; - export const LanguageEnum = { En: "en", De: "de", diff --git a/src/api/resources/ticketing/types/LastSyncResultEnum.ts b/src/api/resources/ticketing/types/LastSyncResultEnum.ts index 2617afd73..e14779ef7 100644 --- a/src/api/resources/ticketing/types/LastSyncResultEnum.ts +++ b/src/api/resources/ticketing/types/LastSyncResultEnum.ts @@ -11,7 +11,6 @@ * - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED */ export type LastSyncResultEnum = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; - export const LastSyncResultEnum = { Syncing: "SYNCING", Done: "DONE", diff --git a/src/api/resources/ticketing/types/MethodEnum.ts b/src/api/resources/ticketing/types/MethodEnum.ts index 5fb2be8d3..5d8dae516 100644 --- a/src/api/resources/ticketing/types/MethodEnum.ts +++ b/src/api/resources/ticketing/types/MethodEnum.ts @@ -12,7 +12,6 @@ * - `DELETE` - DELETE */ export type MethodEnum = "GET" | "OPTIONS" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE"; - export const MethodEnum = { Get: "GET", Options: "OPTIONS", diff --git a/src/api/resources/ticketing/types/PriorityEnum.ts b/src/api/resources/ticketing/types/PriorityEnum.ts index 8e62c25ee..026e2ea3e 100644 --- a/src/api/resources/ticketing/types/PriorityEnum.ts +++ b/src/api/resources/ticketing/types/PriorityEnum.ts @@ -9,7 +9,6 @@ * - `LOW` - LOW */ export type PriorityEnum = "URGENT" | "HIGH" | "NORMAL" | "LOW"; - export const PriorityEnum = { Urgent: "URGENT", High: "HIGH", diff --git a/src/api/resources/ticketing/types/RequestFormatEnum.ts b/src/api/resources/ticketing/types/RequestFormatEnum.ts index 4b66af670..6c5f28198 100644 --- a/src/api/resources/ticketing/types/RequestFormatEnum.ts +++ b/src/api/resources/ticketing/types/RequestFormatEnum.ts @@ -8,7 +8,6 @@ * - `MULTIPART` - MULTIPART */ export type RequestFormatEnum = "JSON" | "XML" | "MULTIPART"; - export const RequestFormatEnum = { Json: "JSON", Xml: "XML", diff --git a/src/api/resources/ticketing/types/ResponseTypeEnum.ts b/src/api/resources/ticketing/types/ResponseTypeEnum.ts index 91a373778..e123001a6 100644 --- a/src/api/resources/ticketing/types/ResponseTypeEnum.ts +++ b/src/api/resources/ticketing/types/ResponseTypeEnum.ts @@ -7,7 +7,6 @@ * - `BASE64_GZIP` - BASE64_GZIP */ export type ResponseTypeEnum = "JSON" | "BASE64_GZIP"; - export const ResponseTypeEnum = { Json: "JSON", Base64Gzip: "BASE64_GZIP", diff --git a/src/api/resources/ticketing/types/RoleEnum.ts b/src/api/resources/ticketing/types/RoleEnum.ts index 5792757ea..d7b99ac49 100644 --- a/src/api/resources/ticketing/types/RoleEnum.ts +++ b/src/api/resources/ticketing/types/RoleEnum.ts @@ -11,7 +11,6 @@ * - `MERGE_TEAM` - MERGE_TEAM */ export type RoleEnum = "ADMIN" | "DEVELOPER" | "MEMBER" | "API" | "SYSTEM" | "MERGE_TEAM"; - export const RoleEnum = { Admin: "ADMIN", Developer: "DEVELOPER", diff --git a/src/api/resources/ticketing/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/api/resources/ticketing/types/SelectiveSyncConfigurationsUsageEnum.ts index 93a6bf0bf..db8508f89 100644 --- a/src/api/resources/ticketing/types/SelectiveSyncConfigurationsUsageEnum.ts +++ b/src/api/resources/ticketing/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -7,7 +7,6 @@ * - `IN_LAST_SYNC` - IN_LAST_SYNC */ export type SelectiveSyncConfigurationsUsageEnum = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; - export const SelectiveSyncConfigurationsUsageEnum = { InNextSync: "IN_NEXT_SYNC", InLastSync: "IN_LAST_SYNC", diff --git a/src/api/resources/ticketing/types/StatusFd5Enum.ts b/src/api/resources/ticketing/types/StatusFd5Enum.ts index dfb75bf03..837436325 100644 --- a/src/api/resources/ticketing/types/StatusFd5Enum.ts +++ b/src/api/resources/ticketing/types/StatusFd5Enum.ts @@ -11,7 +11,6 @@ * - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED */ export type StatusFd5Enum = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; - export const StatusFd5Enum = { Syncing: "SYNCING", Done: "DONE", diff --git a/src/api/resources/ticketing/types/TicketAccessEnum.ts b/src/api/resources/ticketing/types/TicketAccessEnum.ts index 7d6bb13f3..57e5772f4 100644 --- a/src/api/resources/ticketing/types/TicketAccessEnum.ts +++ b/src/api/resources/ticketing/types/TicketAccessEnum.ts @@ -8,7 +8,6 @@ * - `TEAM_ONLY` - TEAM_ONLY */ export type TicketAccessEnum = "ALL" | "ASSIGNED_ONLY" | "TEAM_ONLY"; - export const TicketAccessEnum = { All: "ALL", AssignedOnly: "ASSIGNED_ONLY", diff --git a/src/api/resources/ticketing/types/TicketActionsEnum.ts b/src/api/resources/ticketing/types/TicketActionsEnum.ts index ca30e942c..cd2d1f377 100644 --- a/src/api/resources/ticketing/types/TicketActionsEnum.ts +++ b/src/api/resources/ticketing/types/TicketActionsEnum.ts @@ -11,7 +11,6 @@ * - `ASSIGN` - ASSIGN */ export type TicketActionsEnum = "VIEW" | "CREATE" | "EDIT" | "DELETE" | "CLOSE" | "ASSIGN"; - export const TicketActionsEnum = { View: "VIEW", Create: "CREATE", diff --git a/src/api/resources/ticketing/types/TicketStatusEnum.ts b/src/api/resources/ticketing/types/TicketStatusEnum.ts index 3111a20ca..856760f29 100644 --- a/src/api/resources/ticketing/types/TicketStatusEnum.ts +++ b/src/api/resources/ticketing/types/TicketStatusEnum.ts @@ -9,7 +9,6 @@ * - `ON_HOLD` - ON_HOLD */ export type TicketStatusEnum = "OPEN" | "CLOSED" | "IN_PROGRESS" | "ON_HOLD"; - export const TicketStatusEnum = { Open: "OPEN", Closed: "CLOSED", diff --git a/src/core/fetcher/APIResponse.ts b/src/core/fetcher/APIResponse.ts index 3664d09e1..6335291bb 100644 --- a/src/core/fetcher/APIResponse.ts +++ b/src/core/fetcher/APIResponse.ts @@ -1,12 +1,23 @@ +import { RawResponse } from "./RawResponse"; + +/** + * The response of an API call. + * It is a successful response or a failed response. + */ export type APIResponse = SuccessfulResponse | FailedResponse; export interface SuccessfulResponse { ok: true; body: T; + /** + * @deprecated Use `rawResponse` instead + */ headers?: Record; + rawResponse: RawResponse; } export interface FailedResponse { ok: false; error: T; + rawResponse: RawResponse; } diff --git a/src/core/fetcher/Fetcher.ts b/src/core/fetcher/Fetcher.ts index b8f23717b..336ee10b9 100644 --- a/src/core/fetcher/Fetcher.ts +++ b/src/core/fetcher/Fetcher.ts @@ -1,4 +1,6 @@ +import { toJson } from "../json"; import { APIResponse } from "./APIResponse"; +import { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse"; import { createRequestUrl } from "./createRequestUrl"; import { getFetchFn } from "./getFetchFn"; import { getRequestBody } from "./getRequestBody"; @@ -14,7 +16,7 @@ export declare namespace Fetcher { method: string; contentType?: string; headers?: Record; - queryParameters?: Record; + queryParameters?: Record; body?: unknown; timeoutMs?: number; maxRetries?: number; @@ -64,7 +66,7 @@ export async function fetcherImpl(args: Fetcher.Args): Promise(args: Fetcher.Args): Promise= 200 && response.status < 400) { return { ok: true, body: responseBody as R, headers: response.headers, + rawResponse: toRawResponse(response), }; } else { return { @@ -102,6 +105,7 @@ export async function fetcherImpl(args: Fetcher.Args): Promise(args: Fetcher.Args): Promise(args: Fetcher.Args): Promise(args: Fetcher.Args): Promise(args: Fetcher.Args): Promise extends Promise { + private innerPromise: Promise>; + private unwrappedPromise: Promise | undefined; + + private constructor(promise: Promise>) { + // Initialize with a no-op to avoid premature parsing + super((resolve) => { + resolve(undefined as unknown as T); + }); + this.innerPromise = promise; + } + + /** + * Creates an `HttpResponsePromise` from a function that returns a promise. + * + * @param fn - A function that returns a promise resolving to a `WithRawResponse` object. + * @param args - Arguments to pass to the function. + * @returns An `HttpResponsePromise` instance. + */ + public static fromFunction Promise>, T>( + fn: F, + ...args: Parameters + ): HttpResponsePromise { + return new HttpResponsePromise(fn(...args)); + } + + /** + * Creates a function that returns an `HttpResponsePromise` from a function that returns a promise. + * + * @param fn - A function that returns a promise resolving to a `WithRawResponse` object. + * @returns A function that returns an `HttpResponsePromise` instance. + */ + public static interceptFunction< + F extends (...args: never[]) => Promise>, + T = Awaited>["data"], + >(fn: F): (...args: Parameters) => HttpResponsePromise { + return (...args: Parameters): HttpResponsePromise => { + return HttpResponsePromise.fromPromise(fn(...args)); + }; + } + + /** + * Creates an `HttpResponsePromise` from an existing promise. + * + * @param promise - A promise resolving to a `WithRawResponse` object. + * @returns An `HttpResponsePromise` instance. + */ + public static fromPromise(promise: Promise>): HttpResponsePromise { + return new HttpResponsePromise(promise); + } + + /** + * Creates an `HttpResponsePromise` from an executor function. + * + * @param executor - A function that takes resolve and reject callbacks to create a promise. + * @returns An `HttpResponsePromise` instance. + */ + public static fromExecutor( + executor: (resolve: (value: WithRawResponse) => void, reject: (reason?: unknown) => void) => void, + ): HttpResponsePromise { + const promise = new Promise>(executor); + return new HttpResponsePromise(promise); + } + + /** + * Creates an `HttpResponsePromise` from a resolved result. + * + * @param result - A `WithRawResponse` object to resolve immediately. + * @returns An `HttpResponsePromise` instance. + */ + public static fromResult(result: WithRawResponse): HttpResponsePromise { + const promise = Promise.resolve(result); + return new HttpResponsePromise(promise); + } + + private unwrap(): Promise { + if (!this.unwrappedPromise) { + this.unwrappedPromise = this.innerPromise.then(({ data }) => data); + } + return this.unwrappedPromise; + } + + /** @inheritdoc */ + public override then( + onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onrejected?: ((reason: unknown) => TResult2 | PromiseLike) | null, + ): Promise { + return this.unwrap().then(onfulfilled, onrejected); + } + + /** @inheritdoc */ + public override catch( + onrejected?: ((reason: unknown) => TResult | PromiseLike) | null, + ): Promise { + return this.unwrap().catch(onrejected); + } + + /** @inheritdoc */ + public override finally(onfinally?: (() => void) | null): Promise { + return this.unwrap().finally(onfinally); + } + + /** + * Retrieves the data and raw response. + * + * @returns A promise resolving to a `WithRawResponse` object. + */ + public async withRawResponse(): Promise> { + return await this.innerPromise; + } +} diff --git a/src/core/fetcher/RawResponse.ts b/src/core/fetcher/RawResponse.ts new file mode 100644 index 000000000..c975f23c7 --- /dev/null +++ b/src/core/fetcher/RawResponse.ts @@ -0,0 +1,59 @@ +/** + * The raw response from the fetch call excluding the body. + */ +export type RawResponse = Omit< + { + [K in keyof Response as Response[K] extends Function ? never : K]: Response[K]; // strips out functions + }, + "ok" | "body" | "bodyUsed" +>; // strips out body and bodyUsed + +/** + * A raw response indicating that the request was aborted. + */ +export const abortRawResponse: RawResponse = { + headers: new Headers(), + redirected: false, + status: 499, + statusText: "Client Closed Request", + type: "error", + url: "", +} as const; + +/** + * A raw response indicating an unknown error. + */ +export const unknownRawResponse: RawResponse = { + headers: new Headers(), + redirected: false, + status: 0, + statusText: "Unknown Error", + type: "error", + url: "", +} as const; + +/** + * Converts a `RawResponse` object into a `RawResponse` by extracting its properties, + * excluding the `body` and `bodyUsed` fields. + * + * @param response - The `RawResponse` object to convert. + * @returns A `RawResponse` object containing the extracted properties of the input response. + */ +export function toRawResponse(response: Response): RawResponse { + return { + headers: response.headers, + redirected: response.redirected, + status: response.status, + statusText: response.statusText, + type: response.type, + url: response.url, + }; +} + +/** + * Creates a `RawResponse` from a standard `Response` object. + */ +export interface WithRawResponse { + readonly data: T; + readonly rawResponse: RawResponse; +} diff --git a/src/core/fetcher/createRequestUrl.ts b/src/core/fetcher/createRequestUrl.ts index 9288a99bb..f1157ce72 100644 --- a/src/core/fetcher/createRequestUrl.ts +++ b/src/core/fetcher/createRequestUrl.ts @@ -2,7 +2,7 @@ import qs from "qs"; export function createRequestUrl( baseUrl: string, - queryParameters?: Record + queryParameters?: Record, ): string { return Object.keys(queryParameters ?? {}).length > 0 ? `${baseUrl}?${qs.stringify(queryParameters, { arrayFormat: "repeat" })}` diff --git a/src/core/fetcher/getRequestBody.ts b/src/core/fetcher/getRequestBody.ts index 1138414b1..fce5589c5 100644 --- a/src/core/fetcher/getRequestBody.ts +++ b/src/core/fetcher/getRequestBody.ts @@ -1,3 +1,5 @@ +import { toJson } from "../json"; + export declare namespace GetRequestBody { interface Args { body: unknown; @@ -7,7 +9,7 @@ export declare namespace GetRequestBody { export async function getRequestBody({ body, type }: GetRequestBody.Args): Promise { if (type.includes("json")) { - return JSON.stringify(body); + return toJson(body); } else { return body as BodyInit; } diff --git a/src/core/fetcher/index.ts b/src/core/fetcher/index.ts index 2d658ca48..249f5176d 100644 --- a/src/core/fetcher/index.ts +++ b/src/core/fetcher/index.ts @@ -3,3 +3,6 @@ export { fetcher } from "./Fetcher"; export type { Fetcher, FetchFunction } from "./Fetcher"; export { getHeader } from "./getHeader"; export { Supplier } from "./Supplier"; +export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse"; +export type { RawResponse, WithRawResponse } from "./RawResponse"; +export { HttpResponsePromise } from "./HttpResponsePromise"; diff --git a/src/core/fetcher/makeRequest.ts b/src/core/fetcher/makeRequest.ts index 8fb4bace4..1af42bb9f 100644 --- a/src/core/fetcher/makeRequest.ts +++ b/src/core/fetcher/makeRequest.ts @@ -9,7 +9,7 @@ export const makeRequest = async ( timeoutMs?: number, abortSignal?: AbortSignal, withCredentials?: boolean, - duplex?: "half" + duplex?: "half", ): Promise => { const signals: AbortSignal[] = []; diff --git a/src/core/fetcher/requestWithRetries.ts b/src/core/fetcher/requestWithRetries.ts index 8d5af9d5a..add3cce02 100644 --- a/src/core/fetcher/requestWithRetries.ts +++ b/src/core/fetcher/requestWithRetries.ts @@ -11,12 +11,12 @@ function addJitter(delay: number): number { export async function requestWithRetries( requestFn: () => Promise, - maxRetries: number = DEFAULT_MAX_RETRIES + 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) { + if ([408, 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); diff --git a/src/core/fetcher/signals.ts b/src/core/fetcher/signals.ts index 6c124ff79..a8d32a2e8 100644 --- a/src/core/fetcher/signals.ts +++ b/src/core/fetcher/signals.ts @@ -15,7 +15,7 @@ export function getTimeoutSignal(timeoutMs: number): { signal: AbortSignal; abor 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 signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args) as AbortSignal[]; const controller = new AbortController(); diff --git a/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts b/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts index 4d7b7d52e..6f1a82e96 100644 --- a/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts +++ b/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts @@ -1,4 +1,5 @@ import type { Writable } from "readable-stream"; + import { EventCallback, StreamWrapper } from "./chooseStreamWrapper"; export class Node18UniversalStreamWrapper @@ -38,7 +39,7 @@ export class Node18UniversalStreamWrapper | Writable | WritableStream + dest: Node18UniversalStreamWrapper | Writable | WritableStream, ): Node18UniversalStreamWrapper | Writable | WritableStream { this.on("data", async (chunk) => { if (dest instanceof Node18UniversalStreamWrapper) { @@ -79,7 +80,7 @@ export class Node18UniversalStreamWrapper | Writable | WritableStream + dest: Node18UniversalStreamWrapper | Writable | WritableStream, ): Node18UniversalStreamWrapper | Writable | WritableStream { return this.pipe(dest); } diff --git a/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts b/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts index ba5f72767..23c01a1a7 100644 --- a/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts +++ b/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts @@ -1,4 +1,5 @@ import type { Readable, Writable } from "readable-stream"; + import { EventCallback, StreamWrapper } from "./chooseStreamWrapper"; export class NodePre18StreamWrapper implements StreamWrapper { diff --git a/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts b/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts index 263af0091..091e2a7f3 100644 --- a/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts +++ b/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts @@ -38,7 +38,7 @@ export class UndiciStreamWrapper | WritableStream + dest: UndiciStreamWrapper | WritableStream, ): UndiciStreamWrapper | WritableStream { this.on("data", (chunk) => { if (dest instanceof UndiciStreamWrapper) { @@ -73,7 +73,7 @@ export class UndiciStreamWrapper | WritableStream + dest: UndiciStreamWrapper | WritableStream, ): UndiciStreamWrapper | WritableStream { return this.pipe(dest); } diff --git a/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts b/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts index 2abd6b2ba..8c7492fc8 100644 --- a/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts +++ b/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts @@ -1,4 +1,5 @@ import type { Readable } from "readable-stream"; + import { RUNTIME } from "../../runtime"; export type EventCallback = (data?: any) => void; @@ -23,7 +24,7 @@ export interface StreamWrapper { 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 + responseBody as ReadableStream, ); } else if (RUNTIME.type !== "node" && typeof fetch === "function") { return new (await import("./UndiciStreamWrapper")).UndiciStreamWrapper(responseBody as ReadableStream); diff --git a/src/core/json.ts b/src/core/json.ts new file mode 100644 index 000000000..c052f3249 --- /dev/null +++ b/src/core/json.ts @@ -0,0 +1,27 @@ +/** + * Serialize a value to JSON + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer A function that transforms the results. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @returns JSON string + */ +export const toJson = ( + value: unknown, + replacer?: (this: unknown, key: string, value: unknown) => unknown, + space?: string | number, +): string => { + return JSON.stringify(value, replacer, space); +}; + +/** + * Parse JSON string to object, array, or other type + * @param text A valid JSON string. + * @param reviver A function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is. + * @returns Parsed object, array, or other type + */ +export function fromJson( + text: string, + reviver?: (this: unknown, key: string, value: unknown) => unknown, +): T { + return JSON.parse(text, reviver); +} diff --git a/src/core/runtime/runtime.ts b/src/core/runtime/runtime.ts index 4d0687e8e..a97501751 100644 --- a/src/core/runtime/runtime.ts +++ b/src/core/runtime/runtime.ts @@ -8,58 +8,9 @@ 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"; +declare const Deno: DenoGlobal | undefined; +declare const Bun: BunGlobal | undefined; +declare const EdgeRuntime: string | undefined; /** * A constant that indicates which environment and version the SDK is running in. @@ -67,12 +18,16 @@ const isCloudflare = typeof globalThis !== "undefined" && globalThis?.navigator? export const RUNTIME: Runtime = evaluateRuntime(); export interface Runtime { - type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd"; + type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd" | "edge-runtime"; version?: string; parsedVersion?: number; } function evaluateRuntime(): Runtime { + /** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ + const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; if (isBrowser) { return { type: "browser", @@ -80,18 +35,50 @@ function evaluateRuntime(): Runtime { }; } + /** + * 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"; if (isCloudflare) { return { type: "workerd", }; } + /** + * A constant that indicates whether the environment the code is running is Edge Runtime. + * https://vercel.com/docs/functions/runtimes/edge-runtime#check-if-you're-running-on-the-edge-runtime + */ + const isEdgeRuntime = typeof EdgeRuntime === "string"; + if (isEdgeRuntime) { + return { + type: "edge-runtime", + }; + } + + /** + * 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"); if (isWebWorker) { return { type: "web-worker", }; } + /** + * A constant that indicates whether the environment the code is running is Deno. + * FYI Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions + */ + const isDeno = + typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; if (isDeno) { return { type: "deno", @@ -99,6 +86,10 @@ function evaluateRuntime(): Runtime { }; } + /** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ + const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; if (isBun) { return { type: "bun", @@ -106,6 +97,15 @@ function evaluateRuntime(): Runtime { }; } + /** + * A constant that indicates whether the environment the code is running is Node.JS. + */ + const isNode = + typeof process !== "undefined" && + "version" in process && + !!process.version && + "versions" in process && + !!process.versions?.node; if (isNode) { return { type: "node", @@ -114,6 +114,11 @@ function evaluateRuntime(): Runtime { }; } + /** + * 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"; if (isReactNative) { return { type: "react-native", diff --git a/src/core/schemas/Schema.ts b/src/core/schemas/Schema.ts index 2a72eacec..921a15466 100644 --- a/src/core/schemas/Schema.ts +++ b/src/core/schemas/Schema.ts @@ -28,9 +28,11 @@ export const SchemaType = { SET: "set", UNION: "union", UNDISCRIMINATED_UNION: "undiscriminatedUnion", + NULLABLE: "nullable", OPTIONAL: "optional", + OPTIONAL_NULLABLE: "optionalNullable", } as const; -export type SchemaType = typeof SchemaType[keyof typeof SchemaType]; +export type SchemaType = (typeof SchemaType)[keyof typeof SchemaType]; export type MaybeValid = Valid | Invalid; diff --git a/src/core/schemas/builders/bigint/bigint.ts b/src/core/schemas/builders/bigint/bigint.ts index dc9c742e0..e69bb791e 100644 --- a/src/core/schemas/builders/bigint/bigint.ts +++ b/src/core/schemas/builders/bigint/bigint.ts @@ -3,32 +3,33 @@ import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForI import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { getSchemaUtils } from "../schema-utils"; -export function bigint(): Schema { - const baseSchema: BaseSchema = { +export function bigint(): Schema { + const baseSchema: BaseSchema = { parse: (raw, { breadcrumbsPrefix = [] } = {}) => { - if (typeof raw !== "string") { + if (typeof raw === "bigint") { return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(raw, "string"), - }, - ], + ok: true, + value: raw, + }; + } + if (typeof raw === "number") { + return { + ok: true, + value: BigInt(raw), }; } return { - ok: true, - value: BigInt(raw), + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(raw, "bigint | number"), + }, + ], }; }, json: (bigint, { breadcrumbsPrefix = [] } = {}) => { - if (typeof bigint === "bigint") { - return { - ok: true, - value: bigint.toString(), - }; - } else { + if (typeof bigint !== "bigint") { return { ok: false, errors: [ @@ -39,6 +40,10 @@ export function bigint(): Schema { ], }; } + return { + ok: true, + value: bigint, + }; }, getType: () => SchemaType.BIGINT, }; diff --git a/src/core/schemas/builders/enum/enum.ts b/src/core/schemas/builders/enum/enum.ts index c1e24d69d..69aced6be 100644 --- a/src/core/schemas/builders/enum/enum.ts +++ b/src/core/schemas/builders/enum/enum.ts @@ -36,7 +36,7 @@ export function enum_(values: E): Schema(getter: SchemaGetter>): Sc } export function constructLazyBaseSchema( - getter: SchemaGetter> + getter: SchemaGetter>, ): BaseSchema { return { parse: (raw, opts) => getMemoizedSchema(getter).parse(raw, opts), diff --git a/src/core/schemas/builders/lazy/lazyObject.ts b/src/core/schemas/builders/lazy/lazyObject.ts index 38c9e2840..d8ee6ec5d 100644 --- a/src/core/schemas/builders/lazy/lazyObject.ts +++ b/src/core/schemas/builders/lazy/lazyObject.ts @@ -2,7 +2,7 @@ import { getObjectUtils } from "../object"; import { getObjectLikeUtils } from "../object-like"; import { BaseObjectSchema, ObjectSchema } from "../object/types"; import { getSchemaUtils } from "../schema-utils"; -import { constructLazyBaseSchema, getMemoizedSchema, SchemaGetter } from "./lazy"; +import { SchemaGetter, constructLazyBaseSchema, getMemoizedSchema } from "./lazy"; export function lazyObject(getter: SchemaGetter>): ObjectSchema { const baseSchema: BaseObjectSchema = { diff --git a/src/core/schemas/builders/list/list.ts b/src/core/schemas/builders/list/list.ts index e4c5c4a4a..a6167a5be 100644 --- a/src/core/schemas/builders/list/list.ts +++ b/src/core/schemas/builders/list/list.ts @@ -10,14 +10,14 @@ export function list(schema: Schema): Schema validateAndTransformArray(parsed, (item, index) => schema.json(item, { ...opts, breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `[${index}]`], - }) + }), ), getType: () => SchemaType.LIST, }; @@ -30,7 +30,7 @@ export function list(schema: Schema): Schema( value: unknown, - transformItem: (item: Raw, index: number) => MaybeValid + transformItem: (item: Raw, index: number) => MaybeValid, ): MaybeValid { if (!Array.isArray(value)) { return { @@ -68,6 +68,6 @@ function validateAndTransformArray( errors, }; }, - { ok: true, value: [] } + { ok: true, value: [] }, ); } diff --git a/src/core/schemas/builders/literals/booleanLiteral.ts b/src/core/schemas/builders/literals/booleanLiteral.ts index a83d22cd4..5c004133d 100644 --- a/src/core/schemas/builders/literals/booleanLiteral.ts +++ b/src/core/schemas/builders/literals/booleanLiteral.ts @@ -22,7 +22,7 @@ export function booleanLiteral(literal: V): Schema { ], }; } - } + }, ); return schemaCreator(); diff --git a/src/core/schemas/builders/literals/stringLiteral.ts b/src/core/schemas/builders/literals/stringLiteral.ts index 3939b76b4..334bbdc46 100644 --- a/src/core/schemas/builders/literals/stringLiteral.ts +++ b/src/core/schemas/builders/literals/stringLiteral.ts @@ -22,7 +22,7 @@ export function stringLiteral(literal: V): Schema { ], }; } - } + }, ); return schemaCreator(); diff --git a/src/core/schemas/builders/object-like/getObjectLikeUtils.ts b/src/core/schemas/builders/object-like/getObjectLikeUtils.ts index 8331d08da..8885586e2 100644 --- a/src/core/schemas/builders/object-like/getObjectLikeUtils.ts +++ b/src/core/schemas/builders/object-like/getObjectLikeUtils.ts @@ -17,7 +17,7 @@ export function getObjectLikeUtils(schema: BaseSchema) export function withParsedProperties( objectLike: BaseSchema, - properties: { [K in keyof Properties]: Properties[K] | ((parsed: ParsedObjectShape) => Properties[K]) } + properties: { [K in keyof Properties]: Properties[K] | ((parsed: ParsedObjectShape) => Properties[K]) }, ): ObjectLikeSchema { const objectSchema: BaseSchema = { parse: (raw, opts) => { @@ -33,7 +33,7 @@ export function withParsedProperties !addedPropertyKeys.has(key)) + Object.keys(parsed).filter((key) => !addedPropertyKeys.has(key)), ); return objectLike.json(parsedWithoutAddedProperties as ParsedObjectShape, opts); diff --git a/src/core/schemas/builders/object/object.ts b/src/core/schemas/builders/object/object.ts index 8d40c33c8..05fbca8a1 100644 --- a/src/core/schemas/builders/object/object.ts +++ b/src/core/schemas/builders/object/object.ts @@ -11,12 +11,12 @@ import { getSchemaUtils } from "../schema-utils"; import { isProperty } from "./property"; import { BaseObjectSchema, - inferObjectSchemaFromPropertySchemas, - inferParsedObjectFromPropertySchemas, - inferRawObjectFromPropertySchemas, ObjectSchema, ObjectUtils, PropertySchemas, + inferObjectSchemaFromPropertySchemas, + inferParsedObjectFromPropertySchemas, + inferRawObjectFromPropertySchemas, } from "./types"; interface ObjectPropertyWithRawKey { @@ -26,7 +26,7 @@ interface ObjectPropertyWithRawKey { } export function object>( - schemas: T + schemas: T, ): inferObjectSchemaFromPropertySchemas { const baseSchema: BaseObjectSchema< inferRawObjectFromPropertySchemas, @@ -34,7 +34,7 @@ export function object = { _getRawProperties: () => Object.entries(schemas).map(([parsedKey, propertySchema]) => - isProperty(propertySchema) ? propertySchema.rawKey : parsedKey + isProperty(propertySchema) ? propertySchema.rawKey : parsedKey, ) as unknown as (keyof inferRawObjectFromPropertySchemas)[], _getParsedProperties: () => keys(schemas) as unknown as (keyof inferParsedObjectFromPropertySchemas)[], @@ -102,8 +102,8 @@ export function object MaybeValid } | undefined => { + parsedKey, + ): { transformedKey: string; transform: (propertyValue: object) => MaybeValid } | undefined => { const property = schemas[parsedKey as keyof T]; // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition @@ -160,8 +160,8 @@ function validateAndTransformObject({ value: unknown; requiredKeys: string[]; getProperty: ( - preTransformedKey: string - ) => { transformedKey: string; transform: (propertyValue: unknown) => MaybeValid } | undefined; + preTransformedKey: string, + ) => { transformedKey: string; transform: (propertyValue: object) => MaybeValid } | undefined; unrecognizedObjectKeys: "fail" | "passthrough" | "strip" | undefined; skipValidation: boolean | undefined; breadcrumbsPrefix: string[] | undefined; @@ -189,7 +189,7 @@ function validateAndTransformObject({ if (property != null) { missingRequiredKeys.delete(preTransformedKey); - const value = property.transform(preTransformedItemValue); + const value = property.transform(preTransformedItemValue as object); if (value.ok) { transformed[property.transformedKey] = value.value; } else { @@ -219,7 +219,7 @@ function validateAndTransformObject({ .map((key) => ({ path: breadcrumbsPrefix, message: `Missing required key "${key}"`, - })) + })), ); if (errors.length === 0 || skipValidation) { @@ -244,7 +244,7 @@ export function getObjectUtils(schema: BaseObjectSchema { return validateAndTransformExtendedObject({ extensionKeys: extension._getRawProperties(), - value: raw, + value: raw as object, transformBase: (rawBase) => schema.parse(rawBase, opts), transformExtension: (rawExtension) => extension.parse(rawExtension, opts), }); @@ -252,7 +252,7 @@ export function getObjectUtils(schema: BaseObjectSchema { return validateAndTransformExtendedObject({ extensionKeys: extension._getParsedProperties(), - value: parsed, + value: parsed as object, transformBase: (parsedBase) => schema.json(parsedBase, opts), transformExtension: (parsedExtension) => extension.json(parsedExtension, opts), }); @@ -318,13 +318,13 @@ function validateAndTransformExtendedObject MaybeValid; - transformExtension: (value: unknown) => MaybeValid; + value: object; + transformBase: (value: object) => MaybeValid; + transformExtension: (value: object) => MaybeValid; }): MaybeValid { const extensionPropertiesSet = new Set(extensionKeys); const [extensionProperties, baseProperties] = partition(keys(value), (key) => - extensionPropertiesSet.has(key as keyof PreTransformedExtension) + extensionPropertiesSet.has(key as keyof PreTransformedExtension), ); const transformedBase = transformBase(filterObject(value, baseProperties)); @@ -358,6 +358,7 @@ function isSchemaOptional(schema: Schema): boolean { case SchemaType.ANY: case SchemaType.UNKNOWN: case SchemaType.OPTIONAL: + case SchemaType.OPTIONAL_NULLABLE: return true; default: return false; diff --git a/src/core/schemas/builders/object/objectWithoutOptionalProperties.ts b/src/core/schemas/builders/object/objectWithoutOptionalProperties.ts index a0951f48e..ce4d3edca 100644 --- a/src/core/schemas/builders/object/objectWithoutOptionalProperties.ts +++ b/src/core/schemas/builders/object/objectWithoutOptionalProperties.ts @@ -1,8 +1,8 @@ import { object } from "./object"; -import { inferParsedPropertySchema, inferRawObjectFromPropertySchemas, ObjectSchema, PropertySchemas } from "./types"; +import { ObjectSchema, PropertySchemas, inferParsedPropertySchema, inferRawObjectFromPropertySchemas } from "./types"; export function objectWithoutOptionalProperties>( - schemas: T + schemas: T, ): inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas { return object(schemas) as unknown as inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas; } diff --git a/src/core/schemas/builders/object/property.ts b/src/core/schemas/builders/object/property.ts index d245c4b19..fa9a9be84 100644 --- a/src/core/schemas/builders/object/property.ts +++ b/src/core/schemas/builders/object/property.ts @@ -2,7 +2,7 @@ import { Schema } from "../../Schema"; export function property( rawKey: RawKey, - valueSchema: Schema + valueSchema: Schema, ): Property { return { rawKey, diff --git a/src/core/schemas/builders/object/types.ts b/src/core/schemas/builders/object/types.ts index 9f87cbb78..b4f49c884 100644 --- a/src/core/schemas/builders/object/types.ts +++ b/src/core/schemas/builders/object/types.ts @@ -1,4 +1,4 @@ -import { BaseSchema, inferParsed, inferRaw, Schema } from "../../Schema"; +import { BaseSchema, Schema, inferParsed, inferRaw } from "../../Schema"; import { addQuestionMarksToNullableProperties } from "../../utils/addQuestionMarksToNullableProperties"; import { ObjectLikeUtils } from "../object-like"; import { SchemaUtils } from "../schema-utils"; @@ -16,16 +16,15 @@ export interface BaseObjectSchema extends BaseSchema { export interface ObjectUtils { extend: ( - schemas: ObjectSchema + schemas: ObjectSchema, ) => ObjectSchema; passthrough: () => ObjectSchema; } export type inferRawObject> = O extends ObjectSchema ? Raw : never; -export type inferParsedObject> = O extends ObjectSchema - ? Parsed - : never; +export type inferParsedObject> = + O extends ObjectSchema ? Parsed : never; export type inferObjectSchemaFromPropertySchemas> = ObjectSchema< inferRawObjectFromPropertySchemas, @@ -47,27 +46,13 @@ export type PropertySchemas = Recor Property | Schema >; -export type inferRawPropertySchema

| Schema> = P extends Property< - any, - infer Raw, - any -> - ? Raw - : P extends Schema - ? inferRaw

- : never; +export type inferRawPropertySchema

| Schema> = + P extends Property ? Raw : P extends Schema ? inferRaw

: never; -export type inferParsedPropertySchema

| Schema> = P extends Property< - any, - any, - infer Parsed -> - ? Parsed - : P extends Schema - ? inferParsed

- : never; +export type inferParsedPropertySchema

| Schema> = + P extends Property ? Parsed : P extends Schema ? inferParsed

: never; export type inferRawKey< ParsedKey extends string | number | symbol, - P extends Property | Schema + P extends Property | Schema, > = P extends Property ? Raw : ParsedKey; diff --git a/src/core/schemas/builders/primitives/boolean.ts b/src/core/schemas/builders/primitives/boolean.ts index fad605621..2b5598810 100644 --- a/src/core/schemas/builders/primitives/boolean.ts +++ b/src/core/schemas/builders/primitives/boolean.ts @@ -21,5 +21,5 @@ export const boolean = createIdentitySchemaCreator( ], }; } - } + }, ); diff --git a/src/core/schemas/builders/primitives/number.ts b/src/core/schemas/builders/primitives/number.ts index c26894569..3d6be6ff7 100644 --- a/src/core/schemas/builders/primitives/number.ts +++ b/src/core/schemas/builders/primitives/number.ts @@ -21,5 +21,5 @@ export const number = createIdentitySchemaCreator( ], }; } - } + }, ); diff --git a/src/core/schemas/builders/primitives/string.ts b/src/core/schemas/builders/primitives/string.ts index 949f1f2a6..e09aceeca 100644 --- a/src/core/schemas/builders/primitives/string.ts +++ b/src/core/schemas/builders/primitives/string.ts @@ -21,5 +21,5 @@ export const string = createIdentitySchemaCreator( ], }; } - } + }, ); diff --git a/src/core/schemas/builders/record/record.ts b/src/core/schemas/builders/record/record.ts index 6683ac360..eb3e9a999 100644 --- a/src/core/schemas/builders/record/record.ts +++ b/src/core/schemas/builders/record/record.ts @@ -8,7 +8,7 @@ import { BaseRecordSchema, RecordSchema } from "./types"; export function record( keySchema: Schema, - valueSchema: Schema + valueSchema: Schema, ): RecordSchema { const baseSchema: BaseRecordSchema = { parse: (raw, opts) => { @@ -81,8 +81,7 @@ function validateAndTransformRecord>>( (accPromise, [stringKey, value]) => { - // skip nullish keys - if (value == null) { + if (value === undefined) { return accPromise; } @@ -125,6 +124,6 @@ function validateAndTransformRecord } + { ok: true, value: {} as Record }, ); } diff --git a/src/core/schemas/builders/record/types.ts b/src/core/schemas/builders/record/types.ts index eb82cc7f6..fec431d43 100644 --- a/src/core/schemas/builders/record/types.ts +++ b/src/core/schemas/builders/record/types.ts @@ -5,7 +5,7 @@ export type RecordSchema< RawKey extends string | number, RawValue, ParsedKey extends string | number, - ParsedValue + ParsedValue, > = BaseRecordSchema & SchemaUtils, Record>; @@ -13,5 +13,5 @@ export type BaseRecordSchema< RawKey extends string | number, RawValue, ParsedKey extends string | number, - ParsedValue + ParsedValue, > = BaseSchema, Record>; diff --git a/src/core/schemas/builders/schema-utils/getSchemaUtils.ts b/src/core/schemas/builders/schema-utils/getSchemaUtils.ts index 79ecad921..d5e7a955d 100644 --- a/src/core/schemas/builders/schema-utils/getSchemaUtils.ts +++ b/src/core/schemas/builders/schema-utils/getSchemaUtils.ts @@ -3,7 +3,9 @@ import { JsonError } from "./JsonError"; import { ParseError } from "./ParseError"; export interface SchemaUtils { + nullable: () => Schema; optional: () => Schema; + optionalNullable: () => Schema; transform: (transformer: SchemaTransformer) => Schema; parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Parsed; jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Raw; @@ -16,7 +18,9 @@ export interface SchemaTransformer { export function getSchemaUtils(schema: BaseSchema): SchemaUtils { return { + nullable: () => nullable(schema), optional: () => optional(schema), + optionalNullable: () => optionalNullable(schema), transform: (transformer) => transform(schema, transformer), parseOrThrow: (raw, opts) => { const parsed = schema.parse(raw, opts); @@ -39,8 +43,37 @@ export function getSchemaUtils(schema: BaseSchema): Sc * schema utils are defined in one file to resolve issues with circular imports */ +export function nullable(schema: BaseSchema): Schema { + const baseSchema: BaseSchema = { + parse: (raw, opts) => { + if (raw == null) { + return { + ok: true, + value: null, + }; + } + return schema.parse(raw, opts); + }, + json: (parsed, opts) => { + if (parsed == null) { + return { + ok: true, + value: null, + }; + } + return schema.json(parsed, opts); + }, + getType: () => SchemaType.NULLABLE, + }; + + return { + ...baseSchema, + ...getSchemaUtils(baseSchema), + }; +} + export function optional( - schema: BaseSchema + schema: BaseSchema, ): Schema { const baseSchema: BaseSchema = { parse: (raw, opts) => { @@ -76,9 +109,52 @@ export function optional( }; } +export function optionalNullable( + schema: BaseSchema, +): Schema { + const baseSchema: BaseSchema = { + parse: (raw, opts) => { + if (raw === undefined) { + return { + ok: true, + value: undefined, + }; + } + if (raw === null) { + return { + ok: true, + value: null, + }; + } + return schema.parse(raw, opts); + }, + json: (parsed, opts) => { + if (parsed === undefined) { + return { + ok: true, + value: undefined, + }; + } + if (parsed === null) { + return { + ok: true, + value: null, + }; + } + return schema.json(parsed, opts); + }, + getType: () => SchemaType.OPTIONAL_NULLABLE, + }; + + return { + ...baseSchema, + ...getSchemaUtils(baseSchema), + }; +} + export function transform( schema: BaseSchema, - transformer: SchemaTransformer + transformer: SchemaTransformer, ): Schema { const baseSchema: BaseSchema = { parse: (raw, opts) => { diff --git a/src/core/schemas/builders/undiscriminated-union/types.ts b/src/core/schemas/builders/undiscriminated-union/types.ts index 43e7108a0..4f0888aaf 100644 --- a/src/core/schemas/builders/undiscriminated-union/types.ts +++ b/src/core/schemas/builders/undiscriminated-union/types.ts @@ -1,4 +1,4 @@ -import { inferParsed, inferRaw, Schema } from "../../Schema"; +import { Schema, inferParsed, inferRaw } from "../../Schema"; export type UndiscriminatedUnionSchema = Schema< inferRawUnidiscriminatedUnionSchema, diff --git a/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts b/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts index 21ed3df0f..a5cf01fa5 100644 --- a/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts +++ b/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts @@ -4,7 +4,7 @@ import { getSchemaUtils } from "../schema-utils"; import { inferParsedUnidiscriminatedUnionSchema, inferRawUnidiscriminatedUnionSchema } from "./types"; export function undiscriminatedUnion, ...Schema[]]>( - schemas: Schemas + schemas: Schemas, ): Schema, inferParsedUnidiscriminatedUnionSchema> { const baseSchema: BaseSchema< inferRawUnidiscriminatedUnionSchema, @@ -14,14 +14,14 @@ export function undiscriminatedUnion, ...Schem return validateAndTransformUndiscriminatedUnion>( (schema, opts) => schema.parse(raw, opts), schemas, - opts + opts, ); }, json: (parsed, opts) => { return validateAndTransformUndiscriminatedUnion>( (schema, opts) => schema.json(parsed, opts), schemas, - opts + opts, ); }, getType: () => SchemaType.UNDISCRIMINATED_UNION, @@ -36,7 +36,7 @@ export function undiscriminatedUnion, ...Schem function validateAndTransformUndiscriminatedUnion( transform: (schema: Schema, opts: SchemaOptions) => MaybeValid, schemas: Schema[], - opts: SchemaOptions | undefined + opts: SchemaOptions | undefined, ): MaybeValid { const errors: ValidationError[] = []; for (const [index, schema] of schemas.entries()) { diff --git a/src/core/schemas/builders/union/discriminant.ts b/src/core/schemas/builders/union/discriminant.ts index 55065bc89..73cd62ade 100644 --- a/src/core/schemas/builders/union/discriminant.ts +++ b/src/core/schemas/builders/union/discriminant.ts @@ -1,6 +1,6 @@ export function discriminant( parsedDiscriminant: ParsedDiscriminant, - rawDiscriminant: RawDiscriminant + rawDiscriminant: RawDiscriminant, ): Discriminant { return { parsedDiscriminant, diff --git a/src/core/schemas/builders/union/types.ts b/src/core/schemas/builders/union/types.ts index 6f82c868b..7ac9d16d6 100644 --- a/src/core/schemas/builders/union/types.ts +++ b/src/core/schemas/builders/union/types.ts @@ -1,4 +1,4 @@ -import { inferParsedObject, inferRawObject, ObjectSchema } from "../object"; +import { ObjectSchema, inferParsedObject, inferRawObject } from "../object"; import { Discriminant } from "./discriminant"; export type UnionSubtypes = { @@ -16,11 +16,11 @@ export type inferParsedUnion, U extend export type inferRawDiscriminant> = D extends string ? D : D extends Discriminant - ? Raw - : never; + ? Raw + : never; export type inferParsedDiscriminant> = D extends string ? D : D extends Discriminant - ? Parsed - : never; + ? Parsed + : never; diff --git a/src/core/schemas/builders/union/union.ts b/src/core/schemas/builders/union/union.ts index ab61475a5..afdd5a1f5 100644 --- a/src/core/schemas/builders/union/union.ts +++ b/src/core/schemas/builders/union/union.ts @@ -5,14 +5,14 @@ import { keys } from "../../utils/keys"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { enum_ } from "../enum"; import { ObjectSchema } from "../object"; -import { getObjectLikeUtils, ObjectLikeSchema } from "../object-like"; +import { ObjectLikeSchema, getObjectLikeUtils } from "../object-like"; import { getSchemaUtils } from "../schema-utils"; import { Discriminant } from "./discriminant"; -import { inferParsedDiscriminant, inferParsedUnion, inferRawDiscriminant, inferRawUnion, UnionSubtypes } from "./types"; +import { UnionSubtypes, inferParsedDiscriminant, inferParsedUnion, inferRawDiscriminant, inferRawUnion } from "./types"; export function union, U extends UnionSubtypes>( discriminant: D, - union: U + union: U, ): ObjectLikeSchema, inferParsedUnion> { const rawDiscriminant = typeof discriminant === "string" ? discriminant : (discriminant.rawDiscriminant as inferRawDiscriminant); @@ -71,7 +71,7 @@ export function union, U extends Union function transformAndValidateUnion< TransformedDiscriminant extends string, TransformedDiscriminantValue extends string, - TransformedAdditionalProperties + TransformedAdditionalProperties, >({ value, discriminant, @@ -90,7 +90,7 @@ function transformAndValidateUnion< allowUnrecognizedUnionMembers: boolean | undefined; transformAdditionalProperties: ( additionalProperties: unknown, - additionalPropertiesSchema: ObjectSchema + additionalPropertiesSchema: ObjectSchema, ) => MaybeValid; breadcrumbsPrefix: string[] | undefined; }): MaybeValid & TransformedAdditionalProperties> { @@ -154,7 +154,7 @@ function transformAndValidateUnion< const transformedAdditionalProperties = transformAdditionalProperties( additionalProperties, - additionalPropertiesSchema + additionalPropertiesSchema, ); if (!transformedAdditionalProperties.ok) { return transformedAdditionalProperties; diff --git a/src/core/schemas/utils/addQuestionMarksToNullableProperties.ts b/src/core/schemas/utils/addQuestionMarksToNullableProperties.ts index 4111d703c..59f9e6588 100644 --- a/src/core/schemas/utils/addQuestionMarksToNullableProperties.ts +++ b/src/core/schemas/utils/addQuestionMarksToNullableProperties.ts @@ -3,13 +3,7 @@ export type addQuestionMarksToNullableProperties = { } & Pick>; export type OptionalKeys = { - [K in keyof T]-?: undefined extends T[K] - ? K - : null extends T[K] - ? K - : 1 extends (any extends T[K] ? 0 : 1) - ? never - : K; + [K in keyof T]-?: undefined extends T[K] ? K : never; }[keyof T]; export type RequiredKeys = Exclude>; diff --git a/src/core/schemas/utils/createIdentitySchemaCreator.ts b/src/core/schemas/utils/createIdentitySchemaCreator.ts index de107cf5e..4db71be4a 100644 --- a/src/core/schemas/utils/createIdentitySchemaCreator.ts +++ b/src/core/schemas/utils/createIdentitySchemaCreator.ts @@ -1,10 +1,10 @@ -import { getSchemaUtils } from "../builders/schema-utils"; import { BaseSchema, MaybeValid, Schema, SchemaOptions, SchemaType } from "../Schema"; +import { getSchemaUtils } from "../builders/schema-utils"; import { maybeSkipValidation } from "./maybeSkipValidation"; export function createIdentitySchemaCreator( schemaType: SchemaType, - validate: (value: unknown, opts?: SchemaOptions) => MaybeValid + validate: (value: unknown, opts?: SchemaOptions) => MaybeValid, ): () => Schema { return () => { const baseSchema: BaseSchema = { diff --git a/src/core/schemas/utils/entries.ts b/src/core/schemas/utils/entries.ts index e12295213..2d5c93d65 100644 --- a/src/core/schemas/utils/entries.ts +++ b/src/core/schemas/utils/entries.ts @@ -1,3 +1,3 @@ -export function entries(object: T): [keyof T, T[keyof T]][] { +export function entries(object: T): [keyof T, T[keyof T]][] { return Object.entries(object) as [keyof T, T[keyof T]][]; } diff --git a/src/core/schemas/utils/filterObject.ts b/src/core/schemas/utils/filterObject.ts index 2c25a3455..70527d100 100644 --- a/src/core/schemas/utils/filterObject.ts +++ b/src/core/schemas/utils/filterObject.ts @@ -1,10 +1,13 @@ -export function filterObject(obj: T, keysToInclude: K[]): Pick { +export function filterObject(obj: T, keysToInclude: K[]): Pick { const keysToIncludeSet = new Set(keysToInclude); - return Object.entries(obj).reduce((acc, [key, value]) => { - if (keysToIncludeSet.has(key as K)) { - acc[key as K] = value; - } - return acc; - // eslint-disable-next-line @typescript-eslint/prefer-reduce-type-parameter - }, {} as Pick); + return Object.entries(obj).reduce( + (acc, [key, value]) => { + if (keysToIncludeSet.has(key as K)) { + acc[key as K] = value as T[K]; + } + return acc; + // eslint-disable-next-line @typescript-eslint/prefer-reduce-type-parameter + }, + {} as Pick, + ); } diff --git a/src/core/schemas/utils/keys.ts b/src/core/schemas/utils/keys.ts index 018670982..2e0930e2d 100644 --- a/src/core/schemas/utils/keys.ts +++ b/src/core/schemas/utils/keys.ts @@ -1,3 +1,3 @@ -export function keys(object: T): (keyof T)[] { +export function keys(object: T): (keyof T)[] { return Object.keys(object) as (keyof T)[]; } diff --git a/src/core/schemas/utils/maybeSkipValidation.ts b/src/core/schemas/utils/maybeSkipValidation.ts index 86c07abf2..950d5f9c5 100644 --- a/src/core/schemas/utils/maybeSkipValidation.ts +++ b/src/core/schemas/utils/maybeSkipValidation.ts @@ -9,7 +9,7 @@ export function maybeSkipValidation, Raw, Pars } function transformAndMaybeSkipValidation( - transform: (value: unknown, opts?: SchemaOptions) => MaybeValid + transform: (value: unknown, opts?: SchemaOptions) => MaybeValid, ): (value: unknown, opts?: SchemaOptions) => MaybeValid { return (value, opts): MaybeValid => { const transformed = transform(value, opts); @@ -22,9 +22,9 @@ function transformAndMaybeSkipValidation( ...transformed.errors.map( (error) => " - " + - (error.path.length > 0 ? `${error.path.join(".")}: ${error.message}` : error.message) + (error.path.length > 0 ? `${error.path.join(".")}: ${error.message}` : error.message), ), - ].join("\n") + ].join("\n"), ); return { diff --git a/src/errors/MergeError.ts b/src/errors/MergeError.ts index 37aafe9f7..c3d07530f 100644 --- a/src/errors/MergeError.ts +++ b/src/errors/MergeError.ts @@ -2,6 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ +import { toJson } from "../core/json"; + export class MergeError extends Error { readonly statusCode?: number; readonly body?: unknown; @@ -38,7 +40,7 @@ function buildMessage({ } if (body != null) { - lines.push(`Body: ${JSON.stringify(body, undefined, 2)}`); + lines.push(`Body: ${toJson(body, undefined, 2)}`); } return lines.join("\n"); diff --git a/src/index.ts b/src/index.ts index afe125439..a3c7f43d1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,3 +2,4 @@ export * as Merge from "./api"; export { MergeClient } from "./Client"; export { MergeEnvironment } from "./environments"; export { MergeError, MergeTimeoutError } from "./errors"; +export * as serialization from "./serialization"; 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 600294527..69e666cd0 100644 --- a/src/serialization/resources/accounting/resources/accounts/client/requests/AccountEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/accounts/client/requests/AccountEndpointRequest.ts @@ -15,7 +15,7 @@ export const AccountEndpointRequest: core.serialization.Schema< }); export declare namespace AccountEndpointRequest { - interface Raw { + export interface 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 2b6fbb2e3..8112057e6 100644 --- a/src/serialization/resources/accounting/resources/accounts/types/AccountsListRequestRemoteFields.ts +++ b/src/serialization/resources/accounting/resources/accounts/types/AccountsListRequestRemoteFields.ts @@ -12,5 +12,5 @@ export const AccountsListRequestRemoteFields: core.serialization.Schema< > = core.serialization.enum_(["classification", "classification,status", "status"]); export declare namespace AccountsListRequestRemoteFields { - type Raw = "classification" | "classification,status" | "status"; + export type Raw = "classification" | "classification,status" | "status"; } diff --git a/src/serialization/resources/accounting/resources/accounts/types/AccountsListRequestShowEnumOrigins.ts b/src/serialization/resources/accounting/resources/accounts/types/AccountsListRequestShowEnumOrigins.ts index 91494b090..0537a0336 100644 --- a/src/serialization/resources/accounting/resources/accounts/types/AccountsListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/accounting/resources/accounts/types/AccountsListRequestShowEnumOrigins.ts @@ -12,5 +12,5 @@ export const AccountsListRequestShowEnumOrigins: core.serialization.Schema< > = core.serialization.enum_(["classification", "classification,status", "status"]); export declare namespace AccountsListRequestShowEnumOrigins { - type Raw = "classification" | "classification,status" | "status"; + export type Raw = "classification" | "classification,status" | "status"; } diff --git a/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestRemoteFields.ts b/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestRemoteFields.ts index 6c8116b38..ef1e3db65 100644 --- a/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestRemoteFields.ts @@ -12,5 +12,5 @@ export const AccountsRetrieveRequestRemoteFields: core.serialization.Schema< > = core.serialization.enum_(["classification", "classification,status", "status"]); export declare namespace AccountsRetrieveRequestRemoteFields { - type Raw = "classification" | "classification,status" | "status"; + export type Raw = "classification" | "classification,status" | "status"; } diff --git a/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestShowEnumOrigins.ts index afde9306f..35be30598 100644 --- a/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/accounting/resources/accounts/types/AccountsRetrieveRequestShowEnumOrigins.ts @@ -12,5 +12,5 @@ export const AccountsRetrieveRequestShowEnumOrigins: core.serialization.Schema< > = core.serialization.enum_(["classification", "classification,status", "status"]); export declare namespace AccountsRetrieveRequestShowEnumOrigins { - type Raw = "classification" | "classification,status" | "status"; + export type Raw = "classification" | "classification,status" | "status"; } diff --git a/src/serialization/resources/accounting/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/serialization/resources/accounting/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts index e88792c0c..93a6860f9 100644 --- a/src/serialization/resources/accounting/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts +++ b/src/serialization/resources/accounting/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -13,5 +13,5 @@ export const AsyncPassthroughRetrieveResponse: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([RemoteResponse, core.serialization.string()]); export declare namespace AsyncPassthroughRetrieveResponse { - type Raw = RemoteResponse.Raw | string; + export 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 5a647aec7..670dbe3c6 100644 --- a/src/serialization/resources/accounting/resources/attachments/client/requests/AccountingAttachmentEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/attachments/client/requests/AccountingAttachmentEndpointRequest.ts @@ -15,7 +15,7 @@ export const AccountingAttachmentEndpointRequest: core.serialization.Schema< }); export declare namespace AccountingAttachmentEndpointRequest { - interface Raw { + export interface Raw { model: AccountingAttachmentRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountEndpointRequest.ts b/src/serialization/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountEndpointRequest.ts index a260f4a1f..c37250c4e 100644 --- a/src/serialization/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/bankFeedAccounts/client/requests/BankFeedAccountEndpointRequest.ts @@ -15,7 +15,7 @@ export const BankFeedAccountEndpointRequest: core.serialization.Schema< }); export declare namespace BankFeedAccountEndpointRequest { - interface Raw { + export interface Raw { model: BankFeedAccountRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionEndpointRequest.ts b/src/serialization/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionEndpointRequest.ts index 1f80af722..9d782e23e 100644 --- a/src/serialization/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/bankFeedTransactions/client/requests/BankFeedTransactionEndpointRequest.ts @@ -15,7 +15,7 @@ export const BankFeedTransactionEndpointRequest: core.serialization.Schema< }); export declare namespace BankFeedTransactionEndpointRequest { - interface Raw { + export interface Raw { model: BankFeedTransactionRequestRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoListRequestExpand.ts b/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoListRequestExpand.ts index 170ee0fde..98887217e 100644 --- a/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoListRequestExpand.ts @@ -12,5 +12,5 @@ export const CompanyInfoListRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["addresses", "addresses,phone_numbers", "phone_numbers"]); export declare namespace CompanyInfoListRequestExpand { - type Raw = "addresses" | "addresses,phone_numbers" | "phone_numbers"; + export type Raw = "addresses" | "addresses,phone_numbers" | "phone_numbers"; } diff --git a/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoRetrieveRequestExpand.ts index 2ed7c1d7e..7dd471c77 100644 --- a/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/companyInfo/types/CompanyInfoRetrieveRequestExpand.ts @@ -12,5 +12,5 @@ export const CompanyInfoRetrieveRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["addresses", "addresses,phone_numbers", "phone_numbers"]); export declare namespace CompanyInfoRetrieveRequestExpand { - type Raw = "addresses" | "addresses,phone_numbers" | "phone_numbers"; + export type Raw = "addresses" | "addresses,phone_numbers" | "phone_numbers"; } 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 10e63064e..5b7c33a9d 100644 --- a/src/serialization/resources/accounting/resources/contacts/client/requests/ContactEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/contacts/client/requests/ContactEndpointRequest.ts @@ -15,7 +15,7 @@ export const ContactEndpointRequest: core.serialization.Schema< }); export declare namespace ContactEndpointRequest { - interface Raw { + export interface 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 88804224e..f0f6ff8bf 100644 --- a/src/serialization/resources/accounting/resources/contacts/types/ContactsListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/contacts/types/ContactsListRequestExpand.ts @@ -20,7 +20,7 @@ export const ContactsListRequestExpand: core.serialization.Schema< ]); export declare namespace ContactsListRequestExpand { - type Raw = + export type Raw = | "addresses" | "addresses,company" | "addresses,phone_numbers" diff --git a/src/serialization/resources/accounting/resources/contacts/types/ContactsRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/contacts/types/ContactsRetrieveRequestExpand.ts index f065628e7..63ad1a5c2 100644 --- a/src/serialization/resources/accounting/resources/contacts/types/ContactsRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/contacts/types/ContactsRetrieveRequestExpand.ts @@ -20,7 +20,7 @@ export const ContactsRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace ContactsRetrieveRequestExpand { - type Raw = + export type Raw = | "addresses" | "addresses,company" | "addresses,phone_numbers" diff --git a/src/serialization/resources/accounting/resources/creditNotes/client/requests/CreditNoteEndpointRequest.ts b/src/serialization/resources/accounting/resources/creditNotes/client/requests/CreditNoteEndpointRequest.ts index 90619b181..6f62924a4 100644 --- a/src/serialization/resources/accounting/resources/creditNotes/client/requests/CreditNoteEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/creditNotes/client/requests/CreditNoteEndpointRequest.ts @@ -15,7 +15,7 @@ export const CreditNoteEndpointRequest: core.serialization.Schema< }); export declare namespace CreditNoteEndpointRequest { - interface Raw { + export interface Raw { model: CreditNoteRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestExpand.ts b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestExpand.ts index dc4f3a35f..3708a1fc7 100644 --- a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestExpand.ts @@ -140,7 +140,7 @@ export const CreditNotesListRequestExpand: core.serialization.Schema< ]); export declare namespace CreditNotesListRequestExpand { - type Raw = + export type Raw = | "accounting_period" | "applied_payments" | "applied_payments,accounting_period" diff --git a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestRemoteFields.ts b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestRemoteFields.ts index c6bcdb220..286132e16 100644 --- a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestRemoteFields.ts +++ b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestRemoteFields.ts @@ -12,5 +12,5 @@ export const CreditNotesListRequestRemoteFields: core.serialization.Schema< > = core.serialization.enum_(["status", "status,type", "type"]); export declare namespace CreditNotesListRequestRemoteFields { - type Raw = "status" | "status,type" | "type"; + export type Raw = "status" | "status,type" | "type"; } diff --git a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestShowEnumOrigins.ts b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestShowEnumOrigins.ts index 5e55b2211..a8012e4ab 100644 --- a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesListRequestShowEnumOrigins.ts @@ -12,5 +12,5 @@ export const CreditNotesListRequestShowEnumOrigins: core.serialization.Schema< > = core.serialization.enum_(["status", "status,type", "type"]); export declare namespace CreditNotesListRequestShowEnumOrigins { - type Raw = "status" | "status,type" | "type"; + export type Raw = "status" | "status,type" | "type"; } diff --git a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestExpand.ts index 721f3cc4f..d0386d85d 100644 --- a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestExpand.ts @@ -140,7 +140,7 @@ export const CreditNotesRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace CreditNotesRetrieveRequestExpand { - type Raw = + export type Raw = | "accounting_period" | "applied_payments" | "applied_payments,accounting_period" diff --git a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestRemoteFields.ts b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestRemoteFields.ts index 03db1eab9..daabbcaaa 100644 --- a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestRemoteFields.ts @@ -12,5 +12,5 @@ export const CreditNotesRetrieveRequestRemoteFields: core.serialization.Schema< > = core.serialization.enum_(["status", "status,type", "type"]); export declare namespace CreditNotesRetrieveRequestRemoteFields { - type Raw = "status" | "status,type" | "type"; + export type Raw = "status" | "status,type" | "type"; } diff --git a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestShowEnumOrigins.ts index 346c3acf5..549a1fde7 100644 --- a/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/accounting/resources/creditNotes/types/CreditNotesRetrieveRequestShowEnumOrigins.ts @@ -12,5 +12,5 @@ export const CreditNotesRetrieveRequestShowEnumOrigins: core.serialization.Schem > = core.serialization.enum_(["status", "status,type", "type"]); export declare namespace CreditNotesRetrieveRequestShowEnumOrigins { - type Raw = "status" | "status,type" | "type"; + export type Raw = "status" | "status,type" | "type"; } 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 0483045a8..efc201315 100644 --- a/src/serialization/resources/accounting/resources/expenses/client/requests/ExpenseEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/expenses/client/requests/ExpenseEndpointRequest.ts @@ -15,7 +15,7 @@ export const ExpenseEndpointRequest: core.serialization.Schema< }); export declare namespace ExpenseEndpointRequest { - interface Raw { + export interface 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 88a9ced1d..c300b27fa 100644 --- a/src/serialization/resources/accounting/resources/expenses/types/ExpensesListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/expenses/types/ExpensesListRequestExpand.ts @@ -76,7 +76,7 @@ export const ExpensesListRequestExpand: core.serialization.Schema< ]); export declare namespace ExpensesListRequestExpand { - type Raw = + export type Raw = | "account" | "account,accounting_period" | "account,company" diff --git a/src/serialization/resources/accounting/resources/expenses/types/ExpensesRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/expenses/types/ExpensesRetrieveRequestExpand.ts index 0c4283ec5..3e530276c 100644 --- a/src/serialization/resources/accounting/resources/expenses/types/ExpensesRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/expenses/types/ExpensesRetrieveRequestExpand.ts @@ -76,7 +76,7 @@ export const ExpensesRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace ExpensesRetrieveRequestExpand { - type Raw = + export type Raw = | "account" | "account,accounting_period" | "account,company" 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 597f7c919..c9324b10d 100644 --- a/src/serialization/resources/accounting/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/serialization/resources/accounting/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -14,7 +14,7 @@ export const CreateFieldMappingRequest: core.serialization.Schema< targetFieldDescription: core.serialization.property("target_field_description", core.serialization.string()), remoteFieldTraversalPath: core.serialization.property( "remote_field_traversal_path", - core.serialization.list(core.serialization.unknown()) + core.serialization.list(core.serialization.unknown()), ), remoteMethod: core.serialization.property("remote_method", core.serialization.string()), remoteUrlPath: core.serialization.property("remote_url_path", core.serialization.string()), @@ -22,7 +22,7 @@ export const CreateFieldMappingRequest: core.serialization.Schema< }); export declare namespace CreateFieldMappingRequest { - interface Raw { + export interface Raw { target_field_name: string; target_field_description: string; remote_field_traversal_path: unknown[]; 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 a262eebcb..9ee363c86 100644 --- a/src/serialization/resources/accounting/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts +++ b/src/serialization/resources/accounting/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts @@ -12,14 +12,14 @@ export const PatchedEditFieldMappingRequest: core.serialization.Schema< > = core.serialization.object({ remoteFieldTraversalPath: core.serialization.property( "remote_field_traversal_path", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), remoteMethod: core.serialization.property("remote_method", core.serialization.string().optional()), remoteUrlPath: core.serialization.property("remote_url_path", core.serialization.string().optional()), }); export declare namespace PatchedEditFieldMappingRequest { - interface Raw { + export interface Raw { remote_field_traversal_path?: unknown[] | null; remote_method?: string | null; remote_url_path?: string | null; diff --git a/src/serialization/resources/accounting/resources/forceResync/client/syncStatusResyncCreate.ts b/src/serialization/resources/accounting/resources/forceResync/client/syncStatusResyncCreate.ts index ecde6d776..11f9ed8db 100644 --- a/src/serialization/resources/accounting/resources/forceResync/client/syncStatusResyncCreate.ts +++ b/src/serialization/resources/accounting/resources/forceResync/client/syncStatusResyncCreate.ts @@ -13,5 +13,5 @@ export const Response: core.serialization.Schema< > = core.serialization.list(SyncStatus); export declare namespace Response { - type Raw = SyncStatus.Raw[]; + export type Raw = SyncStatus.Raw[]; } diff --git a/src/serialization/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsListRequestExpand.ts b/src/serialization/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsListRequestExpand.ts index 594ecc66a..e56dad2b4 100644 --- a/src/serialization/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsListRequestExpand.ts @@ -28,7 +28,7 @@ export const GeneralLedgerTransactionsListRequestExpand: core.serialization.Sche ]); export declare namespace GeneralLedgerTransactionsListRequestExpand { - type Raw = + export type Raw = | "accounting_period" | "company" | "company,accounting_period" diff --git a/src/serialization/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsRetrieveRequestExpand.ts index 1ec79a6f1..ac67ff241 100644 --- a/src/serialization/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/generalLedgerTransactions/types/GeneralLedgerTransactionsRetrieveRequestExpand.ts @@ -28,7 +28,7 @@ export const GeneralLedgerTransactionsRetrieveRequestExpand: core.serialization. ]); export declare namespace GeneralLedgerTransactionsRetrieveRequestExpand { - type Raw = + export type Raw = | "accounting_period" | "company" | "company,accounting_period" 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 931768ef7..819ecf44a 100644 --- a/src/serialization/resources/accounting/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts +++ b/src/serialization/resources/accounting/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts @@ -14,7 +14,7 @@ export const GenerateRemoteKeyRequest: core.serialization.Schema< }); export declare namespace GenerateRemoteKeyRequest { - interface Raw { + export interface Raw { name: string; } } 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 e6e0f897d..c4773762e 100644 --- a/src/serialization/resources/accounting/resources/invoices/client/requests/InvoiceEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/invoices/client/requests/InvoiceEndpointRequest.ts @@ -15,7 +15,7 @@ export const InvoiceEndpointRequest: core.serialization.Schema< }); export declare namespace InvoiceEndpointRequest { - interface Raw { + export interface 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 fe4e183d9..fd093d43d 100644 --- a/src/serialization/resources/accounting/resources/invoices/client/requests/PatchedInvoiceEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/invoices/client/requests/PatchedInvoiceEndpointRequest.ts @@ -15,7 +15,7 @@ export const PatchedInvoiceEndpointRequest: core.serialization.Schema< }); export declare namespace PatchedInvoiceEndpointRequest { - interface Raw { + export interface 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 3ea6f9dcd..dc53ff32d 100644 --- a/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestExpand.ts @@ -4108,7 +4108,7 @@ export const InvoicesListRequestExpand: core.serialization.Schema< ]); export declare namespace InvoicesListRequestExpand { - type Raw = + export type Raw = | "accounting_period" | "accounting_period,payment_term" | "applied_credit_notes" diff --git a/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestStatus.ts b/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestStatus.ts index 4c2893cbe..653deb5a9 100644 --- a/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestStatus.ts +++ b/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestStatus.ts @@ -12,5 +12,5 @@ export const InvoicesListRequestStatus: core.serialization.Schema< > = core.serialization.enum_(["DRAFT", "OPEN", "PAID", "PARTIALLY_PAID", "SUBMITTED", "VOID"]); export declare namespace InvoicesListRequestStatus { - type Raw = "DRAFT" | "OPEN" | "PAID" | "PARTIALLY_PAID" | "SUBMITTED" | "VOID"; + export type Raw = "DRAFT" | "OPEN" | "PAID" | "PARTIALLY_PAID" | "SUBMITTED" | "VOID"; } diff --git a/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestType.ts b/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestType.ts index 7c0f35fbd..28e57b514 100644 --- a/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestType.ts +++ b/src/serialization/resources/accounting/resources/invoices/types/InvoicesListRequestType.ts @@ -12,5 +12,5 @@ export const InvoicesListRequestType: core.serialization.Schema< > = core.serialization.enum_(["ACCOUNTS_PAYABLE", "ACCOUNTS_RECEIVABLE"]); export declare namespace InvoicesListRequestType { - type Raw = "ACCOUNTS_PAYABLE" | "ACCOUNTS_RECEIVABLE"; + export type Raw = "ACCOUNTS_PAYABLE" | "ACCOUNTS_RECEIVABLE"; } diff --git a/src/serialization/resources/accounting/resources/invoices/types/InvoicesRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/invoices/types/InvoicesRetrieveRequestExpand.ts index c189f33d2..8a8dac8ac 100644 --- a/src/serialization/resources/accounting/resources/invoices/types/InvoicesRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/invoices/types/InvoicesRetrieveRequestExpand.ts @@ -4108,7 +4108,7 @@ export const InvoicesRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace InvoicesRetrieveRequestExpand { - type Raw = + export type Raw = | "accounting_period" | "accounting_period,payment_term" | "applied_credit_notes" diff --git a/src/serialization/resources/accounting/resources/issues/types/IssuesListRequestStatus.ts b/src/serialization/resources/accounting/resources/issues/types/IssuesListRequestStatus.ts index 8546d7235..43a179ebd 100644 --- a/src/serialization/resources/accounting/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/serialization/resources/accounting/resources/issues/types/IssuesListRequestStatus.ts @@ -12,5 +12,5 @@ export const IssuesListRequestStatus: core.serialization.Schema< > = core.serialization.enum_(["ONGOING", "RESOLVED"]); export declare namespace IssuesListRequestStatus { - type Raw = "ONGOING" | "RESOLVED"; + export type Raw = "ONGOING" | "RESOLVED"; } diff --git a/src/serialization/resources/accounting/resources/items/types/ItemsListRequestExpand.ts b/src/serialization/resources/accounting/resources/items/types/ItemsListRequestExpand.ts index fd2792793..9ac2402a1 100644 --- a/src/serialization/resources/accounting/resources/items/types/ItemsListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/items/types/ItemsListRequestExpand.ts @@ -44,7 +44,7 @@ export const ItemsListRequestExpand: core.serialization.Schema< ]); export declare namespace ItemsListRequestExpand { - type Raw = + export type Raw = | "company" | "company,purchase_tax_rate" | "company,sales_tax_rate" diff --git a/src/serialization/resources/accounting/resources/items/types/ItemsRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/items/types/ItemsRetrieveRequestExpand.ts index 6fbe6177c..f2e985a41 100644 --- a/src/serialization/resources/accounting/resources/items/types/ItemsRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/items/types/ItemsRetrieveRequestExpand.ts @@ -44,7 +44,7 @@ export const ItemsRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace ItemsRetrieveRequestExpand { - type Raw = + export type Raw = | "company" | "company,purchase_tax_rate" | "company,sales_tax_rate" 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 f57d072b6..e5a1bf1e1 100644 --- a/src/serialization/resources/accounting/resources/journalEntries/client/requests/JournalEntryEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/journalEntries/client/requests/JournalEntryEndpointRequest.ts @@ -15,7 +15,7 @@ export const JournalEntryEndpointRequest: core.serialization.Schema< }); export declare namespace JournalEntryEndpointRequest { - interface Raw { + export interface 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 979b4487d..3ecc477a5 100644 --- a/src/serialization/resources/accounting/resources/journalEntries/types/JournalEntriesListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/journalEntries/types/JournalEntriesListRequestExpand.ts @@ -76,7 +76,7 @@ export const JournalEntriesListRequestExpand: core.serialization.Schema< ]); export declare namespace JournalEntriesListRequestExpand { - type Raw = + export type Raw = | "accounting_period" | "applied_payments" | "applied_payments,accounting_period" diff --git a/src/serialization/resources/accounting/resources/journalEntries/types/JournalEntriesRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/journalEntries/types/JournalEntriesRetrieveRequestExpand.ts index 885361cb8..1667a1c01 100644 --- a/src/serialization/resources/accounting/resources/journalEntries/types/JournalEntriesRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/journalEntries/types/JournalEntriesRetrieveRequestExpand.ts @@ -76,7 +76,7 @@ export const JournalEntriesRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace JournalEntriesRetrieveRequestExpand { - type Raw = + export type Raw = | "accounting_period" | "applied_payments" | "applied_payments,accounting_period" 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 0fa07ce6c..1d1da4b8a 100644 --- a/src/serialization/resources/accounting/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/serialization/resources/accounting/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -22,32 +22,32 @@ export const EndUserDetailsRequest: core.serialization.Schema< linkExpiryMins: core.serialization.property("link_expiry_mins", core.serialization.number().optional()), shouldCreateMagicLinkUrl: core.serialization.property( "should_create_magic_link_url", - core.serialization.boolean().optional() + core.serialization.boolean().optional(), ), hideAdminMagicLink: core.serialization.property("hide_admin_magic_link", core.serialization.boolean().optional()), commonModels: core.serialization.property( "common_models", - core.serialization.list(CommonModelScopesBodyRequest).optional() + core.serialization.list(CommonModelScopesBodyRequest).optional(), ), categoryCommonModelScopes: core.serialization.property( "category_common_model_scopes", core.serialization .record( core.serialization.string(), - core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional() + core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional(), ) - .optional() + .optional(), ), language: LanguageEnum.optional(), areSyncsDisabled: core.serialization.property("are_syncs_disabled", core.serialization.boolean().optional()), integrationSpecificConfig: core.serialization.property( "integration_specific_config", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace EndUserDetailsRequest { - interface Raw { + export interface Raw { end_user_email_address: string; end_user_organization_name: string; end_user_origin_id: string; diff --git a/src/serialization/resources/accounting/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/serialization/resources/accounting/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index d578027ec..8e31c6dba 100644 --- a/src/serialization/resources/accounting/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/serialization/resources/accounting/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -12,5 +12,5 @@ export const LinkedAccountsListRequestCategory: core.serialization.Schema< > = core.serialization.enum_(["accounting", "ats", "crm", "filestorage", "hris", "mktg", "ticketing"]); export declare namespace LinkedAccountsListRequestCategory { - type Raw = "accounting" | "ats" | "crm" | "filestorage" | "hris" | "mktg" | "ticketing"; + export type Raw = "accounting" | "ats" | "crm" | "filestorage" | "hris" | "mktg" | "ticketing"; } 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 d998aab00..f2fd25c42 100644 --- a/src/serialization/resources/accounting/resources/payments/client/requests/PatchedPaymentEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/payments/client/requests/PatchedPaymentEndpointRequest.ts @@ -15,7 +15,7 @@ export const PatchedPaymentEndpointRequest: core.serialization.Schema< }); export declare namespace PatchedPaymentEndpointRequest { - interface Raw { + export interface 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 a877590a1..549bfffc7 100644 --- a/src/serialization/resources/accounting/resources/payments/client/requests/PaymentEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/payments/client/requests/PaymentEndpointRequest.ts @@ -15,7 +15,7 @@ export const PaymentEndpointRequest: core.serialization.Schema< }); export declare namespace PaymentEndpointRequest { - interface Raw { + export interface 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 2b4097241..9b0634847 100644 --- a/src/serialization/resources/accounting/resources/payments/types/PaymentsListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/payments/types/PaymentsListRequestExpand.ts @@ -140,7 +140,7 @@ export const PaymentsListRequestExpand: core.serialization.Schema< ]); export declare namespace PaymentsListRequestExpand { - type Raw = + export type Raw = | "account" | "account,accounting_period" | "account,accounting_period,payment_method" diff --git a/src/serialization/resources/accounting/resources/payments/types/PaymentsRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/payments/types/PaymentsRetrieveRequestExpand.ts index 1d12a5eda..e9e92896a 100644 --- a/src/serialization/resources/accounting/resources/payments/types/PaymentsRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/payments/types/PaymentsRetrieveRequestExpand.ts @@ -140,7 +140,7 @@ export const PaymentsRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace PaymentsRetrieveRequestExpand { - type Raw = + export type Raw = | "account" | "account,accounting_period" | "account,accounting_period,payment_method" 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 c722c3a80..07099e3f3 100644 --- a/src/serialization/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrderEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/purchaseOrders/client/requests/PurchaseOrderEndpointRequest.ts @@ -15,7 +15,7 @@ export const PurchaseOrderEndpointRequest: core.serialization.Schema< }); export declare namespace PurchaseOrderEndpointRequest { - interface Raw { + export interface 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 fc00c3adb..42360b79e 100644 --- a/src/serialization/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersListRequestExpand.ts @@ -140,7 +140,7 @@ export const PurchaseOrdersListRequestExpand: core.serialization.Schema< ]); export declare namespace PurchaseOrdersListRequestExpand { - type Raw = + export type Raw = | "accounting_period" | "accounting_period,payment_term" | "company" diff --git a/src/serialization/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersRetrieveRequestExpand.ts index b987f66c4..e2b875d5a 100644 --- a/src/serialization/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/purchaseOrders/types/PurchaseOrdersRetrieveRequestExpand.ts @@ -140,7 +140,7 @@ export const PurchaseOrdersRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace PurchaseOrdersRetrieveRequestExpand { - type Raw = + export type Raw = | "accounting_period" | "accounting_period,payment_term" | "company" 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 7fbc820ff..717e6b77c 100644 --- a/src/serialization/resources/accounting/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts +++ b/src/serialization/resources/accounting/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts @@ -14,7 +14,7 @@ export const RemoteKeyForRegenerationRequest: core.serialization.Schema< }); export declare namespace RemoteKeyForRegenerationRequest { - interface Raw { + export interface Raw { name: string; } } 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 00892b851..f17002fe4 100644 --- a/src/serialization/resources/accounting/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/accounting/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -13,12 +13,12 @@ export const LinkedAccountCommonModelScopeDeserializerRequest: core.serializatio > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list(IndividualCommonModelScopeDeserializerRequest) + core.serialization.list(IndividualCommonModelScopeDeserializerRequest), ), }); export declare namespace LinkedAccountCommonModelScopeDeserializerRequest { - interface Raw { + export interface 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 77a2d6371..214121ee9 100644 --- a/src/serialization/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.ts @@ -44,7 +44,7 @@ export const TransactionsListRequestExpand: core.serialization.Schema< ]); export declare namespace TransactionsListRequestExpand { - type Raw = + export type Raw = | "account" | "account,accounting_period" | "accounting_period" diff --git a/src/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts index b575a85b3..7d04cb8b0 100644 --- a/src/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.ts @@ -44,7 +44,7 @@ export const TransactionsRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace TransactionsRetrieveRequestExpand { - type Raw = + export type Raw = | "account" | "account,accounting_period" | "accounting_period" diff --git a/src/serialization/resources/accounting/resources/vendorCredits/client/requests/VendorCreditEndpointRequest.ts b/src/serialization/resources/accounting/resources/vendorCredits/client/requests/VendorCreditEndpointRequest.ts index b56b2c1cb..e190369bb 100644 --- a/src/serialization/resources/accounting/resources/vendorCredits/client/requests/VendorCreditEndpointRequest.ts +++ b/src/serialization/resources/accounting/resources/vendorCredits/client/requests/VendorCreditEndpointRequest.ts @@ -15,7 +15,7 @@ export const VendorCreditEndpointRequest: core.serialization.Schema< }); export declare namespace VendorCreditEndpointRequest { - interface Raw { + export interface Raw { model: VendorCreditRequest.Raw; } } diff --git a/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsListRequestExpand.ts b/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsListRequestExpand.ts index 1f44cf7b3..b62e822e8 100644 --- a/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsListRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsListRequestExpand.ts @@ -44,7 +44,7 @@ export const VendorCreditsListRequestExpand: core.serialization.Schema< ]); export declare namespace VendorCreditsListRequestExpand { - type Raw = + export type Raw = | "accounting_period" | "company" | "company,accounting_period" diff --git a/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsRetrieveRequestExpand.ts b/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsRetrieveRequestExpand.ts index 56f26ac64..c75e249a7 100644 --- a/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsRetrieveRequestExpand.ts +++ b/src/serialization/resources/accounting/resources/vendorCredits/types/VendorCreditsRetrieveRequestExpand.ts @@ -44,7 +44,7 @@ export const VendorCreditsRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace VendorCreditsRetrieveRequestExpand { - type Raw = + export type Raw = | "accounting_period" | "company" | "company,accounting_period" diff --git a/src/serialization/resources/accounting/resources/webhookReceivers/client/list.ts b/src/serialization/resources/accounting/resources/webhookReceivers/client/list.ts index 95de6ab04..6fb23d447 100644 --- a/src/serialization/resources/accounting/resources/webhookReceivers/client/list.ts +++ b/src/serialization/resources/accounting/resources/webhookReceivers/client/list.ts @@ -13,5 +13,5 @@ export const Response: core.serialization.Schema< > = core.serialization.list(WebhookReceiver); export declare namespace Response { - type Raw = WebhookReceiver.Raw[]; + export 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 2fc33cb78..f3913f549 100644 --- a/src/serialization/resources/accounting/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts +++ b/src/serialization/resources/accounting/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts @@ -16,7 +16,7 @@ export const WebhookReceiverRequest: core.serialization.Schema< }); export declare namespace WebhookReceiverRequest { - interface Raw { + export interface Raw { event: string; is_active: boolean; key?: string | null; diff --git a/src/serialization/resources/accounting/types/Account.ts b/src/serialization/resources/accounting/types/Account.ts index 9e114150a..e66374058 100644 --- a/src/serialization/resources/accounting/types/Account.ts +++ b/src/serialization/resources/accounting/types/Account.ts @@ -31,13 +31,13 @@ export const Account: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([AccountAccountTypeEnum, core.serialization.string()]); export declare namespace AccountAccountType { - type Raw = AccountAccountTypeEnum.Raw | string; + export type Raw = AccountAccountTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountAccountTypeEnum.ts b/src/serialization/resources/accounting/types/AccountAccountTypeEnum.ts index 07649c17c..154e9f83a 100644 --- a/src/serialization/resources/accounting/types/AccountAccountTypeEnum.ts +++ b/src/serialization/resources/accounting/types/AccountAccountTypeEnum.ts @@ -26,7 +26,7 @@ export const AccountAccountTypeEnum: core.serialization.Schema< ]); export declare namespace AccountAccountTypeEnum { - type Raw = + export type Raw = | "BANK" | "CREDIT_CARD" | "ACCOUNTS_PAYABLE" diff --git a/src/serialization/resources/accounting/types/AccountClassification.ts b/src/serialization/resources/accounting/types/AccountClassification.ts index 758c1b2f0..6455e111d 100644 --- a/src/serialization/resources/accounting/types/AccountClassification.ts +++ b/src/serialization/resources/accounting/types/AccountClassification.ts @@ -13,5 +13,5 @@ export const AccountClassification: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([ClassificationEnum, core.serialization.string()]); export declare namespace AccountClassification { - type Raw = ClassificationEnum.Raw | string; + export type Raw = ClassificationEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountCurrency.ts b/src/serialization/resources/accounting/types/AccountCurrency.ts index f3b4179d3..b277628de 100644 --- a/src/serialization/resources/accounting/types/AccountCurrency.ts +++ b/src/serialization/resources/accounting/types/AccountCurrency.ts @@ -13,5 +13,5 @@ export const AccountCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace AccountCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountDetails.ts b/src/serialization/resources/accounting/types/AccountDetails.ts index b0cbb7cd6..8ec4799f0 100644 --- a/src/serialization/resources/accounting/types/AccountDetails.ts +++ b/src/serialization/resources/accounting/types/AccountDetails.ts @@ -18,7 +18,7 @@ export const AccountDetails: core.serialization.ObjectSchema< endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property( "end_user_organization_name", - core.serialization.string().optional() + core.serialization.string().optional(), ), endUserEmailAddress: core.serialization.property("end_user_email_address", core.serialization.string().optional()), status: core.serialization.string().optional(), @@ -29,7 +29,7 @@ export const AccountDetails: core.serialization.ObjectSchema< }); export declare namespace AccountDetails { - interface Raw { + export interface Raw { id?: string | null; integration?: string | null; integration_slug?: string | null; diff --git a/src/serialization/resources/accounting/types/AccountDetailsAndActions.ts b/src/serialization/resources/accounting/types/AccountDetailsAndActions.ts index 126f14ab0..fc9bb5865 100644 --- a/src/serialization/resources/accounting/types/AccountDetailsAndActions.ts +++ b/src/serialization/resources/accounting/types/AccountDetailsAndActions.ts @@ -29,7 +29,7 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< }); export declare namespace AccountDetailsAndActions { - interface Raw { + export interface Raw { id: string; category?: CategoryEnum.Raw | null; status: AccountDetailsAndActionsStatusEnum.Raw; diff --git a/src/serialization/resources/accounting/types/AccountDetailsAndActionsIntegration.ts b/src/serialization/resources/accounting/types/AccountDetailsAndActionsIntegration.ts index 77bd0093c..a2e5bda8a 100644 --- a/src/serialization/resources/accounting/types/AccountDetailsAndActionsIntegration.ts +++ b/src/serialization/resources/accounting/types/AccountDetailsAndActionsIntegration.ts @@ -21,12 +21,12 @@ 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(ModelOperation).optional() + core.serialization.list(ModelOperation).optional(), ), }); export declare namespace AccountDetailsAndActionsIntegration { - interface Raw { + export interface Raw { name: string; categories: CategoriesEnum.Raw[]; image?: string | null; diff --git a/src/serialization/resources/accounting/types/AccountDetailsAndActionsStatusEnum.ts b/src/serialization/resources/accounting/types/AccountDetailsAndActionsStatusEnum.ts index c1269683a..3b6736dea 100644 --- a/src/serialization/resources/accounting/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/serialization/resources/accounting/types/AccountDetailsAndActionsStatusEnum.ts @@ -12,5 +12,5 @@ export const AccountDetailsAndActionsStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["COMPLETE", "INCOMPLETE", "RELINK_NEEDED", "IDLE"]); export declare namespace AccountDetailsAndActionsStatusEnum { - type Raw = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; + export type Raw = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; } diff --git a/src/serialization/resources/accounting/types/AccountIntegration.ts b/src/serialization/resources/accounting/types/AccountIntegration.ts index 69e2c0731..d703215a2 100644 --- a/src/serialization/resources/accounting/types/AccountIntegration.ts +++ b/src/serialization/resources/accounting/types/AccountIntegration.ts @@ -20,20 +20,20 @@ export const AccountIntegration: core.serialization.ObjectSchema< slug: core.serialization.string().optional(), apiEndpointsToDocumentationUrls: core.serialization.property( "api_endpoints_to_documentation_urls", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), webhookSetupGuideUrl: core.serialization.property( "webhook_setup_guide_url", - core.serialization.string().optional() + core.serialization.string().optional(), ), categoryBetaStatus: core.serialization.property( "category_beta_status", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace AccountIntegration { - interface Raw { + export interface Raw { name: string; abbreviated_name?: string | null; categories?: CategoriesEnum.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/AccountRequest.ts b/src/serialization/resources/accounting/types/AccountRequest.ts index 4856b5924..5171fe1a8 100644 --- a/src/serialization/resources/accounting/types/AccountRequest.ts +++ b/src/serialization/resources/accounting/types/AccountRequest.ts @@ -27,16 +27,16 @@ export const AccountRequest: core.serialization.ObjectSchema< company: core.serialization.string().optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace AccountRequest { - interface Raw { + export interface Raw { name?: string | null; description?: string | null; classification?: AccountRequestClassification.Raw | null; diff --git a/src/serialization/resources/accounting/types/AccountRequestAccountType.ts b/src/serialization/resources/accounting/types/AccountRequestAccountType.ts index 9d2906c4f..e677d431b 100644 --- a/src/serialization/resources/accounting/types/AccountRequestAccountType.ts +++ b/src/serialization/resources/accounting/types/AccountRequestAccountType.ts @@ -13,5 +13,5 @@ export const AccountRequestAccountType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([AccountAccountTypeEnum, core.serialization.string()]); export declare namespace AccountRequestAccountType { - type Raw = AccountAccountTypeEnum.Raw | string; + export type Raw = AccountAccountTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountRequestClassification.ts b/src/serialization/resources/accounting/types/AccountRequestClassification.ts index 8fc903735..97859c26a 100644 --- a/src/serialization/resources/accounting/types/AccountRequestClassification.ts +++ b/src/serialization/resources/accounting/types/AccountRequestClassification.ts @@ -13,5 +13,5 @@ export const AccountRequestClassification: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([ClassificationEnum, core.serialization.string()]); export declare namespace AccountRequestClassification { - type Raw = ClassificationEnum.Raw | string; + export type Raw = ClassificationEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountRequestCurrency.ts b/src/serialization/resources/accounting/types/AccountRequestCurrency.ts index 4d3fce53a..e5614ed65 100644 --- a/src/serialization/resources/accounting/types/AccountRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/AccountRequestCurrency.ts @@ -13,5 +13,5 @@ export const AccountRequestCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace AccountRequestCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountRequestStatus.ts b/src/serialization/resources/accounting/types/AccountRequestStatus.ts index d953a5214..149e2da0e 100644 --- a/src/serialization/resources/accounting/types/AccountRequestStatus.ts +++ b/src/serialization/resources/accounting/types/AccountRequestStatus.ts @@ -13,5 +13,5 @@ export const AccountRequestStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([AccountStatusEnum, core.serialization.string()]); export declare namespace AccountRequestStatus { - type Raw = AccountStatusEnum.Raw | string; + export type Raw = AccountStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountResponse.ts b/src/serialization/resources/accounting/types/AccountResponse.ts index fae2b7b85..1c564a728 100644 --- a/src/serialization/resources/accounting/types/AccountResponse.ts +++ b/src/serialization/resources/accounting/types/AccountResponse.ts @@ -21,7 +21,7 @@ export const AccountResponse: core.serialization.ObjectSchema< }); export declare namespace AccountResponse { - interface Raw { + export interface Raw { model: Account.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/accounting/types/AccountStatus.ts b/src/serialization/resources/accounting/types/AccountStatus.ts index 914f3bea5..c565c375c 100644 --- a/src/serialization/resources/accounting/types/AccountStatus.ts +++ b/src/serialization/resources/accounting/types/AccountStatus.ts @@ -13,5 +13,5 @@ export const AccountStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([AccountStatusEnum, core.serialization.string()]); export declare namespace AccountStatus { - type Raw = AccountStatusEnum.Raw | string; + export type Raw = AccountStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountStatusEnum.ts b/src/serialization/resources/accounting/types/AccountStatusEnum.ts index 4a7c086d6..d1ecd3e43 100644 --- a/src/serialization/resources/accounting/types/AccountStatusEnum.ts +++ b/src/serialization/resources/accounting/types/AccountStatusEnum.ts @@ -12,5 +12,5 @@ export const AccountStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["ACTIVE", "PENDING", "INACTIVE"]); export declare namespace AccountStatusEnum { - type Raw = "ACTIVE" | "PENDING" | "INACTIVE"; + export type Raw = "ACTIVE" | "PENDING" | "INACTIVE"; } diff --git a/src/serialization/resources/accounting/types/AccountToken.ts b/src/serialization/resources/accounting/types/AccountToken.ts index 30c0b3278..ac48a8039 100644 --- a/src/serialization/resources/accounting/types/AccountToken.ts +++ b/src/serialization/resources/accounting/types/AccountToken.ts @@ -17,7 +17,7 @@ export const AccountToken: core.serialization.ObjectSchema< }); export declare namespace AccountToken { - interface Raw { + export interface Raw { account_token: string; integration: AccountIntegration.Raw; id: string; diff --git a/src/serialization/resources/accounting/types/AccountingAttachment.ts b/src/serialization/resources/accounting/types/AccountingAttachment.ts index 2b9acdcf3..263b1fefa 100644 --- a/src/serialization/resources/accounting/types/AccountingAttachment.ts +++ b/src/serialization/resources/accounting/types/AccountingAttachment.ts @@ -21,13 +21,13 @@ export const AccountingAttachment: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace AccountingAttachment { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/AccountingAttachmentRequest.ts b/src/serialization/resources/accounting/types/AccountingAttachmentRequest.ts index 9bb4e26f0..67bfa1f0b 100644 --- a/src/serialization/resources/accounting/types/AccountingAttachmentRequest.ts +++ b/src/serialization/resources/accounting/types/AccountingAttachmentRequest.ts @@ -15,16 +15,16 @@ export const AccountingAttachmentRequest: core.serialization.ObjectSchema< company: core.serialization.string().optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace AccountingAttachmentRequest { - interface Raw { + export interface Raw { file_name?: string | null; file_url?: string | null; company?: string | null; diff --git a/src/serialization/resources/accounting/types/AccountingAttachmentResponse.ts b/src/serialization/resources/accounting/types/AccountingAttachmentResponse.ts index e198f2908..29d01edf6 100644 --- a/src/serialization/resources/accounting/types/AccountingAttachmentResponse.ts +++ b/src/serialization/resources/accounting/types/AccountingAttachmentResponse.ts @@ -21,7 +21,7 @@ export const AccountingAttachmentResponse: core.serialization.ObjectSchema< }); export declare namespace AccountingAttachmentResponse { - interface Raw { + export interface Raw { model: AccountingAttachment.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/accounting/types/AccountingPeriod.ts b/src/serialization/resources/accounting/types/AccountingPeriod.ts index 2957b4d88..551bd829f 100644 --- a/src/serialization/resources/accounting/types/AccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/AccountingPeriod.ts @@ -22,13 +22,13 @@ export const AccountingPeriod: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace AccountingPeriod { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/AccountingPeriodStatus.ts b/src/serialization/resources/accounting/types/AccountingPeriodStatus.ts index aa534fd76..a9e737ead 100644 --- a/src/serialization/resources/accounting/types/AccountingPeriodStatus.ts +++ b/src/serialization/resources/accounting/types/AccountingPeriodStatus.ts @@ -13,5 +13,5 @@ export const AccountingPeriodStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([Status895Enum, core.serialization.string()]); export declare namespace AccountingPeriodStatus { - type Raw = Status895Enum.Raw | string; + export type Raw = Status895Enum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AccountingPhoneNumber.ts b/src/serialization/resources/accounting/types/AccountingPhoneNumber.ts index 61eb991ca..4773683d3 100644 --- a/src/serialization/resources/accounting/types/AccountingPhoneNumber.ts +++ b/src/serialization/resources/accounting/types/AccountingPhoneNumber.ts @@ -17,7 +17,7 @@ export const AccountingPhoneNumber: core.serialization.ObjectSchema< }); export declare namespace AccountingPhoneNumber { - interface Raw { + export interface Raw { created_at?: string | null; modified_at?: string | null; number?: string | null; diff --git a/src/serialization/resources/accounting/types/AccountingPhoneNumberRequest.ts b/src/serialization/resources/accounting/types/AccountingPhoneNumberRequest.ts index 39d07967d..9aee99c5b 100644 --- a/src/serialization/resources/accounting/types/AccountingPhoneNumberRequest.ts +++ b/src/serialization/resources/accounting/types/AccountingPhoneNumberRequest.ts @@ -14,16 +14,16 @@ export const AccountingPhoneNumberRequest: core.serialization.ObjectSchema< type: core.serialization.string().optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace AccountingPhoneNumberRequest { - interface Raw { + export interface Raw { number?: string | null; type?: string | null; integration_params?: Record | null; diff --git a/src/serialization/resources/accounting/types/Address.ts b/src/serialization/resources/accounting/types/Address.ts index fceb5e681..0b08a6e20 100644 --- a/src/serialization/resources/accounting/types/Address.ts +++ b/src/serialization/resources/accounting/types/Address.ts @@ -23,7 +23,7 @@ export const Address: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([CountryEnum, core.serialization.string()]); export declare namespace AddressCountry { - type Raw = CountryEnum.Raw | string; + export type Raw = CountryEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AddressRequest.ts b/src/serialization/resources/accounting/types/AddressRequest.ts index bbaf22ea3..e990e88b1 100644 --- a/src/serialization/resources/accounting/types/AddressRequest.ts +++ b/src/serialization/resources/accounting/types/AddressRequest.ts @@ -21,16 +21,16 @@ export const AddressRequest: core.serialization.ObjectSchema< zipCode: core.serialization.property("zip_code", core.serialization.string().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace AddressRequest { - interface Raw { + export interface Raw { type?: AddressRequestType.Raw | null; street_1?: string | null; street_2?: string | null; diff --git a/src/serialization/resources/accounting/types/AddressRequestCountry.ts b/src/serialization/resources/accounting/types/AddressRequestCountry.ts index 613db71ef..b67e9c69f 100644 --- a/src/serialization/resources/accounting/types/AddressRequestCountry.ts +++ b/src/serialization/resources/accounting/types/AddressRequestCountry.ts @@ -13,5 +13,5 @@ export const AddressRequestCountry: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([CountryEnum, core.serialization.string()]); export declare namespace AddressRequestCountry { - type Raw = CountryEnum.Raw | string; + export type Raw = CountryEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AddressRequestType.ts b/src/serialization/resources/accounting/types/AddressRequestType.ts index 0a65d3ddf..46860a074 100644 --- a/src/serialization/resources/accounting/types/AddressRequestType.ts +++ b/src/serialization/resources/accounting/types/AddressRequestType.ts @@ -13,5 +13,5 @@ export const AddressRequestType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([AddressTypeEnum, core.serialization.string()]); export declare namespace AddressRequestType { - type Raw = AddressTypeEnum.Raw | string; + export type Raw = AddressTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AddressType.ts b/src/serialization/resources/accounting/types/AddressType.ts index 310238c1b..e9b48d789 100644 --- a/src/serialization/resources/accounting/types/AddressType.ts +++ b/src/serialization/resources/accounting/types/AddressType.ts @@ -13,5 +13,5 @@ export const AddressType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([AddressTypeEnum, core.serialization.string()]); export declare namespace AddressType { - type Raw = AddressTypeEnum.Raw | string; + export type Raw = AddressTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AddressTypeEnum.ts b/src/serialization/resources/accounting/types/AddressTypeEnum.ts index 8d7036ca7..8fe1fa3e2 100644 --- a/src/serialization/resources/accounting/types/AddressTypeEnum.ts +++ b/src/serialization/resources/accounting/types/AddressTypeEnum.ts @@ -12,5 +12,5 @@ export const AddressTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["BILLING", "SHIPPING"]); export declare namespace AddressTypeEnum { - type Raw = "BILLING" | "SHIPPING"; + export type Raw = "BILLING" | "SHIPPING"; } diff --git a/src/serialization/resources/accounting/types/AdvancedMetadata.ts b/src/serialization/resources/accounting/types/AdvancedMetadata.ts index be27e928e..afb8198c2 100644 --- a/src/serialization/resources/accounting/types/AdvancedMetadata.ts +++ b/src/serialization/resources/accounting/types/AdvancedMetadata.ts @@ -17,12 +17,12 @@ export const AdvancedMetadata: core.serialization.ObjectSchema< isCustom: core.serialization.property("is_custom", core.serialization.boolean().optional()), fieldChoices: core.serialization.property( "field_choices", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace AdvancedMetadata { - interface Raw { + export interface Raw { id: string; display_name?: string | null; description?: string | null; diff --git a/src/serialization/resources/accounting/types/AsyncPassthroughReciept.ts b/src/serialization/resources/accounting/types/AsyncPassthroughReciept.ts index 7c26d0b44..43f9cda40 100644 --- a/src/serialization/resources/accounting/types/AsyncPassthroughReciept.ts +++ b/src/serialization/resources/accounting/types/AsyncPassthroughReciept.ts @@ -14,7 +14,7 @@ export const AsyncPassthroughReciept: core.serialization.ObjectSchema< }); export declare namespace AsyncPassthroughReciept { - interface Raw { + export interface Raw { async_passthrough_receipt_id: string; } } diff --git a/src/serialization/resources/accounting/types/AsyncPostTask.ts b/src/serialization/resources/accounting/types/AsyncPostTask.ts index 157ccc6ef..9c61801ce 100644 --- a/src/serialization/resources/accounting/types/AsyncPostTask.ts +++ b/src/serialization/resources/accounting/types/AsyncPostTask.ts @@ -17,7 +17,7 @@ export const AsyncPostTask: core.serialization.ObjectSchema< }); export declare namespace AsyncPostTask { - interface Raw { + export interface Raw { status: AsyncPostTaskStatus.Raw; result: AsyncPostTaskResult.Raw; } diff --git a/src/serialization/resources/accounting/types/AsyncPostTaskResult.ts b/src/serialization/resources/accounting/types/AsyncPostTaskResult.ts index cea28d1bc..09afad967 100644 --- a/src/serialization/resources/accounting/types/AsyncPostTaskResult.ts +++ b/src/serialization/resources/accounting/types/AsyncPostTaskResult.ts @@ -15,7 +15,7 @@ export const AsyncPostTaskResult: core.serialization.ObjectSchema< }); export declare namespace AsyncPostTaskResult { - interface Raw { + export interface Raw { status_code?: number | null; response?: Record | null; } diff --git a/src/serialization/resources/accounting/types/AsyncPostTaskStatus.ts b/src/serialization/resources/accounting/types/AsyncPostTaskStatus.ts index 68576a331..ffb28a639 100644 --- a/src/serialization/resources/accounting/types/AsyncPostTaskStatus.ts +++ b/src/serialization/resources/accounting/types/AsyncPostTaskStatus.ts @@ -13,5 +13,5 @@ export const AsyncPostTaskStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([AsyncPostTaskStatusEnum, core.serialization.string()]); export declare namespace AsyncPostTaskStatus { - type Raw = AsyncPostTaskStatusEnum.Raw | string; + export type Raw = AsyncPostTaskStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AsyncPostTaskStatusEnum.ts b/src/serialization/resources/accounting/types/AsyncPostTaskStatusEnum.ts index 3d1a1f8f2..44e7f8f86 100644 --- a/src/serialization/resources/accounting/types/AsyncPostTaskStatusEnum.ts +++ b/src/serialization/resources/accounting/types/AsyncPostTaskStatusEnum.ts @@ -12,5 +12,5 @@ export const AsyncPostTaskStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["QUEUED", "IN_PROGRESS", "COMPLETED", "FAILURE"]); export declare namespace AsyncPostTaskStatusEnum { - type Raw = "QUEUED" | "IN_PROGRESS" | "COMPLETED" | "FAILURE"; + export type Raw = "QUEUED" | "IN_PROGRESS" | "COMPLETED" | "FAILURE"; } diff --git a/src/serialization/resources/accounting/types/AuditLogEvent.ts b/src/serialization/resources/accounting/types/AuditLogEvent.ts index cfdfe9df2..73b8299f3 100644 --- a/src/serialization/resources/accounting/types/AuditLogEvent.ts +++ b/src/serialization/resources/accounting/types/AuditLogEvent.ts @@ -23,7 +23,7 @@ export const AuditLogEvent: core.serialization.ObjectSchema< }); export declare namespace AuditLogEvent { - interface Raw { + export interface Raw { id?: string | null; user_name?: string | null; user_email?: string | null; diff --git a/src/serialization/resources/accounting/types/AuditLogEventEventType.ts b/src/serialization/resources/accounting/types/AuditLogEventEventType.ts index 25e465348..c9c561a7f 100644 --- a/src/serialization/resources/accounting/types/AuditLogEventEventType.ts +++ b/src/serialization/resources/accounting/types/AuditLogEventEventType.ts @@ -13,5 +13,5 @@ export const AuditLogEventEventType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([EventTypeEnum, core.serialization.string()]); export declare namespace AuditLogEventEventType { - type Raw = EventTypeEnum.Raw | string; + export type Raw = EventTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AuditLogEventRole.ts b/src/serialization/resources/accounting/types/AuditLogEventRole.ts index 43fa5dc91..333b63bea 100644 --- a/src/serialization/resources/accounting/types/AuditLogEventRole.ts +++ b/src/serialization/resources/accounting/types/AuditLogEventRole.ts @@ -13,5 +13,5 @@ export const AuditLogEventRole: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([RoleEnum, core.serialization.string()]); export declare namespace AuditLogEventRole { - type Raw = RoleEnum.Raw | string; + export type Raw = RoleEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/AvailableActions.ts b/src/serialization/resources/accounting/types/AvailableActions.ts index 12f6e3e88..fc1b6fd22 100644 --- a/src/serialization/resources/accounting/types/AvailableActions.ts +++ b/src/serialization/resources/accounting/types/AvailableActions.ts @@ -16,12 +16,12 @@ export const AvailableActions: core.serialization.ObjectSchema< passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization.list(ModelOperation).optional() + core.serialization.list(ModelOperation).optional(), ), }); export declare namespace AvailableActions { - interface Raw { + export interface Raw { integration: AccountIntegration.Raw; passthrough_available: boolean; 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 c9fc74314..63ac6be50 100644 --- a/src/serialization/resources/accounting/types/BalanceSheet.ts +++ b/src/serialization/resources/accounting/types/BalanceSheet.ts @@ -30,13 +30,13 @@ export const BalanceSheet: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace BalanceSheet { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/BalanceSheetCompany.ts b/src/serialization/resources/accounting/types/BalanceSheetCompany.ts index 3395e6b26..47d409cb1 100644 --- a/src/serialization/resources/accounting/types/BalanceSheetCompany.ts +++ b/src/serialization/resources/accounting/types/BalanceSheetCompany.ts @@ -13,5 +13,5 @@ export const BalanceSheetCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace BalanceSheetCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/BalanceSheetCurrency.ts b/src/serialization/resources/accounting/types/BalanceSheetCurrency.ts index 445caf92d..fba146558 100644 --- a/src/serialization/resources/accounting/types/BalanceSheetCurrency.ts +++ b/src/serialization/resources/accounting/types/BalanceSheetCurrency.ts @@ -13,5 +13,5 @@ export const BalanceSheetCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace BalanceSheetCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/BankFeedAccount.ts b/src/serialization/resources/accounting/types/BankFeedAccount.ts index 7f7ee9826..62303ce60 100644 --- a/src/serialization/resources/accounting/types/BankFeedAccount.ts +++ b/src/serialization/resources/accounting/types/BankFeedAccount.ts @@ -30,18 +30,18 @@ export const BankFeedAccount: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property( "remote_data", core.serialization .list(core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional()) - .optional() + .optional(), ), }); export declare namespace BankFeedAccount { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/BankFeedAccountAccountType.ts b/src/serialization/resources/accounting/types/BankFeedAccountAccountType.ts index 979c12013..e32497639 100644 --- a/src/serialization/resources/accounting/types/BankFeedAccountAccountType.ts +++ b/src/serialization/resources/accounting/types/BankFeedAccountAccountType.ts @@ -13,5 +13,5 @@ export const BankFeedAccountAccountType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([BankFeedAccountAccountTypeEnum, core.serialization.string()]); export declare namespace BankFeedAccountAccountType { - type Raw = BankFeedAccountAccountTypeEnum.Raw | string; + export type Raw = BankFeedAccountAccountTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/BankFeedAccountAccountTypeEnum.ts b/src/serialization/resources/accounting/types/BankFeedAccountAccountTypeEnum.ts index 3994be431..feb40bcb1 100644 --- a/src/serialization/resources/accounting/types/BankFeedAccountAccountTypeEnum.ts +++ b/src/serialization/resources/accounting/types/BankFeedAccountAccountTypeEnum.ts @@ -12,5 +12,5 @@ export const BankFeedAccountAccountTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["BANK", "CREDIT_CARD"]); export declare namespace BankFeedAccountAccountTypeEnum { - type Raw = "BANK" | "CREDIT_CARD"; + export type Raw = "BANK" | "CREDIT_CARD"; } diff --git a/src/serialization/resources/accounting/types/BankFeedAccountCurrency.ts b/src/serialization/resources/accounting/types/BankFeedAccountCurrency.ts index 26aa4c5db..01d0588f4 100644 --- a/src/serialization/resources/accounting/types/BankFeedAccountCurrency.ts +++ b/src/serialization/resources/accounting/types/BankFeedAccountCurrency.ts @@ -13,5 +13,5 @@ export const BankFeedAccountCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace BankFeedAccountCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/BankFeedAccountFeedStatus.ts b/src/serialization/resources/accounting/types/BankFeedAccountFeedStatus.ts index d0e3c13a4..4ca9b0ac4 100644 --- a/src/serialization/resources/accounting/types/BankFeedAccountFeedStatus.ts +++ b/src/serialization/resources/accounting/types/BankFeedAccountFeedStatus.ts @@ -13,5 +13,5 @@ export const BankFeedAccountFeedStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([FeedStatusEnum, core.serialization.string()]); export declare namespace BankFeedAccountFeedStatus { - type Raw = FeedStatusEnum.Raw | string; + export type Raw = FeedStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/BankFeedAccountRequest.ts b/src/serialization/resources/accounting/types/BankFeedAccountRequest.ts index 208108126..247e14a35 100644 --- a/src/serialization/resources/accounting/types/BankFeedAccountRequest.ts +++ b/src/serialization/resources/accounting/types/BankFeedAccountRequest.ts @@ -25,16 +25,16 @@ export const BankFeedAccountRequest: core.serialization.ObjectSchema< accountType: core.serialization.property("account_type", BankFeedAccountRequestAccountType.optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace BankFeedAccountRequest { - interface Raw { + export interface Raw { source_account_id?: string | null; target_account_id?: string | null; source_account_name?: string | null; diff --git a/src/serialization/resources/accounting/types/BankFeedAccountRequestAccountType.ts b/src/serialization/resources/accounting/types/BankFeedAccountRequestAccountType.ts index 022aacaf8..56814b427 100644 --- a/src/serialization/resources/accounting/types/BankFeedAccountRequestAccountType.ts +++ b/src/serialization/resources/accounting/types/BankFeedAccountRequestAccountType.ts @@ -13,5 +13,5 @@ export const BankFeedAccountRequestAccountType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([BankFeedAccountAccountTypeEnum, core.serialization.string()]); export declare namespace BankFeedAccountRequestAccountType { - type Raw = BankFeedAccountAccountTypeEnum.Raw | string; + export type Raw = BankFeedAccountAccountTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/BankFeedAccountRequestCurrency.ts b/src/serialization/resources/accounting/types/BankFeedAccountRequestCurrency.ts index abd6faeea..cbe60f62f 100644 --- a/src/serialization/resources/accounting/types/BankFeedAccountRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/BankFeedAccountRequestCurrency.ts @@ -13,5 +13,5 @@ export const BankFeedAccountRequestCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace BankFeedAccountRequestCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/BankFeedAccountRequestFeedStatus.ts b/src/serialization/resources/accounting/types/BankFeedAccountRequestFeedStatus.ts index 208d546c5..e33f7615e 100644 --- a/src/serialization/resources/accounting/types/BankFeedAccountRequestFeedStatus.ts +++ b/src/serialization/resources/accounting/types/BankFeedAccountRequestFeedStatus.ts @@ -13,5 +13,5 @@ export const BankFeedAccountRequestFeedStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([FeedStatusEnum, core.serialization.string()]); export declare namespace BankFeedAccountRequestFeedStatus { - type Raw = FeedStatusEnum.Raw | string; + export type Raw = FeedStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/BankFeedAccountResponse.ts b/src/serialization/resources/accounting/types/BankFeedAccountResponse.ts index 882e7eca2..5315d7533 100644 --- a/src/serialization/resources/accounting/types/BankFeedAccountResponse.ts +++ b/src/serialization/resources/accounting/types/BankFeedAccountResponse.ts @@ -21,7 +21,7 @@ export const BankFeedAccountResponse: core.serialization.ObjectSchema< }); export declare namespace BankFeedAccountResponse { - interface Raw { + export interface Raw { model: BankFeedAccount.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/accounting/types/BankFeedTransaction.ts b/src/serialization/resources/accounting/types/BankFeedTransaction.ts index dcca9f8d6..61b4b69e9 100644 --- a/src/serialization/resources/accounting/types/BankFeedTransaction.ts +++ b/src/serialization/resources/accounting/types/BankFeedTransaction.ts @@ -30,7 +30,7 @@ export const BankFeedTransaction: core.serialization.ObjectSchema< }); export declare namespace BankFeedTransaction { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/BankFeedTransactionBankFeedAccount.ts b/src/serialization/resources/accounting/types/BankFeedTransactionBankFeedAccount.ts index 4691780da..69c4d748a 100644 --- a/src/serialization/resources/accounting/types/BankFeedTransactionBankFeedAccount.ts +++ b/src/serialization/resources/accounting/types/BankFeedTransactionBankFeedAccount.ts @@ -13,5 +13,5 @@ export const BankFeedTransactionBankFeedAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), BankFeedAccount]); export declare namespace BankFeedTransactionBankFeedAccount { - type Raw = string | BankFeedAccount.Raw; + export type Raw = string | BankFeedAccount.Raw; } diff --git a/src/serialization/resources/accounting/types/BankFeedTransactionCreditOrDebit.ts b/src/serialization/resources/accounting/types/BankFeedTransactionCreditOrDebit.ts index 557277e71..dc417b8f3 100644 --- a/src/serialization/resources/accounting/types/BankFeedTransactionCreditOrDebit.ts +++ b/src/serialization/resources/accounting/types/BankFeedTransactionCreditOrDebit.ts @@ -13,5 +13,5 @@ export const BankFeedTransactionCreditOrDebit: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([CreditOrDebitEnum, core.serialization.string()]); export declare namespace BankFeedTransactionCreditOrDebit { - type Raw = CreditOrDebitEnum.Raw | string; + export type Raw = CreditOrDebitEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/BankFeedTransactionRequestRequest.ts b/src/serialization/resources/accounting/types/BankFeedTransactionRequestRequest.ts index 031478208..0a3254880 100644 --- a/src/serialization/resources/accounting/types/BankFeedTransactionRequestRequest.ts +++ b/src/serialization/resources/accounting/types/BankFeedTransactionRequestRequest.ts @@ -14,7 +14,7 @@ export const BankFeedTransactionRequestRequest: core.serialization.ObjectSchema< > = core.serialization.object({ bankFeedAccount: core.serialization.property( "bank_feed_account", - BankFeedTransactionRequestRequestBankFeedAccount.optional() + BankFeedTransactionRequestRequestBankFeedAccount.optional(), ), transactionDate: core.serialization.property("transaction_date", core.serialization.date().optional()), postedDate: core.serialization.property("posted_date", core.serialization.date().optional()), @@ -24,21 +24,21 @@ export const BankFeedTransactionRequestRequest: core.serialization.ObjectSchema< payee: core.serialization.string().optional(), creditOrDebit: core.serialization.property( "credit_or_debit", - BankFeedTransactionRequestRequestCreditOrDebit.optional() + BankFeedTransactionRequestRequestCreditOrDebit.optional(), ), sourceTransactionId: core.serialization.property("source_transaction_id", core.serialization.string().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace BankFeedTransactionRequestRequest { - interface Raw { + export interface Raw { bank_feed_account?: BankFeedTransactionRequestRequestBankFeedAccount.Raw | null; transaction_date?: string | null; posted_date?: string | null; diff --git a/src/serialization/resources/accounting/types/BankFeedTransactionRequestRequestBankFeedAccount.ts b/src/serialization/resources/accounting/types/BankFeedTransactionRequestRequestBankFeedAccount.ts index 5be4affac..7ba416ac5 100644 --- a/src/serialization/resources/accounting/types/BankFeedTransactionRequestRequestBankFeedAccount.ts +++ b/src/serialization/resources/accounting/types/BankFeedTransactionRequestRequestBankFeedAccount.ts @@ -13,5 +13,5 @@ export const BankFeedTransactionRequestRequestBankFeedAccount: core.serializatio > = core.serialization.undiscriminatedUnion([core.serialization.string(), BankFeedAccount]); export declare namespace BankFeedTransactionRequestRequestBankFeedAccount { - type Raw = string | BankFeedAccount.Raw; + export type Raw = string | BankFeedAccount.Raw; } diff --git a/src/serialization/resources/accounting/types/BankFeedTransactionRequestRequestCreditOrDebit.ts b/src/serialization/resources/accounting/types/BankFeedTransactionRequestRequestCreditOrDebit.ts index dfd4f52ef..a28488e20 100644 --- a/src/serialization/resources/accounting/types/BankFeedTransactionRequestRequestCreditOrDebit.ts +++ b/src/serialization/resources/accounting/types/BankFeedTransactionRequestRequestCreditOrDebit.ts @@ -13,5 +13,5 @@ export const BankFeedTransactionRequestRequestCreditOrDebit: core.serialization. > = core.serialization.undiscriminatedUnion([CreditOrDebitEnum, core.serialization.string()]); export declare namespace BankFeedTransactionRequestRequestCreditOrDebit { - type Raw = CreditOrDebitEnum.Raw | string; + export type Raw = CreditOrDebitEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/BankFeedTransactionResponse.ts b/src/serialization/resources/accounting/types/BankFeedTransactionResponse.ts index 81523fa06..1823822be 100644 --- a/src/serialization/resources/accounting/types/BankFeedTransactionResponse.ts +++ b/src/serialization/resources/accounting/types/BankFeedTransactionResponse.ts @@ -21,7 +21,7 @@ export const BankFeedTransactionResponse: core.serialization.ObjectSchema< }); export declare namespace BankFeedTransactionResponse { - interface Raw { + export interface Raw { model: BankFeedTransaction.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/accounting/types/CashFlowStatement.ts b/src/serialization/resources/accounting/types/CashFlowStatement.ts index 5444def50..7382a5f6b 100644 --- a/src/serialization/resources/accounting/types/CashFlowStatement.ts +++ b/src/serialization/resources/accounting/types/CashFlowStatement.ts @@ -25,32 +25,32 @@ export const CashFlowStatement: core.serialization.ObjectSchema< endPeriod: core.serialization.property("end_period", core.serialization.date().optional()), cashAtBeginningOfPeriod: core.serialization.property( "cash_at_beginning_of_period", - core.serialization.number().optional() + core.serialization.number().optional(), ), cashAtEndOfPeriod: core.serialization.property("cash_at_end_of_period", core.serialization.number().optional()), operatingActivities: core.serialization.property( "operating_activities", - core.serialization.list(ReportItem).optional() + core.serialization.list(ReportItem).optional(), ), investingActivities: core.serialization.property( "investing_activities", - core.serialization.list(ReportItem).optional() + core.serialization.list(ReportItem).optional(), ), financingActivities: core.serialization.property( "financing_activities", - core.serialization.list(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()), fieldMappings: core.serialization.property( "field_mappings", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace CashFlowStatement { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/CashFlowStatementCompany.ts b/src/serialization/resources/accounting/types/CashFlowStatementCompany.ts index 99daebd0d..3e8f8363d 100644 --- a/src/serialization/resources/accounting/types/CashFlowStatementCompany.ts +++ b/src/serialization/resources/accounting/types/CashFlowStatementCompany.ts @@ -13,5 +13,5 @@ export const CashFlowStatementCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace CashFlowStatementCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/CashFlowStatementCurrency.ts b/src/serialization/resources/accounting/types/CashFlowStatementCurrency.ts index e0e715c41..ede4f5de0 100644 --- a/src/serialization/resources/accounting/types/CashFlowStatementCurrency.ts +++ b/src/serialization/resources/accounting/types/CashFlowStatementCurrency.ts @@ -13,5 +13,5 @@ export const CashFlowStatementCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace CashFlowStatementCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/CategoriesEnum.ts b/src/serialization/resources/accounting/types/CategoriesEnum.ts index d38acde3a..26f4f88d7 100644 --- a/src/serialization/resources/accounting/types/CategoriesEnum.ts +++ b/src/serialization/resources/accounting/types/CategoriesEnum.ts @@ -12,5 +12,5 @@ export const CategoriesEnum: core.serialization.Schema< > = core.serialization.enum_(["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"]); export declare namespace CategoriesEnum { - type Raw = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; + export type Raw = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; } diff --git a/src/serialization/resources/accounting/types/CategoryEnum.ts b/src/serialization/resources/accounting/types/CategoryEnum.ts index 0ebf9bb6e..e6bdd3115 100644 --- a/src/serialization/resources/accounting/types/CategoryEnum.ts +++ b/src/serialization/resources/accounting/types/CategoryEnum.ts @@ -12,5 +12,5 @@ export const CategoryEnum: core.serialization.Schema< > = core.serialization.enum_(["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"]); export declare namespace CategoryEnum { - type Raw = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; + export type Raw = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; } diff --git a/src/serialization/resources/accounting/types/CategoryTypeEnum.ts b/src/serialization/resources/accounting/types/CategoryTypeEnum.ts index 6de48ac77..a0d25df1b 100644 --- a/src/serialization/resources/accounting/types/CategoryTypeEnum.ts +++ b/src/serialization/resources/accounting/types/CategoryTypeEnum.ts @@ -12,5 +12,5 @@ export const CategoryTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["CLASS", "DEPARTMENT"]); export declare namespace CategoryTypeEnum { - type Raw = "CLASS" | "DEPARTMENT"; + export type Raw = "CLASS" | "DEPARTMENT"; } diff --git a/src/serialization/resources/accounting/types/ClassificationEnum.ts b/src/serialization/resources/accounting/types/ClassificationEnum.ts index 1cbe4f21c..a0039230a 100644 --- a/src/serialization/resources/accounting/types/ClassificationEnum.ts +++ b/src/serialization/resources/accounting/types/ClassificationEnum.ts @@ -12,5 +12,5 @@ export const ClassificationEnum: core.serialization.Schema< > = core.serialization.enum_(["ASSET", "EQUITY", "EXPENSE", "LIABILITY", "REVENUE"]); export declare namespace ClassificationEnum { - type Raw = "ASSET" | "EQUITY" | "EXPENSE" | "LIABILITY" | "REVENUE"; + export type Raw = "ASSET" | "EQUITY" | "EXPENSE" | "LIABILITY" | "REVENUE"; } diff --git a/src/serialization/resources/accounting/types/CommonModelScopeApi.ts b/src/serialization/resources/accounting/types/CommonModelScopeApi.ts index 22beb1383..45107b500 100644 --- a/src/serialization/resources/accounting/types/CommonModelScopeApi.ts +++ b/src/serialization/resources/accounting/types/CommonModelScopeApi.ts @@ -13,12 +13,12 @@ export const CommonModelScopeApi: core.serialization.ObjectSchema< > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list(IndividualCommonModelScopeDeserializer) + core.serialization.list(IndividualCommonModelScopeDeserializer), ), }); export declare namespace CommonModelScopeApi { - interface Raw { + export interface Raw { common_models: IndividualCommonModelScopeDeserializer.Raw[]; } } diff --git a/src/serialization/resources/accounting/types/CommonModelScopesBodyRequest.ts b/src/serialization/resources/accounting/types/CommonModelScopesBodyRequest.ts index 59b43bc41..472be8e47 100644 --- a/src/serialization/resources/accounting/types/CommonModelScopesBodyRequest.ts +++ b/src/serialization/resources/accounting/types/CommonModelScopesBodyRequest.ts @@ -15,12 +15,12 @@ export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< enabledActions: core.serialization.property("enabled_actions", core.serialization.list(EnabledActionsEnum)), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.string()) + core.serialization.list(core.serialization.string()), ), }); export declare namespace CommonModelScopesBodyRequest { - interface Raw { + export interface Raw { model_id: string; 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 ed9b7ad76..781f4a49b 100644 --- a/src/serialization/resources/accounting/types/CompanyInfo.ts +++ b/src/serialization/resources/accounting/types/CompanyInfo.ts @@ -29,18 +29,18 @@ export const CompanyInfo: core.serialization.ObjectSchema< addresses: core.serialization.list(Address).optional(), phoneNumbers: core.serialization.property( "phone_numbers", - core.serialization.list(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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace CompanyInfo { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/CompanyInfoCurrency.ts b/src/serialization/resources/accounting/types/CompanyInfoCurrency.ts index d3d778f67..84f2a5f0b 100644 --- a/src/serialization/resources/accounting/types/CompanyInfoCurrency.ts +++ b/src/serialization/resources/accounting/types/CompanyInfoCurrency.ts @@ -13,5 +13,5 @@ export const CompanyInfoCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace CompanyInfoCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/ComponentTypeEnum.ts b/src/serialization/resources/accounting/types/ComponentTypeEnum.ts index f8607932f..ef3e7ccc9 100644 --- a/src/serialization/resources/accounting/types/ComponentTypeEnum.ts +++ b/src/serialization/resources/accounting/types/ComponentTypeEnum.ts @@ -12,5 +12,5 @@ export const ComponentTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["SALES", "PURCHASE"]); export declare namespace ComponentTypeEnum { - type Raw = "SALES" | "PURCHASE"; + export type Raw = "SALES" | "PURCHASE"; } diff --git a/src/serialization/resources/accounting/types/Contact.ts b/src/serialization/resources/accounting/types/Contact.ts index efc84d2bd..85fa9f96d 100644 --- a/src/serialization/resources/accounting/types/Contact.ts +++ b/src/serialization/resources/accounting/types/Contact.ts @@ -29,19 +29,19 @@ export const Contact: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Address]); export declare namespace ContactAddressesItem { - type Raw = string | Address.Raw; + export type Raw = string | Address.Raw; } diff --git a/src/serialization/resources/accounting/types/ContactRequest.ts b/src/serialization/resources/accounting/types/ContactRequest.ts index 5358d846c..90332626c 100644 --- a/src/serialization/resources/accounting/types/ContactRequest.ts +++ b/src/serialization/resources/accounting/types/ContactRequest.ts @@ -25,21 +25,21 @@ export const ContactRequest: core.serialization.ObjectSchema< addresses: core.serialization.list(ContactRequestAddressesItem.optional()).optional(), phoneNumbers: core.serialization.property( "phone_numbers", - core.serialization.list(AccountingPhoneNumberRequest).optional() + core.serialization.list(AccountingPhoneNumberRequest).optional(), ), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace ContactRequest { - interface Raw { + export interface Raw { name?: string | null; is_supplier?: boolean | null; is_customer?: boolean | null; diff --git a/src/serialization/resources/accounting/types/ContactRequestAddressesItem.ts b/src/serialization/resources/accounting/types/ContactRequestAddressesItem.ts index 75dfbe9ec..743e9ec53 100644 --- a/src/serialization/resources/accounting/types/ContactRequestAddressesItem.ts +++ b/src/serialization/resources/accounting/types/ContactRequestAddressesItem.ts @@ -13,5 +13,5 @@ export const ContactRequestAddressesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Address]); export declare namespace ContactRequestAddressesItem { - type Raw = string | Address.Raw; + export type Raw = string | Address.Raw; } diff --git a/src/serialization/resources/accounting/types/ContactRequestStatus.ts b/src/serialization/resources/accounting/types/ContactRequestStatus.ts index 7d8e2cc85..d261d3dc5 100644 --- a/src/serialization/resources/accounting/types/ContactRequestStatus.ts +++ b/src/serialization/resources/accounting/types/ContactRequestStatus.ts @@ -13,5 +13,5 @@ export const ContactRequestStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([Status7D1Enum, core.serialization.string()]); export declare namespace ContactRequestStatus { - type Raw = Status7D1Enum.Raw | string; + export type Raw = Status7D1Enum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/ContactResponse.ts b/src/serialization/resources/accounting/types/ContactResponse.ts index dbbc20710..65573b451 100644 --- a/src/serialization/resources/accounting/types/ContactResponse.ts +++ b/src/serialization/resources/accounting/types/ContactResponse.ts @@ -21,7 +21,7 @@ export const ContactResponse: core.serialization.ObjectSchema< }); export declare namespace ContactResponse { - interface Raw { + export interface Raw { model: Contact.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/accounting/types/ContactStatus.ts b/src/serialization/resources/accounting/types/ContactStatus.ts index 3c9d8c0a6..efe3a2cf3 100644 --- a/src/serialization/resources/accounting/types/ContactStatus.ts +++ b/src/serialization/resources/accounting/types/ContactStatus.ts @@ -13,5 +13,5 @@ export const ContactStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([Status7D1Enum, core.serialization.string()]); export declare namespace ContactStatus { - type Raw = Status7D1Enum.Raw | string; + export type Raw = Status7D1Enum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/CountryEnum.ts b/src/serialization/resources/accounting/types/CountryEnum.ts index 4dc5a0538..d041cd821 100644 --- a/src/serialization/resources/accounting/types/CountryEnum.ts +++ b/src/serialization/resources/accounting/types/CountryEnum.ts @@ -262,7 +262,7 @@ export const CountryEnum: core.serialization.Schema< ]); export declare namespace CountryEnum { - type Raw = + export type Raw = | "AF" | "AX" | "AL" diff --git a/src/serialization/resources/accounting/types/CreditNote.ts b/src/serialization/resources/accounting/types/CreditNote.ts index 3c1f05cb8..78fb90e8c 100644 --- a/src/serialization/resources/accounting/types/CreditNote.ts +++ b/src/serialization/resources/accounting/types/CreditNote.ts @@ -36,7 +36,7 @@ export const CreditNote: core.serialization.ObjectSchema< lineItems: core.serialization.property("line_items", core.serialization.list(CreditNoteLineItem).optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(CreditNoteTrackingCategoriesItem.optional()).optional() + core.serialization.list(CreditNoteTrackingCategoriesItem.optional()).optional(), ), currency: CreditNoteCurrency.optional(), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), @@ -44,25 +44,25 @@ export const CreditNote: core.serialization.ObjectSchema< payments: core.serialization.list(CreditNotePaymentsItem.optional()).optional(), appliedPayments: core.serialization.property( "applied_payments", - core.serialization.list(CreditNoteAppliedPaymentsItem.optional()).optional() + core.serialization.list(CreditNoteAppliedPaymentsItem.optional()).optional(), ), accountingPeriod: core.serialization.property("accounting_period", CreditNoteAccountingPeriod.optional()), appliedToLines: core.serialization.property( "applied_to_lines", core.serialization .list(core.serialization.lazyObject(() => serializers.accounting.CreditNoteApplyLineForCreditNote)) - .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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace CreditNote { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/CreditNoteAccountingPeriod.ts b/src/serialization/resources/accounting/types/CreditNoteAccountingPeriod.ts index 0b2eddee1..d7039505c 100644 --- a/src/serialization/resources/accounting/types/CreditNoteAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/CreditNoteAccountingPeriod.ts @@ -13,5 +13,5 @@ export const CreditNoteAccountingPeriod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace CreditNoteAccountingPeriod { - type Raw = string | AccountingPeriod.Raw; + export type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteAppliedPaymentsItem.ts b/src/serialization/resources/accounting/types/CreditNoteAppliedPaymentsItem.ts index 48704ae17..12e851dbc 100644 --- a/src/serialization/resources/accounting/types/CreditNoteAppliedPaymentsItem.ts +++ b/src/serialization/resources/accounting/types/CreditNoteAppliedPaymentsItem.ts @@ -13,5 +13,5 @@ export const CreditNoteAppliedPaymentsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentLineItem]); export declare namespace CreditNoteAppliedPaymentsItem { - type Raw = string | PaymentLineItem.Raw; + export type Raw = string | PaymentLineItem.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNote.ts b/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNote.ts index 8e5e5f290..546677546 100644 --- a/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNote.ts +++ b/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNote.ts @@ -20,7 +20,7 @@ export const CreditNoteApplyLineForCreditNote: core.serialization.ObjectSchema< }); export declare namespace CreditNoteApplyLineForCreditNote { - interface Raw { + export interface Raw { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; diff --git a/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNoteInvoice.ts b/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNoteInvoice.ts index 2c03b82e9..a86aea70e 100644 --- a/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNoteInvoice.ts +++ b/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNoteInvoice.ts @@ -15,5 +15,5 @@ export const CreditNoteApplyLineForCreditNoteInvoice: core.serialization.Schema< ]); export declare namespace CreditNoteApplyLineForCreditNoteInvoice { - type Raw = string | serializers.accounting.Invoice.Raw; + export type Raw = string | serializers.accounting.Invoice.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequest.ts b/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequest.ts index 23e199f80..63d9b62b5 100644 --- a/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequest.ts +++ b/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequest.ts @@ -17,16 +17,16 @@ export const CreditNoteApplyLineForCreditNoteRequest: core.serialization.ObjectS appliedAmount: core.serialization.property("applied_amount", core.serialization.string().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace CreditNoteApplyLineForCreditNoteRequest { - interface Raw { + export interface Raw { remote_id?: string | null; invoice?: CreditNoteApplyLineForCreditNoteRequestInvoice.Raw | null; applied_date?: string | null; diff --git a/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequestInvoice.ts b/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequestInvoice.ts index 9e2068d26..054801b9d 100644 --- a/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequestInvoice.ts +++ b/src/serialization/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequestInvoice.ts @@ -15,5 +15,5 @@ export const CreditNoteApplyLineForCreditNoteRequestInvoice: core.serialization. ]); export declare namespace CreditNoteApplyLineForCreditNoteRequestInvoice { - type Raw = string | serializers.accounting.Invoice.Raw; + export type Raw = string | serializers.accounting.Invoice.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteApplyLineForInvoice.ts b/src/serialization/resources/accounting/types/CreditNoteApplyLineForInvoice.ts index 0562a513c..cc346a287 100644 --- a/src/serialization/resources/accounting/types/CreditNoteApplyLineForInvoice.ts +++ b/src/serialization/resources/accounting/types/CreditNoteApplyLineForInvoice.ts @@ -15,7 +15,7 @@ export const CreditNoteApplyLineForInvoice: core.serialization.ObjectSchema< modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), creditNote: core.serialization.property( "credit_note", - core.serialization.lazy(() => serializers.accounting.CreditNoteApplyLineForInvoiceCreditNote).optional() + core.serialization.lazy(() => serializers.accounting.CreditNoteApplyLineForInvoiceCreditNote).optional(), ), appliedDate: core.serialization.property("applied_date", core.serialization.date().optional()), appliedAmount: core.serialization.property("applied_amount", core.serialization.string().optional()), @@ -23,7 +23,7 @@ export const CreditNoteApplyLineForInvoice: core.serialization.ObjectSchema< }); export declare namespace CreditNoteApplyLineForInvoice { - interface Raw { + export interface Raw { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; diff --git a/src/serialization/resources/accounting/types/CreditNoteApplyLineForInvoiceCreditNote.ts b/src/serialization/resources/accounting/types/CreditNoteApplyLineForInvoiceCreditNote.ts index da9337d56..5376b852c 100644 --- a/src/serialization/resources/accounting/types/CreditNoteApplyLineForInvoiceCreditNote.ts +++ b/src/serialization/resources/accounting/types/CreditNoteApplyLineForInvoiceCreditNote.ts @@ -15,5 +15,5 @@ export const CreditNoteApplyLineForInvoiceCreditNote: core.serialization.Schema< ]); export declare namespace CreditNoteApplyLineForInvoiceCreditNote { - type Raw = string | serializers.accounting.CreditNote.Raw; + export type Raw = string | serializers.accounting.CreditNote.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteCompany.ts b/src/serialization/resources/accounting/types/CreditNoteCompany.ts index 15c18e99e..00175e145 100644 --- a/src/serialization/resources/accounting/types/CreditNoteCompany.ts +++ b/src/serialization/resources/accounting/types/CreditNoteCompany.ts @@ -13,5 +13,5 @@ export const CreditNoteCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace CreditNoteCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteContact.ts b/src/serialization/resources/accounting/types/CreditNoteContact.ts index f566f2d14..2fc4daf27 100644 --- a/src/serialization/resources/accounting/types/CreditNoteContact.ts +++ b/src/serialization/resources/accounting/types/CreditNoteContact.ts @@ -13,5 +13,5 @@ export const CreditNoteContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace CreditNoteContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteCurrency.ts b/src/serialization/resources/accounting/types/CreditNoteCurrency.ts index 340783327..288b0ad58 100644 --- a/src/serialization/resources/accounting/types/CreditNoteCurrency.ts +++ b/src/serialization/resources/accounting/types/CreditNoteCurrency.ts @@ -13,5 +13,5 @@ export const CreditNoteCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace CreditNoteCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/CreditNoteLineItem.ts b/src/serialization/resources/accounting/types/CreditNoteLineItem.ts index 062a868ab..84d5e877b 100644 --- a/src/serialization/resources/accounting/types/CreditNoteLineItem.ts +++ b/src/serialization/resources/accounting/types/CreditNoteLineItem.ts @@ -27,7 +27,7 @@ export const CreditNoteLineItem: core.serialization.ObjectSchema< trackingCategory: core.serialization.property("tracking_category", core.serialization.string().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(core.serialization.string().optional()).optional() + core.serialization.list(core.serialization.string().optional()).optional(), ), account: core.serialization.string().optional(), company: CreditNoteLineItemCompany.optional(), @@ -35,7 +35,7 @@ export const CreditNoteLineItem: core.serialization.ObjectSchema< }); export declare namespace CreditNoteLineItem { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/CreditNoteLineItemCompany.ts b/src/serialization/resources/accounting/types/CreditNoteLineItemCompany.ts index 1b13e0370..dac7930c6 100644 --- a/src/serialization/resources/accounting/types/CreditNoteLineItemCompany.ts +++ b/src/serialization/resources/accounting/types/CreditNoteLineItemCompany.ts @@ -13,5 +13,5 @@ export const CreditNoteLineItemCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace CreditNoteLineItemCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteLineItemItem.ts b/src/serialization/resources/accounting/types/CreditNoteLineItemItem.ts index 96ecb5aae..53f940dbc 100644 --- a/src/serialization/resources/accounting/types/CreditNoteLineItemItem.ts +++ b/src/serialization/resources/accounting/types/CreditNoteLineItemItem.ts @@ -13,5 +13,5 @@ export const CreditNoteLineItemItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace CreditNoteLineItemItem { - type Raw = string | Item.Raw; + export type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteLineItemRequest.ts b/src/serialization/resources/accounting/types/CreditNoteLineItemRequest.ts index 4b2c42289..a265d85a8 100644 --- a/src/serialization/resources/accounting/types/CreditNoteLineItemRequest.ts +++ b/src/serialization/resources/accounting/types/CreditNoteLineItemRequest.ts @@ -24,22 +24,22 @@ export const CreditNoteLineItemRequest: core.serialization.ObjectSchema< trackingCategory: core.serialization.property("tracking_category", core.serialization.string().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(core.serialization.string().optional()).optional() + core.serialization.list(core.serialization.string().optional()).optional(), ), account: core.serialization.string().optional(), company: CreditNoteLineItemRequestCompany.optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace CreditNoteLineItemRequest { - interface Raw { + export interface Raw { remote_id?: string | null; item?: CreditNoteLineItemRequestItem.Raw | null; name?: string | null; diff --git a/src/serialization/resources/accounting/types/CreditNoteLineItemRequestCompany.ts b/src/serialization/resources/accounting/types/CreditNoteLineItemRequestCompany.ts index 29c9984fa..3b8bfc044 100644 --- a/src/serialization/resources/accounting/types/CreditNoteLineItemRequestCompany.ts +++ b/src/serialization/resources/accounting/types/CreditNoteLineItemRequestCompany.ts @@ -13,5 +13,5 @@ export const CreditNoteLineItemRequestCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace CreditNoteLineItemRequestCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteLineItemRequestItem.ts b/src/serialization/resources/accounting/types/CreditNoteLineItemRequestItem.ts index ad482e40f..95e9a9d8e 100644 --- a/src/serialization/resources/accounting/types/CreditNoteLineItemRequestItem.ts +++ b/src/serialization/resources/accounting/types/CreditNoteLineItemRequestItem.ts @@ -13,5 +13,5 @@ export const CreditNoteLineItemRequestItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace CreditNoteLineItemRequestItem { - type Raw = string | Item.Raw; + export type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNotePaymentsItem.ts b/src/serialization/resources/accounting/types/CreditNotePaymentsItem.ts index 8bc65c665..73e447973 100644 --- a/src/serialization/resources/accounting/types/CreditNotePaymentsItem.ts +++ b/src/serialization/resources/accounting/types/CreditNotePaymentsItem.ts @@ -13,5 +13,5 @@ export const CreditNotePaymentsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Payment]); export declare namespace CreditNotePaymentsItem { - type Raw = string | Payment.Raw; + export type Raw = string | Payment.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteRequest.ts b/src/serialization/resources/accounting/types/CreditNoteRequest.ts index ecf3d3e4e..cc279e594 100644 --- a/src/serialization/resources/accounting/types/CreditNoteRequest.ts +++ b/src/serialization/resources/accounting/types/CreditNoteRequest.ts @@ -31,35 +31,35 @@ export const CreditNoteRequest: core.serialization.ObjectSchema< inclusiveOfTax: core.serialization.property("inclusive_of_tax", core.serialization.boolean().optional()), lineItems: core.serialization.property( "line_items", - core.serialization.list(CreditNoteRequestLineItemsItem).optional() + core.serialization.list(CreditNoteRequestLineItemsItem).optional(), ), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(CreditNoteRequestTrackingCategoriesItem.optional()).optional() + core.serialization.list(CreditNoteRequestTrackingCategoriesItem.optional()).optional(), ), currency: CreditNoteRequestCurrency.optional(), payments: core.serialization.list(CreditNoteRequestPaymentsItem.optional()).optional(), appliedPayments: core.serialization.property( "applied_payments", - core.serialization.list(CreditNoteRequestAppliedPaymentsItem.optional()).optional() + core.serialization.list(CreditNoteRequestAppliedPaymentsItem.optional()).optional(), ), accountingPeriod: core.serialization.property("accounting_period", CreditNoteRequestAccountingPeriod.optional()), appliedToLines: core.serialization.property( "applied_to_lines", - core.serialization.list(CreditNoteApplyLineForCreditNoteRequest).optional() + core.serialization.list(CreditNoteApplyLineForCreditNoteRequest).optional(), ), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace CreditNoteRequest { - interface Raw { + export interface Raw { transaction_date?: string | null; status?: CreditNoteRequestStatus.Raw | null; number?: string | null; diff --git a/src/serialization/resources/accounting/types/CreditNoteRequestAccountingPeriod.ts b/src/serialization/resources/accounting/types/CreditNoteRequestAccountingPeriod.ts index 3b3792dd5..4cfadf188 100644 --- a/src/serialization/resources/accounting/types/CreditNoteRequestAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/CreditNoteRequestAccountingPeriod.ts @@ -13,5 +13,5 @@ export const CreditNoteRequestAccountingPeriod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace CreditNoteRequestAccountingPeriod { - type Raw = string | AccountingPeriod.Raw; + export type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteRequestAppliedPaymentsItem.ts b/src/serialization/resources/accounting/types/CreditNoteRequestAppliedPaymentsItem.ts index 3cec76171..5935bc35f 100644 --- a/src/serialization/resources/accounting/types/CreditNoteRequestAppliedPaymentsItem.ts +++ b/src/serialization/resources/accounting/types/CreditNoteRequestAppliedPaymentsItem.ts @@ -13,5 +13,5 @@ export const CreditNoteRequestAppliedPaymentsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentLineItem]); export declare namespace CreditNoteRequestAppliedPaymentsItem { - type Raw = string | PaymentLineItem.Raw; + export type Raw = string | PaymentLineItem.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteRequestCompany.ts b/src/serialization/resources/accounting/types/CreditNoteRequestCompany.ts index 314a7effa..1315dd4ca 100644 --- a/src/serialization/resources/accounting/types/CreditNoteRequestCompany.ts +++ b/src/serialization/resources/accounting/types/CreditNoteRequestCompany.ts @@ -13,5 +13,5 @@ export const CreditNoteRequestCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace CreditNoteRequestCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteRequestContact.ts b/src/serialization/resources/accounting/types/CreditNoteRequestContact.ts index e3b79d8cd..622da6fc7 100644 --- a/src/serialization/resources/accounting/types/CreditNoteRequestContact.ts +++ b/src/serialization/resources/accounting/types/CreditNoteRequestContact.ts @@ -13,5 +13,5 @@ export const CreditNoteRequestContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace CreditNoteRequestContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteRequestCurrency.ts b/src/serialization/resources/accounting/types/CreditNoteRequestCurrency.ts index 22830d743..68d962c0b 100644 --- a/src/serialization/resources/accounting/types/CreditNoteRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/CreditNoteRequestCurrency.ts @@ -13,5 +13,5 @@ export const CreditNoteRequestCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace CreditNoteRequestCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/CreditNoteRequestLineItemsItem.ts b/src/serialization/resources/accounting/types/CreditNoteRequestLineItemsItem.ts index eb1ce8649..3ba9dee93 100644 --- a/src/serialization/resources/accounting/types/CreditNoteRequestLineItemsItem.ts +++ b/src/serialization/resources/accounting/types/CreditNoteRequestLineItemsItem.ts @@ -13,5 +13,5 @@ export const CreditNoteRequestLineItemsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CreditNoteLineItemRequest]); export declare namespace CreditNoteRequestLineItemsItem { - type Raw = string | CreditNoteLineItemRequest.Raw; + export type Raw = string | CreditNoteLineItemRequest.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteRequestPaymentsItem.ts b/src/serialization/resources/accounting/types/CreditNoteRequestPaymentsItem.ts index 72bffc3d0..eda14bf89 100644 --- a/src/serialization/resources/accounting/types/CreditNoteRequestPaymentsItem.ts +++ b/src/serialization/resources/accounting/types/CreditNoteRequestPaymentsItem.ts @@ -13,5 +13,5 @@ export const CreditNoteRequestPaymentsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Payment]); export declare namespace CreditNoteRequestPaymentsItem { - type Raw = string | Payment.Raw; + export type Raw = string | Payment.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteRequestStatus.ts b/src/serialization/resources/accounting/types/CreditNoteRequestStatus.ts index 135498928..a32f726ae 100644 --- a/src/serialization/resources/accounting/types/CreditNoteRequestStatus.ts +++ b/src/serialization/resources/accounting/types/CreditNoteRequestStatus.ts @@ -13,5 +13,5 @@ export const CreditNoteRequestStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([CreditNoteStatusEnum, core.serialization.string()]); export declare namespace CreditNoteRequestStatus { - type Raw = CreditNoteStatusEnum.Raw | string; + export type Raw = CreditNoteStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/CreditNoteRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/CreditNoteRequestTrackingCategoriesItem.ts index 9f6abae45..899aedb01 100644 --- a/src/serialization/resources/accounting/types/CreditNoteRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/CreditNoteRequestTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const CreditNoteRequestTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace CreditNoteRequestTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditNoteResponse.ts b/src/serialization/resources/accounting/types/CreditNoteResponse.ts index e8026adf0..c1c9e7e29 100644 --- a/src/serialization/resources/accounting/types/CreditNoteResponse.ts +++ b/src/serialization/resources/accounting/types/CreditNoteResponse.ts @@ -20,7 +20,7 @@ export const CreditNoteResponse: core.serialization.ObjectSchema< }); export declare namespace CreditNoteResponse { - interface Raw { + export interface Raw { model: serializers.accounting.CreditNote.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/accounting/types/CreditNoteStatus.ts b/src/serialization/resources/accounting/types/CreditNoteStatus.ts index ec7f40056..0a94e4183 100644 --- a/src/serialization/resources/accounting/types/CreditNoteStatus.ts +++ b/src/serialization/resources/accounting/types/CreditNoteStatus.ts @@ -13,5 +13,5 @@ export const CreditNoteStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([CreditNoteStatusEnum, core.serialization.string()]); export declare namespace CreditNoteStatus { - type Raw = CreditNoteStatusEnum.Raw | string; + export type Raw = CreditNoteStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/CreditNoteStatusEnum.ts b/src/serialization/resources/accounting/types/CreditNoteStatusEnum.ts index 4e9e85ef8..afd3d8a1a 100644 --- a/src/serialization/resources/accounting/types/CreditNoteStatusEnum.ts +++ b/src/serialization/resources/accounting/types/CreditNoteStatusEnum.ts @@ -12,5 +12,5 @@ export const CreditNoteStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["SUBMITTED", "AUTHORIZED", "PAID"]); export declare namespace CreditNoteStatusEnum { - type Raw = "SUBMITTED" | "AUTHORIZED" | "PAID"; + export type Raw = "SUBMITTED" | "AUTHORIZED" | "PAID"; } diff --git a/src/serialization/resources/accounting/types/CreditNoteTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/CreditNoteTrackingCategoriesItem.ts index f41294952..00bfbe0ce 100644 --- a/src/serialization/resources/accounting/types/CreditNoteTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/CreditNoteTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const CreditNoteTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace CreditNoteTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/CreditOrDebitEnum.ts b/src/serialization/resources/accounting/types/CreditOrDebitEnum.ts index 6e0fa77d1..ab041f147 100644 --- a/src/serialization/resources/accounting/types/CreditOrDebitEnum.ts +++ b/src/serialization/resources/accounting/types/CreditOrDebitEnum.ts @@ -12,5 +12,5 @@ export const CreditOrDebitEnum: core.serialization.Schema< > = core.serialization.enum_(["CREDIT", "DEBIT"]); export declare namespace CreditOrDebitEnum { - type Raw = "CREDIT" | "DEBIT"; + export type Raw = "CREDIT" | "DEBIT"; } diff --git a/src/serialization/resources/accounting/types/DataPassthroughRequest.ts b/src/serialization/resources/accounting/types/DataPassthroughRequest.ts index 48e86c78c..f4334015b 100644 --- a/src/serialization/resources/accounting/types/DataPassthroughRequest.ts +++ b/src/serialization/resources/accounting/types/DataPassthroughRequest.ts @@ -19,7 +19,7 @@ export const DataPassthroughRequest: core.serialization.ObjectSchema< data: core.serialization.string().optional(), multipartFormData: core.serialization.property( "multipart_form_data", - core.serialization.list(MultipartFormFieldRequest).optional() + core.serialization.list(MultipartFormFieldRequest).optional(), ), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), requestFormat: core.serialization.property("request_format", RequestFormatEnum.optional()), @@ -27,7 +27,7 @@ export const DataPassthroughRequest: core.serialization.ObjectSchema< }); export declare namespace DataPassthroughRequest { - interface Raw { + export interface Raw { method: MethodEnum.Raw; path: string; base_url_override?: string | null; diff --git a/src/serialization/resources/accounting/types/DebugModeLog.ts b/src/serialization/resources/accounting/types/DebugModeLog.ts index ba2719f6f..1596e2e64 100644 --- a/src/serialization/resources/accounting/types/DebugModeLog.ts +++ b/src/serialization/resources/accounting/types/DebugModeLog.ts @@ -17,7 +17,7 @@ export const DebugModeLog: core.serialization.ObjectSchema< }); export declare namespace DebugModeLog { - interface Raw { + export interface Raw { log_id: string; dashboard_view: string; log_summary: DebugModelLogSummary.Raw; diff --git a/src/serialization/resources/accounting/types/DebugModelLogSummary.ts b/src/serialization/resources/accounting/types/DebugModelLogSummary.ts index 7fd63e5e2..f5b452d21 100644 --- a/src/serialization/resources/accounting/types/DebugModelLogSummary.ts +++ b/src/serialization/resources/accounting/types/DebugModelLogSummary.ts @@ -16,7 +16,7 @@ export const DebugModelLogSummary: core.serialization.ObjectSchema< }); export declare namespace DebugModelLogSummary { - interface Raw { + export interface Raw { url: string; method: string; status_code: number; diff --git a/src/serialization/resources/accounting/types/Employee.ts b/src/serialization/resources/accounting/types/Employee.ts index 5f2d83a48..ab7e0ff26 100644 --- a/src/serialization/resources/accounting/types/Employee.ts +++ b/src/serialization/resources/accounting/types/Employee.ts @@ -25,13 +25,13 @@ export const Employee: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), core.serialization.unknown()]); export declare namespace EmployeeCompany { - type Raw = string | unknown; + export type Raw = string | unknown; } diff --git a/src/serialization/resources/accounting/types/EmployeeStatus.ts b/src/serialization/resources/accounting/types/EmployeeStatus.ts index 480c9dbe9..f3689f988 100644 --- a/src/serialization/resources/accounting/types/EmployeeStatus.ts +++ b/src/serialization/resources/accounting/types/EmployeeStatus.ts @@ -13,5 +13,5 @@ export const EmployeeStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([Status895Enum, core.serialization.string()]); export declare namespace EmployeeStatus { - type Raw = Status895Enum.Raw | string; + export type Raw = Status895Enum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/EnabledActionsEnum.ts b/src/serialization/resources/accounting/types/EnabledActionsEnum.ts index 095c47384..bd6d8a178 100644 --- a/src/serialization/resources/accounting/types/EnabledActionsEnum.ts +++ b/src/serialization/resources/accounting/types/EnabledActionsEnum.ts @@ -12,5 +12,5 @@ export const EnabledActionsEnum: core.serialization.Schema< > = core.serialization.enum_(["READ", "WRITE"]); export declare namespace EnabledActionsEnum { - type Raw = "READ" | "WRITE"; + export type Raw = "READ" | "WRITE"; } diff --git a/src/serialization/resources/accounting/types/EncodingEnum.ts b/src/serialization/resources/accounting/types/EncodingEnum.ts index 0833150b5..09634ae28 100644 --- a/src/serialization/resources/accounting/types/EncodingEnum.ts +++ b/src/serialization/resources/accounting/types/EncodingEnum.ts @@ -12,5 +12,5 @@ export const EncodingEnum: core.serialization.Schema< > = core.serialization.enum_(["RAW", "BASE64", "GZIP_BASE64"]); export declare namespace EncodingEnum { - type Raw = "RAW" | "BASE64" | "GZIP_BASE64"; + export type Raw = "RAW" | "BASE64" | "GZIP_BASE64"; } diff --git a/src/serialization/resources/accounting/types/ErrorValidationProblem.ts b/src/serialization/resources/accounting/types/ErrorValidationProblem.ts index 66fb8e5ef..6c9fc955e 100644 --- a/src/serialization/resources/accounting/types/ErrorValidationProblem.ts +++ b/src/serialization/resources/accounting/types/ErrorValidationProblem.ts @@ -18,7 +18,7 @@ export const ErrorValidationProblem: core.serialization.ObjectSchema< }); export declare namespace ErrorValidationProblem { - interface Raw { + export interface Raw { source?: ValidationProblemSource.Raw | null; title: string; detail: string; diff --git a/src/serialization/resources/accounting/types/EventTypeEnum.ts b/src/serialization/resources/accounting/types/EventTypeEnum.ts index 48467f309..1ea07b368 100644 --- a/src/serialization/resources/accounting/types/EventTypeEnum.ts +++ b/src/serialization/resources/accounting/types/EventTypeEnum.ts @@ -55,7 +55,7 @@ export const EventTypeEnum: core.serialization.Schema< ]); export declare namespace EventTypeEnum { - type Raw = + export type Raw = | "CREATED_REMOTE_PRODUCTION_API_KEY" | "DELETED_REMOTE_PRODUCTION_API_KEY" | "CREATED_TEST_API_KEY" diff --git a/src/serialization/resources/accounting/types/Expense.ts b/src/serialization/resources/accounting/types/Expense.ts index b3c03d31e..26d8ba956 100644 --- a/src/serialization/resources/accounting/types/Expense.ts +++ b/src/serialization/resources/accounting/types/Expense.ts @@ -38,20 +38,20 @@ export const Expense: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ExpenseAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseAccountingPeriod.ts b/src/serialization/resources/accounting/types/ExpenseAccountingPeriod.ts index 625cf8196..89ac21195 100644 --- a/src/serialization/resources/accounting/types/ExpenseAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/ExpenseAccountingPeriod.ts @@ -13,5 +13,5 @@ export const ExpenseAccountingPeriod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace ExpenseAccountingPeriod { - type Raw = string | AccountingPeriod.Raw; + export type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseCompany.ts b/src/serialization/resources/accounting/types/ExpenseCompany.ts index c4cb46512..91f836c2f 100644 --- a/src/serialization/resources/accounting/types/ExpenseCompany.ts +++ b/src/serialization/resources/accounting/types/ExpenseCompany.ts @@ -13,5 +13,5 @@ export const ExpenseCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace ExpenseCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseContact.ts b/src/serialization/resources/accounting/types/ExpenseContact.ts index 7df88dc10..2af462364 100644 --- a/src/serialization/resources/accounting/types/ExpenseContact.ts +++ b/src/serialization/resources/accounting/types/ExpenseContact.ts @@ -13,5 +13,5 @@ export const ExpenseContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace ExpenseContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseCurrency.ts b/src/serialization/resources/accounting/types/ExpenseCurrency.ts index d3ac10ad2..c0c34c9f0 100644 --- a/src/serialization/resources/accounting/types/ExpenseCurrency.ts +++ b/src/serialization/resources/accounting/types/ExpenseCurrency.ts @@ -13,5 +13,5 @@ export const ExpenseCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace ExpenseCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/ExpenseEmployee.ts b/src/serialization/resources/accounting/types/ExpenseEmployee.ts index beb1f1baa..acdad8441 100644 --- a/src/serialization/resources/accounting/types/ExpenseEmployee.ts +++ b/src/serialization/resources/accounting/types/ExpenseEmployee.ts @@ -13,5 +13,5 @@ export const ExpenseEmployee: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Employee]); export declare namespace ExpenseEmployee { - type Raw = string | Employee.Raw; + export type Raw = string | Employee.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLine.ts b/src/serialization/resources/accounting/types/ExpenseLine.ts index 48a42c27f..50509a579 100644 --- a/src/serialization/resources/accounting/types/ExpenseLine.ts +++ b/src/serialization/resources/accounting/types/ExpenseLine.ts @@ -26,7 +26,7 @@ export const ExpenseLine: core.serialization.ObjectSchema< trackingCategory: core.serialization.property("tracking_category", ExpenseLineTrackingCategory.optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(ExpenseLineTrackingCategoriesItem.optional()).optional() + core.serialization.list(ExpenseLineTrackingCategoriesItem.optional()).optional(), ), company: core.serialization.string().optional(), employee: ExpenseLineEmployee.optional(), @@ -40,7 +40,7 @@ export const ExpenseLine: core.serialization.ObjectSchema< }); export declare namespace ExpenseLine { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/ExpenseLineAccount.ts b/src/serialization/resources/accounting/types/ExpenseLineAccount.ts index f8fc643ff..2339c2bda 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineAccount.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineAccount.ts @@ -13,5 +13,5 @@ export const ExpenseLineAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ExpenseLineAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineContact.ts b/src/serialization/resources/accounting/types/ExpenseLineContact.ts index 6cb45bd0a..edb27b0df 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineContact.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineContact.ts @@ -13,5 +13,5 @@ export const ExpenseLineContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace ExpenseLineContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineCurrency.ts b/src/serialization/resources/accounting/types/ExpenseLineCurrency.ts index 7fe411797..c8f74d663 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineCurrency.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineCurrency.ts @@ -13,5 +13,5 @@ export const ExpenseLineCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace ExpenseLineCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineEmployee.ts b/src/serialization/resources/accounting/types/ExpenseLineEmployee.ts index ddfe44a2f..2cc41ec18 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineEmployee.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineEmployee.ts @@ -13,5 +13,5 @@ export const ExpenseLineEmployee: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Employee]); export declare namespace ExpenseLineEmployee { - type Raw = string | Employee.Raw; + export type Raw = string | Employee.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineItem.ts b/src/serialization/resources/accounting/types/ExpenseLineItem.ts index 108d58d8d..060ff9f5e 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineItem.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineItem.ts @@ -13,5 +13,5 @@ export const ExpenseLineItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace ExpenseLineItem { - type Raw = string | Item.Raw; + export type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequest.ts b/src/serialization/resources/accounting/types/ExpenseLineRequest.ts index 171f0395a..e91fd75ae 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequest.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequest.ts @@ -24,7 +24,7 @@ export const ExpenseLineRequest: core.serialization.ObjectSchema< trackingCategory: core.serialization.property("tracking_category", ExpenseLineRequestTrackingCategory.optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(ExpenseLineRequestTrackingCategoriesItem.optional()).optional() + core.serialization.list(ExpenseLineRequestTrackingCategoriesItem.optional()).optional(), ), company: core.serialization.string().optional(), employee: ExpenseLineRequestEmployee.optional(), @@ -36,17 +36,17 @@ export const ExpenseLineRequest: core.serialization.ObjectSchema< taxRate: core.serialization.property("tax_rate", core.serialization.string().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace ExpenseLineRequest { - interface Raw { + export interface Raw { remote_id?: string | null; item?: ExpenseLineRequestItem.Raw | null; net_amount?: number | null; diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequestAccount.ts b/src/serialization/resources/accounting/types/ExpenseLineRequestAccount.ts index 0a641507b..54ef33b17 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequestAccount.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequestAccount.ts @@ -13,5 +13,5 @@ export const ExpenseLineRequestAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ExpenseLineRequestAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequestContact.ts b/src/serialization/resources/accounting/types/ExpenseLineRequestContact.ts index a941ba834..a359fdd21 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequestContact.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequestContact.ts @@ -13,5 +13,5 @@ export const ExpenseLineRequestContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace ExpenseLineRequestContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequestCurrency.ts b/src/serialization/resources/accounting/types/ExpenseLineRequestCurrency.ts index 82b1eb6a3..41a766e4f 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequestCurrency.ts @@ -13,5 +13,5 @@ export const ExpenseLineRequestCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace ExpenseLineRequestCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequestEmployee.ts b/src/serialization/resources/accounting/types/ExpenseLineRequestEmployee.ts index 12af83d42..cc0150164 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequestEmployee.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequestEmployee.ts @@ -13,5 +13,5 @@ export const ExpenseLineRequestEmployee: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Employee]); export declare namespace ExpenseLineRequestEmployee { - type Raw = string | Employee.Raw; + export type Raw = string | Employee.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequestItem.ts b/src/serialization/resources/accounting/types/ExpenseLineRequestItem.ts index 2a7e2301d..ab93531df 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequestItem.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequestItem.ts @@ -13,5 +13,5 @@ export const ExpenseLineRequestItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace ExpenseLineRequestItem { - type Raw = string | Item.Raw; + export type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategoriesItem.ts index 40390d86e..93c3caf87 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const ExpenseLineRequestTrackingCategoriesItem: core.serialization.Schema > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace ExpenseLineRequestTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategory.ts b/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategory.ts index 3e16b2ae0..fff727b23 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategory.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineRequestTrackingCategory.ts @@ -13,5 +13,5 @@ export const ExpenseLineRequestTrackingCategory: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace ExpenseLineRequestTrackingCategory { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/ExpenseLineTrackingCategoriesItem.ts index 9cdd03c2c..41e7d8f1b 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const ExpenseLineTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace ExpenseLineTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseLineTrackingCategory.ts b/src/serialization/resources/accounting/types/ExpenseLineTrackingCategory.ts index 172c78b06..f0aab653b 100644 --- a/src/serialization/resources/accounting/types/ExpenseLineTrackingCategory.ts +++ b/src/serialization/resources/accounting/types/ExpenseLineTrackingCategory.ts @@ -13,5 +13,5 @@ export const ExpenseLineTrackingCategory: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace ExpenseLineTrackingCategory { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseRequest.ts b/src/serialization/resources/accounting/types/ExpenseRequest.ts index 171ac1c38..8a76eadda 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequest.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequest.ts @@ -34,22 +34,22 @@ export const ExpenseRequest: core.serialization.ObjectSchema< lines: core.serialization.list(ExpenseLineRequest).optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(ExpenseRequestTrackingCategoriesItem.optional()).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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace ExpenseRequest { - interface Raw { + export interface Raw { transaction_date?: string | null; account?: ExpenseRequestAccount.Raw | null; contact?: ExpenseRequestContact.Raw | null; diff --git a/src/serialization/resources/accounting/types/ExpenseRequestAccount.ts b/src/serialization/resources/accounting/types/ExpenseRequestAccount.ts index bae08a4f0..6f0d10e80 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequestAccount.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequestAccount.ts @@ -13,5 +13,5 @@ export const ExpenseRequestAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ExpenseRequestAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseRequestAccountingPeriod.ts b/src/serialization/resources/accounting/types/ExpenseRequestAccountingPeriod.ts index 51cb5f8e4..d4e7af744 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequestAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequestAccountingPeriod.ts @@ -13,5 +13,5 @@ export const ExpenseRequestAccountingPeriod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace ExpenseRequestAccountingPeriod { - type Raw = string | AccountingPeriod.Raw; + export type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseRequestCompany.ts b/src/serialization/resources/accounting/types/ExpenseRequestCompany.ts index 3d4d648fa..9b8ade6c7 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequestCompany.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequestCompany.ts @@ -13,5 +13,5 @@ export const ExpenseRequestCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace ExpenseRequestCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseRequestContact.ts b/src/serialization/resources/accounting/types/ExpenseRequestContact.ts index 0d52b4a25..52e030ee3 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequestContact.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequestContact.ts @@ -13,5 +13,5 @@ export const ExpenseRequestContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace ExpenseRequestContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseRequestCurrency.ts b/src/serialization/resources/accounting/types/ExpenseRequestCurrency.ts index 841723b31..de888e7cf 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequestCurrency.ts @@ -13,5 +13,5 @@ export const ExpenseRequestCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace ExpenseRequestCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/ExpenseRequestEmployee.ts b/src/serialization/resources/accounting/types/ExpenseRequestEmployee.ts index 36b4976b4..e17f6e868 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequestEmployee.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequestEmployee.ts @@ -13,5 +13,5 @@ export const ExpenseRequestEmployee: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Employee]); export declare namespace ExpenseRequestEmployee { - type Raw = string | Employee.Raw; + export type Raw = string | Employee.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/ExpenseRequestTrackingCategoriesItem.ts index 790fbb368..8093a7327 100644 --- a/src/serialization/resources/accounting/types/ExpenseRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/ExpenseRequestTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const ExpenseRequestTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace ExpenseRequestTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/ExpenseResponse.ts b/src/serialization/resources/accounting/types/ExpenseResponse.ts index 7e63b0fc4..0fead77d5 100644 --- a/src/serialization/resources/accounting/types/ExpenseResponse.ts +++ b/src/serialization/resources/accounting/types/ExpenseResponse.ts @@ -21,7 +21,7 @@ export const ExpenseResponse: core.serialization.ObjectSchema< }); export declare namespace ExpenseResponse { - interface Raw { + export interface Raw { model: Expense.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/accounting/types/ExpenseTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/ExpenseTrackingCategoriesItem.ts index d5fdcb71e..0ffd8e77c 100644 --- a/src/serialization/resources/accounting/types/ExpenseTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/ExpenseTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const ExpenseTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace ExpenseTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/ExternalTargetFieldApi.ts b/src/serialization/resources/accounting/types/ExternalTargetFieldApi.ts index 15c5ac0b2..95630fbfd 100644 --- a/src/serialization/resources/accounting/types/ExternalTargetFieldApi.ts +++ b/src/serialization/resources/accounting/types/ExternalTargetFieldApi.ts @@ -16,7 +16,7 @@ export const ExternalTargetFieldApi: core.serialization.ObjectSchema< }); export declare namespace ExternalTargetFieldApi { - interface Raw { + export interface Raw { name?: string | null; description?: string | null; is_mapped?: string | null; diff --git a/src/serialization/resources/accounting/types/ExternalTargetFieldApiResponse.ts b/src/serialization/resources/accounting/types/ExternalTargetFieldApiResponse.ts index 30fd120af..26ca54aa8 100644 --- a/src/serialization/resources/accounting/types/ExternalTargetFieldApiResponse.ts +++ b/src/serialization/resources/accounting/types/ExternalTargetFieldApiResponse.ts @@ -14,35 +14,35 @@ export const ExternalTargetFieldApiResponse: core.serialization.ObjectSchema< account: core.serialization.property("Account", core.serialization.list(ExternalTargetFieldApi).optional()), accountingAttachment: core.serialization.property( "AccountingAttachment", - core.serialization.list(ExternalTargetFieldApi).optional() + core.serialization.list(ExternalTargetFieldApi).optional(), ), balanceSheet: core.serialization.property( "BalanceSheet", - core.serialization.list(ExternalTargetFieldApi).optional() + core.serialization.list(ExternalTargetFieldApi).optional(), ), cashFlowStatement: core.serialization.property( "CashFlowStatement", - core.serialization.list(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(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(ExternalTargetFieldApi).optional() + core.serialization.list(ExternalTargetFieldApi).optional(), ), trackingCategory: core.serialization.property( "TrackingCategory", - core.serialization.list(ExternalTargetFieldApi).optional() + core.serialization.list(ExternalTargetFieldApi).optional(), ), journalEntry: core.serialization.property( "JournalEntry", - core.serialization.list(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()), @@ -50,31 +50,31 @@ export const ExternalTargetFieldApiResponse: core.serialization.ObjectSchema< expense: core.serialization.property("Expense", core.serialization.list(ExternalTargetFieldApi).optional()), vendorCredit: core.serialization.property( "VendorCredit", - core.serialization.list(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(ExternalTargetFieldApi).optional() + core.serialization.list(ExternalTargetFieldApi).optional(), ), generalLedgerTransaction: core.serialization.property( "GeneralLedgerTransaction", - core.serialization.list(ExternalTargetFieldApi).optional() + core.serialization.list(ExternalTargetFieldApi).optional(), ), bankFeedAccount: core.serialization.property( "BankFeedAccount", - core.serialization.list(ExternalTargetFieldApi).optional() + core.serialization.list(ExternalTargetFieldApi).optional(), ), employee: core.serialization.property("Employee", core.serialization.list(ExternalTargetFieldApi).optional()), paymentMethod: core.serialization.property( "PaymentMethod", - core.serialization.list(ExternalTargetFieldApi).optional() + core.serialization.list(ExternalTargetFieldApi).optional(), ), paymentTerm: core.serialization.property("PaymentTerm", core.serialization.list(ExternalTargetFieldApi).optional()), }); export declare namespace ExternalTargetFieldApiResponse { - interface Raw { + export interface Raw { Account?: ExternalTargetFieldApi.Raw[] | null; AccountingAttachment?: ExternalTargetFieldApi.Raw[] | null; BalanceSheet?: ExternalTargetFieldApi.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/FeedStatusEnum.ts b/src/serialization/resources/accounting/types/FeedStatusEnum.ts index 07ddbb3fc..fbe3c0586 100644 --- a/src/serialization/resources/accounting/types/FeedStatusEnum.ts +++ b/src/serialization/resources/accounting/types/FeedStatusEnum.ts @@ -12,5 +12,5 @@ export const FeedStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["ACTIVE", "INACTIVE"]); export declare namespace FeedStatusEnum { - type Raw = "ACTIVE" | "INACTIVE"; + export type Raw = "ACTIVE" | "INACTIVE"; } diff --git a/src/serialization/resources/accounting/types/FieldFormatEnum.ts b/src/serialization/resources/accounting/types/FieldFormatEnum.ts index 2b86e0f7a..a6e83b755 100644 --- a/src/serialization/resources/accounting/types/FieldFormatEnum.ts +++ b/src/serialization/resources/accounting/types/FieldFormatEnum.ts @@ -12,5 +12,5 @@ export const FieldFormatEnum: core.serialization.Schema< > = core.serialization.enum_(["string", "number", "date", "datetime", "bool", "list"]); export declare namespace FieldFormatEnum { - type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; + export type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; } diff --git a/src/serialization/resources/accounting/types/FieldMappingApiInstance.ts b/src/serialization/resources/accounting/types/FieldMappingApiInstance.ts index 80cd53166..6c156f567 100644 --- a/src/serialization/resources/accounting/types/FieldMappingApiInstance.ts +++ b/src/serialization/resources/accounting/types/FieldMappingApiInstance.ts @@ -19,7 +19,7 @@ export const FieldMappingApiInstance: core.serialization.ObjectSchema< }); export declare namespace FieldMappingApiInstance { - interface Raw { + export interface Raw { id?: string | null; is_integration_wide?: boolean | null; target_field?: FieldMappingApiInstanceTargetField.Raw | null; diff --git a/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteField.ts b/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteField.ts index cc70f6634..17dcae969 100644 --- a/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteField.ts @@ -15,12 +15,12 @@ export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), remoteEndpointInfo: core.serialization.property( "remote_endpoint_info", - FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo, ), }); export declare namespace FieldMappingApiInstanceRemoteField { - interface Raw { + export interface Raw { remote_key_name?: string | null; schema?: Record | null; remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; diff --git a/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts b/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts index 64237cbea..be4dd64e2 100644 --- a/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts +++ b/src/serialization/resources/accounting/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts @@ -14,12 +14,12 @@ export const FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: core.serializ urlPath: core.serialization.property("url_path", core.serialization.string().optional()), fieldTraversalPath: core.serialization.property( "field_traversal_path", - core.serialization.list(core.serialization.string()).optional() + core.serialization.list(core.serialization.string()).optional(), ), }); export declare namespace FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { - interface Raw { + export interface Raw { method?: string | null; url_path?: string | null; field_traversal_path?: string[] | null; diff --git a/src/serialization/resources/accounting/types/FieldMappingApiInstanceResponse.ts b/src/serialization/resources/accounting/types/FieldMappingApiInstanceResponse.ts index abfd258f8..ad3dfa109 100644 --- a/src/serialization/resources/accounting/types/FieldMappingApiInstanceResponse.ts +++ b/src/serialization/resources/accounting/types/FieldMappingApiInstanceResponse.ts @@ -14,38 +14,38 @@ export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< account: core.serialization.property("Account", core.serialization.list(FieldMappingApiInstance).optional()), accountingAttachment: core.serialization.property( "AccountingAttachment", - core.serialization.list(FieldMappingApiInstance).optional() + core.serialization.list(FieldMappingApiInstance).optional(), ), balanceSheet: core.serialization.property( "BalanceSheet", - core.serialization.list(FieldMappingApiInstance).optional() + core.serialization.list(FieldMappingApiInstance).optional(), ), cashFlowStatement: core.serialization.property( "CashFlowStatement", - core.serialization.list(FieldMappingApiInstance).optional() + core.serialization.list(FieldMappingApiInstance).optional(), ), companyInfo: core.serialization.property( "CompanyInfo", - core.serialization.list(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(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(FieldMappingApiInstance).optional() + core.serialization.list(FieldMappingApiInstance).optional(), ), trackingCategory: core.serialization.property( "TrackingCategory", - core.serialization.list(FieldMappingApiInstance).optional() + core.serialization.list(FieldMappingApiInstance).optional(), ), journalEntry: core.serialization.property( "JournalEntry", - core.serialization.list(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()), @@ -53,37 +53,37 @@ export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< expense: core.serialization.property("Expense", core.serialization.list(FieldMappingApiInstance).optional()), vendorCredit: core.serialization.property( "VendorCredit", - core.serialization.list(FieldMappingApiInstance).optional() + core.serialization.list(FieldMappingApiInstance).optional(), ), transaction: core.serialization.property( "Transaction", - core.serialization.list(FieldMappingApiInstance).optional() + core.serialization.list(FieldMappingApiInstance).optional(), ), accountingPeriod: core.serialization.property( "AccountingPeriod", - core.serialization.list(FieldMappingApiInstance).optional() + core.serialization.list(FieldMappingApiInstance).optional(), ), generalLedgerTransaction: core.serialization.property( "GeneralLedgerTransaction", - core.serialization.list(FieldMappingApiInstance).optional() + core.serialization.list(FieldMappingApiInstance).optional(), ), bankFeedAccount: core.serialization.property( "BankFeedAccount", - core.serialization.list(FieldMappingApiInstance).optional() + core.serialization.list(FieldMappingApiInstance).optional(), ), employee: core.serialization.property("Employee", core.serialization.list(FieldMappingApiInstance).optional()), paymentMethod: core.serialization.property( "PaymentMethod", - core.serialization.list(FieldMappingApiInstance).optional() + core.serialization.list(FieldMappingApiInstance).optional(), ), paymentTerm: core.serialization.property( "PaymentTerm", - core.serialization.list(FieldMappingApiInstance).optional() + core.serialization.list(FieldMappingApiInstance).optional(), ), }); export declare namespace FieldMappingApiInstanceResponse { - interface Raw { + export interface Raw { Account?: FieldMappingApiInstance.Raw[] | null; AccountingAttachment?: FieldMappingApiInstance.Raw[] | null; BalanceSheet?: FieldMappingApiInstance.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/FieldMappingApiInstanceTargetField.ts b/src/serialization/resources/accounting/types/FieldMappingApiInstanceTargetField.ts index 88161ec8f..4498ff2c5 100644 --- a/src/serialization/resources/accounting/types/FieldMappingApiInstanceTargetField.ts +++ b/src/serialization/resources/accounting/types/FieldMappingApiInstanceTargetField.ts @@ -16,7 +16,7 @@ export const FieldMappingApiInstanceTargetField: core.serialization.ObjectSchema }); export declare namespace FieldMappingApiInstanceTargetField { - interface Raw { + export interface Raw { name: string; description: string; is_organization_wide: boolean; diff --git a/src/serialization/resources/accounting/types/FieldMappingInstanceResponse.ts b/src/serialization/resources/accounting/types/FieldMappingInstanceResponse.ts index b023c3589..161459c78 100644 --- a/src/serialization/resources/accounting/types/FieldMappingInstanceResponse.ts +++ b/src/serialization/resources/accounting/types/FieldMappingInstanceResponse.ts @@ -21,7 +21,7 @@ export const FieldMappingInstanceResponse: core.serialization.ObjectSchema< }); export declare namespace FieldMappingInstanceResponse { - interface Raw { + export interface Raw { model: FieldMappingApiInstance.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/accounting/types/FieldPermissionDeserializer.ts b/src/serialization/resources/accounting/types/FieldPermissionDeserializer.ts index 293a26a45..5301894cd 100644 --- a/src/serialization/resources/accounting/types/FieldPermissionDeserializer.ts +++ b/src/serialization/resources/accounting/types/FieldPermissionDeserializer.ts @@ -12,16 +12,16 @@ export const FieldPermissionDeserializer: core.serialization.ObjectSchema< > = core.serialization.object({ enabledFields: core.serialization.property( "enabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace FieldPermissionDeserializer { - interface Raw { + export interface Raw { enabled_fields?: unknown[] | null; disabled_fields?: unknown[] | null; } diff --git a/src/serialization/resources/accounting/types/FieldPermissionDeserializerRequest.ts b/src/serialization/resources/accounting/types/FieldPermissionDeserializerRequest.ts index ab3c6fa1c..c9d412369 100644 --- a/src/serialization/resources/accounting/types/FieldPermissionDeserializerRequest.ts +++ b/src/serialization/resources/accounting/types/FieldPermissionDeserializerRequest.ts @@ -12,16 +12,16 @@ export const FieldPermissionDeserializerRequest: core.serialization.ObjectSchema > = core.serialization.object({ enabledFields: core.serialization.property( "enabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace FieldPermissionDeserializerRequest { - interface Raw { + export interface Raw { enabled_fields?: unknown[] | null; disabled_fields?: unknown[] | null; } diff --git a/src/serialization/resources/accounting/types/FieldTypeEnum.ts b/src/serialization/resources/accounting/types/FieldTypeEnum.ts index 5c38b2593..3f5e29f68 100644 --- a/src/serialization/resources/accounting/types/FieldTypeEnum.ts +++ b/src/serialization/resources/accounting/types/FieldTypeEnum.ts @@ -12,5 +12,5 @@ export const FieldTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["string", "number", "date", "datetime", "bool", "list"]); export declare namespace FieldTypeEnum { - type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; + export type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; } diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransaction.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransaction.ts index 771859c15..9718e7630 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransaction.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransaction.ts @@ -22,38 +22,38 @@ export const GeneralLedgerTransaction: core.serialization.ObjectSchema< modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), underlyingTransactionRemoteId: core.serialization.property( "underlying_transaction_remote_id", - core.serialization.string().optional() + core.serialization.string().optional(), ), underlyingTransactionType: core.serialization.property( "underlying_transaction_type", - GeneralLedgerTransactionUnderlyingTransactionType.optional() + GeneralLedgerTransactionUnderlyingTransactionType.optional(), ), accountingPeriod: core.serialization.property( "accounting_period", - GeneralLedgerTransactionAccountingPeriod.optional() + GeneralLedgerTransactionAccountingPeriod.optional(), ), company: GeneralLedgerTransactionCompany.optional(), remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(GeneralLedgerTransactionTrackingCategoriesItem.optional()).optional() + core.serialization.list(GeneralLedgerTransactionTrackingCategoriesItem.optional()).optional(), ), postingDate: core.serialization.property("posting_date", core.serialization.date().optional()), generalLedgerTransactionLines: core.serialization.property( "general_ledger_transaction_lines", - core.serialization.list(GeneralLedgerTransactionGeneralLedgerTransactionLinesItem).optional() + core.serialization.list(GeneralLedgerTransactionGeneralLedgerTransactionLinesItem).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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace GeneralLedgerTransaction { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransactionAccountingPeriod.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransactionAccountingPeriod.ts index a4b4e428c..d2490a1d4 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransactionAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransactionAccountingPeriod.ts @@ -13,5 +13,5 @@ export const GeneralLedgerTransactionAccountingPeriod: core.serialization.Schema > = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace GeneralLedgerTransactionAccountingPeriod { - type Raw = string | AccountingPeriod.Raw; + export type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransactionCompany.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransactionCompany.ts index 8dac94051..fa35bcc86 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransactionCompany.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransactionCompany.ts @@ -13,5 +13,5 @@ export const GeneralLedgerTransactionCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace GeneralLedgerTransactionCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransactionGeneralLedgerTransactionLinesItem.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransactionGeneralLedgerTransactionLinesItem.ts index e24bfabe6..0913ae35f 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransactionGeneralLedgerTransactionLinesItem.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransactionGeneralLedgerTransactionLinesItem.ts @@ -13,5 +13,5 @@ export const GeneralLedgerTransactionGeneralLedgerTransactionLinesItem: core.ser > = core.serialization.undiscriminatedUnion([core.serialization.string(), GeneralLedgerTransactionLine]); export declare namespace GeneralLedgerTransactionGeneralLedgerTransactionLinesItem { - type Raw = string | GeneralLedgerTransactionLine.Raw; + export type Raw = string | GeneralLedgerTransactionLine.Raw; } diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLine.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLine.ts index 2c8977f1b..6920f6dcd 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLine.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLine.ts @@ -29,13 +29,13 @@ export const GeneralLedgerTransactionLine: core.serialization.ObjectSchema< baseCurrency: core.serialization.property("base_currency", GeneralLedgerTransactionLineBaseCurrency.optional()), transactionCurrency: core.serialization.property( "transaction_currency", - GeneralLedgerTransactionLineTransactionCurrency.optional() + GeneralLedgerTransactionLineTransactionCurrency.optional(), ), exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), description: core.serialization.string().optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(GeneralLedgerTransactionLineTrackingCategoriesItem).optional() + core.serialization.list(GeneralLedgerTransactionLineTrackingCategoriesItem).optional(), ), debitAmount: core.serialization.property("debit_amount", core.serialization.string()), creditAmount: core.serialization.property("credit_amount", core.serialization.string()), @@ -45,12 +45,12 @@ export const GeneralLedgerTransactionLine: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace GeneralLedgerTransactionLine { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineAccount.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineAccount.ts index 01da34f5d..26b020bae 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineAccount.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineAccount.ts @@ -13,5 +13,5 @@ export const GeneralLedgerTransactionLineAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace GeneralLedgerTransactionLineAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineBaseCurrency.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineBaseCurrency.ts index 7097e4885..3f2f59f2c 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineBaseCurrency.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineBaseCurrency.ts @@ -13,5 +13,5 @@ export const GeneralLedgerTransactionLineBaseCurrency: core.serialization.Schema > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace GeneralLedgerTransactionLineBaseCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineCompany.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineCompany.ts index 51ffbec45..ddabee16b 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineCompany.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineCompany.ts @@ -13,5 +13,5 @@ export const GeneralLedgerTransactionLineCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace GeneralLedgerTransactionLineCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineContact.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineContact.ts index 0fae87c63..fde743cc6 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineContact.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineContact.ts @@ -13,5 +13,5 @@ export const GeneralLedgerTransactionLineContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace GeneralLedgerTransactionLineContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineEmployee.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineEmployee.ts index a579eb500..0c6b4c02a 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineEmployee.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineEmployee.ts @@ -13,5 +13,5 @@ export const GeneralLedgerTransactionLineEmployee: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Employee]); export declare namespace GeneralLedgerTransactionLineEmployee { - type Raw = string | Employee.Raw; + export type Raw = string | Employee.Raw; } diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineItem.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineItem.ts index a9b061e02..73e21de80 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineItem.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineItem.ts @@ -13,5 +13,5 @@ export const GeneralLedgerTransactionLineItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace GeneralLedgerTransactionLineItem { - type Raw = string | Item.Raw; + export type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineTrackingCategoriesItem.ts index 7895d23bc..c75caf010 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const GeneralLedgerTransactionLineTrackingCategoriesItem: core.serializat > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace GeneralLedgerTransactionLineTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineTransactionCurrency.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineTransactionCurrency.ts index 285fd3244..7969d07a8 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineTransactionCurrency.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransactionLineTransactionCurrency.ts @@ -13,5 +13,5 @@ export const GeneralLedgerTransactionLineTransactionCurrency: core.serialization > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace GeneralLedgerTransactionLineTransactionCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransactionTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransactionTrackingCategoriesItem.ts index d2d082e89..56d242fda 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransactionTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransactionTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const GeneralLedgerTransactionTrackingCategoriesItem: core.serialization. > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace GeneralLedgerTransactionTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/GeneralLedgerTransactionUnderlyingTransactionType.ts b/src/serialization/resources/accounting/types/GeneralLedgerTransactionUnderlyingTransactionType.ts index c2966abc6..0a81ded9b 100644 --- a/src/serialization/resources/accounting/types/GeneralLedgerTransactionUnderlyingTransactionType.ts +++ b/src/serialization/resources/accounting/types/GeneralLedgerTransactionUnderlyingTransactionType.ts @@ -13,5 +13,5 @@ export const GeneralLedgerTransactionUnderlyingTransactionType: core.serializati > = core.serialization.undiscriminatedUnion([UnderlyingTransactionTypeEnum, core.serialization.string()]); export declare namespace GeneralLedgerTransactionUnderlyingTransactionType { - type Raw = UnderlyingTransactionTypeEnum.Raw | string; + export type Raw = UnderlyingTransactionTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/IncomeStatement.ts b/src/serialization/resources/accounting/types/IncomeStatement.ts index 6bd826490..91352e0a4 100644 --- a/src/serialization/resources/accounting/types/IncomeStatement.ts +++ b/src/serialization/resources/accounting/types/IncomeStatement.ts @@ -28,24 +28,24 @@ export const IncomeStatement: core.serialization.ObjectSchema< grossProfit: core.serialization.property("gross_profit", core.serialization.number().optional()), operatingExpenses: core.serialization.property( "operating_expenses", - core.serialization.list(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(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()), fieldMappings: core.serialization.property( "field_mappings", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace IncomeStatement { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/IncomeStatementCompany.ts b/src/serialization/resources/accounting/types/IncomeStatementCompany.ts index 094e2e18a..f25296a96 100644 --- a/src/serialization/resources/accounting/types/IncomeStatementCompany.ts +++ b/src/serialization/resources/accounting/types/IncomeStatementCompany.ts @@ -13,5 +13,5 @@ export const IncomeStatementCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace IncomeStatementCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/IncomeStatementCurrency.ts b/src/serialization/resources/accounting/types/IncomeStatementCurrency.ts index 532d4c8f1..72b8b51d3 100644 --- a/src/serialization/resources/accounting/types/IncomeStatementCurrency.ts +++ b/src/serialization/resources/accounting/types/IncomeStatementCurrency.ts @@ -13,5 +13,5 @@ export const IncomeStatementCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace IncomeStatementCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/IndividualCommonModelScopeDeserializer.ts b/src/serialization/resources/accounting/types/IndividualCommonModelScopeDeserializer.ts index 3345637b4..e28191a71 100644 --- a/src/serialization/resources/accounting/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/serialization/resources/accounting/types/IndividualCommonModelScopeDeserializer.ts @@ -15,13 +15,13 @@ 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(), ModelPermissionDeserializer).optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializer).optional(), ), fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializer.optional()), }); export declare namespace IndividualCommonModelScopeDeserializer { - interface Raw { + export interface Raw { model_name: string; 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 edbb43bbd..22a7a51d6 100644 --- a/src/serialization/resources/accounting/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/accounting/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -15,13 +15,13 @@ 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(), ModelPermissionDeserializerRequest).optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializerRequest).optional(), ), fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializerRequest.optional()), }); export declare namespace IndividualCommonModelScopeDeserializerRequest { - interface Raw { + export interface Raw { model_name: string; 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 d4963e894..cdb8ba448 100644 --- a/src/serialization/resources/accounting/types/Invoice.ts +++ b/src/serialization/resources/accounting/types/Invoice.ts @@ -48,43 +48,43 @@ export const Invoice: core.serialization.ObjectSchema serializers.accounting.InvoiceAppliedCreditNotesItem)) - .optional() + .optional(), ), appliedVendorCredits: core.serialization.property( "applied_vendor_credits", core.serialization .list(core.serialization.lazy(() => serializers.accounting.InvoiceAppliedVendorCreditsItem)) - .optional() + .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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).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 { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/InvoiceAccountingPeriod.ts b/src/serialization/resources/accounting/types/InvoiceAccountingPeriod.ts index f40524fa6..635a69cb0 100644 --- a/src/serialization/resources/accounting/types/InvoiceAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/InvoiceAccountingPeriod.ts @@ -13,5 +13,5 @@ export const InvoiceAccountingPeriod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace InvoiceAccountingPeriod { - type Raw = string | AccountingPeriod.Raw; + export type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceAppliedCreditNotesItem.ts b/src/serialization/resources/accounting/types/InvoiceAppliedCreditNotesItem.ts index b56b44829..c1407ceb1 100644 --- a/src/serialization/resources/accounting/types/InvoiceAppliedCreditNotesItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceAppliedCreditNotesItem.ts @@ -15,5 +15,5 @@ export const InvoiceAppliedCreditNotesItem: core.serialization.Schema< ]); export declare namespace InvoiceAppliedCreditNotesItem { - type Raw = string | serializers.accounting.CreditNoteApplyLineForInvoice.Raw; + export type Raw = string | serializers.accounting.CreditNoteApplyLineForInvoice.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceAppliedPaymentsItem.ts b/src/serialization/resources/accounting/types/InvoiceAppliedPaymentsItem.ts index 3889d83ab..bc7458edc 100644 --- a/src/serialization/resources/accounting/types/InvoiceAppliedPaymentsItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceAppliedPaymentsItem.ts @@ -13,5 +13,5 @@ export const InvoiceAppliedPaymentsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentLineItem]); export declare namespace InvoiceAppliedPaymentsItem { - type Raw = string | PaymentLineItem.Raw; + export type Raw = string | PaymentLineItem.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceAppliedVendorCreditsItem.ts b/src/serialization/resources/accounting/types/InvoiceAppliedVendorCreditsItem.ts index df4b9bc97..9cca745aa 100644 --- a/src/serialization/resources/accounting/types/InvoiceAppliedVendorCreditsItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceAppliedVendorCreditsItem.ts @@ -15,5 +15,5 @@ export const InvoiceAppliedVendorCreditsItem: core.serialization.Schema< ]); export declare namespace InvoiceAppliedVendorCreditsItem { - type Raw = string | serializers.accounting.VendorCreditApplyLineForInvoice.Raw; + export type Raw = string | serializers.accounting.VendorCreditApplyLineForInvoice.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceCompany.ts b/src/serialization/resources/accounting/types/InvoiceCompany.ts index c45436a13..514cf60eb 100644 --- a/src/serialization/resources/accounting/types/InvoiceCompany.ts +++ b/src/serialization/resources/accounting/types/InvoiceCompany.ts @@ -13,5 +13,5 @@ export const InvoiceCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace InvoiceCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceContact.ts b/src/serialization/resources/accounting/types/InvoiceContact.ts index 5579db7bc..f85dd2f7b 100644 --- a/src/serialization/resources/accounting/types/InvoiceContact.ts +++ b/src/serialization/resources/accounting/types/InvoiceContact.ts @@ -13,5 +13,5 @@ export const InvoiceContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace InvoiceContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceCurrency.ts b/src/serialization/resources/accounting/types/InvoiceCurrency.ts index 5109b067c..f3a40f4f4 100644 --- a/src/serialization/resources/accounting/types/InvoiceCurrency.ts +++ b/src/serialization/resources/accounting/types/InvoiceCurrency.ts @@ -13,5 +13,5 @@ export const InvoiceCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace InvoiceCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceEmployee.ts b/src/serialization/resources/accounting/types/InvoiceEmployee.ts index 8a4ad0fc5..f6f2fce69 100644 --- a/src/serialization/resources/accounting/types/InvoiceEmployee.ts +++ b/src/serialization/resources/accounting/types/InvoiceEmployee.ts @@ -13,5 +13,5 @@ export const InvoiceEmployee: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Employee]); export declare namespace InvoiceEmployee { - type Raw = string | Employee.Raw; + export type Raw = string | Employee.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItem.ts b/src/serialization/resources/accounting/types/InvoiceLineItem.ts index b45e6a64b..8ab033673 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItem.ts @@ -34,19 +34,19 @@ export const InvoiceLineItem: core.serialization.ObjectSchema< trackingCategory: core.serialization.property("tracking_category", InvoiceLineItemTrackingCategory.optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(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()), fieldMappings: core.serialization.property( "field_mappings", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteField).optional()), }); export declare namespace InvoiceLineItem { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemAccount.ts b/src/serialization/resources/accounting/types/InvoiceLineItemAccount.ts index d1587d2cd..e79baff37 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemAccount.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemAccount.ts @@ -13,5 +13,5 @@ export const InvoiceLineItemAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace InvoiceLineItemAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemCurrency.ts b/src/serialization/resources/accounting/types/InvoiceLineItemCurrency.ts index 451eee8c4..7e9bf50c8 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemCurrency.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemCurrency.ts @@ -13,5 +13,5 @@ export const InvoiceLineItemCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace InvoiceLineItemCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemEmployee.ts b/src/serialization/resources/accounting/types/InvoiceLineItemEmployee.ts index 258dbfc46..e54661013 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemEmployee.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemEmployee.ts @@ -13,5 +13,5 @@ export const InvoiceLineItemEmployee: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Employee]); export declare namespace InvoiceLineItemEmployee { - type Raw = string | Employee.Raw; + export type Raw = string | Employee.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemItem.ts b/src/serialization/resources/accounting/types/InvoiceLineItemItem.ts index 475a32b2b..3f3d0bebe 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemItem.ts @@ -13,5 +13,5 @@ export const InvoiceLineItemItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace InvoiceLineItemItem { - type Raw = string | Item.Raw; + export type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemRequest.ts b/src/serialization/resources/accounting/types/InvoiceLineItemRequest.ts index 9d96575e2..de80882f9 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemRequest.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemRequest.ts @@ -30,26 +30,26 @@ export const InvoiceLineItemRequest: core.serialization.ObjectSchema< taxRate: core.serialization.property("tax_rate", core.serialization.string().optional()), trackingCategory: core.serialization.property( "tracking_category", - InvoiceLineItemRequestTrackingCategory.optional() + InvoiceLineItemRequestTrackingCategory.optional(), ), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(InvoiceLineItemRequestTrackingCategoriesItem.optional()).optional() + core.serialization.list(InvoiceLineItemRequestTrackingCategoriesItem.optional()).optional(), ), company: core.serialization.string().optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace InvoiceLineItemRequest { - interface Raw { + export interface Raw { remote_id?: string | null; description?: string | null; unit_price?: number | null; diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemRequestAccount.ts b/src/serialization/resources/accounting/types/InvoiceLineItemRequestAccount.ts index cf341f077..26fe6ec80 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemRequestAccount.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemRequestAccount.ts @@ -13,5 +13,5 @@ export const InvoiceLineItemRequestAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace InvoiceLineItemRequestAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemRequestCurrency.ts b/src/serialization/resources/accounting/types/InvoiceLineItemRequestCurrency.ts index 4a657cc88..4be7b0bf2 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemRequestCurrency.ts @@ -13,5 +13,5 @@ export const InvoiceLineItemRequestCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace InvoiceLineItemRequestCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemRequestEmployee.ts b/src/serialization/resources/accounting/types/InvoiceLineItemRequestEmployee.ts index 4297fa621..8beb1aa1e 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemRequestEmployee.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemRequestEmployee.ts @@ -13,5 +13,5 @@ export const InvoiceLineItemRequestEmployee: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Employee]); export declare namespace InvoiceLineItemRequestEmployee { - type Raw = string | Employee.Raw; + export type Raw = string | Employee.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemRequestItem.ts b/src/serialization/resources/accounting/types/InvoiceLineItemRequestItem.ts index 664f547f5..b7ebe364f 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemRequestItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemRequestItem.ts @@ -13,5 +13,5 @@ export const InvoiceLineItemRequestItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace InvoiceLineItemRequestItem { - type Raw = string | Item.Raw; + export type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategoriesItem.ts index aa9171441..87daa2966 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const InvoiceLineItemRequestTrackingCategoriesItem: core.serialization.Sc > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace InvoiceLineItemRequestTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategory.ts b/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategory.ts index 60656094f..dd4c9eb2a 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategory.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemRequestTrackingCategory.ts @@ -13,5 +13,5 @@ export const InvoiceLineItemRequestTrackingCategory: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace InvoiceLineItemRequestTrackingCategory { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategoriesItem.ts index 6b1c0a3e4..87c43584e 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const InvoiceLineItemTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace InvoiceLineItemTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategory.ts b/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategory.ts index 634f33b09..d9e33380b 100644 --- a/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategory.ts +++ b/src/serialization/resources/accounting/types/InvoiceLineItemTrackingCategory.ts @@ -13,5 +13,5 @@ export const InvoiceLineItemTrackingCategory: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace InvoiceLineItemTrackingCategory { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoicePaymentTerm.ts b/src/serialization/resources/accounting/types/InvoicePaymentTerm.ts index 5cdb7f5f2..ff9fc2610 100644 --- a/src/serialization/resources/accounting/types/InvoicePaymentTerm.ts +++ b/src/serialization/resources/accounting/types/InvoicePaymentTerm.ts @@ -13,5 +13,5 @@ export const InvoicePaymentTerm: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentTerm]); export declare namespace InvoicePaymentTerm { - type Raw = string | PaymentTerm.Raw; + export type Raw = string | PaymentTerm.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoicePaymentsItem.ts b/src/serialization/resources/accounting/types/InvoicePaymentsItem.ts index 0e270f40c..fcb438ea9 100644 --- a/src/serialization/resources/accounting/types/InvoicePaymentsItem.ts +++ b/src/serialization/resources/accounting/types/InvoicePaymentsItem.ts @@ -13,5 +13,5 @@ export const InvoicePaymentsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Payment]); export declare namespace InvoicePaymentsItem { - type Raw = string | Payment.Raw; + export type Raw = string | Payment.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoicePurchaseOrdersItem.ts b/src/serialization/resources/accounting/types/InvoicePurchaseOrdersItem.ts index 0574124ca..40e0c30f8 100644 --- a/src/serialization/resources/accounting/types/InvoicePurchaseOrdersItem.ts +++ b/src/serialization/resources/accounting/types/InvoicePurchaseOrdersItem.ts @@ -13,5 +13,5 @@ export const InvoicePurchaseOrdersItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PurchaseOrder]); export declare namespace InvoicePurchaseOrdersItem { - type Raw = string | PurchaseOrder.Raw; + export type Raw = string | PurchaseOrder.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequest.ts b/src/serialization/resources/accounting/types/InvoiceRequest.ts index 0058230a3..4dea2a3c8 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequest.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequest.ts @@ -44,26 +44,26 @@ export const InvoiceRequest: core.serialization.ObjectSchema< payments: core.serialization.list(InvoiceRequestPaymentsItem.optional()).optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(InvoiceRequestTrackingCategoriesItem.optional()).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(InvoiceRequestPurchaseOrdersItem.optional()).optional() + core.serialization.list(InvoiceRequestPurchaseOrdersItem.optional()).optional(), ), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace InvoiceRequest { - interface Raw { + export interface Raw { type?: InvoiceRequestType.Raw | null; contact?: InvoiceRequestContact.Raw | null; number?: string | null; diff --git a/src/serialization/resources/accounting/types/InvoiceRequestCompany.ts b/src/serialization/resources/accounting/types/InvoiceRequestCompany.ts index 9a61299bf..72d494a29 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestCompany.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestCompany.ts @@ -13,5 +13,5 @@ export const InvoiceRequestCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace InvoiceRequestCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestContact.ts b/src/serialization/resources/accounting/types/InvoiceRequestContact.ts index 33ef2cc43..2e2687080 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestContact.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestContact.ts @@ -13,5 +13,5 @@ export const InvoiceRequestContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace InvoiceRequestContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestCurrency.ts b/src/serialization/resources/accounting/types/InvoiceRequestCurrency.ts index 00b7555e7..98d46ce0c 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestCurrency.ts @@ -13,5 +13,5 @@ export const InvoiceRequestCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace InvoiceRequestCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestEmployee.ts b/src/serialization/resources/accounting/types/InvoiceRequestEmployee.ts index ff4037390..ce35dd011 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestEmployee.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestEmployee.ts @@ -13,5 +13,5 @@ export const InvoiceRequestEmployee: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Employee]); export declare namespace InvoiceRequestEmployee { - type Raw = string | Employee.Raw; + export type Raw = string | Employee.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestPaymentTerm.ts b/src/serialization/resources/accounting/types/InvoiceRequestPaymentTerm.ts index c018de893..22bcefb9e 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestPaymentTerm.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestPaymentTerm.ts @@ -13,5 +13,5 @@ export const InvoiceRequestPaymentTerm: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentTerm]); export declare namespace InvoiceRequestPaymentTerm { - type Raw = string | PaymentTerm.Raw; + export type Raw = string | PaymentTerm.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestPaymentsItem.ts b/src/serialization/resources/accounting/types/InvoiceRequestPaymentsItem.ts index 5c987c19b..a29451bfd 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestPaymentsItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestPaymentsItem.ts @@ -13,5 +13,5 @@ export const InvoiceRequestPaymentsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Payment]); export declare namespace InvoiceRequestPaymentsItem { - type Raw = string | Payment.Raw; + export type Raw = string | Payment.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.ts b/src/serialization/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.ts index 22a5ff100..f6b3100f5 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestPurchaseOrdersItem.ts @@ -13,5 +13,5 @@ export const InvoiceRequestPurchaseOrdersItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PurchaseOrder]); export declare namespace InvoiceRequestPurchaseOrdersItem { - type Raw = string | PurchaseOrder.Raw; + export type Raw = string | PurchaseOrder.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestStatus.ts b/src/serialization/resources/accounting/types/InvoiceRequestStatus.ts index 80b785d7c..773353e16 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestStatus.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestStatus.ts @@ -13,5 +13,5 @@ export const InvoiceRequestStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([InvoiceStatusEnum, core.serialization.string()]); export declare namespace InvoiceRequestStatus { - type Raw = InvoiceStatusEnum.Raw | string; + export type Raw = InvoiceStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/InvoiceRequestTrackingCategoriesItem.ts index b56b36127..eb8a991d6 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const InvoiceRequestTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace InvoiceRequestTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceRequestType.ts b/src/serialization/resources/accounting/types/InvoiceRequestType.ts index 552ae28da..b9d1fedd5 100644 --- a/src/serialization/resources/accounting/types/InvoiceRequestType.ts +++ b/src/serialization/resources/accounting/types/InvoiceRequestType.ts @@ -13,5 +13,5 @@ export const InvoiceRequestType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([InvoiceTypeEnum, core.serialization.string()]); export declare namespace InvoiceRequestType { - type Raw = InvoiceTypeEnum.Raw | string; + export type Raw = InvoiceTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceResponse.ts b/src/serialization/resources/accounting/types/InvoiceResponse.ts index fa10c6f28..1b0f98643 100644 --- a/src/serialization/resources/accounting/types/InvoiceResponse.ts +++ b/src/serialization/resources/accounting/types/InvoiceResponse.ts @@ -20,7 +20,7 @@ export const InvoiceResponse: core.serialization.ObjectSchema< }); export declare namespace InvoiceResponse { - interface Raw { + export interface Raw { model: serializers.accounting.Invoice.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/accounting/types/InvoiceStatus.ts b/src/serialization/resources/accounting/types/InvoiceStatus.ts index abbf3e8fa..dd480dcf9 100644 --- a/src/serialization/resources/accounting/types/InvoiceStatus.ts +++ b/src/serialization/resources/accounting/types/InvoiceStatus.ts @@ -13,5 +13,5 @@ export const InvoiceStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([InvoiceStatusEnum, core.serialization.string()]); export declare namespace InvoiceStatus { - type Raw = InvoiceStatusEnum.Raw | string; + export type Raw = InvoiceStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceStatusEnum.ts b/src/serialization/resources/accounting/types/InvoiceStatusEnum.ts index 761a8d7f6..a4c4ea161 100644 --- a/src/serialization/resources/accounting/types/InvoiceStatusEnum.ts +++ b/src/serialization/resources/accounting/types/InvoiceStatusEnum.ts @@ -12,5 +12,5 @@ export const InvoiceStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["PAID", "DRAFT", "SUBMITTED", "PARTIALLY_PAID", "OPEN", "VOID"]); export declare namespace InvoiceStatusEnum { - type Raw = "PAID" | "DRAFT" | "SUBMITTED" | "PARTIALLY_PAID" | "OPEN" | "VOID"; + export type Raw = "PAID" | "DRAFT" | "SUBMITTED" | "PARTIALLY_PAID" | "OPEN" | "VOID"; } diff --git a/src/serialization/resources/accounting/types/InvoiceTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/InvoiceTrackingCategoriesItem.ts index 1e64f19c1..dcb466426 100644 --- a/src/serialization/resources/accounting/types/InvoiceTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/InvoiceTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const InvoiceTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace InvoiceTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/InvoiceType.ts b/src/serialization/resources/accounting/types/InvoiceType.ts index 214479aed..b9de134d3 100644 --- a/src/serialization/resources/accounting/types/InvoiceType.ts +++ b/src/serialization/resources/accounting/types/InvoiceType.ts @@ -13,5 +13,5 @@ export const InvoiceType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([InvoiceTypeEnum, core.serialization.string()]); export declare namespace InvoiceType { - type Raw = InvoiceTypeEnum.Raw | string; + export type Raw = InvoiceTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/InvoiceTypeEnum.ts b/src/serialization/resources/accounting/types/InvoiceTypeEnum.ts index 6a6b8db09..ab4e387e9 100644 --- a/src/serialization/resources/accounting/types/InvoiceTypeEnum.ts +++ b/src/serialization/resources/accounting/types/InvoiceTypeEnum.ts @@ -12,5 +12,5 @@ export const InvoiceTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["ACCOUNTS_RECEIVABLE", "ACCOUNTS_PAYABLE"]); export declare namespace InvoiceTypeEnum { - type Raw = "ACCOUNTS_RECEIVABLE" | "ACCOUNTS_PAYABLE"; + export type Raw = "ACCOUNTS_RECEIVABLE" | "ACCOUNTS_PAYABLE"; } diff --git a/src/serialization/resources/accounting/types/Issue.ts b/src/serialization/resources/accounting/types/Issue.ts index 5fb13df28..152e51704 100644 --- a/src/serialization/resources/accounting/types/Issue.ts +++ b/src/serialization/resources/accounting/types/Issue.ts @@ -14,19 +14,19 @@ export const Issue: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([IssueStatusEnum, core.serialization.string()]); export declare namespace IssueStatus { - type Raw = IssueStatusEnum.Raw | string; + export type Raw = IssueStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/IssueStatusEnum.ts b/src/serialization/resources/accounting/types/IssueStatusEnum.ts index c0a92f275..f31d034cc 100644 --- a/src/serialization/resources/accounting/types/IssueStatusEnum.ts +++ b/src/serialization/resources/accounting/types/IssueStatusEnum.ts @@ -12,5 +12,5 @@ export const IssueStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["ONGOING", "RESOLVED"]); export declare namespace IssueStatusEnum { - type Raw = "ONGOING" | "RESOLVED"; + export type Raw = "ONGOING" | "RESOLVED"; } diff --git a/src/serialization/resources/accounting/types/Item.ts b/src/serialization/resources/accounting/types/Item.ts index 160db5b13..f1aa58059 100644 --- a/src/serialization/resources/accounting/types/Item.ts +++ b/src/serialization/resources/accounting/types/Item.ts @@ -32,13 +32,13 @@ export const Item: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace ItemCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/ItemFormatEnum.ts b/src/serialization/resources/accounting/types/ItemFormatEnum.ts index a43561a23..a182aabaf 100644 --- a/src/serialization/resources/accounting/types/ItemFormatEnum.ts +++ b/src/serialization/resources/accounting/types/ItemFormatEnum.ts @@ -12,5 +12,5 @@ export const ItemFormatEnum: core.serialization.Schema< > = core.serialization.enum_(["string", "number", "date", "datetime", "bool", "list"]); export declare namespace ItemFormatEnum { - type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; + export type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; } diff --git a/src/serialization/resources/accounting/types/ItemPurchaseAccount.ts b/src/serialization/resources/accounting/types/ItemPurchaseAccount.ts index a1befc160..162e22853 100644 --- a/src/serialization/resources/accounting/types/ItemPurchaseAccount.ts +++ b/src/serialization/resources/accounting/types/ItemPurchaseAccount.ts @@ -13,5 +13,5 @@ export const ItemPurchaseAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ItemPurchaseAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/ItemPurchaseTaxRate.ts b/src/serialization/resources/accounting/types/ItemPurchaseTaxRate.ts index 6ef4538d0..b1fd1db24 100644 --- a/src/serialization/resources/accounting/types/ItemPurchaseTaxRate.ts +++ b/src/serialization/resources/accounting/types/ItemPurchaseTaxRate.ts @@ -13,5 +13,5 @@ export const ItemPurchaseTaxRate: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TaxRate]); export declare namespace ItemPurchaseTaxRate { - type Raw = string | TaxRate.Raw; + export type Raw = string | TaxRate.Raw; } diff --git a/src/serialization/resources/accounting/types/ItemSalesAccount.ts b/src/serialization/resources/accounting/types/ItemSalesAccount.ts index f621295d0..9b5a73bf6 100644 --- a/src/serialization/resources/accounting/types/ItemSalesAccount.ts +++ b/src/serialization/resources/accounting/types/ItemSalesAccount.ts @@ -13,5 +13,5 @@ export const ItemSalesAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ItemSalesAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/ItemSalesTaxRate.ts b/src/serialization/resources/accounting/types/ItemSalesTaxRate.ts index 136501692..56f5f64d9 100644 --- a/src/serialization/resources/accounting/types/ItemSalesTaxRate.ts +++ b/src/serialization/resources/accounting/types/ItemSalesTaxRate.ts @@ -13,5 +13,5 @@ export const ItemSalesTaxRate: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TaxRate]); export declare namespace ItemSalesTaxRate { - type Raw = string | TaxRate.Raw; + export type Raw = string | TaxRate.Raw; } diff --git a/src/serialization/resources/accounting/types/ItemSchema.ts b/src/serialization/resources/accounting/types/ItemSchema.ts index 6a1852d3b..2db09c0a4 100644 --- a/src/serialization/resources/accounting/types/ItemSchema.ts +++ b/src/serialization/resources/accounting/types/ItemSchema.ts @@ -16,12 +16,12 @@ export const ItemSchema: core.serialization.ObjectSchema< itemFormat: core.serialization.property("item_format", ItemFormatEnum.optional()), itemChoices: core.serialization.property( "item_choices", - core.serialization.list(core.serialization.string()).optional() + core.serialization.list(core.serialization.string()).optional(), ), }); export declare namespace ItemSchema { - interface Raw { + export interface Raw { 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 f60b49789..4ec9f5bd7 100644 --- a/src/serialization/resources/accounting/types/ItemStatus.ts +++ b/src/serialization/resources/accounting/types/ItemStatus.ts @@ -11,5 +11,5 @@ export const ItemStatus: core.serialization.Schema = core.serialization.enum_(["string", "number", "date", "datetime", "bool", "list"]); export declare namespace ItemTypeEnum { - type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; + export type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; } diff --git a/src/serialization/resources/accounting/types/JournalEntry.ts b/src/serialization/resources/accounting/types/JournalEntry.ts index a57e30589..639a900ab 100644 --- a/src/serialization/resources/accounting/types/JournalEntry.ts +++ b/src/serialization/resources/accounting/types/JournalEntry.ts @@ -28,7 +28,7 @@ export const JournalEntry: core.serialization.ObjectSchema< payments: core.serialization.list(JournalEntryPaymentsItem.optional()).optional(), appliedPayments: core.serialization.property( "applied_payments", - core.serialization.list(JournalEntryAppliedPaymentsItem.optional()).optional() + core.serialization.list(JournalEntryAppliedPaymentsItem.optional()).optional(), ), memo: core.serialization.string().optional(), currency: JournalEntryCurrency.optional(), @@ -39,7 +39,7 @@ export const JournalEntry: core.serialization.ObjectSchema< journalNumber: core.serialization.property("journal_number", core.serialization.string().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(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", JournalEntryPostingStatus.optional()), @@ -48,14 +48,14 @@ export const JournalEntry: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).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 { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/JournalEntryAccountingPeriod.ts b/src/serialization/resources/accounting/types/JournalEntryAccountingPeriod.ts index ea61eda79..e71517fac 100644 --- a/src/serialization/resources/accounting/types/JournalEntryAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/JournalEntryAccountingPeriod.ts @@ -13,5 +13,5 @@ export const JournalEntryAccountingPeriod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace JournalEntryAccountingPeriod { - type Raw = string | AccountingPeriod.Raw; + export type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalEntryAppliedPaymentsItem.ts b/src/serialization/resources/accounting/types/JournalEntryAppliedPaymentsItem.ts index b7e4571be..2091a5958 100644 --- a/src/serialization/resources/accounting/types/JournalEntryAppliedPaymentsItem.ts +++ b/src/serialization/resources/accounting/types/JournalEntryAppliedPaymentsItem.ts @@ -13,5 +13,5 @@ export const JournalEntryAppliedPaymentsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentLineItem]); export declare namespace JournalEntryAppliedPaymentsItem { - type Raw = string | PaymentLineItem.Raw; + export type Raw = string | PaymentLineItem.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalEntryCompany.ts b/src/serialization/resources/accounting/types/JournalEntryCompany.ts index 54f305b96..d0ee91623 100644 --- a/src/serialization/resources/accounting/types/JournalEntryCompany.ts +++ b/src/serialization/resources/accounting/types/JournalEntryCompany.ts @@ -13,5 +13,5 @@ export const JournalEntryCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace JournalEntryCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalEntryCurrency.ts b/src/serialization/resources/accounting/types/JournalEntryCurrency.ts index 3d56a11c2..646c92079 100644 --- a/src/serialization/resources/accounting/types/JournalEntryCurrency.ts +++ b/src/serialization/resources/accounting/types/JournalEntryCurrency.ts @@ -13,5 +13,5 @@ export const JournalEntryCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace JournalEntryCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/JournalEntryPaymentsItem.ts b/src/serialization/resources/accounting/types/JournalEntryPaymentsItem.ts index a0ebc48c7..509ce48f4 100644 --- a/src/serialization/resources/accounting/types/JournalEntryPaymentsItem.ts +++ b/src/serialization/resources/accounting/types/JournalEntryPaymentsItem.ts @@ -13,5 +13,5 @@ export const JournalEntryPaymentsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Payment]); export declare namespace JournalEntryPaymentsItem { - type Raw = string | Payment.Raw; + export type Raw = string | Payment.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalEntryPostingStatus.ts b/src/serialization/resources/accounting/types/JournalEntryPostingStatus.ts index 1eedfb63c..dd2a9954b 100644 --- a/src/serialization/resources/accounting/types/JournalEntryPostingStatus.ts +++ b/src/serialization/resources/accounting/types/JournalEntryPostingStatus.ts @@ -13,5 +13,5 @@ export const JournalEntryPostingStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([PostingStatusEnum, core.serialization.string()]); export declare namespace JournalEntryPostingStatus { - type Raw = PostingStatusEnum.Raw | string; + export type Raw = PostingStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/JournalEntryRequest.ts b/src/serialization/resources/accounting/types/JournalEntryRequest.ts index d1f435914..69528d329 100644 --- a/src/serialization/resources/accounting/types/JournalEntryRequest.ts +++ b/src/serialization/resources/accounting/types/JournalEntryRequest.ts @@ -25,7 +25,7 @@ export const JournalEntryRequest: core.serialization.ObjectSchema< company: JournalEntryRequestCompany.optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(JournalEntryRequestTrackingCategoriesItem.optional()).optional() + core.serialization.list(JournalEntryRequestTrackingCategoriesItem.optional()).optional(), ), inclusiveOfTax: core.serialization.property("inclusive_of_tax", core.serialization.boolean().optional()), lines: core.serialization.list(JournalLineRequest).optional(), @@ -33,17 +33,17 @@ export const JournalEntryRequest: core.serialization.ObjectSchema< postingStatus: core.serialization.property("posting_status", JournalEntryRequestPostingStatus.optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace JournalEntryRequest { - interface Raw { + export interface Raw { transaction_date?: string | null; payments?: (JournalEntryRequestPaymentsItem.Raw | null | undefined)[] | null; memo?: string | null; diff --git a/src/serialization/resources/accounting/types/JournalEntryRequestCompany.ts b/src/serialization/resources/accounting/types/JournalEntryRequestCompany.ts index 52c77f7ff..550fe5d02 100644 --- a/src/serialization/resources/accounting/types/JournalEntryRequestCompany.ts +++ b/src/serialization/resources/accounting/types/JournalEntryRequestCompany.ts @@ -13,5 +13,5 @@ export const JournalEntryRequestCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace JournalEntryRequestCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalEntryRequestCurrency.ts b/src/serialization/resources/accounting/types/JournalEntryRequestCurrency.ts index 303506b29..a6aab7ac9 100644 --- a/src/serialization/resources/accounting/types/JournalEntryRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/JournalEntryRequestCurrency.ts @@ -13,5 +13,5 @@ export const JournalEntryRequestCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace JournalEntryRequestCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/JournalEntryRequestPaymentsItem.ts b/src/serialization/resources/accounting/types/JournalEntryRequestPaymentsItem.ts index d7fb4544a..fbbeab74a 100644 --- a/src/serialization/resources/accounting/types/JournalEntryRequestPaymentsItem.ts +++ b/src/serialization/resources/accounting/types/JournalEntryRequestPaymentsItem.ts @@ -13,5 +13,5 @@ export const JournalEntryRequestPaymentsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Payment]); export declare namespace JournalEntryRequestPaymentsItem { - type Raw = string | Payment.Raw; + export type Raw = string | Payment.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalEntryRequestPostingStatus.ts b/src/serialization/resources/accounting/types/JournalEntryRequestPostingStatus.ts index 5a75937e6..8ab2abfd4 100644 --- a/src/serialization/resources/accounting/types/JournalEntryRequestPostingStatus.ts +++ b/src/serialization/resources/accounting/types/JournalEntryRequestPostingStatus.ts @@ -13,5 +13,5 @@ export const JournalEntryRequestPostingStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([PostingStatusEnum, core.serialization.string()]); export declare namespace JournalEntryRequestPostingStatus { - type Raw = PostingStatusEnum.Raw | string; + export type Raw = PostingStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/JournalEntryRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/JournalEntryRequestTrackingCategoriesItem.ts index 5cc63dec8..2f27a98f0 100644 --- a/src/serialization/resources/accounting/types/JournalEntryRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/JournalEntryRequestTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const JournalEntryRequestTrackingCategoriesItem: core.serialization.Schem > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace JournalEntryRequestTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalEntryResponse.ts b/src/serialization/resources/accounting/types/JournalEntryResponse.ts index abef29e3b..7ae579625 100644 --- a/src/serialization/resources/accounting/types/JournalEntryResponse.ts +++ b/src/serialization/resources/accounting/types/JournalEntryResponse.ts @@ -21,7 +21,7 @@ export const JournalEntryResponse: core.serialization.ObjectSchema< }); export declare namespace JournalEntryResponse { - interface Raw { + export interface Raw { model: JournalEntry.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/accounting/types/JournalEntryTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/JournalEntryTrackingCategoriesItem.ts index 069edd8de..883665e50 100644 --- a/src/serialization/resources/accounting/types/JournalEntryTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/JournalEntryTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const JournalEntryTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace JournalEntryTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalLine.ts b/src/serialization/resources/accounting/types/JournalLine.ts index 2587290ea..1bbd93e91 100644 --- a/src/serialization/resources/accounting/types/JournalLine.ts +++ b/src/serialization/resources/accounting/types/JournalLine.ts @@ -24,7 +24,7 @@ export const JournalLine: core.serialization.ObjectSchema< trackingCategory: core.serialization.property("tracking_category", JournalLineTrackingCategory.optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(JournalLineTrackingCategoriesItem.optional()).optional() + core.serialization.list(JournalLineTrackingCategoriesItem.optional()).optional(), ), currency: JournalLineCurrency.optional(), company: core.serialization.string().optional(), @@ -38,7 +38,7 @@ export const JournalLine: core.serialization.ObjectSchema< }); export declare namespace JournalLine { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/JournalLineAccount.ts b/src/serialization/resources/accounting/types/JournalLineAccount.ts index 77be2112e..523a9dfeb 100644 --- a/src/serialization/resources/accounting/types/JournalLineAccount.ts +++ b/src/serialization/resources/accounting/types/JournalLineAccount.ts @@ -13,5 +13,5 @@ export const JournalLineAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace JournalLineAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalLineCurrency.ts b/src/serialization/resources/accounting/types/JournalLineCurrency.ts index d248a1ac2..3933c4a10 100644 --- a/src/serialization/resources/accounting/types/JournalLineCurrency.ts +++ b/src/serialization/resources/accounting/types/JournalLineCurrency.ts @@ -13,5 +13,5 @@ export const JournalLineCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace JournalLineCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/JournalLineRequest.ts b/src/serialization/resources/accounting/types/JournalLineRequest.ts index 8a66c51f9..8e7c49430 100644 --- a/src/serialization/resources/accounting/types/JournalLineRequest.ts +++ b/src/serialization/resources/accounting/types/JournalLineRequest.ts @@ -21,7 +21,7 @@ export const JournalLineRequest: core.serialization.ObjectSchema< trackingCategory: core.serialization.property("tracking_category", JournalLineRequestTrackingCategory.optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(JournalLineRequestTrackingCategoriesItem.optional()).optional() + core.serialization.list(JournalLineRequestTrackingCategoriesItem.optional()).optional(), ), currency: JournalLineRequestCurrency.optional(), company: core.serialization.string().optional(), @@ -32,17 +32,17 @@ export const JournalLineRequest: core.serialization.ObjectSchema< exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace JournalLineRequest { - interface Raw { + export interface Raw { remote_id?: string | null; account?: JournalLineRequestAccount.Raw | null; net_amount?: number | null; diff --git a/src/serialization/resources/accounting/types/JournalLineRequestAccount.ts b/src/serialization/resources/accounting/types/JournalLineRequestAccount.ts index 6790434b2..151fc1cb2 100644 --- a/src/serialization/resources/accounting/types/JournalLineRequestAccount.ts +++ b/src/serialization/resources/accounting/types/JournalLineRequestAccount.ts @@ -13,5 +13,5 @@ export const JournalLineRequestAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace JournalLineRequestAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalLineRequestCurrency.ts b/src/serialization/resources/accounting/types/JournalLineRequestCurrency.ts index 47eb1fd5d..9835d5623 100644 --- a/src/serialization/resources/accounting/types/JournalLineRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/JournalLineRequestCurrency.ts @@ -13,5 +13,5 @@ export const JournalLineRequestCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace JournalLineRequestCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategoriesItem.ts index 401e5d8bb..e95f3999f 100644 --- a/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const JournalLineRequestTrackingCategoriesItem: core.serialization.Schema > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace JournalLineRequestTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategory.ts b/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategory.ts index 258011ec0..b56602523 100644 --- a/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategory.ts +++ b/src/serialization/resources/accounting/types/JournalLineRequestTrackingCategory.ts @@ -13,5 +13,5 @@ export const JournalLineRequestTrackingCategory: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace JournalLineRequestTrackingCategory { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalLineTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/JournalLineTrackingCategoriesItem.ts index 8c3adfde9..ff392bdb8 100644 --- a/src/serialization/resources/accounting/types/JournalLineTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/JournalLineTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const JournalLineTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace JournalLineTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/JournalLineTrackingCategory.ts b/src/serialization/resources/accounting/types/JournalLineTrackingCategory.ts index 919b08282..aaf80bd96 100644 --- a/src/serialization/resources/accounting/types/JournalLineTrackingCategory.ts +++ b/src/serialization/resources/accounting/types/JournalLineTrackingCategory.ts @@ -13,5 +13,5 @@ export const JournalLineTrackingCategory: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace JournalLineTrackingCategory { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/LanguageEnum.ts b/src/serialization/resources/accounting/types/LanguageEnum.ts index 8cb3142e7..17bf516e9 100644 --- a/src/serialization/resources/accounting/types/LanguageEnum.ts +++ b/src/serialization/resources/accounting/types/LanguageEnum.ts @@ -12,5 +12,5 @@ export const LanguageEnum: core.serialization.Schema< > = core.serialization.enum_(["en", "de"]); export declare namespace LanguageEnum { - type Raw = "en" | "de"; + export type Raw = "en" | "de"; } diff --git a/src/serialization/resources/accounting/types/LastSyncResultEnum.ts b/src/serialization/resources/accounting/types/LastSyncResultEnum.ts index 385019900..6df81dd74 100644 --- a/src/serialization/resources/accounting/types/LastSyncResultEnum.ts +++ b/src/serialization/resources/accounting/types/LastSyncResultEnum.ts @@ -12,5 +12,5 @@ export const LastSyncResultEnum: core.serialization.Schema< > = core.serialization.enum_(["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"]); export declare namespace LastSyncResultEnum { - type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; + export type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; } diff --git a/src/serialization/resources/accounting/types/LinkToken.ts b/src/serialization/resources/accounting/types/LinkToken.ts index 146b128af..a979ab26e 100644 --- a/src/serialization/resources/accounting/types/LinkToken.ts +++ b/src/serialization/resources/accounting/types/LinkToken.ts @@ -16,7 +16,7 @@ export const LinkToken: core.serialization.ObjectSchema< }); export declare namespace LinkToken { - interface Raw { + export interface Raw { link_token: string; integration_name?: string | null; magic_link_url?: string | null; diff --git a/src/serialization/resources/accounting/types/LinkedAccountStatus.ts b/src/serialization/resources/accounting/types/LinkedAccountStatus.ts index 3f4f6409c..c5806693f 100644 --- a/src/serialization/resources/accounting/types/LinkedAccountStatus.ts +++ b/src/serialization/resources/accounting/types/LinkedAccountStatus.ts @@ -15,7 +15,7 @@ export const LinkedAccountStatus: core.serialization.ObjectSchema< }); export declare namespace LinkedAccountStatus { - interface Raw { + export interface Raw { linked_account_status: string; can_make_request: boolean; } diff --git a/src/serialization/resources/accounting/types/MetaResponse.ts b/src/serialization/resources/accounting/types/MetaResponse.ts index c3b922436..e0b6d6e00 100644 --- a/src/serialization/resources/accounting/types/MetaResponse.ts +++ b/src/serialization/resources/accounting/types/MetaResponse.ts @@ -13,22 +13,22 @@ export const MetaResponse: core.serialization.ObjectSchema< > = core.serialization.object({ requestSchema: core.serialization.property( "request_schema", - core.serialization.record(core.serialization.string(), core.serialization.unknown()) + core.serialization.record(core.serialization.string(), core.serialization.unknown()), ), remoteFieldClasses: core.serialization.property( "remote_field_classes", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), status: LinkedAccountStatus.optional(), hasConditionalParams: core.serialization.property("has_conditional_params", core.serialization.boolean()), hasRequiredLinkedAccountParams: core.serialization.property( "has_required_linked_account_params", - core.serialization.boolean() + core.serialization.boolean(), ), }); export declare namespace MetaResponse { - interface Raw { + export interface Raw { request_schema: Record; remote_field_classes?: Record | null; status?: LinkedAccountStatus.Raw | null; diff --git a/src/serialization/resources/accounting/types/MethodEnum.ts b/src/serialization/resources/accounting/types/MethodEnum.ts index 7d3e14017..bf6bbb29d 100644 --- a/src/serialization/resources/accounting/types/MethodEnum.ts +++ b/src/serialization/resources/accounting/types/MethodEnum.ts @@ -10,5 +10,5 @@ export const MethodEnum: core.serialization.Schema = core.serialization.enum_(["CREDIT_CARD", "DEBIT_CARD", "ACH", "CASH", "CHECK"]); export declare namespace MethodTypeEnum { - type Raw = "CREDIT_CARD" | "DEBIT_CARD" | "ACH" | "CASH" | "CHECK"; + export type Raw = "CREDIT_CARD" | "DEBIT_CARD" | "ACH" | "CASH" | "CHECK"; } diff --git a/src/serialization/resources/accounting/types/ModelOperation.ts b/src/serialization/resources/accounting/types/ModelOperation.ts index c6d92822a..10a56a380 100644 --- a/src/serialization/resources/accounting/types/ModelOperation.ts +++ b/src/serialization/resources/accounting/types/ModelOperation.ts @@ -13,20 +13,20 @@ export const ModelOperation: core.serialization.ObjectSchema< modelName: core.serialization.property("model_name", core.serialization.string()), availableOperations: core.serialization.property( "available_operations", - core.serialization.list(core.serialization.string()) + core.serialization.list(core.serialization.string()), ), requiredPostParameters: core.serialization.property( "required_post_parameters", - core.serialization.list(core.serialization.string()) + core.serialization.list(core.serialization.string()), ), supportedFields: core.serialization.property( "supported_fields", - core.serialization.list(core.serialization.string()) + core.serialization.list(core.serialization.string()), ), }); export declare namespace ModelOperation { - interface Raw { + export interface Raw { model_name: string; available_operations: string[]; required_post_parameters: string[]; diff --git a/src/serialization/resources/accounting/types/ModelPermissionDeserializer.ts b/src/serialization/resources/accounting/types/ModelPermissionDeserializer.ts index 6328a165c..3b3c693b4 100644 --- a/src/serialization/resources/accounting/types/ModelPermissionDeserializer.ts +++ b/src/serialization/resources/accounting/types/ModelPermissionDeserializer.ts @@ -14,7 +14,7 @@ export const ModelPermissionDeserializer: core.serialization.ObjectSchema< }); export declare namespace ModelPermissionDeserializer { - interface Raw { + export interface Raw { is_enabled?: boolean | null; } } diff --git a/src/serialization/resources/accounting/types/ModelPermissionDeserializerRequest.ts b/src/serialization/resources/accounting/types/ModelPermissionDeserializerRequest.ts index b09970563..ce08bf143 100644 --- a/src/serialization/resources/accounting/types/ModelPermissionDeserializerRequest.ts +++ b/src/serialization/resources/accounting/types/ModelPermissionDeserializerRequest.ts @@ -14,7 +14,7 @@ export const ModelPermissionDeserializerRequest: core.serialization.ObjectSchema }); export declare namespace ModelPermissionDeserializerRequest { - interface Raw { + export interface Raw { is_enabled?: boolean | null; } } diff --git a/src/serialization/resources/accounting/types/MultipartFormFieldRequest.ts b/src/serialization/resources/accounting/types/MultipartFormFieldRequest.ts index a27966e8d..1a3d4392a 100644 --- a/src/serialization/resources/accounting/types/MultipartFormFieldRequest.ts +++ b/src/serialization/resources/accounting/types/MultipartFormFieldRequest.ts @@ -19,7 +19,7 @@ export const MultipartFormFieldRequest: core.serialization.ObjectSchema< }); export declare namespace MultipartFormFieldRequest { - interface Raw { + export interface Raw { name: string; data: string; encoding?: MultipartFormFieldRequestEncoding.Raw | null; diff --git a/src/serialization/resources/accounting/types/MultipartFormFieldRequestEncoding.ts b/src/serialization/resources/accounting/types/MultipartFormFieldRequestEncoding.ts index 08a3f9e88..9c35798ba 100644 --- a/src/serialization/resources/accounting/types/MultipartFormFieldRequestEncoding.ts +++ b/src/serialization/resources/accounting/types/MultipartFormFieldRequestEncoding.ts @@ -13,5 +13,5 @@ export const MultipartFormFieldRequestEncoding: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([EncodingEnum, core.serialization.string()]); export declare namespace MultipartFormFieldRequestEncoding { - type Raw = EncodingEnum.Raw | string; + export type Raw = EncodingEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PaginatedAccountDetailsAndActionsList.ts b/src/serialization/resources/accounting/types/PaginatedAccountDetailsAndActionsList.ts index 1517bf06b..2c110f8c7 100644 --- a/src/serialization/resources/accounting/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/serialization/resources/accounting/types/PaginatedAccountDetailsAndActionsList.ts @@ -17,7 +17,7 @@ export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSch }); export declare namespace PaginatedAccountDetailsAndActionsList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: AccountDetailsAndActions.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedAccountList.ts b/src/serialization/resources/accounting/types/PaginatedAccountList.ts index bc9056831..4f1fca6d5 100644 --- a/src/serialization/resources/accounting/types/PaginatedAccountList.ts +++ b/src/serialization/resources/accounting/types/PaginatedAccountList.ts @@ -17,7 +17,7 @@ export const PaginatedAccountList: core.serialization.ObjectSchema< }); export declare namespace PaginatedAccountList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Account.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedAccountingAttachmentList.ts b/src/serialization/resources/accounting/types/PaginatedAccountingAttachmentList.ts index 425b6af53..ee92ef696 100644 --- a/src/serialization/resources/accounting/types/PaginatedAccountingAttachmentList.ts +++ b/src/serialization/resources/accounting/types/PaginatedAccountingAttachmentList.ts @@ -17,7 +17,7 @@ export const PaginatedAccountingAttachmentList: core.serialization.ObjectSchema< }); export declare namespace PaginatedAccountingAttachmentList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: AccountingAttachment.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedAccountingPeriodList.ts b/src/serialization/resources/accounting/types/PaginatedAccountingPeriodList.ts index 8ecaf5cbc..b4ac2e139 100644 --- a/src/serialization/resources/accounting/types/PaginatedAccountingPeriodList.ts +++ b/src/serialization/resources/accounting/types/PaginatedAccountingPeriodList.ts @@ -17,7 +17,7 @@ export const PaginatedAccountingPeriodList: core.serialization.ObjectSchema< }); export declare namespace PaginatedAccountingPeriodList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: AccountingPeriod.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedAuditLogEventList.ts b/src/serialization/resources/accounting/types/PaginatedAuditLogEventList.ts index d7ea7e810..0a88ced31 100644 --- a/src/serialization/resources/accounting/types/PaginatedAuditLogEventList.ts +++ b/src/serialization/resources/accounting/types/PaginatedAuditLogEventList.ts @@ -17,7 +17,7 @@ export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< }); export declare namespace PaginatedAuditLogEventList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: AuditLogEvent.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedBalanceSheetList.ts b/src/serialization/resources/accounting/types/PaginatedBalanceSheetList.ts index dbd78c9b7..c69b73522 100644 --- a/src/serialization/resources/accounting/types/PaginatedBalanceSheetList.ts +++ b/src/serialization/resources/accounting/types/PaginatedBalanceSheetList.ts @@ -17,7 +17,7 @@ export const PaginatedBalanceSheetList: core.serialization.ObjectSchema< }); export declare namespace PaginatedBalanceSheetList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: BalanceSheet.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedBankFeedAccountList.ts b/src/serialization/resources/accounting/types/PaginatedBankFeedAccountList.ts index f8f31a885..3b7ab45e4 100644 --- a/src/serialization/resources/accounting/types/PaginatedBankFeedAccountList.ts +++ b/src/serialization/resources/accounting/types/PaginatedBankFeedAccountList.ts @@ -17,7 +17,7 @@ export const PaginatedBankFeedAccountList: core.serialization.ObjectSchema< }); export declare namespace PaginatedBankFeedAccountList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: BankFeedAccount.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedBankFeedTransactionList.ts b/src/serialization/resources/accounting/types/PaginatedBankFeedTransactionList.ts index b0228150d..7e00a52b7 100644 --- a/src/serialization/resources/accounting/types/PaginatedBankFeedTransactionList.ts +++ b/src/serialization/resources/accounting/types/PaginatedBankFeedTransactionList.ts @@ -17,7 +17,7 @@ export const PaginatedBankFeedTransactionList: core.serialization.ObjectSchema< }); export declare namespace PaginatedBankFeedTransactionList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: BankFeedTransaction.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedCashFlowStatementList.ts b/src/serialization/resources/accounting/types/PaginatedCashFlowStatementList.ts index a10f77249..533627dfd 100644 --- a/src/serialization/resources/accounting/types/PaginatedCashFlowStatementList.ts +++ b/src/serialization/resources/accounting/types/PaginatedCashFlowStatementList.ts @@ -17,7 +17,7 @@ export const PaginatedCashFlowStatementList: core.serialization.ObjectSchema< }); export declare namespace PaginatedCashFlowStatementList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: CashFlowStatement.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedCompanyInfoList.ts b/src/serialization/resources/accounting/types/PaginatedCompanyInfoList.ts index 547046333..0a8f83300 100644 --- a/src/serialization/resources/accounting/types/PaginatedCompanyInfoList.ts +++ b/src/serialization/resources/accounting/types/PaginatedCompanyInfoList.ts @@ -17,7 +17,7 @@ export const PaginatedCompanyInfoList: core.serialization.ObjectSchema< }); export declare namespace PaginatedCompanyInfoList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: CompanyInfo.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedContactList.ts b/src/serialization/resources/accounting/types/PaginatedContactList.ts index cbac0707f..2ba8fade8 100644 --- a/src/serialization/resources/accounting/types/PaginatedContactList.ts +++ b/src/serialization/resources/accounting/types/PaginatedContactList.ts @@ -17,7 +17,7 @@ export const PaginatedContactList: core.serialization.ObjectSchema< }); export declare namespace PaginatedContactList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Contact.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedCreditNoteList.ts b/src/serialization/resources/accounting/types/PaginatedCreditNoteList.ts index 415bcb336..276c26146 100644 --- a/src/serialization/resources/accounting/types/PaginatedCreditNoteList.ts +++ b/src/serialization/resources/accounting/types/PaginatedCreditNoteList.ts @@ -16,7 +16,7 @@ export const PaginatedCreditNoteList: core.serialization.ObjectSchema< }); export declare namespace PaginatedCreditNoteList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: serializers.accounting.CreditNote.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedEmployeeList.ts b/src/serialization/resources/accounting/types/PaginatedEmployeeList.ts index 84beaad7b..e3fdb7f6d 100644 --- a/src/serialization/resources/accounting/types/PaginatedEmployeeList.ts +++ b/src/serialization/resources/accounting/types/PaginatedEmployeeList.ts @@ -17,7 +17,7 @@ export const PaginatedEmployeeList: core.serialization.ObjectSchema< }); export declare namespace PaginatedEmployeeList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Employee.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedExpenseList.ts b/src/serialization/resources/accounting/types/PaginatedExpenseList.ts index c09459df1..e673b1c10 100644 --- a/src/serialization/resources/accounting/types/PaginatedExpenseList.ts +++ b/src/serialization/resources/accounting/types/PaginatedExpenseList.ts @@ -17,7 +17,7 @@ export const PaginatedExpenseList: core.serialization.ObjectSchema< }); export declare namespace PaginatedExpenseList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Expense.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedGeneralLedgerTransactionList.ts b/src/serialization/resources/accounting/types/PaginatedGeneralLedgerTransactionList.ts index beae204c5..fa5c9d8ba 100644 --- a/src/serialization/resources/accounting/types/PaginatedGeneralLedgerTransactionList.ts +++ b/src/serialization/resources/accounting/types/PaginatedGeneralLedgerTransactionList.ts @@ -17,7 +17,7 @@ export const PaginatedGeneralLedgerTransactionList: core.serialization.ObjectSch }); export declare namespace PaginatedGeneralLedgerTransactionList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: GeneralLedgerTransaction.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedIncomeStatementList.ts b/src/serialization/resources/accounting/types/PaginatedIncomeStatementList.ts index 4aee303f1..90c5b0a41 100644 --- a/src/serialization/resources/accounting/types/PaginatedIncomeStatementList.ts +++ b/src/serialization/resources/accounting/types/PaginatedIncomeStatementList.ts @@ -17,7 +17,7 @@ export const PaginatedIncomeStatementList: core.serialization.ObjectSchema< }); export declare namespace PaginatedIncomeStatementList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: IncomeStatement.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedInvoiceList.ts b/src/serialization/resources/accounting/types/PaginatedInvoiceList.ts index 65b84c5d5..8b510ac8c 100644 --- a/src/serialization/resources/accounting/types/PaginatedInvoiceList.ts +++ b/src/serialization/resources/accounting/types/PaginatedInvoiceList.ts @@ -16,7 +16,7 @@ export const PaginatedInvoiceList: core.serialization.ObjectSchema< }); export declare namespace PaginatedInvoiceList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: serializers.accounting.Invoice.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedIssueList.ts b/src/serialization/resources/accounting/types/PaginatedIssueList.ts index 0ec28c5c1..adc4dc30f 100644 --- a/src/serialization/resources/accounting/types/PaginatedIssueList.ts +++ b/src/serialization/resources/accounting/types/PaginatedIssueList.ts @@ -17,7 +17,7 @@ export const PaginatedIssueList: core.serialization.ObjectSchema< }); export declare namespace PaginatedIssueList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Issue.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedItemList.ts b/src/serialization/resources/accounting/types/PaginatedItemList.ts index 297691f6e..9e471626b 100644 --- a/src/serialization/resources/accounting/types/PaginatedItemList.ts +++ b/src/serialization/resources/accounting/types/PaginatedItemList.ts @@ -17,7 +17,7 @@ export const PaginatedItemList: core.serialization.ObjectSchema< }); export declare namespace PaginatedItemList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Item.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedJournalEntryList.ts b/src/serialization/resources/accounting/types/PaginatedJournalEntryList.ts index fcfd22095..0600c5000 100644 --- a/src/serialization/resources/accounting/types/PaginatedJournalEntryList.ts +++ b/src/serialization/resources/accounting/types/PaginatedJournalEntryList.ts @@ -17,7 +17,7 @@ export const PaginatedJournalEntryList: core.serialization.ObjectSchema< }); export declare namespace PaginatedJournalEntryList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: JournalEntry.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedPaymentList.ts b/src/serialization/resources/accounting/types/PaginatedPaymentList.ts index a5fe2fa94..a8d6adc5b 100644 --- a/src/serialization/resources/accounting/types/PaginatedPaymentList.ts +++ b/src/serialization/resources/accounting/types/PaginatedPaymentList.ts @@ -17,7 +17,7 @@ export const PaginatedPaymentList: core.serialization.ObjectSchema< }); export declare namespace PaginatedPaymentList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Payment.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedPaymentMethodList.ts b/src/serialization/resources/accounting/types/PaginatedPaymentMethodList.ts index 823e607af..8edfd1210 100644 --- a/src/serialization/resources/accounting/types/PaginatedPaymentMethodList.ts +++ b/src/serialization/resources/accounting/types/PaginatedPaymentMethodList.ts @@ -17,7 +17,7 @@ export const PaginatedPaymentMethodList: core.serialization.ObjectSchema< }); export declare namespace PaginatedPaymentMethodList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: PaymentMethod.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedPaymentTermList.ts b/src/serialization/resources/accounting/types/PaginatedPaymentTermList.ts index 2de4aab61..6e7181211 100644 --- a/src/serialization/resources/accounting/types/PaginatedPaymentTermList.ts +++ b/src/serialization/resources/accounting/types/PaginatedPaymentTermList.ts @@ -17,7 +17,7 @@ export const PaginatedPaymentTermList: core.serialization.ObjectSchema< }); export declare namespace PaginatedPaymentTermList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: PaymentTerm.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedPurchaseOrderList.ts b/src/serialization/resources/accounting/types/PaginatedPurchaseOrderList.ts index 458a00443..bb7bc7fe3 100644 --- a/src/serialization/resources/accounting/types/PaginatedPurchaseOrderList.ts +++ b/src/serialization/resources/accounting/types/PaginatedPurchaseOrderList.ts @@ -17,7 +17,7 @@ export const PaginatedPurchaseOrderList: core.serialization.ObjectSchema< }); export declare namespace PaginatedPurchaseOrderList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: PurchaseOrder.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedRemoteFieldClassList.ts b/src/serialization/resources/accounting/types/PaginatedRemoteFieldClassList.ts index 7f3a5aee7..d62f90492 100644 --- a/src/serialization/resources/accounting/types/PaginatedRemoteFieldClassList.ts +++ b/src/serialization/resources/accounting/types/PaginatedRemoteFieldClassList.ts @@ -17,7 +17,7 @@ export const PaginatedRemoteFieldClassList: core.serialization.ObjectSchema< }); export declare namespace PaginatedRemoteFieldClassList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: RemoteFieldClass.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedSyncStatusList.ts b/src/serialization/resources/accounting/types/PaginatedSyncStatusList.ts index 5245e5051..762f555ea 100644 --- a/src/serialization/resources/accounting/types/PaginatedSyncStatusList.ts +++ b/src/serialization/resources/accounting/types/PaginatedSyncStatusList.ts @@ -17,7 +17,7 @@ export const PaginatedSyncStatusList: core.serialization.ObjectSchema< }); export declare namespace PaginatedSyncStatusList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: SyncStatus.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedTaxRateList.ts b/src/serialization/resources/accounting/types/PaginatedTaxRateList.ts index 6159dd174..e749def39 100644 --- a/src/serialization/resources/accounting/types/PaginatedTaxRateList.ts +++ b/src/serialization/resources/accounting/types/PaginatedTaxRateList.ts @@ -17,7 +17,7 @@ export const PaginatedTaxRateList: core.serialization.ObjectSchema< }); export declare namespace PaginatedTaxRateList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: TaxRate.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedTrackingCategoryList.ts b/src/serialization/resources/accounting/types/PaginatedTrackingCategoryList.ts index 838982465..1ad8c41a8 100644 --- a/src/serialization/resources/accounting/types/PaginatedTrackingCategoryList.ts +++ b/src/serialization/resources/accounting/types/PaginatedTrackingCategoryList.ts @@ -17,7 +17,7 @@ export const PaginatedTrackingCategoryList: core.serialization.ObjectSchema< }); export declare namespace PaginatedTrackingCategoryList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: TrackingCategory.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedTransactionList.ts b/src/serialization/resources/accounting/types/PaginatedTransactionList.ts index ada2f362e..c9cb03b3a 100644 --- a/src/serialization/resources/accounting/types/PaginatedTransactionList.ts +++ b/src/serialization/resources/accounting/types/PaginatedTransactionList.ts @@ -17,7 +17,7 @@ export const PaginatedTransactionList: core.serialization.ObjectSchema< }); export declare namespace PaginatedTransactionList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Transaction.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PaginatedVendorCreditList.ts b/src/serialization/resources/accounting/types/PaginatedVendorCreditList.ts index 3a5c635f7..b1aa3a5d1 100644 --- a/src/serialization/resources/accounting/types/PaginatedVendorCreditList.ts +++ b/src/serialization/resources/accounting/types/PaginatedVendorCreditList.ts @@ -18,7 +18,7 @@ export const PaginatedVendorCreditList: core.serialization.ObjectSchema< }); export declare namespace PaginatedVendorCreditList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: serializers.accounting.VendorCredit.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequest.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequest.ts index 3a712486b..e1360da3f 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequest.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequest.ts @@ -31,29 +31,29 @@ export const PatchedPaymentRequest: core.serialization.ObjectSchema< type: PatchedPaymentRequestType.optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(PatchedPaymentRequestTrackingCategoriesItem.optional()).optional() + core.serialization.list(PatchedPaymentRequestTrackingCategoriesItem.optional()).optional(), ), accountingPeriod: core.serialization.property( "accounting_period", - PatchedPaymentRequestAccountingPeriod.optional() + PatchedPaymentRequestAccountingPeriod.optional(), ), appliedToLines: core.serialization.property( "applied_to_lines", - core.serialization.list(PatchedPaymentRequestAppliedToLinesItem).optional() + core.serialization.list(PatchedPaymentRequestAppliedToLinesItem).optional(), ), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PatchedPaymentRequest { - interface Raw { + export interface Raw { transaction_date?: string | null; contact?: PatchedPaymentRequestContact.Raw | null; account?: PatchedPaymentRequestAccount.Raw | null; diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestAccount.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestAccount.ts index 665990fe2..4d5b9c07a 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestAccount.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestAccount.ts @@ -13,5 +13,5 @@ export const PatchedPaymentRequestAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace PatchedPaymentRequestAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestAccountingPeriod.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestAccountingPeriod.ts index 0e402e809..d6cef478d 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestAccountingPeriod.ts @@ -13,5 +13,5 @@ export const PatchedPaymentRequestAccountingPeriod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace PatchedPaymentRequestAccountingPeriod { - type Raw = string | AccountingPeriod.Raw; + export type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestAppliedToLinesItem.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestAppliedToLinesItem.ts index bc697e927..16cf8cb1d 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestAppliedToLinesItem.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestAppliedToLinesItem.ts @@ -13,5 +13,5 @@ export const PatchedPaymentRequestAppliedToLinesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentLineItemRequest]); export declare namespace PatchedPaymentRequestAppliedToLinesItem { - type Raw = string | PaymentLineItemRequest.Raw; + export type Raw = string | PaymentLineItemRequest.Raw; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestCompany.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestCompany.ts index bf9d080f4..958004273 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestCompany.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestCompany.ts @@ -13,5 +13,5 @@ export const PatchedPaymentRequestCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace PatchedPaymentRequestCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestContact.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestContact.ts index 58e8c875a..7504e0724 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestContact.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestContact.ts @@ -13,5 +13,5 @@ export const PatchedPaymentRequestContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace PatchedPaymentRequestContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestCurrency.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestCurrency.ts index feacefafd..277fc6f32 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestCurrency.ts @@ -13,5 +13,5 @@ export const PatchedPaymentRequestCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace PatchedPaymentRequestCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestPaymentMethod.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestPaymentMethod.ts index 94bace1af..3b3380c6b 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestPaymentMethod.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestPaymentMethod.ts @@ -13,5 +13,5 @@ export const PatchedPaymentRequestPaymentMethod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentMethod]); export declare namespace PatchedPaymentRequestPaymentMethod { - type Raw = string | PaymentMethod.Raw; + export type Raw = string | PaymentMethod.Raw; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestTrackingCategoriesItem.ts index d3daae864..28e9917ab 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const PatchedPaymentRequestTrackingCategoriesItem: core.serialization.Sch > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace PatchedPaymentRequestTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/PatchedPaymentRequestType.ts b/src/serialization/resources/accounting/types/PatchedPaymentRequestType.ts index bcd75fec7..a3e1c3729 100644 --- a/src/serialization/resources/accounting/types/PatchedPaymentRequestType.ts +++ b/src/serialization/resources/accounting/types/PatchedPaymentRequestType.ts @@ -13,5 +13,5 @@ export const PatchedPaymentRequestType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([PaymentTypeEnum, core.serialization.string()]); export declare namespace PatchedPaymentRequestType { - type Raw = PaymentTypeEnum.Raw | string; + export type Raw = PaymentTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/Payment.ts b/src/serialization/resources/accounting/types/Payment.ts index 5f398f5b1..1b6c09af2 100644 --- a/src/serialization/resources/accounting/types/Payment.ts +++ b/src/serialization/resources/accounting/types/Payment.ts @@ -34,25 +34,25 @@ export const Payment: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace PaymentAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentAccountingPeriod.ts b/src/serialization/resources/accounting/types/PaymentAccountingPeriod.ts index 38d265d73..0b28a931d 100644 --- a/src/serialization/resources/accounting/types/PaymentAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/PaymentAccountingPeriod.ts @@ -13,5 +13,5 @@ export const PaymentAccountingPeriod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace PaymentAccountingPeriod { - type Raw = string | AccountingPeriod.Raw; + export type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentAppliedToLinesItem.ts b/src/serialization/resources/accounting/types/PaymentAppliedToLinesItem.ts index 6ed24544a..0c4f8ed27 100644 --- a/src/serialization/resources/accounting/types/PaymentAppliedToLinesItem.ts +++ b/src/serialization/resources/accounting/types/PaymentAppliedToLinesItem.ts @@ -13,5 +13,5 @@ export const PaymentAppliedToLinesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentLineItem]); export declare namespace PaymentAppliedToLinesItem { - type Raw = string | PaymentLineItem.Raw; + export type Raw = string | PaymentLineItem.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentCompany.ts b/src/serialization/resources/accounting/types/PaymentCompany.ts index b27c16107..884d72493 100644 --- a/src/serialization/resources/accounting/types/PaymentCompany.ts +++ b/src/serialization/resources/accounting/types/PaymentCompany.ts @@ -13,5 +13,5 @@ export const PaymentCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace PaymentCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentContact.ts b/src/serialization/resources/accounting/types/PaymentContact.ts index 782ae2e40..a889063a0 100644 --- a/src/serialization/resources/accounting/types/PaymentContact.ts +++ b/src/serialization/resources/accounting/types/PaymentContact.ts @@ -13,5 +13,5 @@ export const PaymentContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace PaymentContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentCurrency.ts b/src/serialization/resources/accounting/types/PaymentCurrency.ts index ca4fee1c6..796e5854c 100644 --- a/src/serialization/resources/accounting/types/PaymentCurrency.ts +++ b/src/serialization/resources/accounting/types/PaymentCurrency.ts @@ -13,5 +13,5 @@ export const PaymentCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace PaymentCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PaymentLineItem.ts b/src/serialization/resources/accounting/types/PaymentLineItem.ts index 33e2f5e59..393f74cde 100644 --- a/src/serialization/resources/accounting/types/PaymentLineItem.ts +++ b/src/serialization/resources/accounting/types/PaymentLineItem.ts @@ -21,7 +21,7 @@ export const PaymentLineItem: core.serialization.ObjectSchema< }); export declare namespace PaymentLineItem { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/PaymentLineItemRequest.ts b/src/serialization/resources/accounting/types/PaymentLineItemRequest.ts index 8f226e275..a818bcc19 100644 --- a/src/serialization/resources/accounting/types/PaymentLineItemRequest.ts +++ b/src/serialization/resources/accounting/types/PaymentLineItemRequest.ts @@ -18,17 +18,17 @@ export const PaymentLineItemRequest: core.serialization.ObjectSchema< relatedObjectType: core.serialization.property("related_object_type", core.serialization.string().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PaymentLineItemRequest { - interface Raw { + export interface Raw { remote_id?: string | null; applied_amount?: string | null; applied_date?: string | null; diff --git a/src/serialization/resources/accounting/types/PaymentMethod.ts b/src/serialization/resources/accounting/types/PaymentMethod.ts index ad614eaff..d6f89dab8 100644 --- a/src/serialization/resources/accounting/types/PaymentMethod.ts +++ b/src/serialization/resources/accounting/types/PaymentMethod.ts @@ -22,13 +22,13 @@ export const PaymentMethod: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace PaymentMethod { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/PaymentMethodMethodType.ts b/src/serialization/resources/accounting/types/PaymentMethodMethodType.ts index a88a2db9b..5ea086837 100644 --- a/src/serialization/resources/accounting/types/PaymentMethodMethodType.ts +++ b/src/serialization/resources/accounting/types/PaymentMethodMethodType.ts @@ -13,5 +13,5 @@ export const PaymentMethodMethodType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([MethodTypeEnum, core.serialization.string()]); export declare namespace PaymentMethodMethodType { - type Raw = MethodTypeEnum.Raw | string; + export type Raw = MethodTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PaymentPaymentMethod.ts b/src/serialization/resources/accounting/types/PaymentPaymentMethod.ts index 992ffd69f..8d6787134 100644 --- a/src/serialization/resources/accounting/types/PaymentPaymentMethod.ts +++ b/src/serialization/resources/accounting/types/PaymentPaymentMethod.ts @@ -13,5 +13,5 @@ export const PaymentPaymentMethod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentMethod]); export declare namespace PaymentPaymentMethod { - type Raw = string | PaymentMethod.Raw; + export type Raw = string | PaymentMethod.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentRequest.ts b/src/serialization/resources/accounting/types/PaymentRequest.ts index 37abf6e69..04ec23c63 100644 --- a/src/serialization/resources/accounting/types/PaymentRequest.ts +++ b/src/serialization/resources/accounting/types/PaymentRequest.ts @@ -31,26 +31,26 @@ export const PaymentRequest: core.serialization.ObjectSchema< type: PaymentRequestType.optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(PaymentRequestTrackingCategoriesItem.optional()).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(PaymentRequestAppliedToLinesItem).optional() + core.serialization.list(PaymentRequestAppliedToLinesItem).optional(), ), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PaymentRequest { - interface Raw { + export interface Raw { transaction_date?: string | null; contact?: PaymentRequestContact.Raw | null; account?: PaymentRequestAccount.Raw | null; diff --git a/src/serialization/resources/accounting/types/PaymentRequestAccount.ts b/src/serialization/resources/accounting/types/PaymentRequestAccount.ts index 1d24319a5..a3d4e6a0a 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestAccount.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestAccount.ts @@ -13,5 +13,5 @@ export const PaymentRequestAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace PaymentRequestAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestAccountingPeriod.ts b/src/serialization/resources/accounting/types/PaymentRequestAccountingPeriod.ts index 047998be7..cd424e355 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestAccountingPeriod.ts @@ -13,5 +13,5 @@ export const PaymentRequestAccountingPeriod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace PaymentRequestAccountingPeriod { - type Raw = string | AccountingPeriod.Raw; + export type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestAppliedToLinesItem.ts b/src/serialization/resources/accounting/types/PaymentRequestAppliedToLinesItem.ts index ea014c864..98898cd53 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestAppliedToLinesItem.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestAppliedToLinesItem.ts @@ -13,5 +13,5 @@ export const PaymentRequestAppliedToLinesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentLineItemRequest]); export declare namespace PaymentRequestAppliedToLinesItem { - type Raw = string | PaymentLineItemRequest.Raw; + export type Raw = string | PaymentLineItemRequest.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestCompany.ts b/src/serialization/resources/accounting/types/PaymentRequestCompany.ts index 52a8bbb62..cb4359c52 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestCompany.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestCompany.ts @@ -13,5 +13,5 @@ export const PaymentRequestCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace PaymentRequestCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestContact.ts b/src/serialization/resources/accounting/types/PaymentRequestContact.ts index a66c357de..0d8d768b8 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestContact.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestContact.ts @@ -13,5 +13,5 @@ export const PaymentRequestContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace PaymentRequestContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestCurrency.ts b/src/serialization/resources/accounting/types/PaymentRequestCurrency.ts index 47e9b4f3e..a596fb130 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestCurrency.ts @@ -13,5 +13,5 @@ export const PaymentRequestCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace PaymentRequestCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestPaymentMethod.ts b/src/serialization/resources/accounting/types/PaymentRequestPaymentMethod.ts index 8a41b61ee..b74146f2f 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestPaymentMethod.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestPaymentMethod.ts @@ -13,5 +13,5 @@ export const PaymentRequestPaymentMethod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentMethod]); export declare namespace PaymentRequestPaymentMethod { - type Raw = string | PaymentMethod.Raw; + export type Raw = string | PaymentMethod.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/PaymentRequestTrackingCategoriesItem.ts index b8b735afd..60436576f 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const PaymentRequestTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace PaymentRequestTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentRequestType.ts b/src/serialization/resources/accounting/types/PaymentRequestType.ts index ca8b12d46..4af429b71 100644 --- a/src/serialization/resources/accounting/types/PaymentRequestType.ts +++ b/src/serialization/resources/accounting/types/PaymentRequestType.ts @@ -13,5 +13,5 @@ export const PaymentRequestType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([PaymentTypeEnum, core.serialization.string()]); export declare namespace PaymentRequestType { - type Raw = PaymentTypeEnum.Raw | string; + export type Raw = PaymentTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PaymentResponse.ts b/src/serialization/resources/accounting/types/PaymentResponse.ts index e50023422..8ae16a952 100644 --- a/src/serialization/resources/accounting/types/PaymentResponse.ts +++ b/src/serialization/resources/accounting/types/PaymentResponse.ts @@ -21,7 +21,7 @@ export const PaymentResponse: core.serialization.ObjectSchema< }); export declare namespace PaymentResponse { - interface Raw { + export interface Raw { model: Payment.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/accounting/types/PaymentTerm.ts b/src/serialization/resources/accounting/types/PaymentTerm.ts index 3ee35ba71..d5fd6213d 100644 --- a/src/serialization/resources/accounting/types/PaymentTerm.ts +++ b/src/serialization/resources/accounting/types/PaymentTerm.ts @@ -24,13 +24,13 @@ export const PaymentTerm: core.serialization.ObjectSchema< remoteLastModifiedAt: core.serialization.property("remote_last_modified_at", core.serialization.date().optional()), fieldMappings: core.serialization.property( "field_mappings", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace PaymentTerm { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/PaymentTermCompany.ts b/src/serialization/resources/accounting/types/PaymentTermCompany.ts index 89b12c48d..db21a4e7f 100644 --- a/src/serialization/resources/accounting/types/PaymentTermCompany.ts +++ b/src/serialization/resources/accounting/types/PaymentTermCompany.ts @@ -13,5 +13,5 @@ export const PaymentTermCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace PaymentTermCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/PaymentTrackingCategoriesItem.ts index c97fa67d1..df0ff7964 100644 --- a/src/serialization/resources/accounting/types/PaymentTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/PaymentTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const PaymentTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace PaymentTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/PaymentType.ts b/src/serialization/resources/accounting/types/PaymentType.ts index ee0bcab97..15cc5620b 100644 --- a/src/serialization/resources/accounting/types/PaymentType.ts +++ b/src/serialization/resources/accounting/types/PaymentType.ts @@ -13,5 +13,5 @@ export const PaymentType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([PaymentTypeEnum, core.serialization.string()]); export declare namespace PaymentType { - type Raw = PaymentTypeEnum.Raw | string; + export type Raw = PaymentTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PaymentTypeEnum.ts b/src/serialization/resources/accounting/types/PaymentTypeEnum.ts index 582e38bea..3cff676e7 100644 --- a/src/serialization/resources/accounting/types/PaymentTypeEnum.ts +++ b/src/serialization/resources/accounting/types/PaymentTypeEnum.ts @@ -12,5 +12,5 @@ export const PaymentTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["ACCOUNTS_PAYABLE", "ACCOUNTS_RECEIVABLE"]); export declare namespace PaymentTypeEnum { - type Raw = "ACCOUNTS_PAYABLE" | "ACCOUNTS_RECEIVABLE"; + export type Raw = "ACCOUNTS_PAYABLE" | "ACCOUNTS_RECEIVABLE"; } diff --git a/src/serialization/resources/accounting/types/PostingStatusEnum.ts b/src/serialization/resources/accounting/types/PostingStatusEnum.ts index a41f63ef5..ff997c337 100644 --- a/src/serialization/resources/accounting/types/PostingStatusEnum.ts +++ b/src/serialization/resources/accounting/types/PostingStatusEnum.ts @@ -12,5 +12,5 @@ export const PostingStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["UNPOSTED", "POSTED"]); export declare namespace PostingStatusEnum { - type Raw = "UNPOSTED" | "POSTED"; + export type Raw = "UNPOSTED" | "POSTED"; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrder.ts b/src/serialization/resources/accounting/types/PurchaseOrder.ts index 159ec3a3d..df5b89882 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrder.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrder.ts @@ -42,7 +42,7 @@ export const PurchaseOrder: core.serialization.ObjectSchema< inclusiveOfTax: core.serialization.property("inclusive_of_tax", core.serialization.boolean().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(PurchaseOrderTrackingCategoriesItem.optional()).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()), @@ -50,14 +50,14 @@ export const PurchaseOrder: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).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 { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/PurchaseOrderAccountingPeriod.ts b/src/serialization/resources/accounting/types/PurchaseOrderAccountingPeriod.ts index 81d7040e9..62bd3fa3d 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderAccountingPeriod.ts @@ -13,5 +13,5 @@ export const PurchaseOrderAccountingPeriod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace PurchaseOrderAccountingPeriod { - type Raw = string | AccountingPeriod.Raw; + export type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderCompany.ts b/src/serialization/resources/accounting/types/PurchaseOrderCompany.ts index 16a89a8f5..1fdd0339e 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderCompany.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderCompany.ts @@ -13,5 +13,5 @@ export const PurchaseOrderCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace PurchaseOrderCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderCurrency.ts b/src/serialization/resources/accounting/types/PurchaseOrderCurrency.ts index 517cfd7cd..886f31bc0 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderCurrency.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderCurrency.ts @@ -13,5 +13,5 @@ export const PurchaseOrderCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace PurchaseOrderCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderDeliveryAddress.ts b/src/serialization/resources/accounting/types/PurchaseOrderDeliveryAddress.ts index 13d4daa03..941d399ab 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderDeliveryAddress.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderDeliveryAddress.ts @@ -13,5 +13,5 @@ export const PurchaseOrderDeliveryAddress: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Address]); export declare namespace PurchaseOrderDeliveryAddress { - type Raw = string | Address.Raw; + export type Raw = string | Address.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderLineItem.ts b/src/serialization/resources/accounting/types/PurchaseOrderLineItem.ts index b1c1ee528..4715bbbaa 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderLineItem.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderLineItem.ts @@ -25,7 +25,7 @@ export const PurchaseOrderLineItem: core.serialization.ObjectSchema< trackingCategory: core.serialization.property("tracking_category", core.serialization.string().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(core.serialization.string().optional()).optional() + core.serialization.list(core.serialization.string().optional()).optional(), ), taxAmount: core.serialization.property("tax_amount", core.serialization.string().optional()), totalLineAmount: core.serialization.property("total_line_amount", core.serialization.string().optional()), @@ -38,7 +38,7 @@ export const PurchaseOrderLineItem: core.serialization.ObjectSchema< }); export declare namespace PurchaseOrderLineItem { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/PurchaseOrderLineItemCurrency.ts b/src/serialization/resources/accounting/types/PurchaseOrderLineItemCurrency.ts index 7a327138e..12cecfaf1 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderLineItemCurrency.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderLineItemCurrency.ts @@ -13,5 +13,5 @@ export const PurchaseOrderLineItemCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace PurchaseOrderLineItemCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderLineItemItem.ts b/src/serialization/resources/accounting/types/PurchaseOrderLineItemItem.ts index 6ecf2e0e9..a2887d38d 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderLineItemItem.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderLineItemItem.ts @@ -13,5 +13,5 @@ export const PurchaseOrderLineItemItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace PurchaseOrderLineItemItem { - type Raw = string | Item.Raw; + export type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequest.ts b/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequest.ts index 4aa1298d4..e6b3223ee 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequest.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequest.ts @@ -22,7 +22,7 @@ export const PurchaseOrderLineItemRequest: core.serialization.ObjectSchema< trackingCategory: core.serialization.property("tracking_category", core.serialization.string().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(core.serialization.string().optional()).optional() + core.serialization.list(core.serialization.string().optional()).optional(), ), taxAmount: core.serialization.property("tax_amount", core.serialization.string().optional()), totalLineAmount: core.serialization.property("total_line_amount", core.serialization.string().optional()), @@ -32,17 +32,17 @@ export const PurchaseOrderLineItemRequest: core.serialization.ObjectSchema< company: core.serialization.string().optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PurchaseOrderLineItemRequest { - interface Raw { + export interface Raw { remote_id?: string | null; description?: string | null; unit_price?: number | null; diff --git a/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestCurrency.ts b/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestCurrency.ts index 09a3a6bd2..07ee90a64 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestCurrency.ts @@ -13,5 +13,5 @@ export const PurchaseOrderLineItemRequestCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace PurchaseOrderLineItemRequestCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestItem.ts b/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestItem.ts index cae579457..83e30ac33 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestItem.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderLineItemRequestItem.ts @@ -13,5 +13,5 @@ export const PurchaseOrderLineItemRequestItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace PurchaseOrderLineItemRequestItem { - type Raw = string | Item.Raw; + export type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderPaymentTerm.ts b/src/serialization/resources/accounting/types/PurchaseOrderPaymentTerm.ts index 15e3098a4..5985e5395 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderPaymentTerm.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderPaymentTerm.ts @@ -13,5 +13,5 @@ export const PurchaseOrderPaymentTerm: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentTerm]); export declare namespace PurchaseOrderPaymentTerm { - type Raw = string | PaymentTerm.Raw; + export type Raw = string | PaymentTerm.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequest.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequest.ts index 21a4bf509..981f13fe6 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequest.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequest.ts @@ -34,25 +34,25 @@ export const PurchaseOrderRequest: core.serialization.ObjectSchema< exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(PurchaseOrderRequestTrackingCategoriesItem.optional()).optional() + core.serialization.list(PurchaseOrderRequestTrackingCategoriesItem.optional()).optional(), ), lineItems: core.serialization.property( "line_items", - core.serialization.list(PurchaseOrderLineItemRequest).optional() + core.serialization.list(PurchaseOrderLineItemRequest).optional(), ), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PurchaseOrderRequest { - interface Raw { + export interface Raw { status?: PurchaseOrderRequestStatus.Raw | null; issue_date?: string | null; delivery_date?: string | null; diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequestCompany.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequestCompany.ts index 617968453..b555d0aa5 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequestCompany.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequestCompany.ts @@ -13,5 +13,5 @@ export const PurchaseOrderRequestCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace PurchaseOrderRequestCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequestCurrency.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequestCurrency.ts index c6d95a679..ad33eec99 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequestCurrency.ts @@ -13,5 +13,5 @@ export const PurchaseOrderRequestCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace PurchaseOrderRequestCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.ts index 927706eea..765978157 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequestDeliveryAddress.ts @@ -13,5 +13,5 @@ export const PurchaseOrderRequestDeliveryAddress: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Address]); export declare namespace PurchaseOrderRequestDeliveryAddress { - type Raw = string | Address.Raw; + export type Raw = string | Address.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequestPaymentTerm.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequestPaymentTerm.ts index bbf23facc..2a6988098 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequestPaymentTerm.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequestPaymentTerm.ts @@ -13,5 +13,5 @@ export const PurchaseOrderRequestPaymentTerm: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PaymentTerm]); export declare namespace PurchaseOrderRequestPaymentTerm { - type Raw = string | PaymentTerm.Raw; + export type Raw = string | PaymentTerm.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequestStatus.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequestStatus.ts index 42f9029cd..45514bc88 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequestStatus.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequestStatus.ts @@ -13,5 +13,5 @@ export const PurchaseOrderRequestStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([PurchaseOrderStatusEnum, core.serialization.string()]); export declare namespace PurchaseOrderRequestStatus { - type Raw = PurchaseOrderStatusEnum.Raw | string; + export type Raw = PurchaseOrderStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequestTrackingCategoriesItem.ts index fb9c05f7e..1873b3cd5 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequestTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const PurchaseOrderRequestTrackingCategoriesItem: core.serialization.Sche > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace PurchaseOrderRequestTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderRequestVendor.ts b/src/serialization/resources/accounting/types/PurchaseOrderRequestVendor.ts index 70154d5c8..7f4d238d1 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderRequestVendor.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderRequestVendor.ts @@ -13,5 +13,5 @@ export const PurchaseOrderRequestVendor: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace PurchaseOrderRequestVendor { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderResponse.ts b/src/serialization/resources/accounting/types/PurchaseOrderResponse.ts index c269ffa78..ac241f939 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderResponse.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderResponse.ts @@ -21,7 +21,7 @@ export const PurchaseOrderResponse: core.serialization.ObjectSchema< }); export declare namespace PurchaseOrderResponse { - interface Raw { + export interface Raw { model: PurchaseOrder.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/accounting/types/PurchaseOrderStatus.ts b/src/serialization/resources/accounting/types/PurchaseOrderStatus.ts index e9b91d8e7..c0a813889 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderStatus.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderStatus.ts @@ -13,5 +13,5 @@ export const PurchaseOrderStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([PurchaseOrderStatusEnum, core.serialization.string()]); export declare namespace PurchaseOrderStatus { - type Raw = PurchaseOrderStatusEnum.Raw | string; + export type Raw = PurchaseOrderStatusEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderStatusEnum.ts b/src/serialization/resources/accounting/types/PurchaseOrderStatusEnum.ts index 293028626..647629a0a 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderStatusEnum.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderStatusEnum.ts @@ -12,5 +12,5 @@ export const PurchaseOrderStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["DRAFT", "SUBMITTED", "AUTHORIZED", "BILLED", "DELETED"]); export declare namespace PurchaseOrderStatusEnum { - type Raw = "DRAFT" | "SUBMITTED" | "AUTHORIZED" | "BILLED" | "DELETED"; + export type Raw = "DRAFT" | "SUBMITTED" | "AUTHORIZED" | "BILLED" | "DELETED"; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/PurchaseOrderTrackingCategoriesItem.ts index 498cfbd6c..4b426d11a 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const PurchaseOrderTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace PurchaseOrderTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/PurchaseOrderVendor.ts b/src/serialization/resources/accounting/types/PurchaseOrderVendor.ts index 6cd7e2721..7103a1ad3 100644 --- a/src/serialization/resources/accounting/types/PurchaseOrderVendor.ts +++ b/src/serialization/resources/accounting/types/PurchaseOrderVendor.ts @@ -13,5 +13,5 @@ export const PurchaseOrderVendor: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace PurchaseOrderVendor { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/RemoteData.ts b/src/serialization/resources/accounting/types/RemoteData.ts index 2539eb03e..879a2f0a2 100644 --- a/src/serialization/resources/accounting/types/RemoteData.ts +++ b/src/serialization/resources/accounting/types/RemoteData.ts @@ -15,7 +15,7 @@ export const RemoteData: core.serialization.ObjectSchema< }); export declare namespace RemoteData { - interface Raw { + export interface Raw { path: string; data?: unknown | null; } diff --git a/src/serialization/resources/accounting/types/RemoteEndpointInfo.ts b/src/serialization/resources/accounting/types/RemoteEndpointInfo.ts index 31f37fc53..26ae19ceb 100644 --- a/src/serialization/resources/accounting/types/RemoteEndpointInfo.ts +++ b/src/serialization/resources/accounting/types/RemoteEndpointInfo.ts @@ -14,12 +14,12 @@ export const RemoteEndpointInfo: core.serialization.ObjectSchema< urlPath: core.serialization.property("url_path", core.serialization.string()), fieldTraversalPath: core.serialization.property( "field_traversal_path", - core.serialization.list(core.serialization.unknown()) + core.serialization.list(core.serialization.unknown()), ), }); export declare namespace RemoteEndpointInfo { - interface Raw { + export interface Raw { method: string; url_path: string; field_traversal_path: unknown[]; diff --git a/src/serialization/resources/accounting/types/RemoteField.ts b/src/serialization/resources/accounting/types/RemoteField.ts index 658adc458..46d6da717 100644 --- a/src/serialization/resources/accounting/types/RemoteField.ts +++ b/src/serialization/resources/accounting/types/RemoteField.ts @@ -16,7 +16,7 @@ export const RemoteField: core.serialization.ObjectSchema< }); export declare namespace RemoteField { - interface Raw { + export interface Raw { remote_field_class: RemoteFieldRemoteFieldClass.Raw; value?: unknown | null; } diff --git a/src/serialization/resources/accounting/types/RemoteFieldApi.ts b/src/serialization/resources/accounting/types/RemoteFieldApi.ts index 209698f0b..ecba8c212 100644 --- a/src/serialization/resources/accounting/types/RemoteFieldApi.ts +++ b/src/serialization/resources/accounting/types/RemoteFieldApi.ts @@ -18,14 +18,14 @@ export const RemoteFieldApi: core.serialization.ObjectSchema< remoteEndpointInfo: core.serialization.property("remote_endpoint_info", RemoteEndpointInfo), exampleValues: core.serialization.property( "example_values", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), advancedMetadata: core.serialization.property("advanced_metadata", AdvancedMetadata.optional()), coverage: RemoteFieldApiCoverage.optional(), }); export declare namespace RemoteFieldApi { - interface Raw { + export interface Raw { schema: Record; remote_key_name: string; remote_endpoint_info: RemoteEndpointInfo.Raw; diff --git a/src/serialization/resources/accounting/types/RemoteFieldApiCoverage.ts b/src/serialization/resources/accounting/types/RemoteFieldApiCoverage.ts index a43be6d51..62563975c 100644 --- a/src/serialization/resources/accounting/types/RemoteFieldApiCoverage.ts +++ b/src/serialization/resources/accounting/types/RemoteFieldApiCoverage.ts @@ -12,5 +12,5 @@ export const RemoteFieldApiCoverage: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.number(), core.serialization.number()]); export declare namespace RemoteFieldApiCoverage { - type Raw = number | number; + export type Raw = number | number; } diff --git a/src/serialization/resources/accounting/types/RemoteFieldApiResponse.ts b/src/serialization/resources/accounting/types/RemoteFieldApiResponse.ts index ddd52b304..23d082c92 100644 --- a/src/serialization/resources/accounting/types/RemoteFieldApiResponse.ts +++ b/src/serialization/resources/accounting/types/RemoteFieldApiResponse.ts @@ -14,12 +14,12 @@ export const RemoteFieldApiResponse: core.serialization.ObjectSchema< account: core.serialization.property("Account", core.serialization.list(RemoteFieldApi).optional()), accountingAttachment: core.serialization.property( "AccountingAttachment", - core.serialization.list(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(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()), @@ -29,7 +29,7 @@ export const RemoteFieldApiResponse: core.serialization.ObjectSchema< purchaseOrder: core.serialization.property("PurchaseOrder", core.serialization.list(RemoteFieldApi).optional()), trackingCategory: core.serialization.property( "TrackingCategory", - core.serialization.list(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()), @@ -40,11 +40,11 @@ export const RemoteFieldApiResponse: core.serialization.ObjectSchema< transaction: core.serialization.property("Transaction", core.serialization.list(RemoteFieldApi).optional()), accountingPeriod: core.serialization.property( "AccountingPeriod", - core.serialization.list(RemoteFieldApi).optional() + core.serialization.list(RemoteFieldApi).optional(), ), generalLedgerTransaction: core.serialization.property( "GeneralLedgerTransaction", - core.serialization.list(RemoteFieldApi).optional() + core.serialization.list(RemoteFieldApi).optional(), ), bankFeedAccount: core.serialization.property("BankFeedAccount", core.serialization.list(RemoteFieldApi).optional()), employee: core.serialization.property("Employee", core.serialization.list(RemoteFieldApi).optional()), @@ -53,7 +53,7 @@ export const RemoteFieldApiResponse: core.serialization.ObjectSchema< }); export declare namespace RemoteFieldApiResponse { - interface Raw { + export interface Raw { Account?: RemoteFieldApi.Raw[] | null; AccountingAttachment?: RemoteFieldApi.Raw[] | null; BalanceSheet?: RemoteFieldApi.Raw[] | null; diff --git a/src/serialization/resources/accounting/types/RemoteFieldClass.ts b/src/serialization/resources/accounting/types/RemoteFieldClass.ts index 8b3875544..8b4bd74d8 100644 --- a/src/serialization/resources/accounting/types/RemoteFieldClass.ts +++ b/src/serialization/resources/accounting/types/RemoteFieldClass.ts @@ -23,13 +23,13 @@ export const RemoteFieldClass: core.serialization.ObjectSchema< fieldFormat: core.serialization.property("field_format", FieldFormatEnum.optional()), fieldChoices: core.serialization.property( "field_choices", - core.serialization.list(core.serialization.string()).optional() + core.serialization.list(core.serialization.string()).optional(), ), itemSchema: core.serialization.property("item_schema", ItemSchema.optional()), }); export declare namespace RemoteFieldClass { - interface Raw { + export interface Raw { id?: string | null; display_name?: string | null; remote_key_name?: string | null; diff --git a/src/serialization/resources/accounting/types/RemoteFieldRemoteFieldClass.ts b/src/serialization/resources/accounting/types/RemoteFieldRemoteFieldClass.ts index b48c23930..46282ed22 100644 --- a/src/serialization/resources/accounting/types/RemoteFieldRemoteFieldClass.ts +++ b/src/serialization/resources/accounting/types/RemoteFieldRemoteFieldClass.ts @@ -13,5 +13,5 @@ export const RemoteFieldRemoteFieldClass: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteFieldClass]); export declare namespace RemoteFieldRemoteFieldClass { - type Raw = string | RemoteFieldClass.Raw; + export type Raw = string | RemoteFieldClass.Raw; } diff --git a/src/serialization/resources/accounting/types/RemoteFieldRequest.ts b/src/serialization/resources/accounting/types/RemoteFieldRequest.ts index 75ed103a3..0aa2d2cfc 100644 --- a/src/serialization/resources/accounting/types/RemoteFieldRequest.ts +++ b/src/serialization/resources/accounting/types/RemoteFieldRequest.ts @@ -16,7 +16,7 @@ export const RemoteFieldRequest: core.serialization.ObjectSchema< }); export declare namespace RemoteFieldRequest { - interface Raw { + export interface 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 aecdbdba3..0d3a43d2d 100644 --- a/src/serialization/resources/accounting/types/RemoteFieldRequestRemoteFieldClass.ts +++ b/src/serialization/resources/accounting/types/RemoteFieldRequestRemoteFieldClass.ts @@ -13,5 +13,5 @@ export const RemoteFieldRequestRemoteFieldClass: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteFieldClass]); export declare namespace RemoteFieldRequestRemoteFieldClass { - type Raw = string | RemoteFieldClass.Raw; + export type Raw = string | RemoteFieldClass.Raw; } diff --git a/src/serialization/resources/accounting/types/RemoteKey.ts b/src/serialization/resources/accounting/types/RemoteKey.ts index c768ffc7e..0dd3dc7fd 100644 --- a/src/serialization/resources/accounting/types/RemoteKey.ts +++ b/src/serialization/resources/accounting/types/RemoteKey.ts @@ -15,7 +15,7 @@ export const RemoteKey: core.serialization.ObjectSchema< }); export declare namespace RemoteKey { - interface Raw { + export interface Raw { name: string; key: string; } diff --git a/src/serialization/resources/accounting/types/RemoteResponse.ts b/src/serialization/resources/accounting/types/RemoteResponse.ts index ff776de87..f13a907f7 100644 --- a/src/serialization/resources/accounting/types/RemoteResponse.ts +++ b/src/serialization/resources/accounting/types/RemoteResponse.ts @@ -17,14 +17,14 @@ export const RemoteResponse: core.serialization.ObjectSchema< response: core.serialization.unknown(), responseHeaders: core.serialization.property( "response_headers", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), responseType: core.serialization.property("response_type", ResponseTypeEnum.optional()), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), }); export declare namespace RemoteResponse { - interface Raw { + export interface Raw { method: string; path: string; status: number; diff --git a/src/serialization/resources/accounting/types/ReportItem.ts b/src/serialization/resources/accounting/types/ReportItem.ts index 894913a46..e9071cdf1 100644 --- a/src/serialization/resources/accounting/types/ReportItem.ts +++ b/src/serialization/resources/accounting/types/ReportItem.ts @@ -19,14 +19,14 @@ export const ReportItem: core.serialization.ObjectSchema< "sub_items", core.serialization .list(core.serialization.record(core.serialization.string(), core.serialization.unknown())) - .optional() + .optional(), ), company: core.serialization.string().optional(), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), }); export declare namespace ReportItem { - interface Raw { + export interface Raw { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; diff --git a/src/serialization/resources/accounting/types/RequestFormatEnum.ts b/src/serialization/resources/accounting/types/RequestFormatEnum.ts index f778e3f9c..fb1e7f3b6 100644 --- a/src/serialization/resources/accounting/types/RequestFormatEnum.ts +++ b/src/serialization/resources/accounting/types/RequestFormatEnum.ts @@ -12,5 +12,5 @@ export const RequestFormatEnum: core.serialization.Schema< > = core.serialization.enum_(["JSON", "XML", "MULTIPART"]); export declare namespace RequestFormatEnum { - type Raw = "JSON" | "XML" | "MULTIPART"; + export type Raw = "JSON" | "XML" | "MULTIPART"; } diff --git a/src/serialization/resources/accounting/types/ResponseTypeEnum.ts b/src/serialization/resources/accounting/types/ResponseTypeEnum.ts index 9a6e2e277..ca57d46b1 100644 --- a/src/serialization/resources/accounting/types/ResponseTypeEnum.ts +++ b/src/serialization/resources/accounting/types/ResponseTypeEnum.ts @@ -12,5 +12,5 @@ export const ResponseTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["JSON", "BASE64_GZIP"]); export declare namespace ResponseTypeEnum { - type Raw = "JSON" | "BASE64_GZIP"; + export type Raw = "JSON" | "BASE64_GZIP"; } diff --git a/src/serialization/resources/accounting/types/RoleEnum.ts b/src/serialization/resources/accounting/types/RoleEnum.ts index 1d388533f..048508ff2 100644 --- a/src/serialization/resources/accounting/types/RoleEnum.ts +++ b/src/serialization/resources/accounting/types/RoleEnum.ts @@ -10,5 +10,5 @@ export const RoleEnum: core.serialization.Schema = core.serialization.enum_(["IN_NEXT_SYNC", "IN_LAST_SYNC"]); export declare namespace SelectiveSyncConfigurationsUsageEnum { - type Raw = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; + export type Raw = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; } diff --git a/src/serialization/resources/accounting/types/Status7D1Enum.ts b/src/serialization/resources/accounting/types/Status7D1Enum.ts index ccc1a51fb..2a350119d 100644 --- a/src/serialization/resources/accounting/types/Status7D1Enum.ts +++ b/src/serialization/resources/accounting/types/Status7D1Enum.ts @@ -12,5 +12,5 @@ export const Status7D1Enum: core.serialization.Schema< > = core.serialization.enum_(["ACTIVE", "ARCHIVED"]); export declare namespace Status7D1Enum { - type Raw = "ACTIVE" | "ARCHIVED"; + export type Raw = "ACTIVE" | "ARCHIVED"; } diff --git a/src/serialization/resources/accounting/types/Status895Enum.ts b/src/serialization/resources/accounting/types/Status895Enum.ts index c78d469bf..769c5ba93 100644 --- a/src/serialization/resources/accounting/types/Status895Enum.ts +++ b/src/serialization/resources/accounting/types/Status895Enum.ts @@ -12,5 +12,5 @@ export const Status895Enum: core.serialization.Schema< > = core.serialization.enum_(["ACTIVE", "INACTIVE"]); export declare namespace Status895Enum { - type Raw = "ACTIVE" | "INACTIVE"; + export type Raw = "ACTIVE" | "INACTIVE"; } diff --git a/src/serialization/resources/accounting/types/StatusFd5Enum.ts b/src/serialization/resources/accounting/types/StatusFd5Enum.ts index 040809559..b85cb24d5 100644 --- a/src/serialization/resources/accounting/types/StatusFd5Enum.ts +++ b/src/serialization/resources/accounting/types/StatusFd5Enum.ts @@ -12,5 +12,5 @@ export const StatusFd5Enum: core.serialization.Schema< > = core.serialization.enum_(["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"]); export declare namespace StatusFd5Enum { - type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; + export type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; } diff --git a/src/serialization/resources/accounting/types/SyncStatus.ts b/src/serialization/resources/accounting/types/SyncStatus.ts index 8f9a69bd3..88eb1f1cf 100644 --- a/src/serialization/resources/accounting/types/SyncStatus.ts +++ b/src/serialization/resources/accounting/types/SyncStatus.ts @@ -23,12 +23,12 @@ export const SyncStatus: core.serialization.ObjectSchema< isInitialSync: core.serialization.property("is_initial_sync", core.serialization.boolean()), selectiveSyncConfigurationsUsage: core.serialization.property( "selective_sync_configurations_usage", - SelectiveSyncConfigurationsUsageEnum.optional() + SelectiveSyncConfigurationsUsageEnum.optional(), ), }); export declare namespace SyncStatus { - interface Raw { + export interface Raw { model_name: string; model_id: string; last_sync_start?: string | null; diff --git a/src/serialization/resources/accounting/types/TaxComponent.ts b/src/serialization/resources/accounting/types/TaxComponent.ts index 636ff9998..7d849ae28 100644 --- a/src/serialization/resources/accounting/types/TaxComponent.ts +++ b/src/serialization/resources/accounting/types/TaxComponent.ts @@ -23,7 +23,7 @@ export const TaxComponent: core.serialization.ObjectSchema< }); export declare namespace TaxComponent { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/TaxComponentComponentType.ts b/src/serialization/resources/accounting/types/TaxComponentComponentType.ts index 6067fa8c7..d6bb55125 100644 --- a/src/serialization/resources/accounting/types/TaxComponentComponentType.ts +++ b/src/serialization/resources/accounting/types/TaxComponentComponentType.ts @@ -13,5 +13,5 @@ export const TaxComponentComponentType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([ComponentTypeEnum, core.serialization.string()]); export declare namespace TaxComponentComponentType { - type Raw = ComponentTypeEnum.Raw | string; + export type Raw = ComponentTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/TaxRate.ts b/src/serialization/resources/accounting/types/TaxRate.ts index bc5ffd0ca..574145d4f 100644 --- a/src/serialization/resources/accounting/types/TaxRate.ts +++ b/src/serialization/resources/accounting/types/TaxRate.ts @@ -26,18 +26,18 @@ export const TaxRate: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace TaxRateCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/TaxRateStatus.ts b/src/serialization/resources/accounting/types/TaxRateStatus.ts index cb3e18f99..50417f0c7 100644 --- a/src/serialization/resources/accounting/types/TaxRateStatus.ts +++ b/src/serialization/resources/accounting/types/TaxRateStatus.ts @@ -13,5 +13,5 @@ export const TaxRateStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([Status7D1Enum, core.serialization.string()]); export declare namespace TaxRateStatus { - type Raw = Status7D1Enum.Raw | string; + export type Raw = Status7D1Enum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/TaxRateTaxComponentsItem.ts b/src/serialization/resources/accounting/types/TaxRateTaxComponentsItem.ts index 0820024fe..04fb8b21d 100644 --- a/src/serialization/resources/accounting/types/TaxRateTaxComponentsItem.ts +++ b/src/serialization/resources/accounting/types/TaxRateTaxComponentsItem.ts @@ -13,5 +13,5 @@ export const TaxRateTaxComponentsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TaxComponent]); export declare namespace TaxRateTaxComponentsItem { - type Raw = string | TaxComponent.Raw; + export type Raw = string | TaxComponent.Raw; } diff --git a/src/serialization/resources/accounting/types/TrackingCategory.ts b/src/serialization/resources/accounting/types/TrackingCategory.ts index d7560a016..c0bf5acb4 100644 --- a/src/serialization/resources/accounting/types/TrackingCategory.ts +++ b/src/serialization/resources/accounting/types/TrackingCategory.ts @@ -25,12 +25,12 @@ export const TrackingCategory: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace TrackingCategory { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/TrackingCategoryCategoryType.ts b/src/serialization/resources/accounting/types/TrackingCategoryCategoryType.ts index d9ceec636..57f198576 100644 --- a/src/serialization/resources/accounting/types/TrackingCategoryCategoryType.ts +++ b/src/serialization/resources/accounting/types/TrackingCategoryCategoryType.ts @@ -13,5 +13,5 @@ export const TrackingCategoryCategoryType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([CategoryTypeEnum, core.serialization.string()]); export declare namespace TrackingCategoryCategoryType { - type Raw = CategoryTypeEnum.Raw | string; + export type Raw = CategoryTypeEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/TrackingCategoryCompany.ts b/src/serialization/resources/accounting/types/TrackingCategoryCompany.ts index cc32cacfb..f49cced42 100644 --- a/src/serialization/resources/accounting/types/TrackingCategoryCompany.ts +++ b/src/serialization/resources/accounting/types/TrackingCategoryCompany.ts @@ -13,5 +13,5 @@ export const TrackingCategoryCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace TrackingCategoryCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/TrackingCategoryStatus.ts b/src/serialization/resources/accounting/types/TrackingCategoryStatus.ts index fd704463d..1e5d8a277 100644 --- a/src/serialization/resources/accounting/types/TrackingCategoryStatus.ts +++ b/src/serialization/resources/accounting/types/TrackingCategoryStatus.ts @@ -13,5 +13,5 @@ export const TrackingCategoryStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([Status7D1Enum, core.serialization.string()]); export declare namespace TrackingCategoryStatus { - type Raw = Status7D1Enum.Raw | string; + export type Raw = Status7D1Enum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/Transaction.ts b/src/serialization/resources/accounting/types/Transaction.ts index 3470216d4..ce8b7f39d 100644 --- a/src/serialization/resources/accounting/types/Transaction.ts +++ b/src/serialization/resources/accounting/types/Transaction.ts @@ -33,20 +33,20 @@ export const Transaction: core.serialization.ObjectSchema< company: core.serialization.string().optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(TransactionTrackingCategoriesItem.optional()).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", TransactionAccountingPeriod.optional()), fieldMappings: core.serialization.property( "field_mappings", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Transaction { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/TransactionAccount.ts b/src/serialization/resources/accounting/types/TransactionAccount.ts index 1b8811e84..e927d8603 100644 --- a/src/serialization/resources/accounting/types/TransactionAccount.ts +++ b/src/serialization/resources/accounting/types/TransactionAccount.ts @@ -13,5 +13,5 @@ export const TransactionAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace TransactionAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/TransactionAccountingPeriod.ts b/src/serialization/resources/accounting/types/TransactionAccountingPeriod.ts index 8d8184485..906672036 100644 --- a/src/serialization/resources/accounting/types/TransactionAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/TransactionAccountingPeriod.ts @@ -13,5 +13,5 @@ export const TransactionAccountingPeriod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace TransactionAccountingPeriod { - type Raw = string | AccountingPeriod.Raw; + export type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/TransactionContact.ts b/src/serialization/resources/accounting/types/TransactionContact.ts index d96889066..d9f0d03a7 100644 --- a/src/serialization/resources/accounting/types/TransactionContact.ts +++ b/src/serialization/resources/accounting/types/TransactionContact.ts @@ -13,5 +13,5 @@ export const TransactionContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace TransactionContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/TransactionCurrency.ts b/src/serialization/resources/accounting/types/TransactionCurrency.ts index eac43bd48..d52d5b447 100644 --- a/src/serialization/resources/accounting/types/TransactionCurrency.ts +++ b/src/serialization/resources/accounting/types/TransactionCurrency.ts @@ -13,5 +13,5 @@ export const TransactionCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace TransactionCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/TransactionCurrencyEnum.ts b/src/serialization/resources/accounting/types/TransactionCurrencyEnum.ts index a212504f6..4fe811c02 100644 --- a/src/serialization/resources/accounting/types/TransactionCurrencyEnum.ts +++ b/src/serialization/resources/accounting/types/TransactionCurrencyEnum.ts @@ -319,7 +319,7 @@ export const TransactionCurrencyEnum: core.serialization.Schema< ]); export declare namespace TransactionCurrencyEnum { - type Raw = + export type Raw = | "XUA" | "AFN" | "AFA" diff --git a/src/serialization/resources/accounting/types/TransactionLineItem.ts b/src/serialization/resources/accounting/types/TransactionLineItem.ts index 0098dab3d..1e9beafda 100644 --- a/src/serialization/resources/accounting/types/TransactionLineItem.ts +++ b/src/serialization/resources/accounting/types/TransactionLineItem.ts @@ -24,7 +24,7 @@ export const TransactionLineItem: core.serialization.ObjectSchema< trackingCategory: core.serialization.property("tracking_category", core.serialization.string().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(core.serialization.string().optional()).optional() + core.serialization.list(core.serialization.string().optional()).optional(), ), totalLineAmount: core.serialization.property("total_line_amount", core.serialization.string().optional()), taxRate: core.serialization.property("tax_rate", core.serialization.string().optional()), @@ -35,7 +35,7 @@ export const TransactionLineItem: core.serialization.ObjectSchema< }); export declare namespace TransactionLineItem { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/TransactionLineItemCurrency.ts b/src/serialization/resources/accounting/types/TransactionLineItemCurrency.ts index 550aee82f..f1bb945c8 100644 --- a/src/serialization/resources/accounting/types/TransactionLineItemCurrency.ts +++ b/src/serialization/resources/accounting/types/TransactionLineItemCurrency.ts @@ -13,5 +13,5 @@ export const TransactionLineItemCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace TransactionLineItemCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/TransactionLineItemItem.ts b/src/serialization/resources/accounting/types/TransactionLineItemItem.ts index ddec2b293..674ee3136 100644 --- a/src/serialization/resources/accounting/types/TransactionLineItemItem.ts +++ b/src/serialization/resources/accounting/types/TransactionLineItemItem.ts @@ -13,5 +13,5 @@ export const TransactionLineItemItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Item]); export declare namespace TransactionLineItemItem { - type Raw = string | Item.Raw; + export type Raw = string | Item.Raw; } diff --git a/src/serialization/resources/accounting/types/TransactionTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/TransactionTrackingCategoriesItem.ts index ba1a1bf59..43632650f 100644 --- a/src/serialization/resources/accounting/types/TransactionTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/TransactionTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const TransactionTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace TransactionTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/UnderlyingTransactionTypeEnum.ts b/src/serialization/resources/accounting/types/UnderlyingTransactionTypeEnum.ts index 8673892c3..8adf429bc 100644 --- a/src/serialization/resources/accounting/types/UnderlyingTransactionTypeEnum.ts +++ b/src/serialization/resources/accounting/types/UnderlyingTransactionTypeEnum.ts @@ -20,5 +20,12 @@ export const UnderlyingTransactionTypeEnum: core.serialization.Schema< ]); export declare namespace UnderlyingTransactionTypeEnum { - type Raw = "INVOICE" | "EXPENSE" | "TRANSACTION" | "JOURNAL_ENTRY" | "PAYMENT" | "VENDOR_CREDIT" | "CREDIT_NOTE"; + export type Raw = + | "INVOICE" + | "EXPENSE" + | "TRANSACTION" + | "JOURNAL_ENTRY" + | "PAYMENT" + | "VENDOR_CREDIT" + | "CREDIT_NOTE"; } diff --git a/src/serialization/resources/accounting/types/ValidationProblemSource.ts b/src/serialization/resources/accounting/types/ValidationProblemSource.ts index b5bfb02c7..2b99eccd4 100644 --- a/src/serialization/resources/accounting/types/ValidationProblemSource.ts +++ b/src/serialization/resources/accounting/types/ValidationProblemSource.ts @@ -14,7 +14,7 @@ export const ValidationProblemSource: core.serialization.ObjectSchema< }); export declare namespace ValidationProblemSource { - interface Raw { + export interface Raw { pointer: string; } } diff --git a/src/serialization/resources/accounting/types/VendorCredit.ts b/src/serialization/resources/accounting/types/VendorCredit.ts index abf4e0e94..955b2ba55 100644 --- a/src/serialization/resources/accounting/types/VendorCredit.ts +++ b/src/serialization/resources/accounting/types/VendorCredit.ts @@ -32,25 +32,25 @@ export const VendorCredit: core.serialization.ObjectSchema< lines: core.serialization.list(VendorCreditLine).optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(VendorCreditTrackingCategoriesItem.optional()).optional() + core.serialization.list(VendorCreditTrackingCategoriesItem.optional()).optional(), ), appliedToLines: core.serialization.property( "applied_to_lines", core.serialization .list(core.serialization.lazyObject(() => serializers.accounting.VendorCreditApplyLineForVendorCredit)) - .optional() + .optional(), ), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace VendorCredit { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/VendorCreditAccountingPeriod.ts b/src/serialization/resources/accounting/types/VendorCreditAccountingPeriod.ts index 54f8abbd4..348ab8901 100644 --- a/src/serialization/resources/accounting/types/VendorCreditAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/VendorCreditAccountingPeriod.ts @@ -13,5 +13,5 @@ export const VendorCreditAccountingPeriod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace VendorCreditAccountingPeriod { - type Raw = string | AccountingPeriod.Raw; + export type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditApplyLineForInvoice.ts b/src/serialization/resources/accounting/types/VendorCreditApplyLineForInvoice.ts index 320d36df0..52abed8d1 100644 --- a/src/serialization/resources/accounting/types/VendorCreditApplyLineForInvoice.ts +++ b/src/serialization/resources/accounting/types/VendorCreditApplyLineForInvoice.ts @@ -15,7 +15,7 @@ export const VendorCreditApplyLineForInvoice: core.serialization.ObjectSchema< modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), vendorCredit: core.serialization.property( "vendor_credit", - core.serialization.lazy(() => serializers.accounting.VendorCreditApplyLineForInvoiceVendorCredit).optional() + core.serialization.lazy(() => serializers.accounting.VendorCreditApplyLineForInvoiceVendorCredit).optional(), ), appliedDate: core.serialization.property("applied_date", core.serialization.date().optional()), appliedAmount: core.serialization.property("applied_amount", core.serialization.string().optional()), @@ -23,7 +23,7 @@ export const VendorCreditApplyLineForInvoice: core.serialization.ObjectSchema< }); export declare namespace VendorCreditApplyLineForInvoice { - interface Raw { + export interface Raw { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; diff --git a/src/serialization/resources/accounting/types/VendorCreditApplyLineForInvoiceVendorCredit.ts b/src/serialization/resources/accounting/types/VendorCreditApplyLineForInvoiceVendorCredit.ts index b81ba4d0a..ba0488f8b 100644 --- a/src/serialization/resources/accounting/types/VendorCreditApplyLineForInvoiceVendorCredit.ts +++ b/src/serialization/resources/accounting/types/VendorCreditApplyLineForInvoiceVendorCredit.ts @@ -15,5 +15,5 @@ export const VendorCreditApplyLineForInvoiceVendorCredit: core.serialization.Sch ]); export declare namespace VendorCreditApplyLineForInvoiceVendorCredit { - type Raw = string | serializers.accounting.VendorCredit.Raw; + export type Raw = string | serializers.accounting.VendorCredit.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCredit.ts b/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCredit.ts index a63af997b..ee2b5d2c3 100644 --- a/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCredit.ts +++ b/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCredit.ts @@ -22,7 +22,7 @@ export const VendorCreditApplyLineForVendorCredit: core.serialization.ObjectSche }); export declare namespace VendorCreditApplyLineForVendorCredit { - interface Raw { + export interface Raw { remote_id?: string | null; created_at?: string | null; modified_at?: string | null; diff --git a/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCreditInvoice.ts b/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCreditInvoice.ts index 6191fea34..ea0c1d1a3 100644 --- a/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCreditInvoice.ts +++ b/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCreditInvoice.ts @@ -15,5 +15,5 @@ export const VendorCreditApplyLineForVendorCreditInvoice: core.serialization.Sch ]); export declare namespace VendorCreditApplyLineForVendorCreditInvoice { - type Raw = string | serializers.accounting.Invoice.Raw; + export type Raw = string | serializers.accounting.Invoice.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequest.ts b/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequest.ts index 79eea02fc..f98814ab4 100644 --- a/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequest.ts +++ b/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequest.ts @@ -17,16 +17,16 @@ export const VendorCreditApplyLineForVendorCreditRequest: core.serialization.Obj appliedAmount: core.serialization.property("applied_amount", core.serialization.string().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace VendorCreditApplyLineForVendorCreditRequest { - interface Raw { + export interface Raw { remote_id?: string | null; invoice?: VendorCreditApplyLineForVendorCreditRequestInvoice.Raw | null; applied_date?: string | null; diff --git a/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequestInvoice.ts b/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequestInvoice.ts index 1097a2191..ee4dd81e5 100644 --- a/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequestInvoice.ts +++ b/src/serialization/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequestInvoice.ts @@ -15,5 +15,5 @@ export const VendorCreditApplyLineForVendorCreditRequestInvoice: core.serializat ]); export declare namespace VendorCreditApplyLineForVendorCreditRequestInvoice { - type Raw = string | serializers.accounting.Invoice.Raw; + export type Raw = string | serializers.accounting.Invoice.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditCompany.ts b/src/serialization/resources/accounting/types/VendorCreditCompany.ts index 86105881a..6e5eabc0c 100644 --- a/src/serialization/resources/accounting/types/VendorCreditCompany.ts +++ b/src/serialization/resources/accounting/types/VendorCreditCompany.ts @@ -13,5 +13,5 @@ export const VendorCreditCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace VendorCreditCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditCurrency.ts b/src/serialization/resources/accounting/types/VendorCreditCurrency.ts index ba03d484c..5aa668822 100644 --- a/src/serialization/resources/accounting/types/VendorCreditCurrency.ts +++ b/src/serialization/resources/accounting/types/VendorCreditCurrency.ts @@ -13,5 +13,5 @@ export const VendorCreditCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace VendorCreditCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/VendorCreditLine.ts b/src/serialization/resources/accounting/types/VendorCreditLine.ts index 2a8593f29..36bb38203 100644 --- a/src/serialization/resources/accounting/types/VendorCreditLine.ts +++ b/src/serialization/resources/accounting/types/VendorCreditLine.ts @@ -19,7 +19,7 @@ export const VendorCreditLine: core.serialization.ObjectSchema< trackingCategory: core.serialization.property("tracking_category", core.serialization.string().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(core.serialization.string().optional()).optional() + core.serialization.list(core.serialization.string().optional()).optional(), ), description: core.serialization.string().optional(), account: VendorCreditLineAccount.optional(), @@ -30,7 +30,7 @@ export const VendorCreditLine: core.serialization.ObjectSchema< }); export declare namespace VendorCreditLine { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/accounting/types/VendorCreditLineAccount.ts b/src/serialization/resources/accounting/types/VendorCreditLineAccount.ts index d8b52a1dd..078323804 100644 --- a/src/serialization/resources/accounting/types/VendorCreditLineAccount.ts +++ b/src/serialization/resources/accounting/types/VendorCreditLineAccount.ts @@ -13,5 +13,5 @@ export const VendorCreditLineAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace VendorCreditLineAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditLineRequest.ts b/src/serialization/resources/accounting/types/VendorCreditLineRequest.ts index 791111d44..500ca7682 100644 --- a/src/serialization/resources/accounting/types/VendorCreditLineRequest.ts +++ b/src/serialization/resources/accounting/types/VendorCreditLineRequest.ts @@ -16,7 +16,7 @@ export const VendorCreditLineRequest: core.serialization.ObjectSchema< trackingCategory: core.serialization.property("tracking_category", core.serialization.string().optional()), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(core.serialization.string().optional()).optional() + core.serialization.list(core.serialization.string().optional()).optional(), ), description: core.serialization.string().optional(), account: VendorCreditLineRequestAccount.optional(), @@ -25,16 +25,16 @@ export const VendorCreditLineRequest: core.serialization.ObjectSchema< exchangeRate: core.serialization.property("exchange_rate", core.serialization.string().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace VendorCreditLineRequest { - interface Raw { + export interface Raw { remote_id?: string | null; net_amount?: number | null; tracking_category?: string | null; diff --git a/src/serialization/resources/accounting/types/VendorCreditLineRequestAccount.ts b/src/serialization/resources/accounting/types/VendorCreditLineRequestAccount.ts index 23c715a21..d057269f0 100644 --- a/src/serialization/resources/accounting/types/VendorCreditLineRequestAccount.ts +++ b/src/serialization/resources/accounting/types/VendorCreditLineRequestAccount.ts @@ -13,5 +13,5 @@ export const VendorCreditLineRequestAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace VendorCreditLineRequestAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditRequest.ts b/src/serialization/resources/accounting/types/VendorCreditRequest.ts index a83115045..c997c5296 100644 --- a/src/serialization/resources/accounting/types/VendorCreditRequest.ts +++ b/src/serialization/resources/accounting/types/VendorCreditRequest.ts @@ -26,25 +26,25 @@ export const VendorCreditRequest: core.serialization.ObjectSchema< company: VendorCreditRequestCompany.optional(), trackingCategories: core.serialization.property( "tracking_categories", - core.serialization.list(VendorCreditRequestTrackingCategoriesItem.optional()).optional() + core.serialization.list(VendorCreditRequestTrackingCategoriesItem.optional()).optional(), ), appliedToLines: core.serialization.property( "applied_to_lines", - core.serialization.list(VendorCreditApplyLineForVendorCreditRequest).optional() + core.serialization.list(VendorCreditApplyLineForVendorCreditRequest).optional(), ), accountingPeriod: core.serialization.property("accounting_period", VendorCreditRequestAccountingPeriod.optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace VendorCreditRequest { - interface Raw { + export interface Raw { number?: string | null; transaction_date?: string | null; vendor?: VendorCreditRequestVendor.Raw | null; diff --git a/src/serialization/resources/accounting/types/VendorCreditRequestAccountingPeriod.ts b/src/serialization/resources/accounting/types/VendorCreditRequestAccountingPeriod.ts index cb26e28be..be86481fc 100644 --- a/src/serialization/resources/accounting/types/VendorCreditRequestAccountingPeriod.ts +++ b/src/serialization/resources/accounting/types/VendorCreditRequestAccountingPeriod.ts @@ -13,5 +13,5 @@ export const VendorCreditRequestAccountingPeriod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), AccountingPeriod]); export declare namespace VendorCreditRequestAccountingPeriod { - type Raw = string | AccountingPeriod.Raw; + export type Raw = string | AccountingPeriod.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditRequestCompany.ts b/src/serialization/resources/accounting/types/VendorCreditRequestCompany.ts index 23e00d81e..7092b3de9 100644 --- a/src/serialization/resources/accounting/types/VendorCreditRequestCompany.ts +++ b/src/serialization/resources/accounting/types/VendorCreditRequestCompany.ts @@ -13,5 +13,5 @@ export const VendorCreditRequestCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), CompanyInfo]); export declare namespace VendorCreditRequestCompany { - type Raw = string | CompanyInfo.Raw; + export type Raw = string | CompanyInfo.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditRequestCurrency.ts b/src/serialization/resources/accounting/types/VendorCreditRequestCurrency.ts index c0c33f6dd..a1725a054 100644 --- a/src/serialization/resources/accounting/types/VendorCreditRequestCurrency.ts +++ b/src/serialization/resources/accounting/types/VendorCreditRequestCurrency.ts @@ -13,5 +13,5 @@ export const VendorCreditRequestCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TransactionCurrencyEnum, core.serialization.string()]); export declare namespace VendorCreditRequestCurrency { - type Raw = TransactionCurrencyEnum.Raw | string; + export type Raw = TransactionCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/accounting/types/VendorCreditRequestTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/VendorCreditRequestTrackingCategoriesItem.ts index 992151e1c..f00e920dd 100644 --- a/src/serialization/resources/accounting/types/VendorCreditRequestTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/VendorCreditRequestTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const VendorCreditRequestTrackingCategoriesItem: core.serialization.Schem > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace VendorCreditRequestTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditRequestVendor.ts b/src/serialization/resources/accounting/types/VendorCreditRequestVendor.ts index 51e157bc8..d380c109b 100644 --- a/src/serialization/resources/accounting/types/VendorCreditRequestVendor.ts +++ b/src/serialization/resources/accounting/types/VendorCreditRequestVendor.ts @@ -13,5 +13,5 @@ export const VendorCreditRequestVendor: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace VendorCreditRequestVendor { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditResponse.ts b/src/serialization/resources/accounting/types/VendorCreditResponse.ts index eeb03c135..739b72ec5 100644 --- a/src/serialization/resources/accounting/types/VendorCreditResponse.ts +++ b/src/serialization/resources/accounting/types/VendorCreditResponse.ts @@ -20,7 +20,7 @@ export const VendorCreditResponse: core.serialization.ObjectSchema< }); export declare namespace VendorCreditResponse { - interface Raw { + export interface Raw { model: serializers.accounting.VendorCredit.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/accounting/types/VendorCreditTrackingCategoriesItem.ts b/src/serialization/resources/accounting/types/VendorCreditTrackingCategoriesItem.ts index 7701b1562..919983bd1 100644 --- a/src/serialization/resources/accounting/types/VendorCreditTrackingCategoriesItem.ts +++ b/src/serialization/resources/accounting/types/VendorCreditTrackingCategoriesItem.ts @@ -13,5 +13,5 @@ export const VendorCreditTrackingCategoriesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TrackingCategory]); export declare namespace VendorCreditTrackingCategoriesItem { - type Raw = string | TrackingCategory.Raw; + export type Raw = string | TrackingCategory.Raw; } diff --git a/src/serialization/resources/accounting/types/VendorCreditVendor.ts b/src/serialization/resources/accounting/types/VendorCreditVendor.ts index 2a9f9ce00..98adef033 100644 --- a/src/serialization/resources/accounting/types/VendorCreditVendor.ts +++ b/src/serialization/resources/accounting/types/VendorCreditVendor.ts @@ -13,5 +13,5 @@ export const VendorCreditVendor: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace VendorCreditVendor { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/accounting/types/WarningValidationProblem.ts b/src/serialization/resources/accounting/types/WarningValidationProblem.ts index 9afb1b20b..60266619e 100644 --- a/src/serialization/resources/accounting/types/WarningValidationProblem.ts +++ b/src/serialization/resources/accounting/types/WarningValidationProblem.ts @@ -18,7 +18,7 @@ export const WarningValidationProblem: core.serialization.ObjectSchema< }); export declare namespace WarningValidationProblem { - interface Raw { + export interface Raw { source?: ValidationProblemSource.Raw | null; title: string; detail: string; diff --git a/src/serialization/resources/accounting/types/WebhookReceiver.ts b/src/serialization/resources/accounting/types/WebhookReceiver.ts index 8736dfc70..aef63875b 100644 --- a/src/serialization/resources/accounting/types/WebhookReceiver.ts +++ b/src/serialization/resources/accounting/types/WebhookReceiver.ts @@ -16,7 +16,7 @@ export const WebhookReceiver: core.serialization.ObjectSchema< }); export declare namespace WebhookReceiver { - interface Raw { + export interface Raw { event: string; is_active: boolean; key?: string | null; 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 36c1be4e8..a71079c3f 100644 --- a/src/serialization/resources/ats/resources/activities/client/requests/ActivityEndpointRequest.ts +++ b/src/serialization/resources/ats/resources/activities/client/requests/ActivityEndpointRequest.ts @@ -16,7 +16,7 @@ export const ActivityEndpointRequest: core.serialization.Schema< }); export declare namespace ActivityEndpointRequest { - interface Raw { + export interface 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 a1370e397..0fa6e6b07 100644 --- a/src/serialization/resources/ats/resources/activities/types/ActivitiesListRequestRemoteFields.ts +++ b/src/serialization/resources/ats/resources/activities/types/ActivitiesListRequestRemoteFields.ts @@ -12,5 +12,5 @@ export const ActivitiesListRequestRemoteFields: core.serialization.Schema< > = core.serialization.enum_(["activity_type", "activity_type,visibility", "visibility"]); export declare namespace ActivitiesListRequestRemoteFields { - type Raw = "activity_type" | "activity_type,visibility" | "visibility"; + export type Raw = "activity_type" | "activity_type,visibility" | "visibility"; } diff --git a/src/serialization/resources/ats/resources/activities/types/ActivitiesListRequestShowEnumOrigins.ts b/src/serialization/resources/ats/resources/activities/types/ActivitiesListRequestShowEnumOrigins.ts index e152f42c7..fab675058 100644 --- a/src/serialization/resources/ats/resources/activities/types/ActivitiesListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/ats/resources/activities/types/ActivitiesListRequestShowEnumOrigins.ts @@ -12,5 +12,5 @@ export const ActivitiesListRequestShowEnumOrigins: core.serialization.Schema< > = core.serialization.enum_(["activity_type", "activity_type,visibility", "visibility"]); export declare namespace ActivitiesListRequestShowEnumOrigins { - type Raw = "activity_type" | "activity_type,visibility" | "visibility"; + export type Raw = "activity_type" | "activity_type,visibility" | "visibility"; } diff --git a/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestRemoteFields.ts b/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestRemoteFields.ts index 96edde8f9..892e2ea06 100644 --- a/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestRemoteFields.ts @@ -12,5 +12,5 @@ export const ActivitiesRetrieveRequestRemoteFields: core.serialization.Schema< > = core.serialization.enum_(["activity_type", "activity_type,visibility", "visibility"]); export declare namespace ActivitiesRetrieveRequestRemoteFields { - type Raw = "activity_type" | "activity_type,visibility" | "visibility"; + export type Raw = "activity_type" | "activity_type,visibility" | "visibility"; } diff --git a/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestShowEnumOrigins.ts index b12e10c27..e71462edc 100644 --- a/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/ats/resources/activities/types/ActivitiesRetrieveRequestShowEnumOrigins.ts @@ -12,5 +12,5 @@ export const ActivitiesRetrieveRequestShowEnumOrigins: core.serialization.Schema > = core.serialization.enum_(["activity_type", "activity_type,visibility", "visibility"]); export declare namespace ActivitiesRetrieveRequestShowEnumOrigins { - type Raw = "activity_type" | "activity_type,visibility" | "visibility"; + export type Raw = "activity_type" | "activity_type,visibility" | "visibility"; } 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 4bea8c9fd..ae6b78ee9 100644 --- a/src/serialization/resources/ats/resources/applications/client/requests/ApplicationEndpointRequest.ts +++ b/src/serialization/resources/ats/resources/applications/client/requests/ApplicationEndpointRequest.ts @@ -16,7 +16,7 @@ export const ApplicationEndpointRequest: core.serialization.Schema< }); export declare namespace ApplicationEndpointRequest { - interface Raw { + export interface 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 27b990214..fef19f6d2 100644 --- a/src/serialization/resources/ats/resources/applications/client/requests/UpdateApplicationStageRequest.ts +++ b/src/serialization/resources/ats/resources/applications/client/requests/UpdateApplicationStageRequest.ts @@ -15,7 +15,7 @@ export const UpdateApplicationStageRequest: core.serialization.Schema< }); export declare namespace UpdateApplicationStageRequest { - interface Raw { + export interface Raw { job_interview_stage?: string | null; remote_user_id?: string | null; } diff --git a/src/serialization/resources/ats/resources/applications/types/ApplicationsListRequestExpand.ts b/src/serialization/resources/ats/resources/applications/types/ApplicationsListRequestExpand.ts index bfca7e716..971043e78 100644 --- a/src/serialization/resources/ats/resources/applications/types/ApplicationsListRequestExpand.ts +++ b/src/serialization/resources/ats/resources/applications/types/ApplicationsListRequestExpand.ts @@ -268,7 +268,7 @@ export const ApplicationsListRequestExpand: core.serialization.Schema< ]); export declare namespace ApplicationsListRequestExpand { - type Raw = + export type Raw = | "candidate" | "candidate,credited_to" | "candidate,credited_to,current_stage" diff --git a/src/serialization/resources/ats/resources/applications/types/ApplicationsRetrieveRequestExpand.ts b/src/serialization/resources/ats/resources/applications/types/ApplicationsRetrieveRequestExpand.ts index 00325ad42..9cb4f1734 100644 --- a/src/serialization/resources/ats/resources/applications/types/ApplicationsRetrieveRequestExpand.ts +++ b/src/serialization/resources/ats/resources/applications/types/ApplicationsRetrieveRequestExpand.ts @@ -268,7 +268,7 @@ export const ApplicationsRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace ApplicationsRetrieveRequestExpand { - type Raw = + export type Raw = | "candidate" | "candidate,credited_to" | "candidate,credited_to,current_stage" diff --git a/src/serialization/resources/ats/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/serialization/resources/ats/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts index 35928be2a..bb1ed1114 100644 --- a/src/serialization/resources/ats/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts +++ b/src/serialization/resources/ats/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -13,5 +13,5 @@ export const AsyncPassthroughRetrieveResponse: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([RemoteResponse, core.serialization.string()]); export declare namespace AsyncPassthroughRetrieveResponse { - type Raw = RemoteResponse.Raw | string; + export 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 32cfc7639..a86af59aa 100644 --- a/src/serialization/resources/ats/resources/attachments/client/requests/AttachmentEndpointRequest.ts +++ b/src/serialization/resources/ats/resources/attachments/client/requests/AttachmentEndpointRequest.ts @@ -16,7 +16,7 @@ export const AttachmentEndpointRequest: core.serialization.Schema< }); export declare namespace AttachmentEndpointRequest { - interface Raw { + export interface 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 70a8cb61a..2ea3c8f1e 100644 --- a/src/serialization/resources/ats/resources/candidates/client/requests/CandidateEndpointRequest.ts +++ b/src/serialization/resources/ats/resources/candidates/client/requests/CandidateEndpointRequest.ts @@ -16,7 +16,7 @@ export const CandidateEndpointRequest: core.serialization.Schema< }); export declare namespace CandidateEndpointRequest { - interface Raw { + export interface 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 326064e3d..e7b8861b4 100644 --- a/src/serialization/resources/ats/resources/candidates/client/requests/IgnoreCommonModelRequest.ts +++ b/src/serialization/resources/ats/resources/candidates/client/requests/IgnoreCommonModelRequest.ts @@ -16,7 +16,7 @@ export const IgnoreCommonModelRequest: core.serialization.Schema< }); export declare namespace IgnoreCommonModelRequest { - interface Raw { + export interface 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 7f052751e..2c4fae01d 100644 --- a/src/serialization/resources/ats/resources/candidates/client/requests/PatchedCandidateEndpointRequest.ts +++ b/src/serialization/resources/ats/resources/candidates/client/requests/PatchedCandidateEndpointRequest.ts @@ -16,7 +16,7 @@ export const PatchedCandidateEndpointRequest: core.serialization.Schema< }); export declare namespace PatchedCandidateEndpointRequest { - interface Raw { + export interface 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 db05f312b..7801c6afb 100644 --- a/src/serialization/resources/ats/resources/candidates/types/CandidatesListRequestExpand.ts +++ b/src/serialization/resources/ats/resources/candidates/types/CandidatesListRequestExpand.ts @@ -12,5 +12,5 @@ export const CandidatesListRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["applications", "applications,attachments", "attachments"]); export declare namespace CandidatesListRequestExpand { - type Raw = "applications" | "applications,attachments" | "attachments"; + export type Raw = "applications" | "applications,attachments" | "attachments"; } diff --git a/src/serialization/resources/ats/resources/candidates/types/CandidatesRetrieveRequestExpand.ts b/src/serialization/resources/ats/resources/candidates/types/CandidatesRetrieveRequestExpand.ts index d59f1e46c..cbf41b0c0 100644 --- a/src/serialization/resources/ats/resources/candidates/types/CandidatesRetrieveRequestExpand.ts +++ b/src/serialization/resources/ats/resources/candidates/types/CandidatesRetrieveRequestExpand.ts @@ -12,5 +12,5 @@ export const CandidatesRetrieveRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["applications", "applications,attachments", "attachments"]); export declare namespace CandidatesRetrieveRequestExpand { - type Raw = "applications" | "applications,attachments" | "attachments"; + export type Raw = "applications" | "applications,attachments" | "attachments"; } diff --git a/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestRemoteFields.ts b/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestRemoteFields.ts index 446011cc4..ec6622053 100644 --- a/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestRemoteFields.ts +++ b/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestRemoteFields.ts @@ -28,7 +28,7 @@ export const EeocsListRequestRemoteFields: core.serialization.Schema< ]); export declare namespace EeocsListRequestRemoteFields { - type Raw = + export type Raw = | "disability_status" | "disability_status,gender" | "disability_status,gender,race" diff --git a/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestShowEnumOrigins.ts b/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestShowEnumOrigins.ts index a0b1dfd55..99fd3f66d 100644 --- a/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/ats/resources/eeocs/types/EeocsListRequestShowEnumOrigins.ts @@ -28,7 +28,7 @@ export const EeocsListRequestShowEnumOrigins: core.serialization.Schema< ]); export declare namespace EeocsListRequestShowEnumOrigins { - type Raw = + export type Raw = | "disability_status" | "disability_status,gender" | "disability_status,gender,race" diff --git a/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestRemoteFields.ts b/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestRemoteFields.ts index a5aebc8bb..a4b6197bc 100644 --- a/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestRemoteFields.ts @@ -28,7 +28,7 @@ export const EeocsRetrieveRequestRemoteFields: core.serialization.Schema< ]); export declare namespace EeocsRetrieveRequestRemoteFields { - type Raw = + export type Raw = | "disability_status" | "disability_status,gender" | "disability_status,gender,race" diff --git a/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestShowEnumOrigins.ts index 911cc68fc..4c34066d7 100644 --- a/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/ats/resources/eeocs/types/EeocsRetrieveRequestShowEnumOrigins.ts @@ -28,7 +28,7 @@ export const EeocsRetrieveRequestShowEnumOrigins: core.serialization.Schema< ]); export declare namespace EeocsRetrieveRequestShowEnumOrigins { - type Raw = + export type Raw = | "disability_status" | "disability_status,gender" | "disability_status,gender,race" 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 6f64a9a0d..be7fa42ad 100644 --- a/src/serialization/resources/ats/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/serialization/resources/ats/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -14,7 +14,7 @@ export const CreateFieldMappingRequest: core.serialization.Schema< targetFieldDescription: core.serialization.property("target_field_description", core.serialization.string()), remoteFieldTraversalPath: core.serialization.property( "remote_field_traversal_path", - core.serialization.list(core.serialization.unknown()) + core.serialization.list(core.serialization.unknown()), ), remoteMethod: core.serialization.property("remote_method", core.serialization.string()), remoteUrlPath: core.serialization.property("remote_url_path", core.serialization.string()), @@ -22,7 +22,7 @@ export const CreateFieldMappingRequest: core.serialization.Schema< }); export declare namespace CreateFieldMappingRequest { - interface Raw { + export interface Raw { target_field_name: string; target_field_description: string; remote_field_traversal_path: unknown[]; 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 21119b736..4be78fcd5 100644 --- a/src/serialization/resources/ats/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts +++ b/src/serialization/resources/ats/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts @@ -12,14 +12,14 @@ export const PatchedEditFieldMappingRequest: core.serialization.Schema< > = core.serialization.object({ remoteFieldTraversalPath: core.serialization.property( "remote_field_traversal_path", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), remoteMethod: core.serialization.property("remote_method", core.serialization.string().optional()), remoteUrlPath: core.serialization.property("remote_url_path", core.serialization.string().optional()), }); export declare namespace PatchedEditFieldMappingRequest { - interface Raw { + export interface Raw { remote_field_traversal_path?: unknown[] | null; remote_method?: string | null; remote_url_path?: string | null; diff --git a/src/serialization/resources/ats/resources/forceResync/client/syncStatusResyncCreate.ts b/src/serialization/resources/ats/resources/forceResync/client/syncStatusResyncCreate.ts index 2d6681df6..9e204ee63 100644 --- a/src/serialization/resources/ats/resources/forceResync/client/syncStatusResyncCreate.ts +++ b/src/serialization/resources/ats/resources/forceResync/client/syncStatusResyncCreate.ts @@ -13,5 +13,5 @@ export const Response: core.serialization.Schema< > = core.serialization.list(SyncStatus); export declare namespace Response { - type Raw = SyncStatus.Raw[]; + export 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 81e91d2dd..6151f37df 100644 --- a/src/serialization/resources/ats/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts +++ b/src/serialization/resources/ats/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts @@ -14,7 +14,7 @@ export const GenerateRemoteKeyRequest: core.serialization.Schema< }); export declare namespace GenerateRemoteKeyRequest { - interface Raw { + export interface Raw { name: string; } } 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 b4b863888..ee90a7bdd 100644 --- a/src/serialization/resources/ats/resources/interviews/client/requests/ScheduledInterviewEndpointRequest.ts +++ b/src/serialization/resources/ats/resources/interviews/client/requests/ScheduledInterviewEndpointRequest.ts @@ -16,7 +16,7 @@ export const ScheduledInterviewEndpointRequest: core.serialization.Schema< }); export declare namespace ScheduledInterviewEndpointRequest { - interface Raw { + export interface 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 ef41b29ea..ee6c6279c 100644 --- a/src/serialization/resources/ats/resources/interviews/types/InterviewsListRequestExpand.ts +++ b/src/serialization/resources/ats/resources/interviews/types/InterviewsListRequestExpand.ts @@ -28,7 +28,7 @@ export const InterviewsListRequestExpand: core.serialization.Schema< ]); export declare namespace InterviewsListRequestExpand { - type Raw = + export type Raw = | "application" | "application,job_interview_stage" | "interviewers" diff --git a/src/serialization/resources/ats/resources/interviews/types/InterviewsRetrieveRequestExpand.ts b/src/serialization/resources/ats/resources/interviews/types/InterviewsRetrieveRequestExpand.ts index 7f6b6bbc9..ec9098d10 100644 --- a/src/serialization/resources/ats/resources/interviews/types/InterviewsRetrieveRequestExpand.ts +++ b/src/serialization/resources/ats/resources/interviews/types/InterviewsRetrieveRequestExpand.ts @@ -28,7 +28,7 @@ export const InterviewsRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace InterviewsRetrieveRequestExpand { - type Raw = + export type Raw = | "application" | "application,job_interview_stage" | "interviewers" diff --git a/src/serialization/resources/ats/resources/issues/types/IssuesListRequestStatus.ts b/src/serialization/resources/ats/resources/issues/types/IssuesListRequestStatus.ts index ed6e44666..19595b9a6 100644 --- a/src/serialization/resources/ats/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/serialization/resources/ats/resources/issues/types/IssuesListRequestStatus.ts @@ -12,5 +12,5 @@ export const IssuesListRequestStatus: core.serialization.Schema< > = core.serialization.enum_(["ONGOING", "RESOLVED"]); export declare namespace IssuesListRequestStatus { - type Raw = "ONGOING" | "RESOLVED"; + export type Raw = "ONGOING" | "RESOLVED"; } diff --git a/src/serialization/resources/ats/resources/jobPostings/types/JobPostingsListRequestStatus.ts b/src/serialization/resources/ats/resources/jobPostings/types/JobPostingsListRequestStatus.ts index 4d4faae98..52f3146ff 100644 --- a/src/serialization/resources/ats/resources/jobPostings/types/JobPostingsListRequestStatus.ts +++ b/src/serialization/resources/ats/resources/jobPostings/types/JobPostingsListRequestStatus.ts @@ -12,5 +12,5 @@ export const JobPostingsListRequestStatus: core.serialization.Schema< > = core.serialization.enum_(["CLOSED", "DRAFT", "INTERNAL", "PENDING", "PUBLISHED"]); export declare namespace JobPostingsListRequestStatus { - type Raw = "CLOSED" | "DRAFT" | "INTERNAL" | "PENDING" | "PUBLISHED"; + export type Raw = "CLOSED" | "DRAFT" | "INTERNAL" | "PENDING" | "PUBLISHED"; } diff --git a/src/serialization/resources/ats/resources/jobs/types/JobsListRequestExpand.ts b/src/serialization/resources/ats/resources/jobs/types/JobsListRequestExpand.ts index 17a6eb83f..7dbb6ba6c 100644 --- a/src/serialization/resources/ats/resources/jobs/types/JobsListRequestExpand.ts +++ b/src/serialization/resources/ats/resources/jobs/types/JobsListRequestExpand.ts @@ -44,7 +44,7 @@ export const JobsListRequestExpand: core.serialization.Schema< ]); export declare namespace JobsListRequestExpand { - type Raw = + export type Raw = | "departments" | "departments,hiring_managers" | "departments,hiring_managers,job_postings" diff --git a/src/serialization/resources/ats/resources/jobs/types/JobsListRequestStatus.ts b/src/serialization/resources/ats/resources/jobs/types/JobsListRequestStatus.ts index 45ee669b0..f2eda33db 100644 --- a/src/serialization/resources/ats/resources/jobs/types/JobsListRequestStatus.ts +++ b/src/serialization/resources/ats/resources/jobs/types/JobsListRequestStatus.ts @@ -12,5 +12,5 @@ export const JobsListRequestStatus: core.serialization.Schema< > = core.serialization.enum_(["ARCHIVED", "CLOSED", "DRAFT", "OPEN", "PENDING"]); export declare namespace JobsListRequestStatus { - type Raw = "ARCHIVED" | "CLOSED" | "DRAFT" | "OPEN" | "PENDING"; + export type Raw = "ARCHIVED" | "CLOSED" | "DRAFT" | "OPEN" | "PENDING"; } diff --git a/src/serialization/resources/ats/resources/jobs/types/JobsRetrieveRequestExpand.ts b/src/serialization/resources/ats/resources/jobs/types/JobsRetrieveRequestExpand.ts index 0b0dd3b2d..fd13e3c4e 100644 --- a/src/serialization/resources/ats/resources/jobs/types/JobsRetrieveRequestExpand.ts +++ b/src/serialization/resources/ats/resources/jobs/types/JobsRetrieveRequestExpand.ts @@ -44,7 +44,7 @@ export const JobsRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace JobsRetrieveRequestExpand { - type Raw = + export type Raw = | "departments" | "departments,hiring_managers" | "departments,hiring_managers,job_postings" diff --git a/src/serialization/resources/ats/resources/jobs/types/JobsScreeningQuestionsListRequestExpand.ts b/src/serialization/resources/ats/resources/jobs/types/JobsScreeningQuestionsListRequestExpand.ts index 0b53c6fb3..568b2193c 100644 --- a/src/serialization/resources/ats/resources/jobs/types/JobsScreeningQuestionsListRequestExpand.ts +++ b/src/serialization/resources/ats/resources/jobs/types/JobsScreeningQuestionsListRequestExpand.ts @@ -12,5 +12,5 @@ export const JobsScreeningQuestionsListRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["job", "options", "options,job"]); export declare namespace JobsScreeningQuestionsListRequestExpand { - type Raw = "job" | "options" | "options,job"; + export type Raw = "job" | "options" | "options,job"; } 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 09d2eabfb..ff2256f65 100644 --- a/src/serialization/resources/ats/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/serialization/resources/ats/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -22,32 +22,32 @@ export const EndUserDetailsRequest: core.serialization.Schema< linkExpiryMins: core.serialization.property("link_expiry_mins", core.serialization.number().optional()), shouldCreateMagicLinkUrl: core.serialization.property( "should_create_magic_link_url", - core.serialization.boolean().optional() + core.serialization.boolean().optional(), ), hideAdminMagicLink: core.serialization.property("hide_admin_magic_link", core.serialization.boolean().optional()), commonModels: core.serialization.property( "common_models", - core.serialization.list(CommonModelScopesBodyRequest).optional() + core.serialization.list(CommonModelScopesBodyRequest).optional(), ), categoryCommonModelScopes: core.serialization.property( "category_common_model_scopes", core.serialization .record( core.serialization.string(), - core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional() + core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional(), ) - .optional() + .optional(), ), language: LanguageEnum.optional(), areSyncsDisabled: core.serialization.property("are_syncs_disabled", core.serialization.boolean().optional()), integrationSpecificConfig: core.serialization.property( "integration_specific_config", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace EndUserDetailsRequest { - interface Raw { + export interface Raw { end_user_email_address: string; end_user_organization_name: string; end_user_origin_id: string; diff --git a/src/serialization/resources/ats/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/serialization/resources/ats/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index 61a886f10..dfcb94d92 100644 --- a/src/serialization/resources/ats/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/serialization/resources/ats/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -12,5 +12,5 @@ export const LinkedAccountsListRequestCategory: core.serialization.Schema< > = core.serialization.enum_(["accounting", "ats", "crm", "filestorage", "hris", "mktg", "ticketing"]); export declare namespace LinkedAccountsListRequestCategory { - type Raw = "accounting" | "ats" | "crm" | "filestorage" | "hris" | "mktg" | "ticketing"; + export type Raw = "accounting" | "ats" | "crm" | "filestorage" | "hris" | "mktg" | "ticketing"; } diff --git a/src/serialization/resources/ats/resources/offers/types/OffersListRequestExpand.ts b/src/serialization/resources/ats/resources/offers/types/OffersListRequestExpand.ts index 3aba68c74..0644766a6 100644 --- a/src/serialization/resources/ats/resources/offers/types/OffersListRequestExpand.ts +++ b/src/serialization/resources/ats/resources/offers/types/OffersListRequestExpand.ts @@ -12,5 +12,5 @@ export const OffersListRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["application", "application,creator", "creator"]); export declare namespace OffersListRequestExpand { - type Raw = "application" | "application,creator" | "creator"; + export type Raw = "application" | "application,creator" | "creator"; } diff --git a/src/serialization/resources/ats/resources/offers/types/OffersRetrieveRequestExpand.ts b/src/serialization/resources/ats/resources/offers/types/OffersRetrieveRequestExpand.ts index dc8031a34..3f25f82bd 100644 --- a/src/serialization/resources/ats/resources/offers/types/OffersRetrieveRequestExpand.ts +++ b/src/serialization/resources/ats/resources/offers/types/OffersRetrieveRequestExpand.ts @@ -12,5 +12,5 @@ export const OffersRetrieveRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["application", "application,creator", "creator"]); export declare namespace OffersRetrieveRequestExpand { - type Raw = "application" | "application,creator" | "creator"; + export type Raw = "application" | "application,creator" | "creator"; } 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 ca82cc420..2c5752d31 100644 --- a/src/serialization/resources/ats/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts +++ b/src/serialization/resources/ats/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts @@ -14,7 +14,7 @@ export const RemoteKeyForRegenerationRequest: core.serialization.Schema< }); export declare namespace RemoteKeyForRegenerationRequest { - interface Raw { + export interface Raw { name: string; } } 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 02aff2d84..4206b560e 100644 --- a/src/serialization/resources/ats/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/ats/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -13,12 +13,12 @@ export const LinkedAccountCommonModelScopeDeserializerRequest: core.serializatio > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list(IndividualCommonModelScopeDeserializerRequest) + core.serialization.list(IndividualCommonModelScopeDeserializerRequest), ), }); export declare namespace LinkedAccountCommonModelScopeDeserializerRequest { - interface Raw { + export interface 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 f6e50a73d..a3a863f94 100644 --- a/src/serialization/resources/ats/resources/scorecards/types/ScorecardsListRequestExpand.ts +++ b/src/serialization/resources/ats/resources/scorecards/types/ScorecardsListRequestExpand.ts @@ -20,7 +20,7 @@ export const ScorecardsListRequestExpand: core.serialization.Schema< ]); export declare namespace ScorecardsListRequestExpand { - type Raw = + export type Raw = | "application" | "application,interview" | "application,interview,interviewer" diff --git a/src/serialization/resources/ats/resources/scorecards/types/ScorecardsRetrieveRequestExpand.ts b/src/serialization/resources/ats/resources/scorecards/types/ScorecardsRetrieveRequestExpand.ts index f9ef4ff17..f6e336d12 100644 --- a/src/serialization/resources/ats/resources/scorecards/types/ScorecardsRetrieveRequestExpand.ts +++ b/src/serialization/resources/ats/resources/scorecards/types/ScorecardsRetrieveRequestExpand.ts @@ -20,7 +20,7 @@ export const ScorecardsRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace ScorecardsRetrieveRequestExpand { - type Raw = + export type Raw = | "application" | "application,interview" | "application,interview,interviewer" diff --git a/src/serialization/resources/ats/resources/webhookReceivers/client/list.ts b/src/serialization/resources/ats/resources/webhookReceivers/client/list.ts index e43b9bda5..7ef9cc2d8 100644 --- a/src/serialization/resources/ats/resources/webhookReceivers/client/list.ts +++ b/src/serialization/resources/ats/resources/webhookReceivers/client/list.ts @@ -13,5 +13,5 @@ export const Response: core.serialization.Schema< > = core.serialization.list(WebhookReceiver); export declare namespace Response { - type Raw = WebhookReceiver.Raw[]; + export 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 ae6904c51..c98def1a8 100644 --- a/src/serialization/resources/ats/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts +++ b/src/serialization/resources/ats/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts @@ -16,7 +16,7 @@ export const WebhookReceiverRequest: core.serialization.Schema< }); export declare namespace WebhookReceiverRequest { - interface Raw { + export interface Raw { event: string; is_active: boolean; key?: string | null; diff --git a/src/serialization/resources/ats/types/AccessRoleEnum.ts b/src/serialization/resources/ats/types/AccessRoleEnum.ts index d719b0faa..c000b0f9b 100644 --- a/src/serialization/resources/ats/types/AccessRoleEnum.ts +++ b/src/serialization/resources/ats/types/AccessRoleEnum.ts @@ -10,5 +10,5 @@ export const AccessRoleEnum: core.serialization.Schema = core.serialization.enum_(["COMPLETE", "INCOMPLETE", "RELINK_NEEDED", "IDLE"]); export declare namespace AccountDetailsAndActionsStatusEnum { - type Raw = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; + export type Raw = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; } diff --git a/src/serialization/resources/ats/types/AccountIntegration.ts b/src/serialization/resources/ats/types/AccountIntegration.ts index 5b43d9260..4cf023cef 100644 --- a/src/serialization/resources/ats/types/AccountIntegration.ts +++ b/src/serialization/resources/ats/types/AccountIntegration.ts @@ -20,20 +20,20 @@ export const AccountIntegration: core.serialization.ObjectSchema< slug: core.serialization.string().optional(), apiEndpointsToDocumentationUrls: core.serialization.property( "api_endpoints_to_documentation_urls", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), webhookSetupGuideUrl: core.serialization.property( "webhook_setup_guide_url", - core.serialization.string().optional() + core.serialization.string().optional(), ), categoryBetaStatus: core.serialization.property( "category_beta_status", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace AccountIntegration { - interface Raw { + export interface Raw { name: string; abbreviated_name?: string | null; categories?: CategoriesEnum.Raw[] | null; diff --git a/src/serialization/resources/ats/types/AccountToken.ts b/src/serialization/resources/ats/types/AccountToken.ts index b06b6f7b0..da73991f8 100644 --- a/src/serialization/resources/ats/types/AccountToken.ts +++ b/src/serialization/resources/ats/types/AccountToken.ts @@ -15,7 +15,7 @@ export const AccountToken: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([ActivityTypeEnum, core.serialization.string()]); export declare namespace ActivityActivityType { - type Raw = ActivityTypeEnum.Raw | string; + export type Raw = ActivityTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ActivityRequest.ts b/src/serialization/resources/ats/types/ActivityRequest.ts index 326afff28..5b06b0e87 100644 --- a/src/serialization/resources/ats/types/ActivityRequest.ts +++ b/src/serialization/resources/ats/types/ActivityRequest.ts @@ -21,16 +21,16 @@ export const ActivityRequest: core.serialization.ObjectSchema< candidate: core.serialization.string().optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace ActivityRequest { - interface Raw { + export interface Raw { user?: ActivityRequestUser.Raw | null; activity_type?: ActivityRequestActivityType.Raw | null; subject?: string | null; diff --git a/src/serialization/resources/ats/types/ActivityRequestActivityType.ts b/src/serialization/resources/ats/types/ActivityRequestActivityType.ts index e0f5588a9..325ab3e93 100644 --- a/src/serialization/resources/ats/types/ActivityRequestActivityType.ts +++ b/src/serialization/resources/ats/types/ActivityRequestActivityType.ts @@ -13,5 +13,5 @@ export const ActivityRequestActivityType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([ActivityTypeEnum, core.serialization.string()]); export declare namespace ActivityRequestActivityType { - type Raw = ActivityTypeEnum.Raw | string; + export type Raw = ActivityTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ActivityRequestUser.ts b/src/serialization/resources/ats/types/ActivityRequestUser.ts index 324ba7545..8c5a310be 100644 --- a/src/serialization/resources/ats/types/ActivityRequestUser.ts +++ b/src/serialization/resources/ats/types/ActivityRequestUser.ts @@ -13,5 +13,5 @@ export const ActivityRequestUser: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ActivityRequestUser { - type Raw = string | RemoteUser.Raw; + export type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ActivityRequestVisibility.ts b/src/serialization/resources/ats/types/ActivityRequestVisibility.ts index a389123f4..f3b6c94fd 100644 --- a/src/serialization/resources/ats/types/ActivityRequestVisibility.ts +++ b/src/serialization/resources/ats/types/ActivityRequestVisibility.ts @@ -13,5 +13,5 @@ export const ActivityRequestVisibility: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([VisibilityEnum, core.serialization.string()]); export declare namespace ActivityRequestVisibility { - type Raw = VisibilityEnum.Raw | string; + export type Raw = VisibilityEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ActivityResponse.ts b/src/serialization/resources/ats/types/ActivityResponse.ts index 3ed689ec9..969dc03b8 100644 --- a/src/serialization/resources/ats/types/ActivityResponse.ts +++ b/src/serialization/resources/ats/types/ActivityResponse.ts @@ -21,7 +21,7 @@ export const ActivityResponse: core.serialization.ObjectSchema< }); export declare namespace ActivityResponse { - interface Raw { + export interface Raw { model: Activity.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/ats/types/ActivityTypeEnum.ts b/src/serialization/resources/ats/types/ActivityTypeEnum.ts index 2974dde41..d7119e079 100644 --- a/src/serialization/resources/ats/types/ActivityTypeEnum.ts +++ b/src/serialization/resources/ats/types/ActivityTypeEnum.ts @@ -12,5 +12,5 @@ export const ActivityTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["NOTE", "EMAIL", "OTHER"]); export declare namespace ActivityTypeEnum { - type Raw = "NOTE" | "EMAIL" | "OTHER"; + export type Raw = "NOTE" | "EMAIL" | "OTHER"; } diff --git a/src/serialization/resources/ats/types/ActivityUser.ts b/src/serialization/resources/ats/types/ActivityUser.ts index 38e99bb6d..d47a74200 100644 --- a/src/serialization/resources/ats/types/ActivityUser.ts +++ b/src/serialization/resources/ats/types/ActivityUser.ts @@ -11,5 +11,5 @@ export const ActivityUser: core.serialization.Schema = core.serialization.undiscriminatedUnion([VisibilityEnum, core.serialization.string()]); export declare namespace ActivityVisibility { - type Raw = VisibilityEnum.Raw | string; + export type Raw = VisibilityEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/AdvancedMetadata.ts b/src/serialization/resources/ats/types/AdvancedMetadata.ts index 0ca8efb54..f55058965 100644 --- a/src/serialization/resources/ats/types/AdvancedMetadata.ts +++ b/src/serialization/resources/ats/types/AdvancedMetadata.ts @@ -17,12 +17,12 @@ export const AdvancedMetadata: core.serialization.ObjectSchema< isCustom: core.serialization.property("is_custom", core.serialization.boolean().optional()), fieldChoices: core.serialization.property( "field_choices", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace AdvancedMetadata { - interface Raw { + export interface Raw { id: string; display_name?: string | null; description?: string | null; diff --git a/src/serialization/resources/ats/types/Application.ts b/src/serialization/resources/ats/types/Application.ts index f6916273b..299974eec 100644 --- a/src/serialization/resources/ats/types/Application.ts +++ b/src/serialization/resources/ats/types/Application.ts @@ -29,20 +29,20 @@ export const Application: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ApplicationCreditedTo { - type Raw = string | RemoteUser.Raw; + export type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationCurrentStage.ts b/src/serialization/resources/ats/types/ApplicationCurrentStage.ts index 259b18e07..2eba1cba3 100644 --- a/src/serialization/resources/ats/types/ApplicationCurrentStage.ts +++ b/src/serialization/resources/ats/types/ApplicationCurrentStage.ts @@ -13,5 +13,5 @@ export const ApplicationCurrentStage: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), JobInterviewStage]); export declare namespace ApplicationCurrentStage { - type Raw = string | JobInterviewStage.Raw; + export type Raw = string | JobInterviewStage.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationJob.ts b/src/serialization/resources/ats/types/ApplicationJob.ts index 1b029b5a0..9bd64c292 100644 --- a/src/serialization/resources/ats/types/ApplicationJob.ts +++ b/src/serialization/resources/ats/types/ApplicationJob.ts @@ -11,5 +11,5 @@ export const ApplicationJob: core.serialization.Schema = core.serialization.undiscriminatedUnion([core.serialization.string(), RejectReason]); export declare namespace ApplicationRejectReason { - type Raw = string | RejectReason.Raw; + export type Raw = string | RejectReason.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationRequest.ts b/src/serialization/resources/ats/types/ApplicationRequest.ts index 21c9a309a..1dc4b42cd 100644 --- a/src/serialization/resources/ats/types/ApplicationRequest.ts +++ b/src/serialization/resources/ats/types/ApplicationRequest.ts @@ -26,23 +26,23 @@ export const ApplicationRequest: core.serialization.ObjectSchema< creditedTo: core.serialization.property("credited_to", ApplicationRequestCreditedTo.optional()), screeningQuestionAnswers: core.serialization.property( "screening_question_answers", - core.serialization.list(ApplicationRequestScreeningQuestionAnswersItem).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", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace ApplicationRequest { - interface Raw { + export interface Raw { candidate?: ApplicationRequestCandidate.Raw | null; job?: ApplicationRequestJob.Raw | null; applied_at?: string | null; diff --git a/src/serialization/resources/ats/types/ApplicationRequestCandidate.ts b/src/serialization/resources/ats/types/ApplicationRequestCandidate.ts index be0bcb449..c8b257cc9 100644 --- a/src/serialization/resources/ats/types/ApplicationRequestCandidate.ts +++ b/src/serialization/resources/ats/types/ApplicationRequestCandidate.ts @@ -15,5 +15,5 @@ export const ApplicationRequestCandidate: core.serialization.Schema< ]); export declare namespace ApplicationRequestCandidate { - type Raw = string | serializers.ats.Candidate.Raw; + export type Raw = string | serializers.ats.Candidate.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationRequestCreditedTo.ts b/src/serialization/resources/ats/types/ApplicationRequestCreditedTo.ts index 8ce0388ca..3cacd17f2 100644 --- a/src/serialization/resources/ats/types/ApplicationRequestCreditedTo.ts +++ b/src/serialization/resources/ats/types/ApplicationRequestCreditedTo.ts @@ -13,5 +13,5 @@ export const ApplicationRequestCreditedTo: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ApplicationRequestCreditedTo { - type Raw = string | RemoteUser.Raw; + export type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationRequestCurrentStage.ts b/src/serialization/resources/ats/types/ApplicationRequestCurrentStage.ts index f69e5dc19..4e8a15e56 100644 --- a/src/serialization/resources/ats/types/ApplicationRequestCurrentStage.ts +++ b/src/serialization/resources/ats/types/ApplicationRequestCurrentStage.ts @@ -13,5 +13,5 @@ export const ApplicationRequestCurrentStage: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), JobInterviewStage]); export declare namespace ApplicationRequestCurrentStage { - type Raw = string | JobInterviewStage.Raw; + export type Raw = string | JobInterviewStage.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationRequestJob.ts b/src/serialization/resources/ats/types/ApplicationRequestJob.ts index 2860069df..ab819db73 100644 --- a/src/serialization/resources/ats/types/ApplicationRequestJob.ts +++ b/src/serialization/resources/ats/types/ApplicationRequestJob.ts @@ -13,5 +13,5 @@ export const ApplicationRequestJob: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Job]); export declare namespace ApplicationRequestJob { - type Raw = string | Job.Raw; + export type Raw = string | Job.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationRequestOffersItem.ts b/src/serialization/resources/ats/types/ApplicationRequestOffersItem.ts index 315745e31..0acb1a962 100644 --- a/src/serialization/resources/ats/types/ApplicationRequestOffersItem.ts +++ b/src/serialization/resources/ats/types/ApplicationRequestOffersItem.ts @@ -15,5 +15,5 @@ export const ApplicationRequestOffersItem: core.serialization.Schema< ]); export declare namespace ApplicationRequestOffersItem { - type Raw = string | serializers.ats.Offer.Raw; + export type Raw = string | serializers.ats.Offer.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationRequestRejectReason.ts b/src/serialization/resources/ats/types/ApplicationRequestRejectReason.ts index 144183f84..6d8fa3aaa 100644 --- a/src/serialization/resources/ats/types/ApplicationRequestRejectReason.ts +++ b/src/serialization/resources/ats/types/ApplicationRequestRejectReason.ts @@ -13,5 +13,5 @@ export const ApplicationRequestRejectReason: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), RejectReason]); export declare namespace ApplicationRequestRejectReason { - type Raw = string | RejectReason.Raw; + export type Raw = string | RejectReason.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationRequestScreeningQuestionAnswersItem.ts b/src/serialization/resources/ats/types/ApplicationRequestScreeningQuestionAnswersItem.ts index 380761d90..c2153678a 100644 --- a/src/serialization/resources/ats/types/ApplicationRequestScreeningQuestionAnswersItem.ts +++ b/src/serialization/resources/ats/types/ApplicationRequestScreeningQuestionAnswersItem.ts @@ -13,5 +13,5 @@ export const ApplicationRequestScreeningQuestionAnswersItem: core.serialization. > = core.serialization.undiscriminatedUnion([core.serialization.string(), ScreeningQuestionAnswerRequest]); export declare namespace ApplicationRequestScreeningQuestionAnswersItem { - type Raw = string | ScreeningQuestionAnswerRequest.Raw; + export type Raw = string | ScreeningQuestionAnswerRequest.Raw; } diff --git a/src/serialization/resources/ats/types/ApplicationResponse.ts b/src/serialization/resources/ats/types/ApplicationResponse.ts index e8957e6b2..3229c828b 100644 --- a/src/serialization/resources/ats/types/ApplicationResponse.ts +++ b/src/serialization/resources/ats/types/ApplicationResponse.ts @@ -20,7 +20,7 @@ export const ApplicationResponse: core.serialization.ObjectSchema< }); export declare namespace ApplicationResponse { - interface Raw { + export interface Raw { model: serializers.ats.Application.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/ats/types/ApplicationScreeningQuestionAnswersItem.ts b/src/serialization/resources/ats/types/ApplicationScreeningQuestionAnswersItem.ts index 083ce4285..c531f8c5e 100644 --- a/src/serialization/resources/ats/types/ApplicationScreeningQuestionAnswersItem.ts +++ b/src/serialization/resources/ats/types/ApplicationScreeningQuestionAnswersItem.ts @@ -13,5 +13,5 @@ export const ApplicationScreeningQuestionAnswersItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), ScreeningQuestionAnswer]); export declare namespace ApplicationScreeningQuestionAnswersItem { - type Raw = string | ScreeningQuestionAnswer.Raw; + export type Raw = string | ScreeningQuestionAnswer.Raw; } diff --git a/src/serialization/resources/ats/types/AsyncPassthroughReciept.ts b/src/serialization/resources/ats/types/AsyncPassthroughReciept.ts index 7a1d69c84..bff325d85 100644 --- a/src/serialization/resources/ats/types/AsyncPassthroughReciept.ts +++ b/src/serialization/resources/ats/types/AsyncPassthroughReciept.ts @@ -14,7 +14,7 @@ export const AsyncPassthroughReciept: core.serialization.ObjectSchema< }); export declare namespace AsyncPassthroughReciept { - interface Raw { + export interface Raw { async_passthrough_receipt_id: string; } } diff --git a/src/serialization/resources/ats/types/Attachment.ts b/src/serialization/resources/ats/types/Attachment.ts index 14ceff8cf..bbe2bed14 100644 --- a/src/serialization/resources/ats/types/Attachment.ts +++ b/src/serialization/resources/ats/types/Attachment.ts @@ -21,13 +21,13 @@ export const Attachment: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([AttachmentTypeEnum, core.serialization.string()]); export declare namespace AttachmentAttachmentType { - type Raw = AttachmentTypeEnum.Raw | string; + export type Raw = AttachmentTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/AttachmentRequest.ts b/src/serialization/resources/ats/types/AttachmentRequest.ts index 8ba5f6994..f29be09d4 100644 --- a/src/serialization/resources/ats/types/AttachmentRequest.ts +++ b/src/serialization/resources/ats/types/AttachmentRequest.ts @@ -17,16 +17,16 @@ export const AttachmentRequest: core.serialization.ObjectSchema< attachmentType: core.serialization.property("attachment_type", AttachmentRequestAttachmentType.optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace AttachmentRequest { - interface Raw { + export interface Raw { file_name?: string | null; file_url?: string | null; candidate?: string | null; diff --git a/src/serialization/resources/ats/types/AttachmentRequestAttachmentType.ts b/src/serialization/resources/ats/types/AttachmentRequestAttachmentType.ts index 98af99124..90a452a4e 100644 --- a/src/serialization/resources/ats/types/AttachmentRequestAttachmentType.ts +++ b/src/serialization/resources/ats/types/AttachmentRequestAttachmentType.ts @@ -13,5 +13,5 @@ export const AttachmentRequestAttachmentType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([AttachmentTypeEnum, core.serialization.string()]); export declare namespace AttachmentRequestAttachmentType { - type Raw = AttachmentTypeEnum.Raw | string; + export type Raw = AttachmentTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/AttachmentResponse.ts b/src/serialization/resources/ats/types/AttachmentResponse.ts index 7037b838b..acf62ae67 100644 --- a/src/serialization/resources/ats/types/AttachmentResponse.ts +++ b/src/serialization/resources/ats/types/AttachmentResponse.ts @@ -21,7 +21,7 @@ export const AttachmentResponse: core.serialization.ObjectSchema< }); export declare namespace AttachmentResponse { - interface Raw { + export interface Raw { model: Attachment.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/ats/types/AttachmentTypeEnum.ts b/src/serialization/resources/ats/types/AttachmentTypeEnum.ts index 043a32cad..f18f7e48b 100644 --- a/src/serialization/resources/ats/types/AttachmentTypeEnum.ts +++ b/src/serialization/resources/ats/types/AttachmentTypeEnum.ts @@ -12,5 +12,5 @@ export const AttachmentTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["RESUME", "COVER_LETTER", "OFFER_LETTER", "OTHER"]); export declare namespace AttachmentTypeEnum { - type Raw = "RESUME" | "COVER_LETTER" | "OFFER_LETTER" | "OTHER"; + export type Raw = "RESUME" | "COVER_LETTER" | "OFFER_LETTER" | "OTHER"; } diff --git a/src/serialization/resources/ats/types/AuditLogEvent.ts b/src/serialization/resources/ats/types/AuditLogEvent.ts index 4746aab88..1c985161b 100644 --- a/src/serialization/resources/ats/types/AuditLogEvent.ts +++ b/src/serialization/resources/ats/types/AuditLogEvent.ts @@ -23,7 +23,7 @@ export const AuditLogEvent: core.serialization.ObjectSchema< }); export declare namespace AuditLogEvent { - interface Raw { + export interface Raw { id?: string | null; user_name?: string | null; user_email?: string | null; diff --git a/src/serialization/resources/ats/types/AuditLogEventEventType.ts b/src/serialization/resources/ats/types/AuditLogEventEventType.ts index 85e2bec14..02168a16f 100644 --- a/src/serialization/resources/ats/types/AuditLogEventEventType.ts +++ b/src/serialization/resources/ats/types/AuditLogEventEventType.ts @@ -13,5 +13,5 @@ export const AuditLogEventEventType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([EventTypeEnum, core.serialization.string()]); export declare namespace AuditLogEventEventType { - type Raw = EventTypeEnum.Raw | string; + export type Raw = EventTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/AuditLogEventRole.ts b/src/serialization/resources/ats/types/AuditLogEventRole.ts index a5a4ec388..70097dfc4 100644 --- a/src/serialization/resources/ats/types/AuditLogEventRole.ts +++ b/src/serialization/resources/ats/types/AuditLogEventRole.ts @@ -13,5 +13,5 @@ export const AuditLogEventRole: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([RoleEnum, core.serialization.string()]); export declare namespace AuditLogEventRole { - type Raw = RoleEnum.Raw | string; + export type Raw = RoleEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/AvailableActions.ts b/src/serialization/resources/ats/types/AvailableActions.ts index a69df5546..7ea65031c 100644 --- a/src/serialization/resources/ats/types/AvailableActions.ts +++ b/src/serialization/resources/ats/types/AvailableActions.ts @@ -16,12 +16,12 @@ export const AvailableActions: core.serialization.ObjectSchema< passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization.list(ModelOperation).optional() + core.serialization.list(ModelOperation).optional(), ), }); export declare namespace AvailableActions { - interface Raw { + export interface Raw { integration: AccountIntegration.Raw; passthrough_available: boolean; 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 1941f8f59..db86e57e1 100644 --- a/src/serialization/resources/ats/types/Candidate.ts +++ b/src/serialization/resources/ats/types/Candidate.ts @@ -30,7 +30,7 @@ export const Candidate: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Attachment]); export declare namespace CandidateAttachmentsItem { - type Raw = string | Attachment.Raw; + export type Raw = string | Attachment.Raw; } diff --git a/src/serialization/resources/ats/types/CandidateRequest.ts b/src/serialization/resources/ats/types/CandidateRequest.ts index 330bace63..af237a577 100644 --- a/src/serialization/resources/ats/types/CandidateRequest.ts +++ b/src/serialization/resources/ats/types/CandidateRequest.ts @@ -26,7 +26,7 @@ export const CandidateRequest: core.serialization.ObjectSchema< phoneNumbers: core.serialization.property("phone_numbers", core.serialization.list(PhoneNumberRequest).optional()), emailAddresses: core.serialization.property( "email_addresses", - core.serialization.list(EmailAddressRequest).optional() + core.serialization.list(EmailAddressRequest).optional(), ), urls: core.serialization.list(UrlRequest).optional(), tags: core.serialization.list(core.serialization.string().optional()).optional(), @@ -35,16 +35,16 @@ export const CandidateRequest: core.serialization.ObjectSchema< remoteTemplateId: core.serialization.property("remote_template_id", core.serialization.string().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace CandidateRequest { - interface Raw { + export interface Raw { first_name?: string | null; last_name?: string | null; company?: string | null; diff --git a/src/serialization/resources/ats/types/CandidateRequestApplicationsItem.ts b/src/serialization/resources/ats/types/CandidateRequestApplicationsItem.ts index ef775e37e..02d8c0b41 100644 --- a/src/serialization/resources/ats/types/CandidateRequestApplicationsItem.ts +++ b/src/serialization/resources/ats/types/CandidateRequestApplicationsItem.ts @@ -15,5 +15,5 @@ export const CandidateRequestApplicationsItem: core.serialization.Schema< ]); export declare namespace CandidateRequestApplicationsItem { - type Raw = string | serializers.ats.Application.Raw; + export type Raw = string | serializers.ats.Application.Raw; } diff --git a/src/serialization/resources/ats/types/CandidateRequestAttachmentsItem.ts b/src/serialization/resources/ats/types/CandidateRequestAttachmentsItem.ts index 76af97d94..3da83994f 100644 --- a/src/serialization/resources/ats/types/CandidateRequestAttachmentsItem.ts +++ b/src/serialization/resources/ats/types/CandidateRequestAttachmentsItem.ts @@ -13,5 +13,5 @@ export const CandidateRequestAttachmentsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Attachment]); export declare namespace CandidateRequestAttachmentsItem { - type Raw = string | Attachment.Raw; + export type Raw = string | Attachment.Raw; } diff --git a/src/serialization/resources/ats/types/CandidateResponse.ts b/src/serialization/resources/ats/types/CandidateResponse.ts index 2395b1e3d..7d01272e0 100644 --- a/src/serialization/resources/ats/types/CandidateResponse.ts +++ b/src/serialization/resources/ats/types/CandidateResponse.ts @@ -20,7 +20,7 @@ export const CandidateResponse: core.serialization.ObjectSchema< }); export declare namespace CandidateResponse { - interface Raw { + export interface Raw { model: serializers.ats.Candidate.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/ats/types/CategoriesEnum.ts b/src/serialization/resources/ats/types/CategoriesEnum.ts index 9ef9683da..11d1c4900 100644 --- a/src/serialization/resources/ats/types/CategoriesEnum.ts +++ b/src/serialization/resources/ats/types/CategoriesEnum.ts @@ -10,5 +10,5 @@ export const CategoriesEnum: core.serialization.Schema = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list(IndividualCommonModelScopeDeserializer) + core.serialization.list(IndividualCommonModelScopeDeserializer), ), }); export declare namespace CommonModelScopeApi { - interface Raw { + export interface Raw { common_models: IndividualCommonModelScopeDeserializer.Raw[]; } } diff --git a/src/serialization/resources/ats/types/CommonModelScopesBodyRequest.ts b/src/serialization/resources/ats/types/CommonModelScopesBodyRequest.ts index f654a16ff..01083c9eb 100644 --- a/src/serialization/resources/ats/types/CommonModelScopesBodyRequest.ts +++ b/src/serialization/resources/ats/types/CommonModelScopesBodyRequest.ts @@ -15,12 +15,12 @@ export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< enabledActions: core.serialization.property("enabled_actions", core.serialization.list(EnabledActionsEnum)), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.string()) + core.serialization.list(core.serialization.string()), ), }); export declare namespace CommonModelScopesBodyRequest { - interface Raw { + export interface Raw { model_id: string; 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 a8aa2b83a..2babb1bbc 100644 --- a/src/serialization/resources/ats/types/DataPassthroughRequest.ts +++ b/src/serialization/resources/ats/types/DataPassthroughRequest.ts @@ -19,7 +19,7 @@ export const DataPassthroughRequest: core.serialization.ObjectSchema< data: core.serialization.string().optional(), multipartFormData: core.serialization.property( "multipart_form_data", - core.serialization.list(MultipartFormFieldRequest).optional() + core.serialization.list(MultipartFormFieldRequest).optional(), ), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), requestFormat: core.serialization.property("request_format", RequestFormatEnum.optional()), @@ -27,7 +27,7 @@ export const DataPassthroughRequest: core.serialization.ObjectSchema< }); export declare namespace DataPassthroughRequest { - interface Raw { + export interface Raw { method: MethodEnum.Raw; path: string; base_url_override?: string | null; diff --git a/src/serialization/resources/ats/types/DebugModeLog.ts b/src/serialization/resources/ats/types/DebugModeLog.ts index dafb54d14..b12390627 100644 --- a/src/serialization/resources/ats/types/DebugModeLog.ts +++ b/src/serialization/resources/ats/types/DebugModeLog.ts @@ -15,7 +15,7 @@ export const DebugModeLog: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([DisabilityStatusEnum, core.serialization.string()]); export declare namespace EeocDisabilityStatus { - type Raw = DisabilityStatusEnum.Raw | string; + export type Raw = DisabilityStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/EeocGender.ts b/src/serialization/resources/ats/types/EeocGender.ts index 502b89fb0..00773a1c8 100644 --- a/src/serialization/resources/ats/types/EeocGender.ts +++ b/src/serialization/resources/ats/types/EeocGender.ts @@ -11,5 +11,5 @@ export const EeocGender: core.serialization.Schema = core.serialization.undiscriminatedUnion([VeteranStatusEnum, core.serialization.string()]); export declare namespace EeocVeteranStatus { - type Raw = VeteranStatusEnum.Raw | string; + export type Raw = VeteranStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/EmailAddress.ts b/src/serialization/resources/ats/types/EmailAddress.ts index dd66c88c7..de4429824 100644 --- a/src/serialization/resources/ats/types/EmailAddress.ts +++ b/src/serialization/resources/ats/types/EmailAddress.ts @@ -17,7 +17,7 @@ export const EmailAddress: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([EmailAddressTypeEnum, core.serialization.string()]); export declare namespace EmailAddressEmailAddressType { - type Raw = EmailAddressTypeEnum.Raw | string; + export type Raw = EmailAddressTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/EmailAddressRequest.ts b/src/serialization/resources/ats/types/EmailAddressRequest.ts index a97f5f061..a1fa73fb8 100644 --- a/src/serialization/resources/ats/types/EmailAddressRequest.ts +++ b/src/serialization/resources/ats/types/EmailAddressRequest.ts @@ -15,16 +15,16 @@ export const EmailAddressRequest: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace EmailAddressRequest { - interface Raw { + export interface Raw { value?: string | null; email_address_type?: EmailAddressRequestEmailAddressType.Raw | null; integration_params?: Record | null; diff --git a/src/serialization/resources/ats/types/EmailAddressRequestEmailAddressType.ts b/src/serialization/resources/ats/types/EmailAddressRequestEmailAddressType.ts index 708c9a298..ebdba1ce3 100644 --- a/src/serialization/resources/ats/types/EmailAddressRequestEmailAddressType.ts +++ b/src/serialization/resources/ats/types/EmailAddressRequestEmailAddressType.ts @@ -13,5 +13,5 @@ export const EmailAddressRequestEmailAddressType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([EmailAddressTypeEnum, core.serialization.string()]); export declare namespace EmailAddressRequestEmailAddressType { - type Raw = EmailAddressTypeEnum.Raw | string; + export type Raw = EmailAddressTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/EmailAddressTypeEnum.ts b/src/serialization/resources/ats/types/EmailAddressTypeEnum.ts index 1d98a8673..d06d31a0b 100644 --- a/src/serialization/resources/ats/types/EmailAddressTypeEnum.ts +++ b/src/serialization/resources/ats/types/EmailAddressTypeEnum.ts @@ -12,5 +12,5 @@ export const EmailAddressTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["PERSONAL", "WORK", "OTHER"]); export declare namespace EmailAddressTypeEnum { - type Raw = "PERSONAL" | "WORK" | "OTHER"; + export type Raw = "PERSONAL" | "WORK" | "OTHER"; } diff --git a/src/serialization/resources/ats/types/EnabledActionsEnum.ts b/src/serialization/resources/ats/types/EnabledActionsEnum.ts index 6a20a3676..37cb3da62 100644 --- a/src/serialization/resources/ats/types/EnabledActionsEnum.ts +++ b/src/serialization/resources/ats/types/EnabledActionsEnum.ts @@ -12,5 +12,5 @@ export const EnabledActionsEnum: core.serialization.Schema< > = core.serialization.enum_(["READ", "WRITE"]); export declare namespace EnabledActionsEnum { - type Raw = "READ" | "WRITE"; + export type Raw = "READ" | "WRITE"; } diff --git a/src/serialization/resources/ats/types/EncodingEnum.ts b/src/serialization/resources/ats/types/EncodingEnum.ts index d7ae9796a..a32b06421 100644 --- a/src/serialization/resources/ats/types/EncodingEnum.ts +++ b/src/serialization/resources/ats/types/EncodingEnum.ts @@ -10,5 +10,5 @@ export const EncodingEnum: core.serialization.Schema | null; remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; diff --git a/src/serialization/resources/ats/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts b/src/serialization/resources/ats/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts index 718342ab6..1fcbf02f6 100644 --- a/src/serialization/resources/ats/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts +++ b/src/serialization/resources/ats/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts @@ -14,12 +14,12 @@ export const FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: core.serializ urlPath: core.serialization.property("url_path", core.serialization.string().optional()), fieldTraversalPath: core.serialization.property( "field_traversal_path", - core.serialization.list(core.serialization.string()).optional() + core.serialization.list(core.serialization.string()).optional(), ), }); export declare namespace FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { - interface Raw { + export interface Raw { method?: string | null; url_path?: string | null; field_traversal_path?: string[] | null; diff --git a/src/serialization/resources/ats/types/FieldMappingApiInstanceResponse.ts b/src/serialization/resources/ats/types/FieldMappingApiInstanceResponse.ts index 11d13268f..623de9d39 100644 --- a/src/serialization/resources/ats/types/FieldMappingApiInstanceResponse.ts +++ b/src/serialization/resources/ats/types/FieldMappingApiInstanceResponse.ts @@ -14,7 +14,7 @@ export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< activity: core.serialization.property("Activity", core.serialization.list(FieldMappingApiInstance).optional()), application: core.serialization.property( "Application", - core.serialization.list(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()), @@ -22,19 +22,19 @@ export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< eeoc: core.serialization.property("EEOC", core.serialization.list(FieldMappingApiInstance).optional()), scheduledInterview: core.serialization.property( "ScheduledInterview", - core.serialization.list(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(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(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()), @@ -42,7 +42,7 @@ export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< }); export declare namespace FieldMappingApiInstanceResponse { - interface Raw { + export interface Raw { Activity?: FieldMappingApiInstance.Raw[] | null; Application?: FieldMappingApiInstance.Raw[] | null; Attachment?: FieldMappingApiInstance.Raw[] | null; diff --git a/src/serialization/resources/ats/types/FieldMappingApiInstanceTargetField.ts b/src/serialization/resources/ats/types/FieldMappingApiInstanceTargetField.ts index e06d37c75..b37919ffe 100644 --- a/src/serialization/resources/ats/types/FieldMappingApiInstanceTargetField.ts +++ b/src/serialization/resources/ats/types/FieldMappingApiInstanceTargetField.ts @@ -16,7 +16,7 @@ export const FieldMappingApiInstanceTargetField: core.serialization.ObjectSchema }); export declare namespace FieldMappingApiInstanceTargetField { - interface Raw { + export interface Raw { name: string; description: string; is_organization_wide: boolean; diff --git a/src/serialization/resources/ats/types/FieldMappingInstanceResponse.ts b/src/serialization/resources/ats/types/FieldMappingInstanceResponse.ts index dcda7336f..efabcc485 100644 --- a/src/serialization/resources/ats/types/FieldMappingInstanceResponse.ts +++ b/src/serialization/resources/ats/types/FieldMappingInstanceResponse.ts @@ -21,7 +21,7 @@ export const FieldMappingInstanceResponse: core.serialization.ObjectSchema< }); export declare namespace FieldMappingInstanceResponse { - interface Raw { + export interface Raw { model: FieldMappingApiInstance.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/ats/types/FieldPermissionDeserializer.ts b/src/serialization/resources/ats/types/FieldPermissionDeserializer.ts index 9022aa08d..b36b19099 100644 --- a/src/serialization/resources/ats/types/FieldPermissionDeserializer.ts +++ b/src/serialization/resources/ats/types/FieldPermissionDeserializer.ts @@ -12,16 +12,16 @@ export const FieldPermissionDeserializer: core.serialization.ObjectSchema< > = core.serialization.object({ enabledFields: core.serialization.property( "enabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace FieldPermissionDeserializer { - interface Raw { + export interface Raw { enabled_fields?: unknown[] | null; disabled_fields?: unknown[] | null; } diff --git a/src/serialization/resources/ats/types/FieldPermissionDeserializerRequest.ts b/src/serialization/resources/ats/types/FieldPermissionDeserializerRequest.ts index c6e3da142..b8190a337 100644 --- a/src/serialization/resources/ats/types/FieldPermissionDeserializerRequest.ts +++ b/src/serialization/resources/ats/types/FieldPermissionDeserializerRequest.ts @@ -12,16 +12,16 @@ export const FieldPermissionDeserializerRequest: core.serialization.ObjectSchema > = core.serialization.object({ enabledFields: core.serialization.property( "enabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace FieldPermissionDeserializerRequest { - interface Raw { + export interface Raw { enabled_fields?: unknown[] | null; disabled_fields?: unknown[] | null; } diff --git a/src/serialization/resources/ats/types/GenderEnum.ts b/src/serialization/resources/ats/types/GenderEnum.ts index 6394501f8..9fceb501c 100644 --- a/src/serialization/resources/ats/types/GenderEnum.ts +++ b/src/serialization/resources/ats/types/GenderEnum.ts @@ -10,5 +10,5 @@ export const GenderEnum: core.serialization.Schema | 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 50a45f808..2556001c3 100644 --- a/src/serialization/resources/ats/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/ats/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -15,13 +15,13 @@ 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(), ModelPermissionDeserializerRequest).optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializerRequest).optional(), ), fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializerRequest.optional()), }); export declare namespace IndividualCommonModelScopeDeserializerRequest { - interface Raw { + export interface Raw { model_name: string; 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 e44754316..adb239f22 100644 --- a/src/serialization/resources/ats/types/Issue.ts +++ b/src/serialization/resources/ats/types/Issue.ts @@ -14,19 +14,19 @@ export const Issue: core.serialization.ObjectSchema = core.serialization.enum_(["ONGOING", "RESOLVED"]); export declare namespace IssueStatusEnum { - type Raw = "ONGOING" | "RESOLVED"; + export type Raw = "ONGOING" | "RESOLVED"; } diff --git a/src/serialization/resources/ats/types/Job.ts b/src/serialization/resources/ats/types/Job.ts index 5c0470bda..ab392f53a 100644 --- a/src/serialization/resources/ats/types/Job.ts +++ b/src/serialization/resources/ats/types/Job.ts @@ -26,7 +26,7 @@ export const Job: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Department]); export declare namespace JobDepartmentsItem { - type Raw = string | Department.Raw; + export type Raw = string | Department.Raw; } diff --git a/src/serialization/resources/ats/types/JobHiringManagersItem.ts b/src/serialization/resources/ats/types/JobHiringManagersItem.ts index 9a4328165..65b68aa16 100644 --- a/src/serialization/resources/ats/types/JobHiringManagersItem.ts +++ b/src/serialization/resources/ats/types/JobHiringManagersItem.ts @@ -13,5 +13,5 @@ export const JobHiringManagersItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace JobHiringManagersItem { - type Raw = string | RemoteUser.Raw; + export type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/JobInterviewStage.ts b/src/serialization/resources/ats/types/JobInterviewStage.ts index cc87bd5f6..6546ae486 100644 --- a/src/serialization/resources/ats/types/JobInterviewStage.ts +++ b/src/serialization/resources/ats/types/JobInterviewStage.ts @@ -22,13 +22,13 @@ export const JobInterviewStage: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace JobInterviewStage { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/ats/types/JobInterviewStageJob.ts b/src/serialization/resources/ats/types/JobInterviewStageJob.ts index 7b900b3ab..eab3d8cbb 100644 --- a/src/serialization/resources/ats/types/JobInterviewStageJob.ts +++ b/src/serialization/resources/ats/types/JobInterviewStageJob.ts @@ -13,5 +13,5 @@ export const JobInterviewStageJob: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Job]); export declare namespace JobInterviewStageJob { - type Raw = string | Job.Raw; + export type Raw = string | Job.Raw; } diff --git a/src/serialization/resources/ats/types/JobOfficesItem.ts b/src/serialization/resources/ats/types/JobOfficesItem.ts index 3bfaeed6b..f9324ae0e 100644 --- a/src/serialization/resources/ats/types/JobOfficesItem.ts +++ b/src/serialization/resources/ats/types/JobOfficesItem.ts @@ -11,5 +11,5 @@ export const JobOfficesItem: core.serialization.Schema = core.serialization.undiscriminatedUnion([core.serialization.string(), Url]); export declare namespace JobPostingJobPostingUrlsItem { - type Raw = string | Url.Raw; + export type Raw = string | Url.Raw; } diff --git a/src/serialization/resources/ats/types/JobPostingStatusEnum.ts b/src/serialization/resources/ats/types/JobPostingStatusEnum.ts index 3d7f6356e..c8b2ef64b 100644 --- a/src/serialization/resources/ats/types/JobPostingStatusEnum.ts +++ b/src/serialization/resources/ats/types/JobPostingStatusEnum.ts @@ -12,5 +12,5 @@ export const JobPostingStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["PUBLISHED", "CLOSED", "DRAFT", "INTERNAL", "PENDING"]); export declare namespace JobPostingStatusEnum { - type Raw = "PUBLISHED" | "CLOSED" | "DRAFT" | "INTERNAL" | "PENDING"; + export type Raw = "PUBLISHED" | "CLOSED" | "DRAFT" | "INTERNAL" | "PENDING"; } diff --git a/src/serialization/resources/ats/types/JobRecruitersItem.ts b/src/serialization/resources/ats/types/JobRecruitersItem.ts index 38042a0be..bd33f446a 100644 --- a/src/serialization/resources/ats/types/JobRecruitersItem.ts +++ b/src/serialization/resources/ats/types/JobRecruitersItem.ts @@ -13,5 +13,5 @@ export const JobRecruitersItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace JobRecruitersItem { - type Raw = string | RemoteUser.Raw; + export type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/JobStatus.ts b/src/serialization/resources/ats/types/JobStatus.ts index 4c44cb383..e9cc04871 100644 --- a/src/serialization/resources/ats/types/JobStatus.ts +++ b/src/serialization/resources/ats/types/JobStatus.ts @@ -11,5 +11,5 @@ export const JobStatus: core.serialization.Schema = core.serialization.enum_(["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"]); export declare namespace LastSyncResultEnum { - type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; + export type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; } diff --git a/src/serialization/resources/ats/types/LinkToken.ts b/src/serialization/resources/ats/types/LinkToken.ts index bf7793340..ceb35cab7 100644 --- a/src/serialization/resources/ats/types/LinkToken.ts +++ b/src/serialization/resources/ats/types/LinkToken.ts @@ -14,7 +14,7 @@ export const LinkToken: core.serialization.ObjectSchema; remote_field_classes?: Record | null; status?: LinkedAccountStatus.Raw | null; diff --git a/src/serialization/resources/ats/types/MethodEnum.ts b/src/serialization/resources/ats/types/MethodEnum.ts index 451269f5c..93adf9f3f 100644 --- a/src/serialization/resources/ats/types/MethodEnum.ts +++ b/src/serialization/resources/ats/types/MethodEnum.ts @@ -10,5 +10,5 @@ export const MethodEnum: core.serialization.Schema = core.serialization.undiscriminatedUnion([EncodingEnum, core.serialization.string()]); export declare namespace MultipartFormFieldRequestEncoding { - type Raw = EncodingEnum.Raw | string; + export type Raw = EncodingEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/Offer.ts b/src/serialization/resources/ats/types/Offer.ts index 6fd9e9f0e..2b2f339da 100644 --- a/src/serialization/resources/ats/types/Offer.ts +++ b/src/serialization/resources/ats/types/Offer.ts @@ -25,13 +25,13 @@ export const Offer: core.serialization.ObjectSchema = core.serialization.enum_(["DEFINITELY_NO", "NO", "YES", "STRONG_YES", "NO_DECISION"]); export declare namespace OverallRecommendationEnum { - type Raw = "DEFINITELY_NO" | "NO" | "YES" | "STRONG_YES" | "NO_DECISION"; + export type Raw = "DEFINITELY_NO" | "NO" | "YES" | "STRONG_YES" | "NO_DECISION"; } diff --git a/src/serialization/resources/ats/types/PaginatedAccountDetailsAndActionsList.ts b/src/serialization/resources/ats/types/PaginatedAccountDetailsAndActionsList.ts index 7e99f155c..b0b22182e 100644 --- a/src/serialization/resources/ats/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/serialization/resources/ats/types/PaginatedAccountDetailsAndActionsList.ts @@ -17,7 +17,7 @@ export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSch }); export declare namespace PaginatedAccountDetailsAndActionsList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: AccountDetailsAndActions.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedActivityList.ts b/src/serialization/resources/ats/types/PaginatedActivityList.ts index 4a1cb5c03..10011230d 100644 --- a/src/serialization/resources/ats/types/PaginatedActivityList.ts +++ b/src/serialization/resources/ats/types/PaginatedActivityList.ts @@ -17,7 +17,7 @@ export const PaginatedActivityList: core.serialization.ObjectSchema< }); export declare namespace PaginatedActivityList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Activity.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedApplicationList.ts b/src/serialization/resources/ats/types/PaginatedApplicationList.ts index 74c9293cd..507846326 100644 --- a/src/serialization/resources/ats/types/PaginatedApplicationList.ts +++ b/src/serialization/resources/ats/types/PaginatedApplicationList.ts @@ -16,7 +16,7 @@ export const PaginatedApplicationList: core.serialization.ObjectSchema< }); export declare namespace PaginatedApplicationList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: serializers.ats.Application.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedAttachmentList.ts b/src/serialization/resources/ats/types/PaginatedAttachmentList.ts index 945473b11..1e2a8a5b3 100644 --- a/src/serialization/resources/ats/types/PaginatedAttachmentList.ts +++ b/src/serialization/resources/ats/types/PaginatedAttachmentList.ts @@ -17,7 +17,7 @@ export const PaginatedAttachmentList: core.serialization.ObjectSchema< }); export declare namespace PaginatedAttachmentList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Attachment.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedAuditLogEventList.ts b/src/serialization/resources/ats/types/PaginatedAuditLogEventList.ts index 413266c5f..17ecc88ca 100644 --- a/src/serialization/resources/ats/types/PaginatedAuditLogEventList.ts +++ b/src/serialization/resources/ats/types/PaginatedAuditLogEventList.ts @@ -17,7 +17,7 @@ export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< }); export declare namespace PaginatedAuditLogEventList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: AuditLogEvent.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedCandidateList.ts b/src/serialization/resources/ats/types/PaginatedCandidateList.ts index 44f88ab6e..e7c083ebb 100644 --- a/src/serialization/resources/ats/types/PaginatedCandidateList.ts +++ b/src/serialization/resources/ats/types/PaginatedCandidateList.ts @@ -16,7 +16,7 @@ export const PaginatedCandidateList: core.serialization.ObjectSchema< }); export declare namespace PaginatedCandidateList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: serializers.ats.Candidate.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedDepartmentList.ts b/src/serialization/resources/ats/types/PaginatedDepartmentList.ts index 8de1477a0..c0fbe16c5 100644 --- a/src/serialization/resources/ats/types/PaginatedDepartmentList.ts +++ b/src/serialization/resources/ats/types/PaginatedDepartmentList.ts @@ -17,7 +17,7 @@ export const PaginatedDepartmentList: core.serialization.ObjectSchema< }); export declare namespace PaginatedDepartmentList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Department.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedEeocList.ts b/src/serialization/resources/ats/types/PaginatedEeocList.ts index e10c14610..bdedc533e 100644 --- a/src/serialization/resources/ats/types/PaginatedEeocList.ts +++ b/src/serialization/resources/ats/types/PaginatedEeocList.ts @@ -17,7 +17,7 @@ export const PaginatedEeocList: core.serialization.ObjectSchema< }); export declare namespace PaginatedEeocList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Eeoc.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedIssueList.ts b/src/serialization/resources/ats/types/PaginatedIssueList.ts index 3aa22d19c..f9411f5f0 100644 --- a/src/serialization/resources/ats/types/PaginatedIssueList.ts +++ b/src/serialization/resources/ats/types/PaginatedIssueList.ts @@ -17,7 +17,7 @@ export const PaginatedIssueList: core.serialization.ObjectSchema< }); export declare namespace PaginatedIssueList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Issue.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedJobInterviewStageList.ts b/src/serialization/resources/ats/types/PaginatedJobInterviewStageList.ts index 0df0ef21f..9350fc9e7 100644 --- a/src/serialization/resources/ats/types/PaginatedJobInterviewStageList.ts +++ b/src/serialization/resources/ats/types/PaginatedJobInterviewStageList.ts @@ -17,7 +17,7 @@ export const PaginatedJobInterviewStageList: core.serialization.ObjectSchema< }); export declare namespace PaginatedJobInterviewStageList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: JobInterviewStage.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedJobList.ts b/src/serialization/resources/ats/types/PaginatedJobList.ts index 25a168ad9..4b346dea8 100644 --- a/src/serialization/resources/ats/types/PaginatedJobList.ts +++ b/src/serialization/resources/ats/types/PaginatedJobList.ts @@ -17,7 +17,7 @@ export const PaginatedJobList: core.serialization.ObjectSchema< }); export declare namespace PaginatedJobList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Job.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedJobPostingList.ts b/src/serialization/resources/ats/types/PaginatedJobPostingList.ts index d9d629a50..de2917b9f 100644 --- a/src/serialization/resources/ats/types/PaginatedJobPostingList.ts +++ b/src/serialization/resources/ats/types/PaginatedJobPostingList.ts @@ -17,7 +17,7 @@ export const PaginatedJobPostingList: core.serialization.ObjectSchema< }); export declare namespace PaginatedJobPostingList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: JobPosting.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedOfferList.ts b/src/serialization/resources/ats/types/PaginatedOfferList.ts index fbca99029..9455ddd69 100644 --- a/src/serialization/resources/ats/types/PaginatedOfferList.ts +++ b/src/serialization/resources/ats/types/PaginatedOfferList.ts @@ -16,7 +16,7 @@ export const PaginatedOfferList: core.serialization.ObjectSchema< }); export declare namespace PaginatedOfferList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: serializers.ats.Offer.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedOfficeList.ts b/src/serialization/resources/ats/types/PaginatedOfficeList.ts index 927b1144e..68ba2e7f5 100644 --- a/src/serialization/resources/ats/types/PaginatedOfficeList.ts +++ b/src/serialization/resources/ats/types/PaginatedOfficeList.ts @@ -17,7 +17,7 @@ export const PaginatedOfficeList: core.serialization.ObjectSchema< }); export declare namespace PaginatedOfficeList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Office.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedRejectReasonList.ts b/src/serialization/resources/ats/types/PaginatedRejectReasonList.ts index 7d5821885..6a8919444 100644 --- a/src/serialization/resources/ats/types/PaginatedRejectReasonList.ts +++ b/src/serialization/resources/ats/types/PaginatedRejectReasonList.ts @@ -17,7 +17,7 @@ export const PaginatedRejectReasonList: core.serialization.ObjectSchema< }); export declare namespace PaginatedRejectReasonList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: RejectReason.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedRemoteUserList.ts b/src/serialization/resources/ats/types/PaginatedRemoteUserList.ts index ccaf330ee..9d9ce10e8 100644 --- a/src/serialization/resources/ats/types/PaginatedRemoteUserList.ts +++ b/src/serialization/resources/ats/types/PaginatedRemoteUserList.ts @@ -17,7 +17,7 @@ export const PaginatedRemoteUserList: core.serialization.ObjectSchema< }); export declare namespace PaginatedRemoteUserList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: RemoteUser.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedScheduledInterviewList.ts b/src/serialization/resources/ats/types/PaginatedScheduledInterviewList.ts index 2a3172801..0124d45fb 100644 --- a/src/serialization/resources/ats/types/PaginatedScheduledInterviewList.ts +++ b/src/serialization/resources/ats/types/PaginatedScheduledInterviewList.ts @@ -17,7 +17,7 @@ export const PaginatedScheduledInterviewList: core.serialization.ObjectSchema< }); export declare namespace PaginatedScheduledInterviewList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: ScheduledInterview.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedScorecardList.ts b/src/serialization/resources/ats/types/PaginatedScorecardList.ts index f90ae0380..f83f26286 100644 --- a/src/serialization/resources/ats/types/PaginatedScorecardList.ts +++ b/src/serialization/resources/ats/types/PaginatedScorecardList.ts @@ -17,7 +17,7 @@ export const PaginatedScorecardList: core.serialization.ObjectSchema< }); export declare namespace PaginatedScorecardList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Scorecard.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedScreeningQuestionList.ts b/src/serialization/resources/ats/types/PaginatedScreeningQuestionList.ts index bc1d4deb8..9c8a4e7b1 100644 --- a/src/serialization/resources/ats/types/PaginatedScreeningQuestionList.ts +++ b/src/serialization/resources/ats/types/PaginatedScreeningQuestionList.ts @@ -17,7 +17,7 @@ export const PaginatedScreeningQuestionList: core.serialization.ObjectSchema< }); export declare namespace PaginatedScreeningQuestionList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: ScreeningQuestion.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedSyncStatusList.ts b/src/serialization/resources/ats/types/PaginatedSyncStatusList.ts index 40bdef77f..c395fd839 100644 --- a/src/serialization/resources/ats/types/PaginatedSyncStatusList.ts +++ b/src/serialization/resources/ats/types/PaginatedSyncStatusList.ts @@ -17,7 +17,7 @@ export const PaginatedSyncStatusList: core.serialization.ObjectSchema< }); export declare namespace PaginatedSyncStatusList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: SyncStatus.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PaginatedTagList.ts b/src/serialization/resources/ats/types/PaginatedTagList.ts index f924f36ef..80fbbd9aa 100644 --- a/src/serialization/resources/ats/types/PaginatedTagList.ts +++ b/src/serialization/resources/ats/types/PaginatedTagList.ts @@ -17,7 +17,7 @@ export const PaginatedTagList: core.serialization.ObjectSchema< }); export declare namespace PaginatedTagList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Tag.Raw[] | null; diff --git a/src/serialization/resources/ats/types/PatchedCandidateRequest.ts b/src/serialization/resources/ats/types/PatchedCandidateRequest.ts index 359800244..8a4498c5a 100644 --- a/src/serialization/resources/ats/types/PatchedCandidateRequest.ts +++ b/src/serialization/resources/ats/types/PatchedCandidateRequest.ts @@ -24,7 +24,7 @@ export const PatchedCandidateRequest: core.serialization.ObjectSchema< phoneNumbers: core.serialization.property("phone_numbers", core.serialization.list(PhoneNumberRequest).optional()), emailAddresses: core.serialization.property( "email_addresses", - core.serialization.list(EmailAddressRequest).optional() + core.serialization.list(EmailAddressRequest).optional(), ), urls: core.serialization.list(UrlRequest).optional(), tags: core.serialization.list(core.serialization.string().optional()).optional(), @@ -33,16 +33,16 @@ export const PatchedCandidateRequest: core.serialization.ObjectSchema< remoteTemplateId: core.serialization.property("remote_template_id", core.serialization.string().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace PatchedCandidateRequest { - interface Raw { + export interface Raw { first_name?: string | null; last_name?: string | null; company?: string | null; diff --git a/src/serialization/resources/ats/types/PhoneNumber.ts b/src/serialization/resources/ats/types/PhoneNumber.ts index b4ac7d7be..f6b73efdf 100644 --- a/src/serialization/resources/ats/types/PhoneNumber.ts +++ b/src/serialization/resources/ats/types/PhoneNumber.ts @@ -17,7 +17,7 @@ export const PhoneNumber: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([PhoneNumberTypeEnum, core.serialization.string()]); export declare namespace PhoneNumberPhoneNumberType { - type Raw = PhoneNumberTypeEnum.Raw | string; + export type Raw = PhoneNumberTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/PhoneNumberRequest.ts b/src/serialization/resources/ats/types/PhoneNumberRequest.ts index 356f07aa7..90438e302 100644 --- a/src/serialization/resources/ats/types/PhoneNumberRequest.ts +++ b/src/serialization/resources/ats/types/PhoneNumberRequest.ts @@ -15,16 +15,16 @@ export const PhoneNumberRequest: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace PhoneNumberRequest { - interface Raw { + export interface Raw { value?: string | null; phone_number_type?: PhoneNumberRequestPhoneNumberType.Raw | null; integration_params?: Record | null; diff --git a/src/serialization/resources/ats/types/PhoneNumberRequestPhoneNumberType.ts b/src/serialization/resources/ats/types/PhoneNumberRequestPhoneNumberType.ts index 82405f1e4..83fb41bf5 100644 --- a/src/serialization/resources/ats/types/PhoneNumberRequestPhoneNumberType.ts +++ b/src/serialization/resources/ats/types/PhoneNumberRequestPhoneNumberType.ts @@ -13,5 +13,5 @@ export const PhoneNumberRequestPhoneNumberType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([PhoneNumberTypeEnum, core.serialization.string()]); export declare namespace PhoneNumberRequestPhoneNumberType { - type Raw = PhoneNumberTypeEnum.Raw | string; + export type Raw = PhoneNumberTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/PhoneNumberTypeEnum.ts b/src/serialization/resources/ats/types/PhoneNumberTypeEnum.ts index facdb166b..b31436a51 100644 --- a/src/serialization/resources/ats/types/PhoneNumberTypeEnum.ts +++ b/src/serialization/resources/ats/types/PhoneNumberTypeEnum.ts @@ -12,5 +12,5 @@ export const PhoneNumberTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["HOME", "WORK", "MOBILE", "SKYPE", "OTHER"]); export declare namespace PhoneNumberTypeEnum { - type Raw = "HOME" | "WORK" | "MOBILE" | "SKYPE" | "OTHER"; + export type Raw = "HOME" | "WORK" | "MOBILE" | "SKYPE" | "OTHER"; } diff --git a/src/serialization/resources/ats/types/RaceEnum.ts b/src/serialization/resources/ats/types/RaceEnum.ts index 61e144ea7..50ececae7 100644 --- a/src/serialization/resources/ats/types/RaceEnum.ts +++ b/src/serialization/resources/ats/types/RaceEnum.ts @@ -19,7 +19,7 @@ export const RaceEnum: core.serialization.Schema; remote_key_name: string; remote_endpoint_info: RemoteEndpointInfo.Raw; diff --git a/src/serialization/resources/ats/types/RemoteFieldApiCoverage.ts b/src/serialization/resources/ats/types/RemoteFieldApiCoverage.ts index 103fc8a4c..1f667da5d 100644 --- a/src/serialization/resources/ats/types/RemoteFieldApiCoverage.ts +++ b/src/serialization/resources/ats/types/RemoteFieldApiCoverage.ts @@ -12,5 +12,5 @@ export const RemoteFieldApiCoverage: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.number(), core.serialization.number()]); export declare namespace RemoteFieldApiCoverage { - type Raw = number | number; + export type Raw = number | number; } diff --git a/src/serialization/resources/ats/types/RemoteFieldApiResponse.ts b/src/serialization/resources/ats/types/RemoteFieldApiResponse.ts index a5bd78d86..c979c2055 100644 --- a/src/serialization/resources/ats/types/RemoteFieldApiResponse.ts +++ b/src/serialization/resources/ats/types/RemoteFieldApiResponse.ts @@ -19,13 +19,13 @@ export const RemoteFieldApiResponse: core.serialization.ObjectSchema< eeoc: core.serialization.property("EEOC", core.serialization.list(RemoteFieldApi).optional()), scheduledInterview: core.serialization.property( "ScheduledInterview", - core.serialization.list(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(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()), @@ -36,7 +36,7 @@ export const RemoteFieldApiResponse: core.serialization.ObjectSchema< }); export declare namespace RemoteFieldApiResponse { - interface Raw { + export interface Raw { Activity?: RemoteFieldApi.Raw[] | null; Application?: RemoteFieldApi.Raw[] | null; Attachment?: RemoteFieldApi.Raw[] | null; diff --git a/src/serialization/resources/ats/types/RemoteKey.ts b/src/serialization/resources/ats/types/RemoteKey.ts index 4c4c338f3..cba9028df 100644 --- a/src/serialization/resources/ats/types/RemoteKey.ts +++ b/src/serialization/resources/ats/types/RemoteKey.ts @@ -13,7 +13,7 @@ export const RemoteKey: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([ResponseTypeEnum, core.serialization.string()]); export declare namespace RemoteResponseResponseType { - type Raw = ResponseTypeEnum.Raw | string; + export type Raw = ResponseTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/RemoteUser.ts b/src/serialization/resources/ats/types/RemoteUser.ts index db6d6ad30..a9fa47dde 100644 --- a/src/serialization/resources/ats/types/RemoteUser.ts +++ b/src/serialization/resources/ats/types/RemoteUser.ts @@ -23,13 +23,13 @@ export const RemoteUser: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([AccessRoleEnum, core.serialization.string()]); export declare namespace RemoteUserAccessRole { - type Raw = AccessRoleEnum.Raw | string; + export type Raw = AccessRoleEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/RequestFormatEnum.ts b/src/serialization/resources/ats/types/RequestFormatEnum.ts index 9c8818d0d..c2590f002 100644 --- a/src/serialization/resources/ats/types/RequestFormatEnum.ts +++ b/src/serialization/resources/ats/types/RequestFormatEnum.ts @@ -12,5 +12,5 @@ export const RequestFormatEnum: core.serialization.Schema< > = core.serialization.enum_(["JSON", "XML", "MULTIPART"]); export declare namespace RequestFormatEnum { - type Raw = "JSON" | "XML" | "MULTIPART"; + export type Raw = "JSON" | "XML" | "MULTIPART"; } diff --git a/src/serialization/resources/ats/types/ResponseTypeEnum.ts b/src/serialization/resources/ats/types/ResponseTypeEnum.ts index f4adc53a3..b5825609e 100644 --- a/src/serialization/resources/ats/types/ResponseTypeEnum.ts +++ b/src/serialization/resources/ats/types/ResponseTypeEnum.ts @@ -12,5 +12,5 @@ export const ResponseTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["JSON", "BASE64_GZIP"]); export declare namespace ResponseTypeEnum { - type Raw = "JSON" | "BASE64_GZIP"; + export type Raw = "JSON" | "BASE64_GZIP"; } diff --git a/src/serialization/resources/ats/types/RoleEnum.ts b/src/serialization/resources/ats/types/RoleEnum.ts index 248cb7ae4..f807296b5 100644 --- a/src/serialization/resources/ats/types/RoleEnum.ts +++ b/src/serialization/resources/ats/types/RoleEnum.ts @@ -10,5 +10,5 @@ export const RoleEnum: core.serialization.Schema = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ScheduledInterviewInterviewersItem { - type Raw = string | RemoteUser.Raw; + export type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewJobInterviewStage.ts b/src/serialization/resources/ats/types/ScheduledInterviewJobInterviewStage.ts index 25b2698e6..24814f455 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewJobInterviewStage.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewJobInterviewStage.ts @@ -13,5 +13,5 @@ export const ScheduledInterviewJobInterviewStage: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), JobInterviewStage]); export declare namespace ScheduledInterviewJobInterviewStage { - type Raw = string | JobInterviewStage.Raw; + export type Raw = string | JobInterviewStage.Raw; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewOrganizer.ts b/src/serialization/resources/ats/types/ScheduledInterviewOrganizer.ts index cfa3df9e0..da7671bf2 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewOrganizer.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewOrganizer.ts @@ -13,5 +13,5 @@ export const ScheduledInterviewOrganizer: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ScheduledInterviewOrganizer { - type Raw = string | RemoteUser.Raw; + export type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewRequest.ts b/src/serialization/resources/ats/types/ScheduledInterviewRequest.ts index b6a4a5232..d2888fc67 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewRequest.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewRequest.ts @@ -18,7 +18,7 @@ export const ScheduledInterviewRequest: core.serialization.ObjectSchema< application: ScheduledInterviewRequestApplication.optional(), jobInterviewStage: core.serialization.property( "job_interview_stage", - ScheduledInterviewRequestJobInterviewStage.optional() + ScheduledInterviewRequestJobInterviewStage.optional(), ), organizer: ScheduledInterviewRequestOrganizer.optional(), interviewers: core.serialization.list(ScheduledInterviewRequestInterviewersItem.optional()).optional(), @@ -28,16 +28,16 @@ export const ScheduledInterviewRequest: core.serialization.ObjectSchema< status: ScheduledInterviewRequestStatus.optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace ScheduledInterviewRequest { - interface Raw { + export interface Raw { application?: ScheduledInterviewRequestApplication.Raw | null; job_interview_stage?: ScheduledInterviewRequestJobInterviewStage.Raw | null; organizer?: ScheduledInterviewRequestOrganizer.Raw | null; diff --git a/src/serialization/resources/ats/types/ScheduledInterviewRequestApplication.ts b/src/serialization/resources/ats/types/ScheduledInterviewRequestApplication.ts index b027425a5..c0760b9e4 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewRequestApplication.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewRequestApplication.ts @@ -15,5 +15,5 @@ export const ScheduledInterviewRequestApplication: core.serialization.Schema< ]); export declare namespace ScheduledInterviewRequestApplication { - type Raw = string | serializers.ats.Application.Raw; + export type Raw = string | serializers.ats.Application.Raw; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewRequestInterviewersItem.ts b/src/serialization/resources/ats/types/ScheduledInterviewRequestInterviewersItem.ts index 486727872..4883acb1f 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewRequestInterviewersItem.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewRequestInterviewersItem.ts @@ -13,5 +13,5 @@ export const ScheduledInterviewRequestInterviewersItem: core.serialization.Schem > = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ScheduledInterviewRequestInterviewersItem { - type Raw = string | RemoteUser.Raw; + export type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewRequestJobInterviewStage.ts b/src/serialization/resources/ats/types/ScheduledInterviewRequestJobInterviewStage.ts index d799166e7..81c4f100a 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewRequestJobInterviewStage.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewRequestJobInterviewStage.ts @@ -13,5 +13,5 @@ export const ScheduledInterviewRequestJobInterviewStage: core.serialization.Sche > = core.serialization.undiscriminatedUnion([core.serialization.string(), JobInterviewStage]); export declare namespace ScheduledInterviewRequestJobInterviewStage { - type Raw = string | JobInterviewStage.Raw; + export type Raw = string | JobInterviewStage.Raw; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewRequestOrganizer.ts b/src/serialization/resources/ats/types/ScheduledInterviewRequestOrganizer.ts index 4796c30d2..e05e44595 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewRequestOrganizer.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewRequestOrganizer.ts @@ -13,5 +13,5 @@ export const ScheduledInterviewRequestOrganizer: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ScheduledInterviewRequestOrganizer { - type Raw = string | RemoteUser.Raw; + export type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewRequestStatus.ts b/src/serialization/resources/ats/types/ScheduledInterviewRequestStatus.ts index 2d8e01d64..0b2ce94e3 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewRequestStatus.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewRequestStatus.ts @@ -13,5 +13,5 @@ export const ScheduledInterviewRequestStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([ScheduledInterviewStatusEnum, core.serialization.string()]); export declare namespace ScheduledInterviewRequestStatus { - type Raw = ScheduledInterviewStatusEnum.Raw | string; + export type Raw = ScheduledInterviewStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewResponse.ts b/src/serialization/resources/ats/types/ScheduledInterviewResponse.ts index 0450341c1..ad61d8e4d 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewResponse.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewResponse.ts @@ -21,7 +21,7 @@ export const ScheduledInterviewResponse: core.serialization.ObjectSchema< }); export declare namespace ScheduledInterviewResponse { - interface Raw { + export interface Raw { model: ScheduledInterview.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/ats/types/ScheduledInterviewStatus.ts b/src/serialization/resources/ats/types/ScheduledInterviewStatus.ts index 9d786451f..5f3e99943 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewStatus.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewStatus.ts @@ -13,5 +13,5 @@ export const ScheduledInterviewStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([ScheduledInterviewStatusEnum, core.serialization.string()]); export declare namespace ScheduledInterviewStatus { - type Raw = ScheduledInterviewStatusEnum.Raw | string; + export type Raw = ScheduledInterviewStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ScheduledInterviewStatusEnum.ts b/src/serialization/resources/ats/types/ScheduledInterviewStatusEnum.ts index 9d137e0dd..90a454698 100644 --- a/src/serialization/resources/ats/types/ScheduledInterviewStatusEnum.ts +++ b/src/serialization/resources/ats/types/ScheduledInterviewStatusEnum.ts @@ -12,5 +12,5 @@ export const ScheduledInterviewStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["SCHEDULED", "AWAITING_FEEDBACK", "COMPLETE"]); export declare namespace ScheduledInterviewStatusEnum { - type Raw = "SCHEDULED" | "AWAITING_FEEDBACK" | "COMPLETE"; + export type Raw = "SCHEDULED" | "AWAITING_FEEDBACK" | "COMPLETE"; } diff --git a/src/serialization/resources/ats/types/Scorecard.ts b/src/serialization/resources/ats/types/Scorecard.ts index 844ab6d58..f3fe48f7a 100644 --- a/src/serialization/resources/ats/types/Scorecard.ts +++ b/src/serialization/resources/ats/types/Scorecard.ts @@ -24,18 +24,18 @@ export const Scorecard: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), ScheduledInterview]); export declare namespace ScorecardInterview { - type Raw = string | ScheduledInterview.Raw; + export type Raw = string | ScheduledInterview.Raw; } diff --git a/src/serialization/resources/ats/types/ScorecardInterviewer.ts b/src/serialization/resources/ats/types/ScorecardInterviewer.ts index d7bccc68b..46773a865 100644 --- a/src/serialization/resources/ats/types/ScorecardInterviewer.ts +++ b/src/serialization/resources/ats/types/ScorecardInterviewer.ts @@ -13,5 +13,5 @@ export const ScorecardInterviewer: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteUser]); export declare namespace ScorecardInterviewer { - type Raw = string | RemoteUser.Raw; + export type Raw = string | RemoteUser.Raw; } diff --git a/src/serialization/resources/ats/types/ScorecardOverallRecommendation.ts b/src/serialization/resources/ats/types/ScorecardOverallRecommendation.ts index 836a3d0af..5320150e2 100644 --- a/src/serialization/resources/ats/types/ScorecardOverallRecommendation.ts +++ b/src/serialization/resources/ats/types/ScorecardOverallRecommendation.ts @@ -13,5 +13,5 @@ export const ScorecardOverallRecommendation: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([OverallRecommendationEnum, core.serialization.string()]); export declare namespace ScorecardOverallRecommendation { - type Raw = OverallRecommendationEnum.Raw | string; + export type Raw = OverallRecommendationEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ScreeningQuestion.ts b/src/serialization/resources/ats/types/ScreeningQuestion.ts index 2c7b2b908..2761d85b7 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestion.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestion.ts @@ -26,7 +26,7 @@ export const ScreeningQuestion: core.serialization.ObjectSchema< }); export declare namespace ScreeningQuestion { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/ats/types/ScreeningQuestionAnswer.ts b/src/serialization/resources/ats/types/ScreeningQuestionAnswer.ts index 18d28c280..3221aae38 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionAnswer.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionAnswer.ts @@ -21,7 +21,7 @@ export const ScreeningQuestionAnswer: core.serialization.ObjectSchema< }); export declare namespace ScreeningQuestionAnswer { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/ats/types/ScreeningQuestionAnswerQuestion.ts b/src/serialization/resources/ats/types/ScreeningQuestionAnswerQuestion.ts index 5dea5eaee..ca096b16d 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionAnswerQuestion.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionAnswerQuestion.ts @@ -13,5 +13,5 @@ export const ScreeningQuestionAnswerQuestion: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), ScreeningQuestion]); export declare namespace ScreeningQuestionAnswerQuestion { - type Raw = string | ScreeningQuestion.Raw; + export type Raw = string | ScreeningQuestion.Raw; } diff --git a/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequest.ts b/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequest.ts index 16c71ddb4..557ef6318 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequest.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequest.ts @@ -16,16 +16,16 @@ export const ScreeningQuestionAnswerRequest: core.serialization.ObjectSchema< answer: core.serialization.string().optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace ScreeningQuestionAnswerRequest { - interface Raw { + export interface Raw { remote_id?: string | null; question?: ScreeningQuestionAnswerRequestQuestion.Raw | null; answer?: string | null; diff --git a/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequestQuestion.ts b/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequestQuestion.ts index 2b02219e1..e95333e15 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequestQuestion.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionAnswerRequestQuestion.ts @@ -13,5 +13,5 @@ export const ScreeningQuestionAnswerRequestQuestion: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), ScreeningQuestion]); export declare namespace ScreeningQuestionAnswerRequestQuestion { - type Raw = string | ScreeningQuestion.Raw; + export type Raw = string | ScreeningQuestion.Raw; } diff --git a/src/serialization/resources/ats/types/ScreeningQuestionJob.ts b/src/serialization/resources/ats/types/ScreeningQuestionJob.ts index 44149aae5..7386d70a7 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionJob.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionJob.ts @@ -13,5 +13,5 @@ export const ScreeningQuestionJob: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Job]); export declare namespace ScreeningQuestionJob { - type Raw = string | Job.Raw; + export type Raw = string | Job.Raw; } diff --git a/src/serialization/resources/ats/types/ScreeningQuestionOption.ts b/src/serialization/resources/ats/types/ScreeningQuestionOption.ts index 597be83a2..8ef8d7999 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionOption.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionOption.ts @@ -19,7 +19,7 @@ export const ScreeningQuestionOption: core.serialization.ObjectSchema< }); export declare namespace ScreeningQuestionOption { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/ats/types/ScreeningQuestionType.ts b/src/serialization/resources/ats/types/ScreeningQuestionType.ts index d14e5bc2e..72927953d 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionType.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionType.ts @@ -13,5 +13,5 @@ export const ScreeningQuestionType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([ScreeningQuestionTypeEnum, core.serialization.string()]); export declare namespace ScreeningQuestionType { - type Raw = ScreeningQuestionTypeEnum.Raw | string; + export type Raw = ScreeningQuestionTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/ScreeningQuestionTypeEnum.ts b/src/serialization/resources/ats/types/ScreeningQuestionTypeEnum.ts index f8e024146..970baed2d 100644 --- a/src/serialization/resources/ats/types/ScreeningQuestionTypeEnum.ts +++ b/src/serialization/resources/ats/types/ScreeningQuestionTypeEnum.ts @@ -21,7 +21,7 @@ export const ScreeningQuestionTypeEnum: core.serialization.Schema< ]); export declare namespace ScreeningQuestionTypeEnum { - type Raw = + export type Raw = | "DATE" | "FILE" | "SINGLE_SELECT" diff --git a/src/serialization/resources/ats/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/serialization/resources/ats/types/SelectiveSyncConfigurationsUsageEnum.ts index 62f1e3985..dfe88fb6f 100644 --- a/src/serialization/resources/ats/types/SelectiveSyncConfigurationsUsageEnum.ts +++ b/src/serialization/resources/ats/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -12,5 +12,5 @@ export const SelectiveSyncConfigurationsUsageEnum: core.serialization.Schema< > = core.serialization.enum_(["IN_NEXT_SYNC", "IN_LAST_SYNC"]); export declare namespace SelectiveSyncConfigurationsUsageEnum { - type Raw = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; + export type Raw = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; } diff --git a/src/serialization/resources/ats/types/StatusFd5Enum.ts b/src/serialization/resources/ats/types/StatusFd5Enum.ts index 2b60ae9ee..fd01200c3 100644 --- a/src/serialization/resources/ats/types/StatusFd5Enum.ts +++ b/src/serialization/resources/ats/types/StatusFd5Enum.ts @@ -10,5 +10,5 @@ export const StatusFd5Enum: core.serialization.Schema | null; diff --git a/src/serialization/resources/ats/types/UrlRequestUrlType.ts b/src/serialization/resources/ats/types/UrlRequestUrlType.ts index f91c9a67e..a4b2ebd09 100644 --- a/src/serialization/resources/ats/types/UrlRequestUrlType.ts +++ b/src/serialization/resources/ats/types/UrlRequestUrlType.ts @@ -13,5 +13,5 @@ export const UrlRequestUrlType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([UrlTypeEnum, core.serialization.string()]); export declare namespace UrlRequestUrlType { - type Raw = UrlTypeEnum.Raw | string; + export type Raw = UrlTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ats/types/UrlTypeEnum.ts b/src/serialization/resources/ats/types/UrlTypeEnum.ts index 9b7eaee5f..2b9aea6cb 100644 --- a/src/serialization/resources/ats/types/UrlTypeEnum.ts +++ b/src/serialization/resources/ats/types/UrlTypeEnum.ts @@ -10,5 +10,5 @@ export const UrlTypeEnum: core.serialization.Schema = core.serialization.undiscriminatedUnion([RemoteResponse, core.serialization.string()]); export declare namespace AsyncPassthroughRetrieveResponse { - type Raw = RemoteResponse.Raw | string; + export 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 177dbaf41..6fe6eaf71 100644 --- a/src/serialization/resources/crm/resources/contacts/client/requests/CrmContactEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/contacts/client/requests/CrmContactEndpointRequest.ts @@ -15,7 +15,7 @@ export const CrmContactEndpointRequest: core.serialization.Schema< }); export declare namespace CrmContactEndpointRequest { - interface Raw { + export interface 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 4902b6940..091bc5204 100644 --- a/src/serialization/resources/crm/resources/contacts/client/requests/PatchedCrmContactEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/contacts/client/requests/PatchedCrmContactEndpointRequest.ts @@ -15,7 +15,7 @@ export const PatchedCrmContactEndpointRequest: core.serialization.Schema< }); export declare namespace PatchedCrmContactEndpointRequest { - interface Raw { + export interface 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 788b390ff..f2a6ea416 100644 --- a/src/serialization/resources/crm/resources/contacts/types/ContactsListRequestExpand.ts +++ b/src/serialization/resources/crm/resources/contacts/types/ContactsListRequestExpand.ts @@ -12,5 +12,5 @@ export const ContactsListRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["account", "account,owner", "owner"]); export declare namespace ContactsListRequestExpand { - type Raw = "account" | "account,owner" | "owner"; + export type Raw = "account" | "account,owner" | "owner"; } diff --git a/src/serialization/resources/crm/resources/contacts/types/ContactsRetrieveRequestExpand.ts b/src/serialization/resources/crm/resources/contacts/types/ContactsRetrieveRequestExpand.ts index 5c9698f28..b37bab387 100644 --- a/src/serialization/resources/crm/resources/contacts/types/ContactsRetrieveRequestExpand.ts +++ b/src/serialization/resources/crm/resources/contacts/types/ContactsRetrieveRequestExpand.ts @@ -12,5 +12,5 @@ export const ContactsRetrieveRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["account", "account,owner", "owner"]); export declare namespace ContactsRetrieveRequestExpand { - type Raw = "account" | "account,owner" | "owner"; + export type Raw = "account" | "account,owner" | "owner"; } 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 844214d0a..dc1bae64f 100644 --- a/src/serialization/resources/crm/resources/customObjects/client/requests/CrmCustomObjectEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/customObjects/client/requests/CrmCustomObjectEndpointRequest.ts @@ -15,7 +15,7 @@ export const CrmCustomObjectEndpointRequest: core.serialization.Schema< }); export declare namespace CrmCustomObjectEndpointRequest { - interface Raw { + export interface 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 1fd7287f4..2029076c6 100644 --- a/src/serialization/resources/crm/resources/engagements/client/requests/EngagementEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/engagements/client/requests/EngagementEndpointRequest.ts @@ -15,7 +15,7 @@ export const EngagementEndpointRequest: core.serialization.Schema< }); export declare namespace EngagementEndpointRequest { - interface Raw { + export interface 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 37d3e4864..4163fef6e 100644 --- a/src/serialization/resources/crm/resources/engagements/client/requests/PatchedEngagementEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/engagements/client/requests/PatchedEngagementEndpointRequest.ts @@ -15,7 +15,7 @@ export const PatchedEngagementEndpointRequest: core.serialization.Schema< }); export declare namespace PatchedEngagementEndpointRequest { - interface Raw { + export interface 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 3aca48edf..554bc70fc 100644 --- a/src/serialization/resources/crm/resources/engagements/types/EngagementsListRequestExpand.ts +++ b/src/serialization/resources/crm/resources/engagements/types/EngagementsListRequestExpand.ts @@ -28,7 +28,7 @@ export const EngagementsListRequestExpand: core.serialization.Schema< ]); export declare namespace EngagementsListRequestExpand { - type Raw = + export type Raw = | "account" | "account,engagement_type" | "contacts" diff --git a/src/serialization/resources/crm/resources/engagements/types/EngagementsRetrieveRequestExpand.ts b/src/serialization/resources/crm/resources/engagements/types/EngagementsRetrieveRequestExpand.ts index 0f893dfd4..6f4477494 100644 --- a/src/serialization/resources/crm/resources/engagements/types/EngagementsRetrieveRequestExpand.ts +++ b/src/serialization/resources/crm/resources/engagements/types/EngagementsRetrieveRequestExpand.ts @@ -28,7 +28,7 @@ export const EngagementsRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace EngagementsRetrieveRequestExpand { - type Raw = + export type Raw = | "account" | "account,engagement_type" | "contacts" 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 326c208c4..d9575b1e5 100644 --- a/src/serialization/resources/crm/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/serialization/resources/crm/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -14,7 +14,7 @@ export const CreateFieldMappingRequest: core.serialization.Schema< targetFieldDescription: core.serialization.property("target_field_description", core.serialization.string()), remoteFieldTraversalPath: core.serialization.property( "remote_field_traversal_path", - core.serialization.list(core.serialization.unknown()) + core.serialization.list(core.serialization.unknown()), ), remoteMethod: core.serialization.property("remote_method", core.serialization.string()), remoteUrlPath: core.serialization.property("remote_url_path", core.serialization.string()), @@ -22,7 +22,7 @@ export const CreateFieldMappingRequest: core.serialization.Schema< }); export declare namespace CreateFieldMappingRequest { - interface Raw { + export interface Raw { target_field_name: string; target_field_description: string; remote_field_traversal_path: unknown[]; 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 10ff02266..84375e6c9 100644 --- a/src/serialization/resources/crm/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts +++ b/src/serialization/resources/crm/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts @@ -12,14 +12,14 @@ export const PatchedEditFieldMappingRequest: core.serialization.Schema< > = core.serialization.object({ remoteFieldTraversalPath: core.serialization.property( "remote_field_traversal_path", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), remoteMethod: core.serialization.property("remote_method", core.serialization.string().optional()), remoteUrlPath: core.serialization.property("remote_url_path", core.serialization.string().optional()), }); export declare namespace PatchedEditFieldMappingRequest { - interface Raw { + export interface Raw { remote_field_traversal_path?: unknown[] | null; remote_method?: string | null; remote_url_path?: string | null; diff --git a/src/serialization/resources/crm/resources/forceResync/client/syncStatusResyncCreate.ts b/src/serialization/resources/crm/resources/forceResync/client/syncStatusResyncCreate.ts index 81d9c5fdb..755307b18 100644 --- a/src/serialization/resources/crm/resources/forceResync/client/syncStatusResyncCreate.ts +++ b/src/serialization/resources/crm/resources/forceResync/client/syncStatusResyncCreate.ts @@ -13,5 +13,5 @@ export const Response: core.serialization.Schema< > = core.serialization.list(SyncStatus); export declare namespace Response { - type Raw = SyncStatus.Raw[]; + export 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 155cb4709..4eb8b27ac 100644 --- a/src/serialization/resources/crm/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts +++ b/src/serialization/resources/crm/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts @@ -14,7 +14,7 @@ export const GenerateRemoteKeyRequest: core.serialization.Schema< }); export declare namespace GenerateRemoteKeyRequest { - interface Raw { + export interface Raw { name: string; } } diff --git a/src/serialization/resources/crm/resources/issues/types/IssuesListRequestStatus.ts b/src/serialization/resources/crm/resources/issues/types/IssuesListRequestStatus.ts index 86fff93d1..278b9e634 100644 --- a/src/serialization/resources/crm/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/serialization/resources/crm/resources/issues/types/IssuesListRequestStatus.ts @@ -12,5 +12,5 @@ export const IssuesListRequestStatus: core.serialization.Schema< > = core.serialization.enum_(["ONGOING", "RESOLVED"]); export declare namespace IssuesListRequestStatus { - type Raw = "ONGOING" | "RESOLVED"; + export type Raw = "ONGOING" | "RESOLVED"; } 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 05ba3b5a8..b14fb6f2d 100644 --- a/src/serialization/resources/crm/resources/leads/client/requests/LeadEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/leads/client/requests/LeadEndpointRequest.ts @@ -15,7 +15,7 @@ export const LeadEndpointRequest: core.serialization.Schema< }); export declare namespace LeadEndpointRequest { - interface Raw { + export interface 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 e060234f8..7e316094d 100644 --- a/src/serialization/resources/crm/resources/leads/types/LeadsListRequestExpand.ts +++ b/src/serialization/resources/crm/resources/leads/types/LeadsListRequestExpand.ts @@ -20,7 +20,7 @@ export const LeadsListRequestExpand: core.serialization.Schema< ]); export declare namespace LeadsListRequestExpand { - type Raw = + export type Raw = | "converted_account" | "converted_contact" | "converted_contact,converted_account" diff --git a/src/serialization/resources/crm/resources/leads/types/LeadsRetrieveRequestExpand.ts b/src/serialization/resources/crm/resources/leads/types/LeadsRetrieveRequestExpand.ts index cfe484d7b..29530368d 100644 --- a/src/serialization/resources/crm/resources/leads/types/LeadsRetrieveRequestExpand.ts +++ b/src/serialization/resources/crm/resources/leads/types/LeadsRetrieveRequestExpand.ts @@ -20,7 +20,7 @@ export const LeadsRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace LeadsRetrieveRequestExpand { - type Raw = + export type Raw = | "converted_account" | "converted_contact" | "converted_contact,converted_account" 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 6d2298c95..edf0f5dc1 100644 --- a/src/serialization/resources/crm/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/serialization/resources/crm/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -22,32 +22,32 @@ export const EndUserDetailsRequest: core.serialization.Schema< linkExpiryMins: core.serialization.property("link_expiry_mins", core.serialization.number().optional()), shouldCreateMagicLinkUrl: core.serialization.property( "should_create_magic_link_url", - core.serialization.boolean().optional() + core.serialization.boolean().optional(), ), hideAdminMagicLink: core.serialization.property("hide_admin_magic_link", core.serialization.boolean().optional()), commonModels: core.serialization.property( "common_models", - core.serialization.list(CommonModelScopesBodyRequest).optional() + core.serialization.list(CommonModelScopesBodyRequest).optional(), ), categoryCommonModelScopes: core.serialization.property( "category_common_model_scopes", core.serialization .record( core.serialization.string(), - core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional() + core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional(), ) - .optional() + .optional(), ), language: LanguageEnum.optional(), areSyncsDisabled: core.serialization.property("are_syncs_disabled", core.serialization.boolean().optional()), integrationSpecificConfig: core.serialization.property( "integration_specific_config", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace EndUserDetailsRequest { - interface Raw { + export interface Raw { end_user_email_address: string; end_user_organization_name: string; end_user_origin_id: string; diff --git a/src/serialization/resources/crm/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/serialization/resources/crm/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index c5d93cd30..9c40511c4 100644 --- a/src/serialization/resources/crm/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/serialization/resources/crm/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -12,5 +12,5 @@ export const LinkedAccountsListRequestCategory: core.serialization.Schema< > = core.serialization.enum_(["accounting", "ats", "crm", "filestorage", "hris", "mktg", "ticketing"]); export declare namespace LinkedAccountsListRequestCategory { - type Raw = "accounting" | "ats" | "crm" | "filestorage" | "hris" | "mktg" | "ticketing"; + export type Raw = "accounting" | "ats" | "crm" | "filestorage" | "hris" | "mktg" | "ticketing"; } 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 50d65c2a7..126f24646 100644 --- a/src/serialization/resources/crm/resources/notes/client/requests/NoteEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/notes/client/requests/NoteEndpointRequest.ts @@ -15,7 +15,7 @@ export const NoteEndpointRequest: core.serialization.Schema< }); export declare namespace NoteEndpointRequest { - interface Raw { + export interface 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 df0ca3167..bcee2b691 100644 --- a/src/serialization/resources/crm/resources/notes/types/NotesListRequestExpand.ts +++ b/src/serialization/resources/crm/resources/notes/types/NotesListRequestExpand.ts @@ -28,7 +28,7 @@ export const NotesListRequestExpand: core.serialization.Schema< ]); export declare namespace NotesListRequestExpand { - type Raw = + export type Raw = | "account" | "account,opportunity" | "contact" diff --git a/src/serialization/resources/crm/resources/notes/types/NotesRetrieveRequestExpand.ts b/src/serialization/resources/crm/resources/notes/types/NotesRetrieveRequestExpand.ts index 6a2f74528..35752dfc6 100644 --- a/src/serialization/resources/crm/resources/notes/types/NotesRetrieveRequestExpand.ts +++ b/src/serialization/resources/crm/resources/notes/types/NotesRetrieveRequestExpand.ts @@ -28,7 +28,7 @@ export const NotesRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace NotesRetrieveRequestExpand { - type Raw = + export type Raw = | "account" | "account,opportunity" | "contact" 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 7879d4254..8e41cd77e 100644 --- a/src/serialization/resources/crm/resources/opportunities/client/requests/OpportunityEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/opportunities/client/requests/OpportunityEndpointRequest.ts @@ -15,7 +15,7 @@ export const OpportunityEndpointRequest: core.serialization.Schema< }); export declare namespace OpportunityEndpointRequest { - interface Raw { + export interface 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 c10f6292e..7c04e1c63 100644 --- a/src/serialization/resources/crm/resources/opportunities/client/requests/PatchedOpportunityEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/opportunities/client/requests/PatchedOpportunityEndpointRequest.ts @@ -15,7 +15,7 @@ export const PatchedOpportunityEndpointRequest: core.serialization.Schema< }); export declare namespace PatchedOpportunityEndpointRequest { - interface Raw { + export interface 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 3bafe1c79..393acb935 100644 --- a/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesListRequestExpand.ts +++ b/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesListRequestExpand.ts @@ -20,7 +20,7 @@ export const OpportunitiesListRequestExpand: core.serialization.Schema< ]); export declare namespace OpportunitiesListRequestExpand { - type Raw = + export type Raw = | "account" | "owner" | "owner,account" diff --git a/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesListRequestStatus.ts b/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesListRequestStatus.ts index 53651e033..bb57c7f08 100644 --- a/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesListRequestStatus.ts +++ b/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesListRequestStatus.ts @@ -12,5 +12,5 @@ export const OpportunitiesListRequestStatus: core.serialization.Schema< > = core.serialization.enum_(["LOST", "OPEN", "WON"]); export declare namespace OpportunitiesListRequestStatus { - type Raw = "LOST" | "OPEN" | "WON"; + export type Raw = "LOST" | "OPEN" | "WON"; } diff --git a/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesRetrieveRequestExpand.ts b/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesRetrieveRequestExpand.ts index 177d36c10..9dc54ef96 100644 --- a/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesRetrieveRequestExpand.ts +++ b/src/serialization/resources/crm/resources/opportunities/types/OpportunitiesRetrieveRequestExpand.ts @@ -20,7 +20,7 @@ export const OpportunitiesRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace OpportunitiesRetrieveRequestExpand { - type Raw = + export type Raw = | "account" | "owner" | "owner,account" 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 aade4d43f..cc6a782f0 100644 --- a/src/serialization/resources/crm/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts +++ b/src/serialization/resources/crm/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts @@ -14,7 +14,7 @@ export const RemoteKeyForRegenerationRequest: core.serialization.Schema< }); export declare namespace RemoteKeyForRegenerationRequest { - interface Raw { + export interface Raw { name: string; } } 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 72474d90b..18325dc0d 100644 --- a/src/serialization/resources/crm/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/crm/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -13,12 +13,12 @@ export const LinkedAccountCommonModelScopeDeserializerRequest: core.serializatio > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list(IndividualCommonModelScopeDeserializerRequest) + core.serialization.list(IndividualCommonModelScopeDeserializerRequest), ), }); export declare namespace LinkedAccountCommonModelScopeDeserializerRequest { - interface Raw { + export interface 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 1b01fec79..1e4956b89 100644 --- a/src/serialization/resources/crm/resources/tasks/client/requests/PatchedTaskEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/tasks/client/requests/PatchedTaskEndpointRequest.ts @@ -15,7 +15,7 @@ export const PatchedTaskEndpointRequest: core.serialization.Schema< }); export declare namespace PatchedTaskEndpointRequest { - interface Raw { + export interface 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 2201e4297..107e55bf5 100644 --- a/src/serialization/resources/crm/resources/tasks/client/requests/TaskEndpointRequest.ts +++ b/src/serialization/resources/crm/resources/tasks/client/requests/TaskEndpointRequest.ts @@ -15,7 +15,7 @@ export const TaskEndpointRequest: core.serialization.Schema< }); export declare namespace TaskEndpointRequest { - interface Raw { + export interface 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 c34123aa0..6b87911da 100644 --- a/src/serialization/resources/crm/resources/tasks/types/TasksListRequestExpand.ts +++ b/src/serialization/resources/crm/resources/tasks/types/TasksListRequestExpand.ts @@ -20,7 +20,7 @@ export const TasksListRequestExpand: core.serialization.Schema< ]); export declare namespace TasksListRequestExpand { - type Raw = + export type Raw = | "account" | "account,opportunity" | "opportunity" diff --git a/src/serialization/resources/crm/resources/tasks/types/TasksRetrieveRequestExpand.ts b/src/serialization/resources/crm/resources/tasks/types/TasksRetrieveRequestExpand.ts index 3a2c7168d..dadf1be97 100644 --- a/src/serialization/resources/crm/resources/tasks/types/TasksRetrieveRequestExpand.ts +++ b/src/serialization/resources/crm/resources/tasks/types/TasksRetrieveRequestExpand.ts @@ -20,7 +20,7 @@ export const TasksRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace TasksRetrieveRequestExpand { - type Raw = + export type Raw = | "account" | "account,opportunity" | "opportunity" diff --git a/src/serialization/resources/crm/resources/webhookReceivers/client/list.ts b/src/serialization/resources/crm/resources/webhookReceivers/client/list.ts index 3e0411191..51e903aab 100644 --- a/src/serialization/resources/crm/resources/webhookReceivers/client/list.ts +++ b/src/serialization/resources/crm/resources/webhookReceivers/client/list.ts @@ -13,5 +13,5 @@ export const Response: core.serialization.Schema< > = core.serialization.list(WebhookReceiver); export declare namespace Response { - type Raw = WebhookReceiver.Raw[]; + export 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 66e7b4e43..0e9f1c915 100644 --- a/src/serialization/resources/crm/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts +++ b/src/serialization/resources/crm/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts @@ -16,7 +16,7 @@ export const WebhookReceiverRequest: core.serialization.Schema< }); export declare namespace WebhookReceiverRequest { - interface Raw { + export interface Raw { event: string; is_active: boolean; key?: string | null; diff --git a/src/serialization/resources/crm/types/Account.ts b/src/serialization/resources/crm/types/Account.ts index e38c1c884..f5ba8b61d 100644 --- a/src/serialization/resources/crm/types/Account.ts +++ b/src/serialization/resources/crm/types/Account.ts @@ -31,14 +31,14 @@ export const Account: core.serialization.ObjectSchema = core.serialization.enum_(["COMPLETE", "INCOMPLETE", "RELINK_NEEDED", "IDLE"]); export declare namespace AccountDetailsAndActionsStatusEnum { - type Raw = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; + export type Raw = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; } diff --git a/src/serialization/resources/crm/types/AccountIntegration.ts b/src/serialization/resources/crm/types/AccountIntegration.ts index 36d1ae348..4e8fc5432 100644 --- a/src/serialization/resources/crm/types/AccountIntegration.ts +++ b/src/serialization/resources/crm/types/AccountIntegration.ts @@ -20,20 +20,20 @@ export const AccountIntegration: core.serialization.ObjectSchema< slug: core.serialization.string().optional(), apiEndpointsToDocumentationUrls: core.serialization.property( "api_endpoints_to_documentation_urls", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), webhookSetupGuideUrl: core.serialization.property( "webhook_setup_guide_url", - core.serialization.string().optional() + core.serialization.string().optional(), ), categoryBetaStatus: core.serialization.property( "category_beta_status", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace AccountIntegration { - interface Raw { + export interface Raw { name: string; abbreviated_name?: string | null; categories?: CategoriesEnum.Raw[] | null; diff --git a/src/serialization/resources/crm/types/AccountOwner.ts b/src/serialization/resources/crm/types/AccountOwner.ts index 021e91401..81632a102 100644 --- a/src/serialization/resources/crm/types/AccountOwner.ts +++ b/src/serialization/resources/crm/types/AccountOwner.ts @@ -11,5 +11,5 @@ export const AccountOwner: core.serialization.Schema = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace AccountRequestOwner { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/AccountToken.ts b/src/serialization/resources/crm/types/AccountToken.ts index 0507a977b..0bfa27d27 100644 --- a/src/serialization/resources/crm/types/AccountToken.ts +++ b/src/serialization/resources/crm/types/AccountToken.ts @@ -15,7 +15,7 @@ export const AccountToken: core.serialization.ObjectSchema = core.serialization.enum_(["CALL", "MEETING", "EMAIL"]); export declare namespace ActivityTypeEnum { - type Raw = "CALL" | "MEETING" | "EMAIL"; + export type Raw = "CALL" | "MEETING" | "EMAIL"; } diff --git a/src/serialization/resources/crm/types/Address.ts b/src/serialization/resources/crm/types/Address.ts index a2c7e3f8b..8a6e8c257 100644 --- a/src/serialization/resources/crm/types/Address.ts +++ b/src/serialization/resources/crm/types/Address.ts @@ -22,7 +22,7 @@ export const Address: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([AddressTypeEnum, core.serialization.string()]); export declare namespace AddressAddressType { - type Raw = AddressTypeEnum.Raw | string; + export type Raw = AddressTypeEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/AddressCountry.ts b/src/serialization/resources/crm/types/AddressCountry.ts index e8fed71ff..b551ad275 100644 --- a/src/serialization/resources/crm/types/AddressCountry.ts +++ b/src/serialization/resources/crm/types/AddressCountry.ts @@ -11,5 +11,5 @@ export const AddressCountry: core.serialization.Schema = core.serialization.undiscriminatedUnion([AddressTypeEnum, core.serialization.string()]); export declare namespace AddressRequestAddressType { - type Raw = AddressTypeEnum.Raw | string; + export type Raw = AddressTypeEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/AddressRequestCountry.ts b/src/serialization/resources/crm/types/AddressRequestCountry.ts index ae3c2f721..a09a2f453 100644 --- a/src/serialization/resources/crm/types/AddressRequestCountry.ts +++ b/src/serialization/resources/crm/types/AddressRequestCountry.ts @@ -13,5 +13,5 @@ export const AddressRequestCountry: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([CountryEnum, core.serialization.string()]); export declare namespace AddressRequestCountry { - type Raw = CountryEnum.Raw | string; + export type Raw = CountryEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/AddressTypeEnum.ts b/src/serialization/resources/crm/types/AddressTypeEnum.ts index 7ea67a8ec..9f95b2de0 100644 --- a/src/serialization/resources/crm/types/AddressTypeEnum.ts +++ b/src/serialization/resources/crm/types/AddressTypeEnum.ts @@ -12,5 +12,5 @@ export const AddressTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["BILLING", "SHIPPING"]); export declare namespace AddressTypeEnum { - type Raw = "BILLING" | "SHIPPING"; + export type Raw = "BILLING" | "SHIPPING"; } diff --git a/src/serialization/resources/crm/types/AdvancedMetadata.ts b/src/serialization/resources/crm/types/AdvancedMetadata.ts index 15cc03577..ea0b945cf 100644 --- a/src/serialization/resources/crm/types/AdvancedMetadata.ts +++ b/src/serialization/resources/crm/types/AdvancedMetadata.ts @@ -17,12 +17,12 @@ export const AdvancedMetadata: core.serialization.ObjectSchema< isCustom: core.serialization.property("is_custom", core.serialization.boolean().optional()), fieldChoices: core.serialization.property( "field_choices", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace AdvancedMetadata { - interface Raw { + export interface Raw { id: string; display_name?: string | null; description?: string | null; diff --git a/src/serialization/resources/crm/types/Association.ts b/src/serialization/resources/crm/types/Association.ts index c68338f5c..7388ce93a 100644 --- a/src/serialization/resources/crm/types/Association.ts +++ b/src/serialization/resources/crm/types/Association.ts @@ -17,7 +17,7 @@ export const Association: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), AssociationType]); export declare namespace AssociationAssociationType { - type Raw = string | AssociationType.Raw; + export type Raw = string | AssociationType.Raw; } diff --git a/src/serialization/resources/crm/types/AssociationSubType.ts b/src/serialization/resources/crm/types/AssociationSubType.ts index ca5b5e60c..32107d0da 100644 --- a/src/serialization/resources/crm/types/AssociationSubType.ts +++ b/src/serialization/resources/crm/types/AssociationSubType.ts @@ -17,7 +17,7 @@ export const AssociationSubType: core.serialization.ObjectSchema< }); export declare namespace AssociationSubType { - interface Raw { + export interface Raw { id?: string | null; created_at?: string | null; modified_at?: string | null; diff --git a/src/serialization/resources/crm/types/AssociationType.ts b/src/serialization/resources/crm/types/AssociationType.ts index 0ad564264..a171b9646 100644 --- a/src/serialization/resources/crm/types/AssociationType.ts +++ b/src/serialization/resources/crm/types/AssociationType.ts @@ -18,11 +18,11 @@ export const AssociationType: core.serialization.ObjectSchema< modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), sourceObjectClass: core.serialization.property( "source_object_class", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), targetObjectClasses: core.serialization.property( "target_object_classes", - core.serialization.list(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()), @@ -31,7 +31,7 @@ export const AssociationType: core.serialization.ObjectSchema< }); export declare namespace AssociationType { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/crm/types/AssociationTypeCardinality.ts b/src/serialization/resources/crm/types/AssociationTypeCardinality.ts index 0a4737c01..9f2b58b20 100644 --- a/src/serialization/resources/crm/types/AssociationTypeCardinality.ts +++ b/src/serialization/resources/crm/types/AssociationTypeCardinality.ts @@ -13,5 +13,5 @@ export const AssociationTypeCardinality: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([CardinalityEnum, core.serialization.string()]); export declare namespace AssociationTypeCardinality { - type Raw = CardinalityEnum.Raw | string; + export type Raw = CardinalityEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/AssociationTypeRequestRequest.ts b/src/serialization/resources/crm/types/AssociationTypeRequestRequest.ts index 02b41d3bb..a3e39e4f7 100644 --- a/src/serialization/resources/crm/types/AssociationTypeRequestRequest.ts +++ b/src/serialization/resources/crm/types/AssociationTypeRequestRequest.ts @@ -15,7 +15,7 @@ export const AssociationTypeRequestRequest: core.serialization.ObjectSchema< sourceObjectClass: core.serialization.property("source_object_class", ObjectClassDescriptionRequest), targetObjectClasses: core.serialization.property( "target_object_classes", - core.serialization.list(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()), @@ -24,7 +24,7 @@ export const AssociationTypeRequestRequest: core.serialization.ObjectSchema< }); export declare namespace AssociationTypeRequestRequest { - interface Raw { + export interface Raw { source_object_class: ObjectClassDescriptionRequest.Raw; target_object_classes: ObjectClassDescriptionRequest.Raw[]; remote_key_name: string; diff --git a/src/serialization/resources/crm/types/AsyncPassthroughReciept.ts b/src/serialization/resources/crm/types/AsyncPassthroughReciept.ts index ed15bd943..1fb12fbe7 100644 --- a/src/serialization/resources/crm/types/AsyncPassthroughReciept.ts +++ b/src/serialization/resources/crm/types/AsyncPassthroughReciept.ts @@ -14,7 +14,7 @@ export const AsyncPassthroughReciept: core.serialization.ObjectSchema< }); export declare namespace AsyncPassthroughReciept { - interface Raw { + export interface Raw { async_passthrough_receipt_id: string; } } diff --git a/src/serialization/resources/crm/types/AuditLogEvent.ts b/src/serialization/resources/crm/types/AuditLogEvent.ts index aa59eb6c4..b298dbfc0 100644 --- a/src/serialization/resources/crm/types/AuditLogEvent.ts +++ b/src/serialization/resources/crm/types/AuditLogEvent.ts @@ -23,7 +23,7 @@ export const AuditLogEvent: core.serialization.ObjectSchema< }); export declare namespace AuditLogEvent { - interface Raw { + export interface Raw { id?: string | null; user_name?: string | null; user_email?: string | null; diff --git a/src/serialization/resources/crm/types/AuditLogEventEventType.ts b/src/serialization/resources/crm/types/AuditLogEventEventType.ts index 4fe108d69..3bc33a28c 100644 --- a/src/serialization/resources/crm/types/AuditLogEventEventType.ts +++ b/src/serialization/resources/crm/types/AuditLogEventEventType.ts @@ -13,5 +13,5 @@ export const AuditLogEventEventType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([EventTypeEnum, core.serialization.string()]); export declare namespace AuditLogEventEventType { - type Raw = EventTypeEnum.Raw | string; + export type Raw = EventTypeEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/AuditLogEventRole.ts b/src/serialization/resources/crm/types/AuditLogEventRole.ts index 65d590dac..45e71be2e 100644 --- a/src/serialization/resources/crm/types/AuditLogEventRole.ts +++ b/src/serialization/resources/crm/types/AuditLogEventRole.ts @@ -13,5 +13,5 @@ export const AuditLogEventRole: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([RoleEnum, core.serialization.string()]); export declare namespace AuditLogEventRole { - type Raw = RoleEnum.Raw | string; + export type Raw = RoleEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/AvailableActions.ts b/src/serialization/resources/crm/types/AvailableActions.ts index a09b963c8..7074e36f9 100644 --- a/src/serialization/resources/crm/types/AvailableActions.ts +++ b/src/serialization/resources/crm/types/AvailableActions.ts @@ -16,12 +16,12 @@ export const AvailableActions: core.serialization.ObjectSchema< passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization.list(ModelOperation).optional() + core.serialization.list(ModelOperation).optional(), ), }); export declare namespace AvailableActions { - interface Raw { + export interface Raw { integration: AccountIntegration.Raw; passthrough_available: boolean; 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 8297ebd65..abf538175 100644 --- a/src/serialization/resources/crm/types/CardinalityEnum.ts +++ b/src/serialization/resources/crm/types/CardinalityEnum.ts @@ -12,5 +12,5 @@ export const CardinalityEnum: core.serialization.Schema< > = core.serialization.enum_(["ONE_TO_ONE", "MANY_TO_ONE", "MANY_TO_MANY", "ONE_TO_MANY"]); export declare namespace CardinalityEnum { - type Raw = "ONE_TO_ONE" | "MANY_TO_ONE" | "MANY_TO_MANY" | "ONE_TO_MANY"; + export type Raw = "ONE_TO_ONE" | "MANY_TO_ONE" | "MANY_TO_MANY" | "ONE_TO_MANY"; } diff --git a/src/serialization/resources/crm/types/CategoriesEnum.ts b/src/serialization/resources/crm/types/CategoriesEnum.ts index e6e7d390b..94cf71e4c 100644 --- a/src/serialization/resources/crm/types/CategoriesEnum.ts +++ b/src/serialization/resources/crm/types/CategoriesEnum.ts @@ -10,5 +10,5 @@ export const CategoriesEnum: core.serialization.Schema = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list(IndividualCommonModelScopeDeserializer) + core.serialization.list(IndividualCommonModelScopeDeserializer), ), }); export declare namespace CommonModelScopeApi { - interface Raw { + export interface Raw { common_models: IndividualCommonModelScopeDeserializer.Raw[]; } } diff --git a/src/serialization/resources/crm/types/CommonModelScopesBodyRequest.ts b/src/serialization/resources/crm/types/CommonModelScopesBodyRequest.ts index 008d5e6b1..3f4e712f8 100644 --- a/src/serialization/resources/crm/types/CommonModelScopesBodyRequest.ts +++ b/src/serialization/resources/crm/types/CommonModelScopesBodyRequest.ts @@ -15,12 +15,12 @@ export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< enabledActions: core.serialization.property("enabled_actions", core.serialization.list(EnabledActionsEnum)), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.string()) + core.serialization.list(core.serialization.string()), ), }); export declare namespace CommonModelScopesBodyRequest { - interface Raw { + export interface Raw { model_id: string; 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 e5e333f78..837e5639a 100644 --- a/src/serialization/resources/crm/types/Contact.ts +++ b/src/serialization/resources/crm/types/Contact.ts @@ -26,7 +26,7 @@ export const Contact: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ContactRequestAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/ContactRequestOwner.ts b/src/serialization/resources/crm/types/ContactRequestOwner.ts index bc6e8d94a..dcaaa0691 100644 --- a/src/serialization/resources/crm/types/ContactRequestOwner.ts +++ b/src/serialization/resources/crm/types/ContactRequestOwner.ts @@ -13,5 +13,5 @@ export const ContactRequestOwner: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace ContactRequestOwner { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/CountryEnum.ts b/src/serialization/resources/crm/types/CountryEnum.ts index 527da822d..01ddc289d 100644 --- a/src/serialization/resources/crm/types/CountryEnum.ts +++ b/src/serialization/resources/crm/types/CountryEnum.ts @@ -260,7 +260,7 @@ export const CountryEnum: core.serialization.Schema; } } diff --git a/src/serialization/resources/crm/types/DataPassthroughRequest.ts b/src/serialization/resources/crm/types/DataPassthroughRequest.ts index b214f0824..62e8a8804 100644 --- a/src/serialization/resources/crm/types/DataPassthroughRequest.ts +++ b/src/serialization/resources/crm/types/DataPassthroughRequest.ts @@ -19,7 +19,7 @@ export const DataPassthroughRequest: core.serialization.ObjectSchema< data: core.serialization.string().optional(), multipartFormData: core.serialization.property( "multipart_form_data", - core.serialization.list(MultipartFormFieldRequest).optional() + core.serialization.list(MultipartFormFieldRequest).optional(), ), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), requestFormat: core.serialization.property("request_format", RequestFormatEnum.optional()), @@ -27,7 +27,7 @@ export const DataPassthroughRequest: core.serialization.ObjectSchema< }); export declare namespace DataPassthroughRequest { - interface Raw { + export interface Raw { method: MethodEnum.Raw; path: string; base_url_override?: string | null; diff --git a/src/serialization/resources/crm/types/DebugModeLog.ts b/src/serialization/resources/crm/types/DebugModeLog.ts index 972d25b70..f193d8550 100644 --- a/src/serialization/resources/crm/types/DebugModeLog.ts +++ b/src/serialization/resources/crm/types/DebugModeLog.ts @@ -15,7 +15,7 @@ export const DebugModeLog: core.serialization.ObjectSchema | null; diff --git a/src/serialization/resources/crm/types/EnabledActionsEnum.ts b/src/serialization/resources/crm/types/EnabledActionsEnum.ts index f354290ff..45434392b 100644 --- a/src/serialization/resources/crm/types/EnabledActionsEnum.ts +++ b/src/serialization/resources/crm/types/EnabledActionsEnum.ts @@ -12,5 +12,5 @@ export const EnabledActionsEnum: core.serialization.Schema< > = core.serialization.enum_(["READ", "WRITE"]); export declare namespace EnabledActionsEnum { - type Raw = "READ" | "WRITE"; + export type Raw = "READ" | "WRITE"; } diff --git a/src/serialization/resources/crm/types/EncodingEnum.ts b/src/serialization/resources/crm/types/EncodingEnum.ts index 60cec848b..b91cdaeb2 100644 --- a/src/serialization/resources/crm/types/EncodingEnum.ts +++ b/src/serialization/resources/crm/types/EncodingEnum.ts @@ -10,5 +10,5 @@ export const EncodingEnum: core.serialization.Schema = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace EngagementAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementContactsItem.ts b/src/serialization/resources/crm/types/EngagementContactsItem.ts index 72bf23142..735b5b1d8 100644 --- a/src/serialization/resources/crm/types/EngagementContactsItem.ts +++ b/src/serialization/resources/crm/types/EngagementContactsItem.ts @@ -13,5 +13,5 @@ export const EngagementContactsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace EngagementContactsItem { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementDirection.ts b/src/serialization/resources/crm/types/EngagementDirection.ts index b53f2d79d..db1f518a7 100644 --- a/src/serialization/resources/crm/types/EngagementDirection.ts +++ b/src/serialization/resources/crm/types/EngagementDirection.ts @@ -13,5 +13,5 @@ export const EngagementDirection: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([DirectionEnum, core.serialization.string()]); export declare namespace EngagementDirection { - type Raw = DirectionEnum.Raw | string; + export type Raw = DirectionEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/EngagementEngagementType.ts b/src/serialization/resources/crm/types/EngagementEngagementType.ts index e5a7da3df..afa8d753f 100644 --- a/src/serialization/resources/crm/types/EngagementEngagementType.ts +++ b/src/serialization/resources/crm/types/EngagementEngagementType.ts @@ -13,5 +13,5 @@ export const EngagementEngagementType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), EngagementType]); export declare namespace EngagementEngagementType { - type Raw = string | EngagementType.Raw; + export type Raw = string | EngagementType.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementOwner.ts b/src/serialization/resources/crm/types/EngagementOwner.ts index 79ab58520..4e9dc09cb 100644 --- a/src/serialization/resources/crm/types/EngagementOwner.ts +++ b/src/serialization/resources/crm/types/EngagementOwner.ts @@ -13,5 +13,5 @@ export const EngagementOwner: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace EngagementOwner { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementRequest.ts b/src/serialization/resources/crm/types/EngagementRequest.ts index aa8d24efa..da82aa025 100644 --- a/src/serialization/resources/crm/types/EngagementRequest.ts +++ b/src/serialization/resources/crm/types/EngagementRequest.ts @@ -27,17 +27,17 @@ export const EngagementRequest: core.serialization.ObjectSchema< contacts: core.serialization.list(EngagementRequestContactsItem.optional()).optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace EngagementRequest { - interface Raw { + export interface Raw { owner?: EngagementRequestOwner.Raw | null; content?: string | null; subject?: string | null; diff --git a/src/serialization/resources/crm/types/EngagementRequestAccount.ts b/src/serialization/resources/crm/types/EngagementRequestAccount.ts index b3895e2ef..c842d4c37 100644 --- a/src/serialization/resources/crm/types/EngagementRequestAccount.ts +++ b/src/serialization/resources/crm/types/EngagementRequestAccount.ts @@ -13,5 +13,5 @@ export const EngagementRequestAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace EngagementRequestAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementRequestContactsItem.ts b/src/serialization/resources/crm/types/EngagementRequestContactsItem.ts index 176a7f1db..dcd235501 100644 --- a/src/serialization/resources/crm/types/EngagementRequestContactsItem.ts +++ b/src/serialization/resources/crm/types/EngagementRequestContactsItem.ts @@ -13,5 +13,5 @@ export const EngagementRequestContactsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace EngagementRequestContactsItem { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementRequestDirection.ts b/src/serialization/resources/crm/types/EngagementRequestDirection.ts index 29cb187fd..6fdd9f04a 100644 --- a/src/serialization/resources/crm/types/EngagementRequestDirection.ts +++ b/src/serialization/resources/crm/types/EngagementRequestDirection.ts @@ -13,5 +13,5 @@ export const EngagementRequestDirection: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([DirectionEnum, core.serialization.string()]); export declare namespace EngagementRequestDirection { - type Raw = DirectionEnum.Raw | string; + export type Raw = DirectionEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/EngagementRequestEngagementType.ts b/src/serialization/resources/crm/types/EngagementRequestEngagementType.ts index 0c701325d..1862ff9d1 100644 --- a/src/serialization/resources/crm/types/EngagementRequestEngagementType.ts +++ b/src/serialization/resources/crm/types/EngagementRequestEngagementType.ts @@ -13,5 +13,5 @@ export const EngagementRequestEngagementType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), EngagementType]); export declare namespace EngagementRequestEngagementType { - type Raw = string | EngagementType.Raw; + export type Raw = string | EngagementType.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementRequestOwner.ts b/src/serialization/resources/crm/types/EngagementRequestOwner.ts index bfbbbb231..62c4df7a0 100644 --- a/src/serialization/resources/crm/types/EngagementRequestOwner.ts +++ b/src/serialization/resources/crm/types/EngagementRequestOwner.ts @@ -13,5 +13,5 @@ export const EngagementRequestOwner: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace EngagementRequestOwner { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/EngagementResponse.ts b/src/serialization/resources/crm/types/EngagementResponse.ts index 0d0cfac0d..d52fc226a 100644 --- a/src/serialization/resources/crm/types/EngagementResponse.ts +++ b/src/serialization/resources/crm/types/EngagementResponse.ts @@ -21,7 +21,7 @@ export const EngagementResponse: core.serialization.ObjectSchema< }); export declare namespace EngagementResponse { - interface Raw { + export interface Raw { model: Engagement.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/crm/types/EngagementType.ts b/src/serialization/resources/crm/types/EngagementType.ts index ad9711352..03d05a67f 100644 --- a/src/serialization/resources/crm/types/EngagementType.ts +++ b/src/serialization/resources/crm/types/EngagementType.ts @@ -22,7 +22,7 @@ export const EngagementType: core.serialization.ObjectSchema< }); export declare namespace EngagementType { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/crm/types/EngagementTypeActivityType.ts b/src/serialization/resources/crm/types/EngagementTypeActivityType.ts index 46cc8f462..0df2bf012 100644 --- a/src/serialization/resources/crm/types/EngagementTypeActivityType.ts +++ b/src/serialization/resources/crm/types/EngagementTypeActivityType.ts @@ -13,5 +13,5 @@ export const EngagementTypeActivityType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([ActivityTypeEnum, core.serialization.string()]); export declare namespace EngagementTypeActivityType { - type Raw = ActivityTypeEnum.Raw | string; + export type Raw = ActivityTypeEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/ErrorValidationProblem.ts b/src/serialization/resources/crm/types/ErrorValidationProblem.ts index 73a500d65..1aebb5580 100644 --- a/src/serialization/resources/crm/types/ErrorValidationProblem.ts +++ b/src/serialization/resources/crm/types/ErrorValidationProblem.ts @@ -18,7 +18,7 @@ export const ErrorValidationProblem: core.serialization.ObjectSchema< }); export declare namespace ErrorValidationProblem { - interface Raw { + export interface Raw { source?: ValidationProblemSource.Raw | null; title: string; detail: string; diff --git a/src/serialization/resources/crm/types/EventTypeEnum.ts b/src/serialization/resources/crm/types/EventTypeEnum.ts index 19542c0c5..1388d033b 100644 --- a/src/serialization/resources/crm/types/EventTypeEnum.ts +++ b/src/serialization/resources/crm/types/EventTypeEnum.ts @@ -53,7 +53,7 @@ export const EventTypeEnum: core.serialization.Schema = core.serialization.enum_(["string", "number", "date", "datetime", "bool", "list"]); export declare namespace FieldFormatEnum { - type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; + export type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; } diff --git a/src/serialization/resources/crm/types/FieldMappingApiInstance.ts b/src/serialization/resources/crm/types/FieldMappingApiInstance.ts index 7689c4684..162698030 100644 --- a/src/serialization/resources/crm/types/FieldMappingApiInstance.ts +++ b/src/serialization/resources/crm/types/FieldMappingApiInstance.ts @@ -19,7 +19,7 @@ export const FieldMappingApiInstance: core.serialization.ObjectSchema< }); export declare namespace FieldMappingApiInstance { - interface Raw { + export interface Raw { id?: string | null; is_integration_wide?: boolean | null; target_field?: FieldMappingApiInstanceTargetField.Raw | null; diff --git a/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteField.ts b/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteField.ts index acd550c7c..01c7fbd63 100644 --- a/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteField.ts @@ -15,12 +15,12 @@ export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), remoteEndpointInfo: core.serialization.property( "remote_endpoint_info", - FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo, ), }); export declare namespace FieldMappingApiInstanceRemoteField { - interface Raw { + export interface Raw { remote_key_name?: string | null; schema?: Record | null; remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; diff --git a/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts b/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts index 06b22d167..606304d9d 100644 --- a/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts +++ b/src/serialization/resources/crm/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts @@ -14,12 +14,12 @@ export const FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: core.serializ urlPath: core.serialization.property("url_path", core.serialization.string().optional()), fieldTraversalPath: core.serialization.property( "field_traversal_path", - core.serialization.list(core.serialization.string()).optional() + core.serialization.list(core.serialization.string()).optional(), ), }); export declare namespace FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { - interface Raw { + export interface Raw { method?: string | null; url_path?: string | null; field_traversal_path?: string[] | null; diff --git a/src/serialization/resources/crm/types/FieldMappingApiInstanceResponse.ts b/src/serialization/resources/crm/types/FieldMappingApiInstanceResponse.ts index b3d5ebd8c..db23b0b1c 100644 --- a/src/serialization/resources/crm/types/FieldMappingApiInstanceResponse.ts +++ b/src/serialization/resources/crm/types/FieldMappingApiInstanceResponse.ts @@ -17,7 +17,7 @@ export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< note: core.serialization.property("Note", core.serialization.list(FieldMappingApiInstance).optional()), opportunity: core.serialization.property( "Opportunity", - core.serialization.list(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()), @@ -26,7 +26,7 @@ export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< }); export declare namespace FieldMappingApiInstanceResponse { - interface Raw { + export interface Raw { Account?: FieldMappingApiInstance.Raw[] | null; Contact?: FieldMappingApiInstance.Raw[] | null; Lead?: FieldMappingApiInstance.Raw[] | null; diff --git a/src/serialization/resources/crm/types/FieldMappingApiInstanceTargetField.ts b/src/serialization/resources/crm/types/FieldMappingApiInstanceTargetField.ts index 2b14bd3fb..fb7e57469 100644 --- a/src/serialization/resources/crm/types/FieldMappingApiInstanceTargetField.ts +++ b/src/serialization/resources/crm/types/FieldMappingApiInstanceTargetField.ts @@ -16,7 +16,7 @@ export const FieldMappingApiInstanceTargetField: core.serialization.ObjectSchema }); export declare namespace FieldMappingApiInstanceTargetField { - interface Raw { + export interface Raw { name: string; description: string; is_organization_wide: boolean; diff --git a/src/serialization/resources/crm/types/FieldMappingInstanceResponse.ts b/src/serialization/resources/crm/types/FieldMappingInstanceResponse.ts index 9e7120041..4929208ab 100644 --- a/src/serialization/resources/crm/types/FieldMappingInstanceResponse.ts +++ b/src/serialization/resources/crm/types/FieldMappingInstanceResponse.ts @@ -21,7 +21,7 @@ export const FieldMappingInstanceResponse: core.serialization.ObjectSchema< }); export declare namespace FieldMappingInstanceResponse { - interface Raw { + export interface Raw { model: FieldMappingApiInstance.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/crm/types/FieldPermissionDeserializer.ts b/src/serialization/resources/crm/types/FieldPermissionDeserializer.ts index 4c7464df2..51271c061 100644 --- a/src/serialization/resources/crm/types/FieldPermissionDeserializer.ts +++ b/src/serialization/resources/crm/types/FieldPermissionDeserializer.ts @@ -12,16 +12,16 @@ export const FieldPermissionDeserializer: core.serialization.ObjectSchema< > = core.serialization.object({ enabledFields: core.serialization.property( "enabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace FieldPermissionDeserializer { - interface Raw { + export interface Raw { enabled_fields?: unknown[] | null; disabled_fields?: unknown[] | null; } diff --git a/src/serialization/resources/crm/types/FieldPermissionDeserializerRequest.ts b/src/serialization/resources/crm/types/FieldPermissionDeserializerRequest.ts index af71a04be..70514d728 100644 --- a/src/serialization/resources/crm/types/FieldPermissionDeserializerRequest.ts +++ b/src/serialization/resources/crm/types/FieldPermissionDeserializerRequest.ts @@ -12,16 +12,16 @@ export const FieldPermissionDeserializerRequest: core.serialization.ObjectSchema > = core.serialization.object({ enabledFields: core.serialization.property( "enabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace FieldPermissionDeserializerRequest { - interface Raw { + export interface Raw { enabled_fields?: unknown[] | null; disabled_fields?: unknown[] | null; } diff --git a/src/serialization/resources/crm/types/FieldTypeEnum.ts b/src/serialization/resources/crm/types/FieldTypeEnum.ts index f8d952382..e35195c44 100644 --- a/src/serialization/resources/crm/types/FieldTypeEnum.ts +++ b/src/serialization/resources/crm/types/FieldTypeEnum.ts @@ -10,5 +10,5 @@ export const FieldTypeEnum: core.serialization.Schema | 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 1c9606ca9..9f517c18c 100644 --- a/src/serialization/resources/crm/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/crm/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -15,13 +15,13 @@ 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(), ModelPermissionDeserializerRequest).optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializerRequest).optional(), ), fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializerRequest.optional()), }); export declare namespace IndividualCommonModelScopeDeserializerRequest { - interface Raw { + export interface Raw { model_name: string; 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 ba2a08b68..f9da612ee 100644 --- a/src/serialization/resources/crm/types/Issue.ts +++ b/src/serialization/resources/crm/types/Issue.ts @@ -14,19 +14,19 @@ export const Issue: core.serialization.ObjectSchema = core.serialization.enum_(["ONGOING", "RESOLVED"]); export declare namespace IssueStatusEnum { - type Raw = "ONGOING" | "RESOLVED"; + export type Raw = "ONGOING" | "RESOLVED"; } diff --git a/src/serialization/resources/crm/types/ItemFormatEnum.ts b/src/serialization/resources/crm/types/ItemFormatEnum.ts index bb433cb5f..9aedcbbd7 100644 --- a/src/serialization/resources/crm/types/ItemFormatEnum.ts +++ b/src/serialization/resources/crm/types/ItemFormatEnum.ts @@ -10,5 +10,5 @@ export const ItemFormatEnum: core.serialization.Schema = core.serialization.enum_(["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"]); export declare namespace LastSyncResultEnum { - type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; + export type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; } diff --git a/src/serialization/resources/crm/types/Lead.ts b/src/serialization/resources/crm/types/Lead.ts index 67961df4a..5e8f024ab 100644 --- a/src/serialization/resources/crm/types/Lead.ts +++ b/src/serialization/resources/crm/types/Lead.ts @@ -29,7 +29,7 @@ export const Lead: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace LeadConvertedAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/LeadConvertedContact.ts b/src/serialization/resources/crm/types/LeadConvertedContact.ts index f0a80f04a..793ff6332 100644 --- a/src/serialization/resources/crm/types/LeadConvertedContact.ts +++ b/src/serialization/resources/crm/types/LeadConvertedContact.ts @@ -13,5 +13,5 @@ export const LeadConvertedContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace LeadConvertedContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/crm/types/LeadOwner.ts b/src/serialization/resources/crm/types/LeadOwner.ts index 8290d8d38..6d88c78d1 100644 --- a/src/serialization/resources/crm/types/LeadOwner.ts +++ b/src/serialization/resources/crm/types/LeadOwner.ts @@ -11,5 +11,5 @@ export const LeadOwner: core.serialization.Schema = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace LeadRequestConvertedAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/LeadRequestConvertedContact.ts b/src/serialization/resources/crm/types/LeadRequestConvertedContact.ts index 459cf42d8..8b1840a7b 100644 --- a/src/serialization/resources/crm/types/LeadRequestConvertedContact.ts +++ b/src/serialization/resources/crm/types/LeadRequestConvertedContact.ts @@ -13,5 +13,5 @@ export const LeadRequestConvertedContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace LeadRequestConvertedContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/crm/types/LeadRequestOwner.ts b/src/serialization/resources/crm/types/LeadRequestOwner.ts index 2da66431c..61fb3dba6 100644 --- a/src/serialization/resources/crm/types/LeadRequestOwner.ts +++ b/src/serialization/resources/crm/types/LeadRequestOwner.ts @@ -13,5 +13,5 @@ export const LeadRequestOwner: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace LeadRequestOwner { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/LeadResponse.ts b/src/serialization/resources/crm/types/LeadResponse.ts index b0743bb0d..8e21c241b 100644 --- a/src/serialization/resources/crm/types/LeadResponse.ts +++ b/src/serialization/resources/crm/types/LeadResponse.ts @@ -19,7 +19,7 @@ export const LeadResponse: core.serialization.ObjectSchema; remote_field_classes?: Record | null; status?: LinkedAccountStatus.Raw | null; diff --git a/src/serialization/resources/crm/types/MethodEnum.ts b/src/serialization/resources/crm/types/MethodEnum.ts index 6b1621588..0d91a7f54 100644 --- a/src/serialization/resources/crm/types/MethodEnum.ts +++ b/src/serialization/resources/crm/types/MethodEnum.ts @@ -10,5 +10,5 @@ export const MethodEnum: core.serialization.Schema = core.serialization.undiscriminatedUnion([EncodingEnum, core.serialization.string()]); export declare namespace MultipartFormFieldRequestEncoding { - type Raw = EncodingEnum.Raw | string; + export type Raw = EncodingEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/Note.ts b/src/serialization/resources/crm/types/Note.ts index 0eb0d0024..0f646728b 100644 --- a/src/serialization/resources/crm/types/Note.ts +++ b/src/serialization/resources/crm/types/Note.ts @@ -28,14 +28,14 @@ export const Note: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Opportunity]); export declare namespace NoteOpportunity { - type Raw = string | Opportunity.Raw; + export type Raw = string | Opportunity.Raw; } diff --git a/src/serialization/resources/crm/types/NoteOwner.ts b/src/serialization/resources/crm/types/NoteOwner.ts index 4c7b01a0b..6ab246154 100644 --- a/src/serialization/resources/crm/types/NoteOwner.ts +++ b/src/serialization/resources/crm/types/NoteOwner.ts @@ -11,5 +11,5 @@ export const NoteOwner: core.serialization.Schema = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace NoteRequestAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/NoteRequestContact.ts b/src/serialization/resources/crm/types/NoteRequestContact.ts index e8a1a3e6e..42db5c419 100644 --- a/src/serialization/resources/crm/types/NoteRequestContact.ts +++ b/src/serialization/resources/crm/types/NoteRequestContact.ts @@ -13,5 +13,5 @@ export const NoteRequestContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace NoteRequestContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/crm/types/NoteRequestOpportunity.ts b/src/serialization/resources/crm/types/NoteRequestOpportunity.ts index b020d4ce5..7cecb8988 100644 --- a/src/serialization/resources/crm/types/NoteRequestOpportunity.ts +++ b/src/serialization/resources/crm/types/NoteRequestOpportunity.ts @@ -13,5 +13,5 @@ export const NoteRequestOpportunity: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Opportunity]); export declare namespace NoteRequestOpportunity { - type Raw = string | Opportunity.Raw; + export type Raw = string | Opportunity.Raw; } diff --git a/src/serialization/resources/crm/types/NoteRequestOwner.ts b/src/serialization/resources/crm/types/NoteRequestOwner.ts index b654e27e9..d460b8844 100644 --- a/src/serialization/resources/crm/types/NoteRequestOwner.ts +++ b/src/serialization/resources/crm/types/NoteRequestOwner.ts @@ -13,5 +13,5 @@ export const NoteRequestOwner: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace NoteRequestOwner { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/NoteResponse.ts b/src/serialization/resources/crm/types/NoteResponse.ts index d37060d13..380a2900c 100644 --- a/src/serialization/resources/crm/types/NoteResponse.ts +++ b/src/serialization/resources/crm/types/NoteResponse.ts @@ -19,7 +19,7 @@ export const NoteResponse: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace OpportunityAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/OpportunityOwner.ts b/src/serialization/resources/crm/types/OpportunityOwner.ts index 40def5c2c..29d406fc0 100644 --- a/src/serialization/resources/crm/types/OpportunityOwner.ts +++ b/src/serialization/resources/crm/types/OpportunityOwner.ts @@ -13,5 +13,5 @@ export const OpportunityOwner: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace OpportunityOwner { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/OpportunityRequest.ts b/src/serialization/resources/crm/types/OpportunityRequest.ts index 36e8b3cdf..9c7eeadff 100644 --- a/src/serialization/resources/crm/types/OpportunityRequest.ts +++ b/src/serialization/resources/crm/types/OpportunityRequest.ts @@ -26,17 +26,17 @@ export const OpportunityRequest: core.serialization.ObjectSchema< closeDate: core.serialization.property("close_date", core.serialization.date().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace OpportunityRequest { - interface Raw { + export interface Raw { name?: string | null; description?: string | null; amount?: number | null; diff --git a/src/serialization/resources/crm/types/OpportunityRequestAccount.ts b/src/serialization/resources/crm/types/OpportunityRequestAccount.ts index 59a356225..66a724e50 100644 --- a/src/serialization/resources/crm/types/OpportunityRequestAccount.ts +++ b/src/serialization/resources/crm/types/OpportunityRequestAccount.ts @@ -13,5 +13,5 @@ export const OpportunityRequestAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace OpportunityRequestAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/OpportunityRequestOwner.ts b/src/serialization/resources/crm/types/OpportunityRequestOwner.ts index 67cff97c8..9071a6097 100644 --- a/src/serialization/resources/crm/types/OpportunityRequestOwner.ts +++ b/src/serialization/resources/crm/types/OpportunityRequestOwner.ts @@ -13,5 +13,5 @@ export const OpportunityRequestOwner: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace OpportunityRequestOwner { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/OpportunityRequestStage.ts b/src/serialization/resources/crm/types/OpportunityRequestStage.ts index caa0997d4..d26db5fb2 100644 --- a/src/serialization/resources/crm/types/OpportunityRequestStage.ts +++ b/src/serialization/resources/crm/types/OpportunityRequestStage.ts @@ -13,5 +13,5 @@ export const OpportunityRequestStage: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Stage]); export declare namespace OpportunityRequestStage { - type Raw = string | Stage.Raw; + export type Raw = string | Stage.Raw; } diff --git a/src/serialization/resources/crm/types/OpportunityRequestStatus.ts b/src/serialization/resources/crm/types/OpportunityRequestStatus.ts index 92a81a5ed..5a47ff038 100644 --- a/src/serialization/resources/crm/types/OpportunityRequestStatus.ts +++ b/src/serialization/resources/crm/types/OpportunityRequestStatus.ts @@ -13,5 +13,5 @@ export const OpportunityRequestStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([OpportunityStatusEnum, core.serialization.string()]); export declare namespace OpportunityRequestStatus { - type Raw = OpportunityStatusEnum.Raw | string; + export type Raw = OpportunityStatusEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/OpportunityResponse.ts b/src/serialization/resources/crm/types/OpportunityResponse.ts index 9a15b24cb..a1232d7ff 100644 --- a/src/serialization/resources/crm/types/OpportunityResponse.ts +++ b/src/serialization/resources/crm/types/OpportunityResponse.ts @@ -21,7 +21,7 @@ export const OpportunityResponse: core.serialization.ObjectSchema< }); export declare namespace OpportunityResponse { - interface Raw { + export interface Raw { model: Opportunity.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/crm/types/OpportunityStage.ts b/src/serialization/resources/crm/types/OpportunityStage.ts index 8e9d67eeb..3008a9c4d 100644 --- a/src/serialization/resources/crm/types/OpportunityStage.ts +++ b/src/serialization/resources/crm/types/OpportunityStage.ts @@ -13,5 +13,5 @@ export const OpportunityStage: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Stage]); export declare namespace OpportunityStage { - type Raw = string | Stage.Raw; + export type Raw = string | Stage.Raw; } diff --git a/src/serialization/resources/crm/types/OpportunityStatus.ts b/src/serialization/resources/crm/types/OpportunityStatus.ts index af884a0d1..8de307e18 100644 --- a/src/serialization/resources/crm/types/OpportunityStatus.ts +++ b/src/serialization/resources/crm/types/OpportunityStatus.ts @@ -13,5 +13,5 @@ export const OpportunityStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([OpportunityStatusEnum, core.serialization.string()]); export declare namespace OpportunityStatus { - type Raw = OpportunityStatusEnum.Raw | string; + export type Raw = OpportunityStatusEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/OpportunityStatusEnum.ts b/src/serialization/resources/crm/types/OpportunityStatusEnum.ts index 058b9496f..c1fc69609 100644 --- a/src/serialization/resources/crm/types/OpportunityStatusEnum.ts +++ b/src/serialization/resources/crm/types/OpportunityStatusEnum.ts @@ -12,5 +12,5 @@ export const OpportunityStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["OPEN", "WON", "LOST"]); export declare namespace OpportunityStatusEnum { - type Raw = "OPEN" | "WON" | "LOST"; + export type Raw = "OPEN" | "WON" | "LOST"; } diff --git a/src/serialization/resources/crm/types/OriginTypeEnum.ts b/src/serialization/resources/crm/types/OriginTypeEnum.ts index 269413389..a42d125e8 100644 --- a/src/serialization/resources/crm/types/OriginTypeEnum.ts +++ b/src/serialization/resources/crm/types/OriginTypeEnum.ts @@ -10,5 +10,5 @@ export const OriginTypeEnum: core.serialization.Schema = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace PatchedContactRequestOwner { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/PatchedEngagementRequest.ts b/src/serialization/resources/crm/types/PatchedEngagementRequest.ts index 2a25fd177..d5644fc7c 100644 --- a/src/serialization/resources/crm/types/PatchedEngagementRequest.ts +++ b/src/serialization/resources/crm/types/PatchedEngagementRequest.ts @@ -23,17 +23,17 @@ export const PatchedEngagementRequest: core.serialization.ObjectSchema< contacts: core.serialization.list(core.serialization.string().optional()).optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PatchedEngagementRequest { - interface Raw { + export interface Raw { owner?: string | null; content?: string | null; subject?: string | null; diff --git a/src/serialization/resources/crm/types/PatchedEngagementRequestDirection.ts b/src/serialization/resources/crm/types/PatchedEngagementRequestDirection.ts index 1a0117c9c..b0b9126c5 100644 --- a/src/serialization/resources/crm/types/PatchedEngagementRequestDirection.ts +++ b/src/serialization/resources/crm/types/PatchedEngagementRequestDirection.ts @@ -13,5 +13,5 @@ export const PatchedEngagementRequestDirection: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([DirectionEnum, core.serialization.string()]); export declare namespace PatchedEngagementRequestDirection { - type Raw = DirectionEnum.Raw | string; + export type Raw = DirectionEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/PatchedOpportunityRequest.ts b/src/serialization/resources/crm/types/PatchedOpportunityRequest.ts index f37d6e1a7..96795464b 100644 --- a/src/serialization/resources/crm/types/PatchedOpportunityRequest.ts +++ b/src/serialization/resources/crm/types/PatchedOpportunityRequest.ts @@ -23,17 +23,17 @@ export const PatchedOpportunityRequest: core.serialization.ObjectSchema< closeDate: core.serialization.property("close_date", core.serialization.date().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PatchedOpportunityRequest { - interface Raw { + export interface Raw { name?: string | null; description?: string | null; amount?: number | null; diff --git a/src/serialization/resources/crm/types/PatchedOpportunityRequestStatus.ts b/src/serialization/resources/crm/types/PatchedOpportunityRequestStatus.ts index 35b9725a2..0d939791e 100644 --- a/src/serialization/resources/crm/types/PatchedOpportunityRequestStatus.ts +++ b/src/serialization/resources/crm/types/PatchedOpportunityRequestStatus.ts @@ -13,5 +13,5 @@ export const PatchedOpportunityRequestStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([OpportunityStatusEnum, core.serialization.string()]); export declare namespace PatchedOpportunityRequestStatus { - type Raw = OpportunityStatusEnum.Raw | string; + export type Raw = OpportunityStatusEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/PatchedTaskRequest.ts b/src/serialization/resources/crm/types/PatchedTaskRequest.ts index cc89338f9..ef8783c2f 100644 --- a/src/serialization/resources/crm/types/PatchedTaskRequest.ts +++ b/src/serialization/resources/crm/types/PatchedTaskRequest.ts @@ -22,17 +22,17 @@ export const PatchedTaskRequest: core.serialization.ObjectSchema< status: PatchedTaskRequestStatus.optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PatchedTaskRequest { - interface Raw { + export interface Raw { subject?: string | null; content?: string | null; owner?: string | null; diff --git a/src/serialization/resources/crm/types/PatchedTaskRequestStatus.ts b/src/serialization/resources/crm/types/PatchedTaskRequestStatus.ts index 0a677d498..ed3eb5017 100644 --- a/src/serialization/resources/crm/types/PatchedTaskRequestStatus.ts +++ b/src/serialization/resources/crm/types/PatchedTaskRequestStatus.ts @@ -13,5 +13,5 @@ export const PatchedTaskRequestStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TaskStatusEnum, core.serialization.string()]); export declare namespace PatchedTaskRequestStatus { - type Raw = TaskStatusEnum.Raw | string; + export type Raw = TaskStatusEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/PhoneNumber.ts b/src/serialization/resources/crm/types/PhoneNumber.ts index e5d037d8b..aa77fb430 100644 --- a/src/serialization/resources/crm/types/PhoneNumber.ts +++ b/src/serialization/resources/crm/types/PhoneNumber.ts @@ -15,7 +15,7 @@ export const PhoneNumber: core.serialization.ObjectSchema | null; diff --git a/src/serialization/resources/crm/types/ReasonEnum.ts b/src/serialization/resources/crm/types/ReasonEnum.ts index 038cf2657..be880ed7a 100644 --- a/src/serialization/resources/crm/types/ReasonEnum.ts +++ b/src/serialization/resources/crm/types/ReasonEnum.ts @@ -10,5 +10,5 @@ export const ReasonEnum: core.serialization.Schema; remote_key_name: string; remote_endpoint_info: RemoteEndpointInfo.Raw; diff --git a/src/serialization/resources/crm/types/RemoteFieldApiCoverage.ts b/src/serialization/resources/crm/types/RemoteFieldApiCoverage.ts index 899e86127..97744323e 100644 --- a/src/serialization/resources/crm/types/RemoteFieldApiCoverage.ts +++ b/src/serialization/resources/crm/types/RemoteFieldApiCoverage.ts @@ -12,5 +12,5 @@ export const RemoteFieldApiCoverage: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.number(), core.serialization.number()]); export declare namespace RemoteFieldApiCoverage { - type Raw = number | number; + export type Raw = number | number; } diff --git a/src/serialization/resources/crm/types/RemoteFieldApiResponse.ts b/src/serialization/resources/crm/types/RemoteFieldApiResponse.ts index 068d716ce..7db4cff4d 100644 --- a/src/serialization/resources/crm/types/RemoteFieldApiResponse.ts +++ b/src/serialization/resources/crm/types/RemoteFieldApiResponse.ts @@ -23,7 +23,7 @@ export const RemoteFieldApiResponse: core.serialization.ObjectSchema< }); export declare namespace RemoteFieldApiResponse { - interface Raw { + export interface Raw { Account?: RemoteFieldApi.Raw[] | null; Contact?: RemoteFieldApi.Raw[] | null; Lead?: RemoteFieldApi.Raw[] | null; diff --git a/src/serialization/resources/crm/types/RemoteFieldClass.ts b/src/serialization/resources/crm/types/RemoteFieldClass.ts index b1e4a2dd5..052358ce2 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClass.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClass.ts @@ -24,13 +24,13 @@ export const RemoteFieldClass: core.serialization.ObjectSchema< fieldFormat: core.serialization.property("field_format", RemoteFieldClassFieldFormat.optional()), fieldChoices: core.serialization.property( "field_choices", - core.serialization.list(RemoteFieldClassFieldChoicesItem).optional() + core.serialization.list(RemoteFieldClassFieldChoicesItem).optional(), ), itemSchema: core.serialization.property("item_schema", ItemSchema.optional()), }); export declare namespace RemoteFieldClass { - interface Raw { + export interface Raw { id?: string | null; display_name?: string | null; remote_key_name?: string | null; diff --git a/src/serialization/resources/crm/types/RemoteFieldClassFieldChoicesItem.ts b/src/serialization/resources/crm/types/RemoteFieldClassFieldChoicesItem.ts index 2d6473b22..c3e2485d2 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassFieldChoicesItem.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassFieldChoicesItem.ts @@ -15,7 +15,7 @@ export const RemoteFieldClassFieldChoicesItem: core.serialization.ObjectSchema< }); export declare namespace RemoteFieldClassFieldChoicesItem { - interface Raw { + export interface Raw { value?: unknown | null; display_name?: string | null; } diff --git a/src/serialization/resources/crm/types/RemoteFieldClassFieldFormat.ts b/src/serialization/resources/crm/types/RemoteFieldClassFieldFormat.ts index b5fee1c42..e99ab5de6 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassFieldFormat.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassFieldFormat.ts @@ -13,5 +13,5 @@ export const RemoteFieldClassFieldFormat: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([FieldFormatEnum, core.serialization.string()]); export declare namespace RemoteFieldClassFieldFormat { - type Raw = FieldFormatEnum.Raw | string; + export type Raw = FieldFormatEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/RemoteFieldClassFieldType.ts b/src/serialization/resources/crm/types/RemoteFieldClassFieldType.ts index c142c6fea..c38ad951d 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassFieldType.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassFieldType.ts @@ -13,5 +13,5 @@ export const RemoteFieldClassFieldType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([FieldTypeEnum, core.serialization.string()]); export declare namespace RemoteFieldClassFieldType { - type Raw = FieldTypeEnum.Raw | string; + export type Raw = FieldTypeEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClass.ts b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClass.ts index 69697b764..d96213be5 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClass.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClass.ts @@ -23,17 +23,17 @@ export const RemoteFieldClassForCustomObjectClass: core.serialization.ObjectSche fieldType: core.serialization.property("field_type", RemoteFieldClassForCustomObjectClassFieldType.optional()), fieldFormat: core.serialization.property( "field_format", - RemoteFieldClassForCustomObjectClassFieldFormat.optional() + RemoteFieldClassForCustomObjectClassFieldFormat.optional(), ), fieldChoices: core.serialization.property( "field_choices", - core.serialization.list(RemoteFieldClassForCustomObjectClassFieldChoicesItem).optional() + core.serialization.list(RemoteFieldClassForCustomObjectClassFieldChoicesItem).optional(), ), itemSchema: core.serialization.property("item_schema", RemoteFieldClassForCustomObjectClassItemSchema.optional()), }); export declare namespace RemoteFieldClassForCustomObjectClass { - interface Raw { + export interface Raw { created_at?: string | null; modified_at?: string | null; display_name?: string | null; diff --git a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldChoicesItem.ts b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldChoicesItem.ts index ccc8194c8..2f80d8414 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldChoicesItem.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldChoicesItem.ts @@ -15,7 +15,7 @@ export const RemoteFieldClassForCustomObjectClassFieldChoicesItem: core.serializ }); export declare namespace RemoteFieldClassForCustomObjectClassFieldChoicesItem { - interface Raw { + export interface Raw { value?: unknown | null; display_name?: string | null; } diff --git a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.ts b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.ts index 720e73ad3..14395bfbf 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.ts @@ -13,5 +13,5 @@ export const RemoteFieldClassForCustomObjectClassFieldFormat: core.serialization > = core.serialization.undiscriminatedUnion([FieldFormatEnum, core.serialization.string()]); export declare namespace RemoteFieldClassForCustomObjectClassFieldFormat { - type Raw = FieldFormatEnum.Raw | string; + export type Raw = FieldFormatEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldType.ts b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldType.ts index dcc51954a..c6955e37c 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldType.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassFieldType.ts @@ -13,5 +13,5 @@ export const RemoteFieldClassForCustomObjectClassFieldType: core.serialization.S > = core.serialization.undiscriminatedUnion([FieldTypeEnum, core.serialization.string()]); export declare namespace RemoteFieldClassForCustomObjectClassFieldType { - type Raw = FieldTypeEnum.Raw | string; + export type Raw = FieldTypeEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassItemSchema.ts b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassItemSchema.ts index bf5f66604..0c9df5c30 100644 --- a/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassItemSchema.ts +++ b/src/serialization/resources/crm/types/RemoteFieldClassForCustomObjectClassItemSchema.ts @@ -14,12 +14,12 @@ export const RemoteFieldClassForCustomObjectClassItemSchema: core.serialization. itemFormat: core.serialization.property("item_format", core.serialization.string().optional()), itemChoices: core.serialization.property( "item_choices", - core.serialization.list(core.serialization.string().optional()).optional() + core.serialization.list(core.serialization.string().optional()).optional(), ), }); export declare namespace RemoteFieldClassForCustomObjectClassItemSchema { - interface Raw { + export interface Raw { item_type?: string | null; item_format?: string | null; item_choices?: (string | null | undefined)[] | null; diff --git a/src/serialization/resources/crm/types/RemoteFieldRemoteFieldClass.ts b/src/serialization/resources/crm/types/RemoteFieldRemoteFieldClass.ts index ec1106a9b..ad3eb66fc 100644 --- a/src/serialization/resources/crm/types/RemoteFieldRemoteFieldClass.ts +++ b/src/serialization/resources/crm/types/RemoteFieldRemoteFieldClass.ts @@ -13,5 +13,5 @@ export const RemoteFieldRemoteFieldClass: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteFieldClass]); export declare namespace RemoteFieldRemoteFieldClass { - type Raw = string | RemoteFieldClass.Raw; + export type Raw = string | RemoteFieldClass.Raw; } diff --git a/src/serialization/resources/crm/types/RemoteFieldRequest.ts b/src/serialization/resources/crm/types/RemoteFieldRequest.ts index 442374d07..2577c24a4 100644 --- a/src/serialization/resources/crm/types/RemoteFieldRequest.ts +++ b/src/serialization/resources/crm/types/RemoteFieldRequest.ts @@ -16,7 +16,7 @@ export const RemoteFieldRequest: core.serialization.ObjectSchema< }); export declare namespace RemoteFieldRequest { - interface Raw { + export interface 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 9ec5fe125..2a396f70d 100644 --- a/src/serialization/resources/crm/types/RemoteFieldRequestRemoteFieldClass.ts +++ b/src/serialization/resources/crm/types/RemoteFieldRequestRemoteFieldClass.ts @@ -13,5 +13,5 @@ export const RemoteFieldRequestRemoteFieldClass: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteFieldClass]); export declare namespace RemoteFieldRequestRemoteFieldClass { - type Raw = string | RemoteFieldClass.Raw; + export type Raw = string | RemoteFieldClass.Raw; } diff --git a/src/serialization/resources/crm/types/RemoteKey.ts b/src/serialization/resources/crm/types/RemoteKey.ts index 4b1ce4ca4..b56ae3698 100644 --- a/src/serialization/resources/crm/types/RemoteKey.ts +++ b/src/serialization/resources/crm/types/RemoteKey.ts @@ -13,7 +13,7 @@ export const RemoteKey: core.serialization.ObjectSchema = core.serialization.enum_(["JSON", "XML", "MULTIPART"]); export declare namespace RequestFormatEnum { - type Raw = "JSON" | "XML" | "MULTIPART"; + export type Raw = "JSON" | "XML" | "MULTIPART"; } diff --git a/src/serialization/resources/crm/types/ResponseTypeEnum.ts b/src/serialization/resources/crm/types/ResponseTypeEnum.ts index 0f0439401..d37153aec 100644 --- a/src/serialization/resources/crm/types/ResponseTypeEnum.ts +++ b/src/serialization/resources/crm/types/ResponseTypeEnum.ts @@ -12,5 +12,5 @@ export const ResponseTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["JSON", "BASE64_GZIP"]); export declare namespace ResponseTypeEnum { - type Raw = "JSON" | "BASE64_GZIP"; + export type Raw = "JSON" | "BASE64_GZIP"; } diff --git a/src/serialization/resources/crm/types/RoleEnum.ts b/src/serialization/resources/crm/types/RoleEnum.ts index b0ddf9e4a..e75e3c4ef 100644 --- a/src/serialization/resources/crm/types/RoleEnum.ts +++ b/src/serialization/resources/crm/types/RoleEnum.ts @@ -10,5 +10,5 @@ export const RoleEnum: core.serialization.Schema = core.serialization.enum_(["IN_NEXT_SYNC", "IN_LAST_SYNC"]); export declare namespace SelectiveSyncConfigurationsUsageEnum { - type Raw = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; + export type Raw = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; } diff --git a/src/serialization/resources/crm/types/Stage.ts b/src/serialization/resources/crm/types/Stage.ts index 5d8544fce..744f7ed69 100644 --- a/src/serialization/resources/crm/types/Stage.ts +++ b/src/serialization/resources/crm/types/Stage.ts @@ -18,14 +18,14 @@ export const Stage: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([LastSyncResultEnum, core.serialization.string()]); export declare namespace SyncStatusLastSyncResult { - type Raw = LastSyncResultEnum.Raw | string; + export type Raw = LastSyncResultEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/Task.ts b/src/serialization/resources/crm/types/Task.ts index b929af605..0a99bbf3d 100644 --- a/src/serialization/resources/crm/types/Task.ts +++ b/src/serialization/resources/crm/types/Task.ts @@ -29,14 +29,14 @@ export const Task: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Opportunity]); export declare namespace TaskOpportunity { - type Raw = string | Opportunity.Raw; + export type Raw = string | Opportunity.Raw; } diff --git a/src/serialization/resources/crm/types/TaskOwner.ts b/src/serialization/resources/crm/types/TaskOwner.ts index e16741088..1409af4ca 100644 --- a/src/serialization/resources/crm/types/TaskOwner.ts +++ b/src/serialization/resources/crm/types/TaskOwner.ts @@ -11,5 +11,5 @@ export const TaskOwner: core.serialization.Schema = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace TaskRequestAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/crm/types/TaskRequestOpportunity.ts b/src/serialization/resources/crm/types/TaskRequestOpportunity.ts index 4d35aaf1b..cdfe1b4bc 100644 --- a/src/serialization/resources/crm/types/TaskRequestOpportunity.ts +++ b/src/serialization/resources/crm/types/TaskRequestOpportunity.ts @@ -13,5 +13,5 @@ export const TaskRequestOpportunity: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Opportunity]); export declare namespace TaskRequestOpportunity { - type Raw = string | Opportunity.Raw; + export type Raw = string | Opportunity.Raw; } diff --git a/src/serialization/resources/crm/types/TaskRequestOwner.ts b/src/serialization/resources/crm/types/TaskRequestOwner.ts index dfbb960a6..600926d3e 100644 --- a/src/serialization/resources/crm/types/TaskRequestOwner.ts +++ b/src/serialization/resources/crm/types/TaskRequestOwner.ts @@ -13,5 +13,5 @@ export const TaskRequestOwner: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace TaskRequestOwner { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/crm/types/TaskRequestStatus.ts b/src/serialization/resources/crm/types/TaskRequestStatus.ts index 25b99b61a..d52f33978 100644 --- a/src/serialization/resources/crm/types/TaskRequestStatus.ts +++ b/src/serialization/resources/crm/types/TaskRequestStatus.ts @@ -13,5 +13,5 @@ export const TaskRequestStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TaskStatusEnum, core.serialization.string()]); export declare namespace TaskRequestStatus { - type Raw = TaskStatusEnum.Raw | string; + export type Raw = TaskStatusEnum.Raw | string; } diff --git a/src/serialization/resources/crm/types/TaskResponse.ts b/src/serialization/resources/crm/types/TaskResponse.ts index 96097eaf8..f35c0d9c8 100644 --- a/src/serialization/resources/crm/types/TaskResponse.ts +++ b/src/serialization/resources/crm/types/TaskResponse.ts @@ -19,7 +19,7 @@ export const TaskResponse: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([RemoteResponse, core.serialization.string()]); export declare namespace AsyncPassthroughRetrieveResponse { - type Raw = RemoteResponse.Raw | string; + export 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 dd1ec36a9..48eba9b06 100644 --- a/src/serialization/resources/filestorage/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/serialization/resources/filestorage/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -14,7 +14,7 @@ export const CreateFieldMappingRequest: core.serialization.Schema< targetFieldDescription: core.serialization.property("target_field_description", core.serialization.string()), remoteFieldTraversalPath: core.serialization.property( "remote_field_traversal_path", - core.serialization.list(core.serialization.unknown()) + core.serialization.list(core.serialization.unknown()), ), remoteMethod: core.serialization.property("remote_method", core.serialization.string()), remoteUrlPath: core.serialization.property("remote_url_path", core.serialization.string()), @@ -22,7 +22,7 @@ export const CreateFieldMappingRequest: core.serialization.Schema< }); export declare namespace CreateFieldMappingRequest { - interface Raw { + export interface Raw { target_field_name: string; target_field_description: string; remote_field_traversal_path: unknown[]; 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 e772c9da2..19d82935a 100644 --- a/src/serialization/resources/filestorage/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts +++ b/src/serialization/resources/filestorage/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts @@ -12,14 +12,14 @@ export const PatchedEditFieldMappingRequest: core.serialization.Schema< > = core.serialization.object({ remoteFieldTraversalPath: core.serialization.property( "remote_field_traversal_path", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), remoteMethod: core.serialization.property("remote_method", core.serialization.string().optional()), remoteUrlPath: core.serialization.property("remote_url_path", core.serialization.string().optional()), }); export declare namespace PatchedEditFieldMappingRequest { - interface Raw { + export interface Raw { remote_field_traversal_path?: unknown[] | null; remote_method?: string | null; remote_url_path?: string | null; 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 35ed5e1e3..026683a2b 100644 --- a/src/serialization/resources/filestorage/resources/files/client/requests/FileStorageFileEndpointRequest.ts +++ b/src/serialization/resources/filestorage/resources/files/client/requests/FileStorageFileEndpointRequest.ts @@ -15,7 +15,7 @@ export const FileStorageFileEndpointRequest: core.serialization.Schema< }); export declare namespace FileStorageFileEndpointRequest { - interface Raw { + export interface 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 4b46e811d..d1dd8b015 100644 --- a/src/serialization/resources/filestorage/resources/files/types/FilesListRequestExpand.ts +++ b/src/serialization/resources/filestorage/resources/files/types/FilesListRequestExpand.ts @@ -20,7 +20,7 @@ export const FilesListRequestExpand: core.serialization.Schema< ]); export declare namespace FilesListRequestExpand { - type Raw = + export type Raw = | "drive" | "folder" | "folder,drive" diff --git a/src/serialization/resources/filestorage/resources/files/types/FilesRetrieveRequestExpand.ts b/src/serialization/resources/filestorage/resources/files/types/FilesRetrieveRequestExpand.ts index d45ef41c2..0e50ee997 100644 --- a/src/serialization/resources/filestorage/resources/files/types/FilesRetrieveRequestExpand.ts +++ b/src/serialization/resources/filestorage/resources/files/types/FilesRetrieveRequestExpand.ts @@ -20,7 +20,7 @@ export const FilesRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace FilesRetrieveRequestExpand { - type Raw = + export type Raw = | "drive" | "folder" | "folder,drive" 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 2764ec04c..e44c86bf2 100644 --- a/src/serialization/resources/filestorage/resources/folders/client/requests/FileStorageFolderEndpointRequest.ts +++ b/src/serialization/resources/filestorage/resources/folders/client/requests/FileStorageFolderEndpointRequest.ts @@ -15,7 +15,7 @@ export const FileStorageFolderEndpointRequest: core.serialization.Schema< }); export declare namespace FileStorageFolderEndpointRequest { - interface Raw { + export interface 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 86b8276cc..6015dc809 100644 --- a/src/serialization/resources/filestorage/resources/folders/types/FoldersListRequestExpand.ts +++ b/src/serialization/resources/filestorage/resources/folders/types/FoldersListRequestExpand.ts @@ -20,7 +20,7 @@ export const FoldersListRequestExpand: core.serialization.Schema< ]); export declare namespace FoldersListRequestExpand { - type Raw = + export type Raw = | "drive" | "parent_folder" | "parent_folder,drive" diff --git a/src/serialization/resources/filestorage/resources/folders/types/FoldersRetrieveRequestExpand.ts b/src/serialization/resources/filestorage/resources/folders/types/FoldersRetrieveRequestExpand.ts index 96ac310a2..6eb0901ed 100644 --- a/src/serialization/resources/filestorage/resources/folders/types/FoldersRetrieveRequestExpand.ts +++ b/src/serialization/resources/filestorage/resources/folders/types/FoldersRetrieveRequestExpand.ts @@ -20,7 +20,7 @@ export const FoldersRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace FoldersRetrieveRequestExpand { - type Raw = + export type Raw = | "drive" | "parent_folder" | "parent_folder,drive" diff --git a/src/serialization/resources/filestorage/resources/forceResync/client/syncStatusResyncCreate.ts b/src/serialization/resources/filestorage/resources/forceResync/client/syncStatusResyncCreate.ts index e3717d345..f6d509c22 100644 --- a/src/serialization/resources/filestorage/resources/forceResync/client/syncStatusResyncCreate.ts +++ b/src/serialization/resources/filestorage/resources/forceResync/client/syncStatusResyncCreate.ts @@ -13,5 +13,5 @@ export const Response: core.serialization.Schema< > = core.serialization.list(SyncStatus); export declare namespace Response { - type Raw = SyncStatus.Raw[]; + export 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 5f06f2802..2f2947689 100644 --- a/src/serialization/resources/filestorage/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts +++ b/src/serialization/resources/filestorage/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts @@ -14,7 +14,7 @@ export const GenerateRemoteKeyRequest: core.serialization.Schema< }); export declare namespace GenerateRemoteKeyRequest { - interface Raw { + export interface Raw { name: string; } } diff --git a/src/serialization/resources/filestorage/resources/issues/types/IssuesListRequestStatus.ts b/src/serialization/resources/filestorage/resources/issues/types/IssuesListRequestStatus.ts index 27ce68f67..134f96835 100644 --- a/src/serialization/resources/filestorage/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/serialization/resources/filestorage/resources/issues/types/IssuesListRequestStatus.ts @@ -12,5 +12,5 @@ export const IssuesListRequestStatus: core.serialization.Schema< > = core.serialization.enum_(["ONGOING", "RESOLVED"]); export declare namespace IssuesListRequestStatus { - type Raw = "ONGOING" | "RESOLVED"; + export type Raw = "ONGOING" | "RESOLVED"; } 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 408355120..99b8dbe14 100644 --- a/src/serialization/resources/filestorage/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/serialization/resources/filestorage/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -22,32 +22,32 @@ export const EndUserDetailsRequest: core.serialization.Schema< linkExpiryMins: core.serialization.property("link_expiry_mins", core.serialization.number().optional()), shouldCreateMagicLinkUrl: core.serialization.property( "should_create_magic_link_url", - core.serialization.boolean().optional() + core.serialization.boolean().optional(), ), hideAdminMagicLink: core.serialization.property("hide_admin_magic_link", core.serialization.boolean().optional()), commonModels: core.serialization.property( "common_models", - core.serialization.list(CommonModelScopesBodyRequest).optional() + core.serialization.list(CommonModelScopesBodyRequest).optional(), ), categoryCommonModelScopes: core.serialization.property( "category_common_model_scopes", core.serialization .record( core.serialization.string(), - core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional() + core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional(), ) - .optional() + .optional(), ), language: LanguageEnum.optional(), areSyncsDisabled: core.serialization.property("are_syncs_disabled", core.serialization.boolean().optional()), integrationSpecificConfig: core.serialization.property( "integration_specific_config", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace EndUserDetailsRequest { - interface Raw { + export interface Raw { end_user_email_address: string; end_user_organization_name: string; end_user_origin_id: string; diff --git a/src/serialization/resources/filestorage/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/serialization/resources/filestorage/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index ad4ace040..1c2295a87 100644 --- a/src/serialization/resources/filestorage/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/serialization/resources/filestorage/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -12,5 +12,5 @@ export const LinkedAccountsListRequestCategory: core.serialization.Schema< > = core.serialization.enum_(["accounting", "ats", "crm", "filestorage", "hris", "mktg", "ticketing"]); export declare namespace LinkedAccountsListRequestCategory { - type Raw = "accounting" | "ats" | "crm" | "filestorage" | "hris" | "mktg" | "ticketing"; + export type Raw = "accounting" | "ats" | "crm" | "filestorage" | "hris" | "mktg" | "ticketing"; } 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 4b13f06a4..df696e31a 100644 --- a/src/serialization/resources/filestorage/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts +++ b/src/serialization/resources/filestorage/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts @@ -14,7 +14,7 @@ export const RemoteKeyForRegenerationRequest: core.serialization.Schema< }); export declare namespace RemoteKeyForRegenerationRequest { - interface Raw { + export interface Raw { name: string; } } 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 4c48e873b..d800d44df 100644 --- a/src/serialization/resources/filestorage/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/filestorage/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -13,12 +13,12 @@ export const LinkedAccountCommonModelScopeDeserializerRequest: core.serializatio > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list(IndividualCommonModelScopeDeserializerRequest) + core.serialization.list(IndividualCommonModelScopeDeserializerRequest), ), }); export declare namespace LinkedAccountCommonModelScopeDeserializerRequest { - interface Raw { + export interface 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 328a64782..6a4956583 100644 --- a/src/serialization/resources/filestorage/resources/webhookReceivers/client/list.ts +++ b/src/serialization/resources/filestorage/resources/webhookReceivers/client/list.ts @@ -13,5 +13,5 @@ export const Response: core.serialization.Schema< > = core.serialization.list(WebhookReceiver); export declare namespace Response { - type Raw = WebhookReceiver.Raw[]; + export 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 882f99bc5..f36d6e0b6 100644 --- a/src/serialization/resources/filestorage/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts +++ b/src/serialization/resources/filestorage/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts @@ -16,7 +16,7 @@ export const WebhookReceiverRequest: core.serialization.Schema< }); export declare namespace WebhookReceiverRequest { - interface Raw { + export interface Raw { event: string; is_active: boolean; key?: string | null; diff --git a/src/serialization/resources/filestorage/types/AccountDetails.ts b/src/serialization/resources/filestorage/types/AccountDetails.ts index 82cc123a1..77abeee64 100644 --- a/src/serialization/resources/filestorage/types/AccountDetails.ts +++ b/src/serialization/resources/filestorage/types/AccountDetails.ts @@ -18,7 +18,7 @@ export const AccountDetails: core.serialization.ObjectSchema< endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property( "end_user_organization_name", - core.serialization.string().optional() + core.serialization.string().optional(), ), endUserEmailAddress: core.serialization.property("end_user_email_address", core.serialization.string().optional()), status: core.serialization.string().optional(), @@ -29,7 +29,7 @@ export const AccountDetails: core.serialization.ObjectSchema< }); export declare namespace AccountDetails { - interface Raw { + export interface Raw { id?: string | null; integration?: string | null; integration_slug?: string | null; diff --git a/src/serialization/resources/filestorage/types/AccountDetailsAndActions.ts b/src/serialization/resources/filestorage/types/AccountDetailsAndActions.ts index be3342c59..3b71295f5 100644 --- a/src/serialization/resources/filestorage/types/AccountDetailsAndActions.ts +++ b/src/serialization/resources/filestorage/types/AccountDetailsAndActions.ts @@ -29,7 +29,7 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< }); export declare namespace AccountDetailsAndActions { - interface Raw { + export interface Raw { id: string; category?: CategoryEnum.Raw | null; status: AccountDetailsAndActionsStatusEnum.Raw; diff --git a/src/serialization/resources/filestorage/types/AccountDetailsAndActionsIntegration.ts b/src/serialization/resources/filestorage/types/AccountDetailsAndActionsIntegration.ts index 7d5994aa9..18122458a 100644 --- a/src/serialization/resources/filestorage/types/AccountDetailsAndActionsIntegration.ts +++ b/src/serialization/resources/filestorage/types/AccountDetailsAndActionsIntegration.ts @@ -21,12 +21,12 @@ 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(ModelOperation).optional() + core.serialization.list(ModelOperation).optional(), ), }); export declare namespace AccountDetailsAndActionsIntegration { - interface Raw { + export interface Raw { name: string; categories: CategoriesEnum.Raw[]; image?: string | null; diff --git a/src/serialization/resources/filestorage/types/AccountDetailsAndActionsStatusEnum.ts b/src/serialization/resources/filestorage/types/AccountDetailsAndActionsStatusEnum.ts index 5e5e5cb35..e91963844 100644 --- a/src/serialization/resources/filestorage/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/serialization/resources/filestorage/types/AccountDetailsAndActionsStatusEnum.ts @@ -12,5 +12,5 @@ export const AccountDetailsAndActionsStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["COMPLETE", "INCOMPLETE", "RELINK_NEEDED", "IDLE"]); export declare namespace AccountDetailsAndActionsStatusEnum { - type Raw = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; + export type Raw = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; } diff --git a/src/serialization/resources/filestorage/types/AccountIntegration.ts b/src/serialization/resources/filestorage/types/AccountIntegration.ts index d23166d0f..b14753aca 100644 --- a/src/serialization/resources/filestorage/types/AccountIntegration.ts +++ b/src/serialization/resources/filestorage/types/AccountIntegration.ts @@ -20,20 +20,20 @@ export const AccountIntegration: core.serialization.ObjectSchema< slug: core.serialization.string().optional(), apiEndpointsToDocumentationUrls: core.serialization.property( "api_endpoints_to_documentation_urls", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), webhookSetupGuideUrl: core.serialization.property( "webhook_setup_guide_url", - core.serialization.string().optional() + core.serialization.string().optional(), ), categoryBetaStatus: core.serialization.property( "category_beta_status", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace AccountIntegration { - interface Raw { + export interface Raw { name: string; abbreviated_name?: string | null; categories?: CategoriesEnum.Raw[] | null; diff --git a/src/serialization/resources/filestorage/types/AccountToken.ts b/src/serialization/resources/filestorage/types/AccountToken.ts index 48b56cf35..184017d81 100644 --- a/src/serialization/resources/filestorage/types/AccountToken.ts +++ b/src/serialization/resources/filestorage/types/AccountToken.ts @@ -17,7 +17,7 @@ export const AccountToken: core.serialization.ObjectSchema< }); export declare namespace AccountToken { - interface Raw { + export interface Raw { account_token: string; integration: AccountIntegration.Raw; id: string; diff --git a/src/serialization/resources/filestorage/types/AdvancedMetadata.ts b/src/serialization/resources/filestorage/types/AdvancedMetadata.ts index 6e0b444bc..464775365 100644 --- a/src/serialization/resources/filestorage/types/AdvancedMetadata.ts +++ b/src/serialization/resources/filestorage/types/AdvancedMetadata.ts @@ -17,12 +17,12 @@ export const AdvancedMetadata: core.serialization.ObjectSchema< isCustom: core.serialization.property("is_custom", core.serialization.boolean().optional()), fieldChoices: core.serialization.property( "field_choices", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace AdvancedMetadata { - interface Raw { + export interface Raw { id: string; display_name?: string | null; description?: string | null; diff --git a/src/serialization/resources/filestorage/types/AsyncPassthroughReciept.ts b/src/serialization/resources/filestorage/types/AsyncPassthroughReciept.ts index 5fa364cdb..3ce1e68dc 100644 --- a/src/serialization/resources/filestorage/types/AsyncPassthroughReciept.ts +++ b/src/serialization/resources/filestorage/types/AsyncPassthroughReciept.ts @@ -14,7 +14,7 @@ export const AsyncPassthroughReciept: core.serialization.ObjectSchema< }); export declare namespace AsyncPassthroughReciept { - interface Raw { + export interface Raw { async_passthrough_receipt_id: string; } } diff --git a/src/serialization/resources/filestorage/types/AuditLogEvent.ts b/src/serialization/resources/filestorage/types/AuditLogEvent.ts index 31bcc754f..195239f6f 100644 --- a/src/serialization/resources/filestorage/types/AuditLogEvent.ts +++ b/src/serialization/resources/filestorage/types/AuditLogEvent.ts @@ -23,7 +23,7 @@ export const AuditLogEvent: core.serialization.ObjectSchema< }); export declare namespace AuditLogEvent { - interface Raw { + export interface Raw { id?: string | null; user_name?: string | null; user_email?: string | null; diff --git a/src/serialization/resources/filestorage/types/AuditLogEventEventType.ts b/src/serialization/resources/filestorage/types/AuditLogEventEventType.ts index 86b8953bc..cd8dcfd3b 100644 --- a/src/serialization/resources/filestorage/types/AuditLogEventEventType.ts +++ b/src/serialization/resources/filestorage/types/AuditLogEventEventType.ts @@ -13,5 +13,5 @@ export const AuditLogEventEventType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([EventTypeEnum, core.serialization.string()]); export declare namespace AuditLogEventEventType { - type Raw = EventTypeEnum.Raw | string; + export type Raw = EventTypeEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/AuditLogEventRole.ts b/src/serialization/resources/filestorage/types/AuditLogEventRole.ts index e71fc8a6f..5c9178ee5 100644 --- a/src/serialization/resources/filestorage/types/AuditLogEventRole.ts +++ b/src/serialization/resources/filestorage/types/AuditLogEventRole.ts @@ -13,5 +13,5 @@ export const AuditLogEventRole: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([RoleEnum, core.serialization.string()]); export declare namespace AuditLogEventRole { - type Raw = RoleEnum.Raw | string; + export type Raw = RoleEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/AvailableActions.ts b/src/serialization/resources/filestorage/types/AvailableActions.ts index ec4f45611..17cae0441 100644 --- a/src/serialization/resources/filestorage/types/AvailableActions.ts +++ b/src/serialization/resources/filestorage/types/AvailableActions.ts @@ -16,12 +16,12 @@ export const AvailableActions: core.serialization.ObjectSchema< passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization.list(ModelOperation).optional() + core.serialization.list(ModelOperation).optional(), ), }); export declare namespace AvailableActions { - interface Raw { + export interface Raw { integration: AccountIntegration.Raw; passthrough_available: boolean; 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 60bbbee04..b30afd70e 100644 --- a/src/serialization/resources/filestorage/types/CategoriesEnum.ts +++ b/src/serialization/resources/filestorage/types/CategoriesEnum.ts @@ -12,5 +12,5 @@ export const CategoriesEnum: core.serialization.Schema< > = core.serialization.enum_(["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"]); export declare namespace CategoriesEnum { - type Raw = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; + export type Raw = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; } diff --git a/src/serialization/resources/filestorage/types/CategoryEnum.ts b/src/serialization/resources/filestorage/types/CategoryEnum.ts index 99227afe1..a796d3e27 100644 --- a/src/serialization/resources/filestorage/types/CategoryEnum.ts +++ b/src/serialization/resources/filestorage/types/CategoryEnum.ts @@ -12,5 +12,5 @@ export const CategoryEnum: core.serialization.Schema< > = core.serialization.enum_(["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"]); export declare namespace CategoryEnum { - type Raw = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; + export type Raw = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; } diff --git a/src/serialization/resources/filestorage/types/CommonModelScopeApi.ts b/src/serialization/resources/filestorage/types/CommonModelScopeApi.ts index 83ff6b923..2e956d7de 100644 --- a/src/serialization/resources/filestorage/types/CommonModelScopeApi.ts +++ b/src/serialization/resources/filestorage/types/CommonModelScopeApi.ts @@ -13,12 +13,12 @@ export const CommonModelScopeApi: core.serialization.ObjectSchema< > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list(IndividualCommonModelScopeDeserializer) + core.serialization.list(IndividualCommonModelScopeDeserializer), ), }); export declare namespace CommonModelScopeApi { - interface Raw { + export interface Raw { common_models: IndividualCommonModelScopeDeserializer.Raw[]; } } diff --git a/src/serialization/resources/filestorage/types/CommonModelScopesBodyRequest.ts b/src/serialization/resources/filestorage/types/CommonModelScopesBodyRequest.ts index 85fb96d59..596f338ee 100644 --- a/src/serialization/resources/filestorage/types/CommonModelScopesBodyRequest.ts +++ b/src/serialization/resources/filestorage/types/CommonModelScopesBodyRequest.ts @@ -15,12 +15,12 @@ export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< enabledActions: core.serialization.property("enabled_actions", core.serialization.list(EnabledActionsEnum)), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.string()) + core.serialization.list(core.serialization.string()), ), }); export declare namespace CommonModelScopesBodyRequest { - interface Raw { + export interface Raw { model_id: string; 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 8f13493ef..13391f2d2 100644 --- a/src/serialization/resources/filestorage/types/DataPassthroughRequest.ts +++ b/src/serialization/resources/filestorage/types/DataPassthroughRequest.ts @@ -19,7 +19,7 @@ export const DataPassthroughRequest: core.serialization.ObjectSchema< data: core.serialization.string().optional(), multipartFormData: core.serialization.property( "multipart_form_data", - core.serialization.list(MultipartFormFieldRequest).optional() + core.serialization.list(MultipartFormFieldRequest).optional(), ), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), requestFormat: core.serialization.property("request_format", RequestFormatEnum.optional()), @@ -27,7 +27,7 @@ export const DataPassthroughRequest: core.serialization.ObjectSchema< }); export declare namespace DataPassthroughRequest { - interface Raw { + export interface Raw { method: MethodEnum.Raw; path: string; base_url_override?: string | null; diff --git a/src/serialization/resources/filestorage/types/DebugModeLog.ts b/src/serialization/resources/filestorage/types/DebugModeLog.ts index 56a15acdf..57f3304b0 100644 --- a/src/serialization/resources/filestorage/types/DebugModeLog.ts +++ b/src/serialization/resources/filestorage/types/DebugModeLog.ts @@ -17,7 +17,7 @@ export const DebugModeLog: core.serialization.ObjectSchema< }); export declare namespace DebugModeLog { - interface Raw { + export interface Raw { log_id: string; dashboard_view: string; log_summary: DebugModelLogSummary.Raw; diff --git a/src/serialization/resources/filestorage/types/DebugModelLogSummary.ts b/src/serialization/resources/filestorage/types/DebugModelLogSummary.ts index c3be09275..30bba0f12 100644 --- a/src/serialization/resources/filestorage/types/DebugModelLogSummary.ts +++ b/src/serialization/resources/filestorage/types/DebugModelLogSummary.ts @@ -16,7 +16,7 @@ export const DebugModelLogSummary: core.serialization.ObjectSchema< }); export declare namespace DebugModelLogSummary { - interface Raw { + export interface Raw { url: string; method: string; status_code: number; diff --git a/src/serialization/resources/filestorage/types/DownloadRequestMeta.ts b/src/serialization/resources/filestorage/types/DownloadRequestMeta.ts index 4a4fdecb4..27d79c1e0 100644 --- a/src/serialization/resources/filestorage/types/DownloadRequestMeta.ts +++ b/src/serialization/resources/filestorage/types/DownloadRequestMeta.ts @@ -18,7 +18,7 @@ export const DownloadRequestMeta: core.serialization.ObjectSchema< }); export declare namespace DownloadRequestMeta { - interface Raw { + export interface Raw { id: string; url: string; method: string; diff --git a/src/serialization/resources/filestorage/types/Drive.ts b/src/serialization/resources/filestorage/types/Drive.ts index 31e6ef5bc..36a7632ad 100644 --- a/src/serialization/resources/filestorage/types/Drive.ts +++ b/src/serialization/resources/filestorage/types/Drive.ts @@ -19,13 +19,13 @@ export const Drive: core.serialization.ObjectSchema = core.serialization.enum_(["READ", "WRITE"]); export declare namespace EnabledActionsEnum { - type Raw = "READ" | "WRITE"; + export type Raw = "READ" | "WRITE"; } diff --git a/src/serialization/resources/filestorage/types/EncodingEnum.ts b/src/serialization/resources/filestorage/types/EncodingEnum.ts index b401f4139..16b2c6ac2 100644 --- a/src/serialization/resources/filestorage/types/EncodingEnum.ts +++ b/src/serialization/resources/filestorage/types/EncodingEnum.ts @@ -12,5 +12,5 @@ export const EncodingEnum: core.serialization.Schema< > = core.serialization.enum_(["RAW", "BASE64", "GZIP_BASE64"]); export declare namespace EncodingEnum { - type Raw = "RAW" | "BASE64" | "GZIP_BASE64"; + export type Raw = "RAW" | "BASE64" | "GZIP_BASE64"; } diff --git a/src/serialization/resources/filestorage/types/ErrorValidationProblem.ts b/src/serialization/resources/filestorage/types/ErrorValidationProblem.ts index d6dc435cc..9cf22cb6c 100644 --- a/src/serialization/resources/filestorage/types/ErrorValidationProblem.ts +++ b/src/serialization/resources/filestorage/types/ErrorValidationProblem.ts @@ -18,7 +18,7 @@ export const ErrorValidationProblem: core.serialization.ObjectSchema< }); export declare namespace ErrorValidationProblem { - interface Raw { + export interface Raw { source?: ValidationProblemSource.Raw | null; title: string; detail: string; diff --git a/src/serialization/resources/filestorage/types/EventTypeEnum.ts b/src/serialization/resources/filestorage/types/EventTypeEnum.ts index 8f16d25a7..09509522d 100644 --- a/src/serialization/resources/filestorage/types/EventTypeEnum.ts +++ b/src/serialization/resources/filestorage/types/EventTypeEnum.ts @@ -55,7 +55,7 @@ export const EventTypeEnum: core.serialization.Schema< ]); export declare namespace EventTypeEnum { - type Raw = + export type Raw = | "CREATED_REMOTE_PRODUCTION_API_KEY" | "DELETED_REMOTE_PRODUCTION_API_KEY" | "CREATED_TEST_API_KEY" diff --git a/src/serialization/resources/filestorage/types/ExternalTargetFieldApi.ts b/src/serialization/resources/filestorage/types/ExternalTargetFieldApi.ts index f301c61e8..461db51bc 100644 --- a/src/serialization/resources/filestorage/types/ExternalTargetFieldApi.ts +++ b/src/serialization/resources/filestorage/types/ExternalTargetFieldApi.ts @@ -16,7 +16,7 @@ export const ExternalTargetFieldApi: core.serialization.ObjectSchema< }); export declare namespace ExternalTargetFieldApi { - interface Raw { + export interface Raw { name?: string | null; description?: string | null; is_mapped?: string | null; diff --git a/src/serialization/resources/filestorage/types/ExternalTargetFieldApiResponse.ts b/src/serialization/resources/filestorage/types/ExternalTargetFieldApiResponse.ts index 84791b52f..fd5dc9fd4 100644 --- a/src/serialization/resources/filestorage/types/ExternalTargetFieldApiResponse.ts +++ b/src/serialization/resources/filestorage/types/ExternalTargetFieldApiResponse.ts @@ -19,7 +19,7 @@ export const ExternalTargetFieldApiResponse: core.serialization.ObjectSchema< }); export declare namespace ExternalTargetFieldApiResponse { - interface Raw { + export interface Raw { File?: ExternalTargetFieldApi.Raw[] | null; Folder?: ExternalTargetFieldApi.Raw[] | null; Drive?: ExternalTargetFieldApi.Raw[] | null; diff --git a/src/serialization/resources/filestorage/types/FieldMappingApiInstance.ts b/src/serialization/resources/filestorage/types/FieldMappingApiInstance.ts index 3d07e5c9b..e58053a27 100644 --- a/src/serialization/resources/filestorage/types/FieldMappingApiInstance.ts +++ b/src/serialization/resources/filestorage/types/FieldMappingApiInstance.ts @@ -19,7 +19,7 @@ export const FieldMappingApiInstance: core.serialization.ObjectSchema< }); export declare namespace FieldMappingApiInstance { - interface Raw { + export interface Raw { id?: string | null; is_integration_wide?: boolean | null; target_field?: FieldMappingApiInstanceTargetField.Raw | null; diff --git a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteField.ts b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteField.ts index ca3861c70..199eb3fb9 100644 --- a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteField.ts @@ -15,12 +15,12 @@ export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), remoteEndpointInfo: core.serialization.property( "remote_endpoint_info", - FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo, ), }); export declare namespace FieldMappingApiInstanceRemoteField { - interface Raw { + export interface Raw { remote_key_name?: string | null; schema?: Record | null; remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; diff --git a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts index d0635d08f..5d0b87ca3 100644 --- a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts +++ b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts @@ -14,12 +14,12 @@ export const FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: core.serializ urlPath: core.serialization.property("url_path", core.serialization.string().optional()), fieldTraversalPath: core.serialization.property( "field_traversal_path", - core.serialization.list(core.serialization.string()).optional() + core.serialization.list(core.serialization.string()).optional(), ), }); export declare namespace FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { - interface Raw { + export interface Raw { method?: string | null; url_path?: string | null; field_traversal_path?: string[] | null; diff --git a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceResponse.ts b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceResponse.ts index eb4299146..a89b12bc9 100644 --- a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceResponse.ts +++ b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceResponse.ts @@ -19,7 +19,7 @@ export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< }); export declare namespace FieldMappingApiInstanceResponse { - interface Raw { + export interface Raw { File?: FieldMappingApiInstance.Raw[] | null; Folder?: FieldMappingApiInstance.Raw[] | null; Drive?: FieldMappingApiInstance.Raw[] | null; diff --git a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceTargetField.ts b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceTargetField.ts index 648d533b1..1a171429c 100644 --- a/src/serialization/resources/filestorage/types/FieldMappingApiInstanceTargetField.ts +++ b/src/serialization/resources/filestorage/types/FieldMappingApiInstanceTargetField.ts @@ -16,7 +16,7 @@ export const FieldMappingApiInstanceTargetField: core.serialization.ObjectSchema }); export declare namespace FieldMappingApiInstanceTargetField { - interface Raw { + export interface Raw { name: string; description: string; is_organization_wide: boolean; diff --git a/src/serialization/resources/filestorage/types/FieldMappingInstanceResponse.ts b/src/serialization/resources/filestorage/types/FieldMappingInstanceResponse.ts index fcba5e6c8..41d1583c5 100644 --- a/src/serialization/resources/filestorage/types/FieldMappingInstanceResponse.ts +++ b/src/serialization/resources/filestorage/types/FieldMappingInstanceResponse.ts @@ -21,7 +21,7 @@ export const FieldMappingInstanceResponse: core.serialization.ObjectSchema< }); export declare namespace FieldMappingInstanceResponse { - interface Raw { + export interface Raw { model: FieldMappingApiInstance.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/filestorage/types/FieldPermissionDeserializer.ts b/src/serialization/resources/filestorage/types/FieldPermissionDeserializer.ts index fcb0d1e07..391b5adcc 100644 --- a/src/serialization/resources/filestorage/types/FieldPermissionDeserializer.ts +++ b/src/serialization/resources/filestorage/types/FieldPermissionDeserializer.ts @@ -12,16 +12,16 @@ export const FieldPermissionDeserializer: core.serialization.ObjectSchema< > = core.serialization.object({ enabledFields: core.serialization.property( "enabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace FieldPermissionDeserializer { - interface Raw { + export interface Raw { enabled_fields?: unknown[] | null; disabled_fields?: unknown[] | null; } diff --git a/src/serialization/resources/filestorage/types/FieldPermissionDeserializerRequest.ts b/src/serialization/resources/filestorage/types/FieldPermissionDeserializerRequest.ts index b36deccb1..838eb23ff 100644 --- a/src/serialization/resources/filestorage/types/FieldPermissionDeserializerRequest.ts +++ b/src/serialization/resources/filestorage/types/FieldPermissionDeserializerRequest.ts @@ -12,16 +12,16 @@ export const FieldPermissionDeserializerRequest: core.serialization.ObjectSchema > = core.serialization.object({ enabledFields: core.serialization.property( "enabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace FieldPermissionDeserializerRequest { - interface Raw { + export interface Raw { enabled_fields?: unknown[] | null; disabled_fields?: unknown[] | null; } diff --git a/src/serialization/resources/filestorage/types/FileDrive.ts b/src/serialization/resources/filestorage/types/FileDrive.ts index e902f610d..23a8d28db 100644 --- a/src/serialization/resources/filestorage/types/FileDrive.ts +++ b/src/serialization/resources/filestorage/types/FileDrive.ts @@ -11,5 +11,5 @@ export const FileDrive: core.serialization.Schema = core.serialization.undiscriminatedUnion([ core.serialization.string(), - PermissionRequest, + Permission, core.serialization.list(FilePermissionsItem), ]); export declare namespace FilePermissions { - type Raw = string | PermissionRequest.Raw | FilePermissionsItem.Raw[]; + export type Raw = string | Permission.Raw | FilePermissionsItem.Raw[]; } diff --git a/src/serialization/resources/filestorage/types/FilePermissionsItem.ts b/src/serialization/resources/filestorage/types/FilePermissionsItem.ts index f32322f8d..7f70cc817 100644 --- a/src/serialization/resources/filestorage/types/FilePermissionsItem.ts +++ b/src/serialization/resources/filestorage/types/FilePermissionsItem.ts @@ -5,13 +5,13 @@ import * as serializers from "../../../index"; import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; -import { PermissionRequest } from "./PermissionRequest"; +import { Permission } from "./Permission"; export const FilePermissionsItem: core.serialization.Schema< serializers.filestorage.FilePermissionsItem.Raw, Merge.filestorage.FilePermissionsItem -> = core.serialization.undiscriminatedUnion([core.serialization.string(), PermissionRequest]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Permission]); export declare namespace FilePermissionsItem { - type Raw = string | PermissionRequest.Raw; + export type Raw = string | Permission.Raw; } diff --git a/src/serialization/resources/filestorage/types/FileRequest.ts b/src/serialization/resources/filestorage/types/FileRequest.ts index 89c80d1df..f0ceb4590 100644 --- a/src/serialization/resources/filestorage/types/FileRequest.ts +++ b/src/serialization/resources/filestorage/types/FileRequest.ts @@ -24,16 +24,16 @@ export const FileRequest: core.serialization.ObjectSchema< drive: FileRequestDrive.optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace FileRequest { - interface Raw { + export interface Raw { name?: string | null; file_url?: string | null; file_thumbnail_url?: string | null; diff --git a/src/serialization/resources/filestorage/types/FileRequestDrive.ts b/src/serialization/resources/filestorage/types/FileRequestDrive.ts index 6117c7a2c..df24eecaa 100644 --- a/src/serialization/resources/filestorage/types/FileRequestDrive.ts +++ b/src/serialization/resources/filestorage/types/FileRequestDrive.ts @@ -13,5 +13,5 @@ export const FileRequestDrive: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Drive]); export declare namespace FileRequestDrive { - type Raw = string | Drive.Raw; + export type Raw = string | Drive.Raw; } diff --git a/src/serialization/resources/filestorage/types/FileRequestFolder.ts b/src/serialization/resources/filestorage/types/FileRequestFolder.ts index c39084214..31cf6c982 100644 --- a/src/serialization/resources/filestorage/types/FileRequestFolder.ts +++ b/src/serialization/resources/filestorage/types/FileRequestFolder.ts @@ -15,5 +15,5 @@ export const FileRequestFolder: core.serialization.Schema< ]); export declare namespace FileRequestFolder { - type Raw = string | serializers.filestorage.Folder.Raw; + export type Raw = string | serializers.filestorage.Folder.Raw; } diff --git a/src/serialization/resources/filestorage/types/FileRequestPermissions.ts b/src/serialization/resources/filestorage/types/FileRequestPermissions.ts index 0d0b9cfd6..4686a10cd 100644 --- a/src/serialization/resources/filestorage/types/FileRequestPermissions.ts +++ b/src/serialization/resources/filestorage/types/FileRequestPermissions.ts @@ -18,5 +18,5 @@ export const FileRequestPermissions: core.serialization.Schema< ]); export declare namespace FileRequestPermissions { - type Raw = string | PermissionRequest.Raw | FileRequestPermissionsItem.Raw[]; + export 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 f935ef6ca..058cdf8a4 100644 --- a/src/serialization/resources/filestorage/types/FileRequestPermissionsItem.ts +++ b/src/serialization/resources/filestorage/types/FileRequestPermissionsItem.ts @@ -13,5 +13,5 @@ export const FileRequestPermissionsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PermissionRequest]); export declare namespace FileRequestPermissionsItem { - type Raw = string | PermissionRequest.Raw; + export type Raw = string | PermissionRequest.Raw; } diff --git a/src/serialization/resources/filestorage/types/FileStorageFileResponse.ts b/src/serialization/resources/filestorage/types/FileStorageFileResponse.ts index 383076f71..bbc89c1b6 100644 --- a/src/serialization/resources/filestorage/types/FileStorageFileResponse.ts +++ b/src/serialization/resources/filestorage/types/FileStorageFileResponse.ts @@ -21,7 +21,7 @@ export const FileStorageFileResponse: core.serialization.ObjectSchema< }); export declare namespace FileStorageFileResponse { - interface Raw { + export interface Raw { model: File_.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/filestorage/types/FileStorageFolderResponse.ts b/src/serialization/resources/filestorage/types/FileStorageFolderResponse.ts index 6e8ec8ebf..c3444cfda 100644 --- a/src/serialization/resources/filestorage/types/FileStorageFolderResponse.ts +++ b/src/serialization/resources/filestorage/types/FileStorageFolderResponse.ts @@ -20,7 +20,7 @@ export const FileStorageFolderResponse: core.serialization.ObjectSchema< }); export declare namespace FileStorageFolderResponse { - interface Raw { + export interface Raw { model: serializers.filestorage.Folder.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/filestorage/types/File_.ts b/src/serialization/resources/filestorage/types/File_.ts index 0bb990094..e22a0b7c4 100644 --- a/src/serialization/resources/filestorage/types/File_.ts +++ b/src/serialization/resources/filestorage/types/File_.ts @@ -30,13 +30,13 @@ export const File_: core.serialization.ObjectSchema serializers.filestorage.FolderParentFolder).optional() + core.serialization.lazy(() => serializers.filestorage.FolderParentFolder).optional(), ), drive: FolderDrive.optional(), permissions: FolderPermissions.optional(), @@ -30,13 +30,13 @@ export const Folder: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Drive]); export declare namespace FolderDrive { - type Raw = string | Drive.Raw; + export type Raw = string | Drive.Raw; } diff --git a/src/serialization/resources/filestorage/types/FolderParentFolder.ts b/src/serialization/resources/filestorage/types/FolderParentFolder.ts index 8a6f557c4..c9b6f8fe5 100644 --- a/src/serialization/resources/filestorage/types/FolderParentFolder.ts +++ b/src/serialization/resources/filestorage/types/FolderParentFolder.ts @@ -15,5 +15,5 @@ export const FolderParentFolder: core.serialization.Schema< ]); export declare namespace FolderParentFolder { - type Raw = string | serializers.filestorage.Folder.Raw; + export type Raw = string | serializers.filestorage.Folder.Raw; } diff --git a/src/serialization/resources/filestorage/types/FolderPermissions.ts b/src/serialization/resources/filestorage/types/FolderPermissions.ts index c26aedf3b..45256fa11 100644 --- a/src/serialization/resources/filestorage/types/FolderPermissions.ts +++ b/src/serialization/resources/filestorage/types/FolderPermissions.ts @@ -5,7 +5,7 @@ import * as serializers from "../../../index"; import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; -import { PermissionRequest } from "./PermissionRequest"; +import { Permission } from "./Permission"; import { FolderPermissionsItem } from "./FolderPermissionsItem"; export const FolderPermissions: core.serialization.Schema< @@ -13,10 +13,10 @@ export const FolderPermissions: core.serialization.Schema< Merge.filestorage.FolderPermissions > = core.serialization.undiscriminatedUnion([ core.serialization.string(), - PermissionRequest, + Permission, core.serialization.list(FolderPermissionsItem), ]); export declare namespace FolderPermissions { - type Raw = string | PermissionRequest.Raw | FolderPermissionsItem.Raw[]; + export type Raw = string | Permission.Raw | FolderPermissionsItem.Raw[]; } diff --git a/src/serialization/resources/filestorage/types/FolderPermissionsItem.ts b/src/serialization/resources/filestorage/types/FolderPermissionsItem.ts index 342879dfe..4e6b2a53b 100644 --- a/src/serialization/resources/filestorage/types/FolderPermissionsItem.ts +++ b/src/serialization/resources/filestorage/types/FolderPermissionsItem.ts @@ -5,13 +5,13 @@ import * as serializers from "../../../index"; import * as Merge from "../../../../api/index"; import * as core from "../../../../core"; -import { PermissionRequest } from "./PermissionRequest"; +import { Permission } from "./Permission"; export const FolderPermissionsItem: core.serialization.Schema< serializers.filestorage.FolderPermissionsItem.Raw, Merge.filestorage.FolderPermissionsItem -> = core.serialization.undiscriminatedUnion([core.serialization.string(), PermissionRequest]); +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Permission]); export declare namespace FolderPermissionsItem { - type Raw = string | PermissionRequest.Raw; + export type Raw = string | Permission.Raw; } diff --git a/src/serialization/resources/filestorage/types/FolderRequest.ts b/src/serialization/resources/filestorage/types/FolderRequest.ts index da2a41e00..9d09ce1b5 100644 --- a/src/serialization/resources/filestorage/types/FolderRequest.ts +++ b/src/serialization/resources/filestorage/types/FolderRequest.ts @@ -22,16 +22,16 @@ export const FolderRequest: core.serialization.ObjectSchema< permissions: FolderRequestPermissions.optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace FolderRequest { - interface Raw { + export interface Raw { name?: string | null; folder_url?: string | null; size?: number | null; diff --git a/src/serialization/resources/filestorage/types/FolderRequestDrive.ts b/src/serialization/resources/filestorage/types/FolderRequestDrive.ts index 513d354dd..39fcd6806 100644 --- a/src/serialization/resources/filestorage/types/FolderRequestDrive.ts +++ b/src/serialization/resources/filestorage/types/FolderRequestDrive.ts @@ -13,5 +13,5 @@ export const FolderRequestDrive: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Drive]); export declare namespace FolderRequestDrive { - type Raw = string | Drive.Raw; + export type Raw = string | Drive.Raw; } diff --git a/src/serialization/resources/filestorage/types/FolderRequestParentFolder.ts b/src/serialization/resources/filestorage/types/FolderRequestParentFolder.ts index 142ff7546..73db96c2d 100644 --- a/src/serialization/resources/filestorage/types/FolderRequestParentFolder.ts +++ b/src/serialization/resources/filestorage/types/FolderRequestParentFolder.ts @@ -15,5 +15,5 @@ export const FolderRequestParentFolder: core.serialization.Schema< ]); export declare namespace FolderRequestParentFolder { - type Raw = string | serializers.filestorage.Folder.Raw; + export type Raw = string | serializers.filestorage.Folder.Raw; } diff --git a/src/serialization/resources/filestorage/types/FolderRequestPermissions.ts b/src/serialization/resources/filestorage/types/FolderRequestPermissions.ts index 24d1415fb..d483330e0 100644 --- a/src/serialization/resources/filestorage/types/FolderRequestPermissions.ts +++ b/src/serialization/resources/filestorage/types/FolderRequestPermissions.ts @@ -18,5 +18,5 @@ export const FolderRequestPermissions: core.serialization.Schema< ]); export declare namespace FolderRequestPermissions { - type Raw = string | PermissionRequest.Raw | FolderRequestPermissionsItem.Raw[]; + export 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 661b043db..b47c35bd5 100644 --- a/src/serialization/resources/filestorage/types/FolderRequestPermissionsItem.ts +++ b/src/serialization/resources/filestorage/types/FolderRequestPermissionsItem.ts @@ -13,5 +13,5 @@ export const FolderRequestPermissionsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PermissionRequest]); export declare namespace FolderRequestPermissionsItem { - type Raw = string | PermissionRequest.Raw; + export type Raw = string | PermissionRequest.Raw; } diff --git a/src/serialization/resources/filestorage/types/Group.ts b/src/serialization/resources/filestorage/types/Group.ts index e7fc9d1ab..1a148a4ba 100644 --- a/src/serialization/resources/filestorage/types/Group.ts +++ b/src/serialization/resources/filestorage/types/Group.ts @@ -19,18 +19,18 @@ export const Group: core.serialization.ObjectSchema serializers.filestorage.GroupChildGroupsItem)) - .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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Group { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/filestorage/types/GroupChildGroupsItem.ts b/src/serialization/resources/filestorage/types/GroupChildGroupsItem.ts index b85281f9f..aa96441af 100644 --- a/src/serialization/resources/filestorage/types/GroupChildGroupsItem.ts +++ b/src/serialization/resources/filestorage/types/GroupChildGroupsItem.ts @@ -15,5 +15,5 @@ export const GroupChildGroupsItem: core.serialization.Schema< ]); export declare namespace GroupChildGroupsItem { - type Raw = string | serializers.filestorage.Group.Raw; + export type Raw = string | serializers.filestorage.Group.Raw; } diff --git a/src/serialization/resources/filestorage/types/IndividualCommonModelScopeDeserializer.ts b/src/serialization/resources/filestorage/types/IndividualCommonModelScopeDeserializer.ts index 701dc15c6..190d3be2d 100644 --- a/src/serialization/resources/filestorage/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/serialization/resources/filestorage/types/IndividualCommonModelScopeDeserializer.ts @@ -15,13 +15,13 @@ 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(), ModelPermissionDeserializer).optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializer).optional(), ), fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializer.optional()), }); export declare namespace IndividualCommonModelScopeDeserializer { - interface Raw { + export interface Raw { model_name: string; 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 aa9c1ca2c..ee84b6121 100644 --- a/src/serialization/resources/filestorage/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/filestorage/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -15,13 +15,13 @@ 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(), ModelPermissionDeserializerRequest).optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializerRequest).optional(), ), fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializerRequest.optional()), }); export declare namespace IndividualCommonModelScopeDeserializerRequest { - interface Raw { + export interface Raw { model_name: string; 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 e49653407..e54d39dde 100644 --- a/src/serialization/resources/filestorage/types/Issue.ts +++ b/src/serialization/resources/filestorage/types/Issue.ts @@ -14,19 +14,19 @@ export const Issue: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([IssueStatusEnum, core.serialization.string()]); export declare namespace IssueStatus { - type Raw = IssueStatusEnum.Raw | string; + export type Raw = IssueStatusEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/IssueStatusEnum.ts b/src/serialization/resources/filestorage/types/IssueStatusEnum.ts index c326663c4..73f2fccf5 100644 --- a/src/serialization/resources/filestorage/types/IssueStatusEnum.ts +++ b/src/serialization/resources/filestorage/types/IssueStatusEnum.ts @@ -12,5 +12,5 @@ export const IssueStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["ONGOING", "RESOLVED"]); export declare namespace IssueStatusEnum { - type Raw = "ONGOING" | "RESOLVED"; + export type Raw = "ONGOING" | "RESOLVED"; } diff --git a/src/serialization/resources/filestorage/types/LanguageEnum.ts b/src/serialization/resources/filestorage/types/LanguageEnum.ts index 936480a16..c51af9739 100644 --- a/src/serialization/resources/filestorage/types/LanguageEnum.ts +++ b/src/serialization/resources/filestorage/types/LanguageEnum.ts @@ -12,5 +12,5 @@ export const LanguageEnum: core.serialization.Schema< > = core.serialization.enum_(["en", "de"]); export declare namespace LanguageEnum { - type Raw = "en" | "de"; + export type Raw = "en" | "de"; } diff --git a/src/serialization/resources/filestorage/types/LastSyncResultEnum.ts b/src/serialization/resources/filestorage/types/LastSyncResultEnum.ts index 6cb7f0b37..501487b60 100644 --- a/src/serialization/resources/filestorage/types/LastSyncResultEnum.ts +++ b/src/serialization/resources/filestorage/types/LastSyncResultEnum.ts @@ -12,5 +12,5 @@ export const LastSyncResultEnum: core.serialization.Schema< > = core.serialization.enum_(["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"]); export declare namespace LastSyncResultEnum { - type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; + export type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; } diff --git a/src/serialization/resources/filestorage/types/LinkToken.ts b/src/serialization/resources/filestorage/types/LinkToken.ts index c0bb55865..7bdc345ab 100644 --- a/src/serialization/resources/filestorage/types/LinkToken.ts +++ b/src/serialization/resources/filestorage/types/LinkToken.ts @@ -16,7 +16,7 @@ export const LinkToken: core.serialization.ObjectSchema< }); export declare namespace LinkToken { - interface Raw { + export interface Raw { link_token: string; integration_name?: string | null; magic_link_url?: string | null; diff --git a/src/serialization/resources/filestorage/types/LinkedAccountStatus.ts b/src/serialization/resources/filestorage/types/LinkedAccountStatus.ts index b2031c033..96186d11a 100644 --- a/src/serialization/resources/filestorage/types/LinkedAccountStatus.ts +++ b/src/serialization/resources/filestorage/types/LinkedAccountStatus.ts @@ -15,7 +15,7 @@ export const LinkedAccountStatus: core.serialization.ObjectSchema< }); export declare namespace LinkedAccountStatus { - interface Raw { + export interface Raw { linked_account_status: string; can_make_request: boolean; } diff --git a/src/serialization/resources/filestorage/types/MetaResponse.ts b/src/serialization/resources/filestorage/types/MetaResponse.ts index 8d0ad9583..f167239c2 100644 --- a/src/serialization/resources/filestorage/types/MetaResponse.ts +++ b/src/serialization/resources/filestorage/types/MetaResponse.ts @@ -13,22 +13,22 @@ export const MetaResponse: core.serialization.ObjectSchema< > = core.serialization.object({ requestSchema: core.serialization.property( "request_schema", - core.serialization.record(core.serialization.string(), core.serialization.unknown()) + core.serialization.record(core.serialization.string(), core.serialization.unknown()), ), remoteFieldClasses: core.serialization.property( "remote_field_classes", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), status: LinkedAccountStatus.optional(), hasConditionalParams: core.serialization.property("has_conditional_params", core.serialization.boolean()), hasRequiredLinkedAccountParams: core.serialization.property( "has_required_linked_account_params", - core.serialization.boolean() + core.serialization.boolean(), ), }); export declare namespace MetaResponse { - interface Raw { + export interface Raw { request_schema: Record; remote_field_classes?: Record | null; status?: LinkedAccountStatus.Raw | null; diff --git a/src/serialization/resources/filestorage/types/MethodEnum.ts b/src/serialization/resources/filestorage/types/MethodEnum.ts index 3515d6c42..eafc14822 100644 --- a/src/serialization/resources/filestorage/types/MethodEnum.ts +++ b/src/serialization/resources/filestorage/types/MethodEnum.ts @@ -12,5 +12,5 @@ export const MethodEnum: core.serialization.Schema< > = core.serialization.enum_(["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE"]); export declare namespace MethodEnum { - type Raw = "GET" | "OPTIONS" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE"; + export type Raw = "GET" | "OPTIONS" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE"; } diff --git a/src/serialization/resources/filestorage/types/ModelOperation.ts b/src/serialization/resources/filestorage/types/ModelOperation.ts index 6ecc7e399..3b9d3744d 100644 --- a/src/serialization/resources/filestorage/types/ModelOperation.ts +++ b/src/serialization/resources/filestorage/types/ModelOperation.ts @@ -13,20 +13,20 @@ export const ModelOperation: core.serialization.ObjectSchema< modelName: core.serialization.property("model_name", core.serialization.string()), availableOperations: core.serialization.property( "available_operations", - core.serialization.list(core.serialization.string()) + core.serialization.list(core.serialization.string()), ), requiredPostParameters: core.serialization.property( "required_post_parameters", - core.serialization.list(core.serialization.string()) + core.serialization.list(core.serialization.string()), ), supportedFields: core.serialization.property( "supported_fields", - core.serialization.list(core.serialization.string()) + core.serialization.list(core.serialization.string()), ), }); export declare namespace ModelOperation { - interface Raw { + export interface Raw { model_name: string; available_operations: string[]; required_post_parameters: string[]; diff --git a/src/serialization/resources/filestorage/types/ModelPermissionDeserializer.ts b/src/serialization/resources/filestorage/types/ModelPermissionDeserializer.ts index 5909b7ffd..cf24ef251 100644 --- a/src/serialization/resources/filestorage/types/ModelPermissionDeserializer.ts +++ b/src/serialization/resources/filestorage/types/ModelPermissionDeserializer.ts @@ -14,7 +14,7 @@ export const ModelPermissionDeserializer: core.serialization.ObjectSchema< }); export declare namespace ModelPermissionDeserializer { - interface Raw { + export interface Raw { is_enabled?: boolean | null; } } diff --git a/src/serialization/resources/filestorage/types/ModelPermissionDeserializerRequest.ts b/src/serialization/resources/filestorage/types/ModelPermissionDeserializerRequest.ts index e7152c2b0..44389fa35 100644 --- a/src/serialization/resources/filestorage/types/ModelPermissionDeserializerRequest.ts +++ b/src/serialization/resources/filestorage/types/ModelPermissionDeserializerRequest.ts @@ -14,7 +14,7 @@ export const ModelPermissionDeserializerRequest: core.serialization.ObjectSchema }); export declare namespace ModelPermissionDeserializerRequest { - interface Raw { + export interface Raw { is_enabled?: boolean | null; } } diff --git a/src/serialization/resources/filestorage/types/MultipartFormFieldRequest.ts b/src/serialization/resources/filestorage/types/MultipartFormFieldRequest.ts index 0b250c58e..a9f81c525 100644 --- a/src/serialization/resources/filestorage/types/MultipartFormFieldRequest.ts +++ b/src/serialization/resources/filestorage/types/MultipartFormFieldRequest.ts @@ -19,7 +19,7 @@ export const MultipartFormFieldRequest: core.serialization.ObjectSchema< }); export declare namespace MultipartFormFieldRequest { - interface Raw { + export interface Raw { name: string; data: string; encoding?: MultipartFormFieldRequestEncoding.Raw | null; diff --git a/src/serialization/resources/filestorage/types/MultipartFormFieldRequestEncoding.ts b/src/serialization/resources/filestorage/types/MultipartFormFieldRequestEncoding.ts index f7153b3f5..e3d57e2d4 100644 --- a/src/serialization/resources/filestorage/types/MultipartFormFieldRequestEncoding.ts +++ b/src/serialization/resources/filestorage/types/MultipartFormFieldRequestEncoding.ts @@ -13,5 +13,5 @@ export const MultipartFormFieldRequestEncoding: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([EncodingEnum, core.serialization.string()]); export declare namespace MultipartFormFieldRequestEncoding { - type Raw = EncodingEnum.Raw | string; + export type Raw = EncodingEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.ts b/src/serialization/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.ts index 96f117378..3dfc8cc24 100644 --- a/src/serialization/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.ts @@ -17,7 +17,7 @@ export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSch }); export declare namespace PaginatedAccountDetailsAndActionsList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: AccountDetailsAndActions.Raw[] | null; diff --git a/src/serialization/resources/filestorage/types/PaginatedAuditLogEventList.ts b/src/serialization/resources/filestorage/types/PaginatedAuditLogEventList.ts index 5d49ecdac..72cdcf3ab 100644 --- a/src/serialization/resources/filestorage/types/PaginatedAuditLogEventList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedAuditLogEventList.ts @@ -17,7 +17,7 @@ export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< }); export declare namespace PaginatedAuditLogEventList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: AuditLogEvent.Raw[] | null; diff --git a/src/serialization/resources/filestorage/types/PaginatedDownloadRequestMetaList.ts b/src/serialization/resources/filestorage/types/PaginatedDownloadRequestMetaList.ts index 420f14fcc..36233b828 100644 --- a/src/serialization/resources/filestorage/types/PaginatedDownloadRequestMetaList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedDownloadRequestMetaList.ts @@ -17,7 +17,7 @@ export const PaginatedDownloadRequestMetaList: core.serialization.ObjectSchema< }); export declare namespace PaginatedDownloadRequestMetaList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: DownloadRequestMeta.Raw[] | null; diff --git a/src/serialization/resources/filestorage/types/PaginatedDriveList.ts b/src/serialization/resources/filestorage/types/PaginatedDriveList.ts index 6387dc50b..6af5aba3d 100644 --- a/src/serialization/resources/filestorage/types/PaginatedDriveList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedDriveList.ts @@ -17,7 +17,7 @@ export const PaginatedDriveList: core.serialization.ObjectSchema< }); export declare namespace PaginatedDriveList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Drive.Raw[] | null; diff --git a/src/serialization/resources/filestorage/types/PaginatedFileList.ts b/src/serialization/resources/filestorage/types/PaginatedFileList.ts index 3709c612b..a5604b895 100644 --- a/src/serialization/resources/filestorage/types/PaginatedFileList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedFileList.ts @@ -17,7 +17,7 @@ export const PaginatedFileList: core.serialization.ObjectSchema< }); export declare namespace PaginatedFileList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: File_.Raw[] | null; diff --git a/src/serialization/resources/filestorage/types/PaginatedFolderList.ts b/src/serialization/resources/filestorage/types/PaginatedFolderList.ts index f185c90cb..be357dfce 100644 --- a/src/serialization/resources/filestorage/types/PaginatedFolderList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedFolderList.ts @@ -16,7 +16,7 @@ export const PaginatedFolderList: core.serialization.ObjectSchema< }); export declare namespace PaginatedFolderList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: serializers.filestorage.Folder.Raw[] | null; diff --git a/src/serialization/resources/filestorage/types/PaginatedGroupList.ts b/src/serialization/resources/filestorage/types/PaginatedGroupList.ts index c2c743c83..d56bb39e4 100644 --- a/src/serialization/resources/filestorage/types/PaginatedGroupList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedGroupList.ts @@ -16,7 +16,7 @@ export const PaginatedGroupList: core.serialization.ObjectSchema< }); export declare namespace PaginatedGroupList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: serializers.filestorage.Group.Raw[] | null; diff --git a/src/serialization/resources/filestorage/types/PaginatedIssueList.ts b/src/serialization/resources/filestorage/types/PaginatedIssueList.ts index 4c49cc377..a85845c0a 100644 --- a/src/serialization/resources/filestorage/types/PaginatedIssueList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedIssueList.ts @@ -17,7 +17,7 @@ export const PaginatedIssueList: core.serialization.ObjectSchema< }); export declare namespace PaginatedIssueList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Issue.Raw[] | null; diff --git a/src/serialization/resources/filestorage/types/PaginatedSyncStatusList.ts b/src/serialization/resources/filestorage/types/PaginatedSyncStatusList.ts index f6c6e6b3d..b07d3f5b8 100644 --- a/src/serialization/resources/filestorage/types/PaginatedSyncStatusList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedSyncStatusList.ts @@ -17,7 +17,7 @@ export const PaginatedSyncStatusList: core.serialization.ObjectSchema< }); export declare namespace PaginatedSyncStatusList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: SyncStatus.Raw[] | null; diff --git a/src/serialization/resources/filestorage/types/PaginatedUserList.ts b/src/serialization/resources/filestorage/types/PaginatedUserList.ts index 68f40d9ca..6d8969fca 100644 --- a/src/serialization/resources/filestorage/types/PaginatedUserList.ts +++ b/src/serialization/resources/filestorage/types/PaginatedUserList.ts @@ -17,7 +17,7 @@ export const PaginatedUserList: core.serialization.ObjectSchema< }); export declare namespace PaginatedUserList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: User.Raw[] | null; diff --git a/src/serialization/resources/filestorage/types/Permission.ts b/src/serialization/resources/filestorage/types/Permission.ts index 5ca6826bb..cd00a114c 100644 --- a/src/serialization/resources/filestorage/types/Permission.ts +++ b/src/serialization/resources/filestorage/types/Permission.ts @@ -25,7 +25,7 @@ export const Permission: core.serialization.ObjectSchema< }); export declare namespace Permission { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/filestorage/types/PermissionGroup.ts b/src/serialization/resources/filestorage/types/PermissionGroup.ts index 72dfdae1c..251d0f183 100644 --- a/src/serialization/resources/filestorage/types/PermissionGroup.ts +++ b/src/serialization/resources/filestorage/types/PermissionGroup.ts @@ -15,5 +15,5 @@ export const PermissionGroup: core.serialization.Schema< ]); export declare namespace PermissionGroup { - type Raw = string | serializers.filestorage.Group.Raw; + export type Raw = string | serializers.filestorage.Group.Raw; } diff --git a/src/serialization/resources/filestorage/types/PermissionRequest.ts b/src/serialization/resources/filestorage/types/PermissionRequest.ts index 671339c6a..de3f43799 100644 --- a/src/serialization/resources/filestorage/types/PermissionRequest.ts +++ b/src/serialization/resources/filestorage/types/PermissionRequest.ts @@ -21,16 +21,16 @@ export const PermissionRequest: core.serialization.ObjectSchema< roles: core.serialization.list(PermissionRequestRolesItem.optional()).optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace PermissionRequest { - interface Raw { + export interface Raw { remote_id?: string | null; user?: PermissionRequestUser.Raw | null; group?: PermissionRequestGroup.Raw | null; diff --git a/src/serialization/resources/filestorage/types/PermissionRequestGroup.ts b/src/serialization/resources/filestorage/types/PermissionRequestGroup.ts index 2818f8892..576b93546 100644 --- a/src/serialization/resources/filestorage/types/PermissionRequestGroup.ts +++ b/src/serialization/resources/filestorage/types/PermissionRequestGroup.ts @@ -15,5 +15,5 @@ export const PermissionRequestGroup: core.serialization.Schema< ]); export declare namespace PermissionRequestGroup { - type Raw = string | serializers.filestorage.Group.Raw; + export type Raw = string | serializers.filestorage.Group.Raw; } diff --git a/src/serialization/resources/filestorage/types/PermissionRequestRolesItem.ts b/src/serialization/resources/filestorage/types/PermissionRequestRolesItem.ts index 642d13801..3e3cd88cf 100644 --- a/src/serialization/resources/filestorage/types/PermissionRequestRolesItem.ts +++ b/src/serialization/resources/filestorage/types/PermissionRequestRolesItem.ts @@ -13,5 +13,5 @@ export const PermissionRequestRolesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([RolesEnum, core.serialization.string()]); export declare namespace PermissionRequestRolesItem { - type Raw = RolesEnum.Raw | string; + export type Raw = RolesEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/PermissionRequestType.ts b/src/serialization/resources/filestorage/types/PermissionRequestType.ts index 04be60d32..e828affcd 100644 --- a/src/serialization/resources/filestorage/types/PermissionRequestType.ts +++ b/src/serialization/resources/filestorage/types/PermissionRequestType.ts @@ -13,5 +13,5 @@ export const PermissionRequestType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TypeEnum, core.serialization.string()]); export declare namespace PermissionRequestType { - type Raw = TypeEnum.Raw | string; + export type Raw = TypeEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/PermissionRequestUser.ts b/src/serialization/resources/filestorage/types/PermissionRequestUser.ts index 4e3743d8c..0817968b7 100644 --- a/src/serialization/resources/filestorage/types/PermissionRequestUser.ts +++ b/src/serialization/resources/filestorage/types/PermissionRequestUser.ts @@ -13,5 +13,5 @@ export const PermissionRequestUser: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace PermissionRequestUser { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/filestorage/types/PermissionRolesItem.ts b/src/serialization/resources/filestorage/types/PermissionRolesItem.ts index 59b092b82..5fd8f29ba 100644 --- a/src/serialization/resources/filestorage/types/PermissionRolesItem.ts +++ b/src/serialization/resources/filestorage/types/PermissionRolesItem.ts @@ -13,5 +13,5 @@ export const PermissionRolesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([RolesEnum, core.serialization.string()]); export declare namespace PermissionRolesItem { - type Raw = RolesEnum.Raw | string; + export type Raw = RolesEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/PermissionType.ts b/src/serialization/resources/filestorage/types/PermissionType.ts index 7fb7c9e88..4d062ea7e 100644 --- a/src/serialization/resources/filestorage/types/PermissionType.ts +++ b/src/serialization/resources/filestorage/types/PermissionType.ts @@ -13,5 +13,5 @@ export const PermissionType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TypeEnum, core.serialization.string()]); export declare namespace PermissionType { - type Raw = TypeEnum.Raw | string; + export type Raw = TypeEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/PermissionUser.ts b/src/serialization/resources/filestorage/types/PermissionUser.ts index f25d7d45f..ac3189f50 100644 --- a/src/serialization/resources/filestorage/types/PermissionUser.ts +++ b/src/serialization/resources/filestorage/types/PermissionUser.ts @@ -13,5 +13,5 @@ export const PermissionUser: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace PermissionUser { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/filestorage/types/RemoteData.ts b/src/serialization/resources/filestorage/types/RemoteData.ts index 98329bc45..9de9e5bd6 100644 --- a/src/serialization/resources/filestorage/types/RemoteData.ts +++ b/src/serialization/resources/filestorage/types/RemoteData.ts @@ -15,7 +15,7 @@ export const RemoteData: core.serialization.ObjectSchema< }); export declare namespace RemoteData { - interface Raw { + export interface Raw { path: string; data?: unknown | null; } diff --git a/src/serialization/resources/filestorage/types/RemoteEndpointInfo.ts b/src/serialization/resources/filestorage/types/RemoteEndpointInfo.ts index 1685892bd..44018b560 100644 --- a/src/serialization/resources/filestorage/types/RemoteEndpointInfo.ts +++ b/src/serialization/resources/filestorage/types/RemoteEndpointInfo.ts @@ -14,12 +14,12 @@ export const RemoteEndpointInfo: core.serialization.ObjectSchema< urlPath: core.serialization.property("url_path", core.serialization.string()), fieldTraversalPath: core.serialization.property( "field_traversal_path", - core.serialization.list(core.serialization.unknown()) + core.serialization.list(core.serialization.unknown()), ), }); export declare namespace RemoteEndpointInfo { - interface Raw { + export interface Raw { method: string; url_path: string; field_traversal_path: unknown[]; diff --git a/src/serialization/resources/filestorage/types/RemoteFieldApi.ts b/src/serialization/resources/filestorage/types/RemoteFieldApi.ts index 89a38dcb7..71c2544f9 100644 --- a/src/serialization/resources/filestorage/types/RemoteFieldApi.ts +++ b/src/serialization/resources/filestorage/types/RemoteFieldApi.ts @@ -18,14 +18,14 @@ export const RemoteFieldApi: core.serialization.ObjectSchema< remoteEndpointInfo: core.serialization.property("remote_endpoint_info", RemoteEndpointInfo), exampleValues: core.serialization.property( "example_values", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), advancedMetadata: core.serialization.property("advanced_metadata", AdvancedMetadata.optional()), coverage: RemoteFieldApiCoverage.optional(), }); export declare namespace RemoteFieldApi { - interface Raw { + export interface Raw { schema: Record; remote_key_name: string; remote_endpoint_info: RemoteEndpointInfo.Raw; diff --git a/src/serialization/resources/filestorage/types/RemoteFieldApiCoverage.ts b/src/serialization/resources/filestorage/types/RemoteFieldApiCoverage.ts index d84f147c7..1de61a107 100644 --- a/src/serialization/resources/filestorage/types/RemoteFieldApiCoverage.ts +++ b/src/serialization/resources/filestorage/types/RemoteFieldApiCoverage.ts @@ -12,5 +12,5 @@ export const RemoteFieldApiCoverage: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.number(), core.serialization.number()]); export declare namespace RemoteFieldApiCoverage { - type Raw = number | number; + export type Raw = number | number; } diff --git a/src/serialization/resources/filestorage/types/RemoteFieldApiResponse.ts b/src/serialization/resources/filestorage/types/RemoteFieldApiResponse.ts index 6c135ead3..01b6b194f 100644 --- a/src/serialization/resources/filestorage/types/RemoteFieldApiResponse.ts +++ b/src/serialization/resources/filestorage/types/RemoteFieldApiResponse.ts @@ -19,7 +19,7 @@ export const RemoteFieldApiResponse: core.serialization.ObjectSchema< }); export declare namespace RemoteFieldApiResponse { - interface Raw { + export interface Raw { File?: RemoteFieldApi.Raw[] | null; Folder?: RemoteFieldApi.Raw[] | null; Drive?: RemoteFieldApi.Raw[] | null; diff --git a/src/serialization/resources/filestorage/types/RemoteKey.ts b/src/serialization/resources/filestorage/types/RemoteKey.ts index 680b0a248..61280f35b 100644 --- a/src/serialization/resources/filestorage/types/RemoteKey.ts +++ b/src/serialization/resources/filestorage/types/RemoteKey.ts @@ -15,7 +15,7 @@ export const RemoteKey: core.serialization.ObjectSchema< }); export declare namespace RemoteKey { - interface Raw { + export interface Raw { name: string; key: string; } diff --git a/src/serialization/resources/filestorage/types/RemoteResponse.ts b/src/serialization/resources/filestorage/types/RemoteResponse.ts index 25a13f535..70e58afd3 100644 --- a/src/serialization/resources/filestorage/types/RemoteResponse.ts +++ b/src/serialization/resources/filestorage/types/RemoteResponse.ts @@ -17,14 +17,14 @@ export const RemoteResponse: core.serialization.ObjectSchema< response: core.serialization.unknown(), responseHeaders: core.serialization.property( "response_headers", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), responseType: core.serialization.property("response_type", ResponseTypeEnum.optional()), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), }); export declare namespace RemoteResponse { - interface Raw { + export interface Raw { method: string; path: string; status: number; diff --git a/src/serialization/resources/filestorage/types/RequestFormatEnum.ts b/src/serialization/resources/filestorage/types/RequestFormatEnum.ts index 296dfbc8c..d12e676c0 100644 --- a/src/serialization/resources/filestorage/types/RequestFormatEnum.ts +++ b/src/serialization/resources/filestorage/types/RequestFormatEnum.ts @@ -12,5 +12,5 @@ export const RequestFormatEnum: core.serialization.Schema< > = core.serialization.enum_(["JSON", "XML", "MULTIPART"]); export declare namespace RequestFormatEnum { - type Raw = "JSON" | "XML" | "MULTIPART"; + export type Raw = "JSON" | "XML" | "MULTIPART"; } diff --git a/src/serialization/resources/filestorage/types/ResponseTypeEnum.ts b/src/serialization/resources/filestorage/types/ResponseTypeEnum.ts index e44fee1dd..2a3c68276 100644 --- a/src/serialization/resources/filestorage/types/ResponseTypeEnum.ts +++ b/src/serialization/resources/filestorage/types/ResponseTypeEnum.ts @@ -12,5 +12,5 @@ export const ResponseTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["JSON", "BASE64_GZIP"]); export declare namespace ResponseTypeEnum { - type Raw = "JSON" | "BASE64_GZIP"; + export type Raw = "JSON" | "BASE64_GZIP"; } diff --git a/src/serialization/resources/filestorage/types/RoleEnum.ts b/src/serialization/resources/filestorage/types/RoleEnum.ts index b97cab9e9..78262e24f 100644 --- a/src/serialization/resources/filestorage/types/RoleEnum.ts +++ b/src/serialization/resources/filestorage/types/RoleEnum.ts @@ -10,5 +10,5 @@ export const RoleEnum: core.serialization.Schema = core.serialization.enum_(["IN_NEXT_SYNC", "IN_LAST_SYNC"]); export declare namespace SelectiveSyncConfigurationsUsageEnum { - type Raw = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; + export type Raw = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; } diff --git a/src/serialization/resources/filestorage/types/StatusFd5Enum.ts b/src/serialization/resources/filestorage/types/StatusFd5Enum.ts index f3668703b..1e46de9ab 100644 --- a/src/serialization/resources/filestorage/types/StatusFd5Enum.ts +++ b/src/serialization/resources/filestorage/types/StatusFd5Enum.ts @@ -12,5 +12,5 @@ export const StatusFd5Enum: core.serialization.Schema< > = core.serialization.enum_(["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"]); export declare namespace StatusFd5Enum { - type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; + export type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; } diff --git a/src/serialization/resources/filestorage/types/SyncStatus.ts b/src/serialization/resources/filestorage/types/SyncStatus.ts index 47cfc3b98..194b5a5fb 100644 --- a/src/serialization/resources/filestorage/types/SyncStatus.ts +++ b/src/serialization/resources/filestorage/types/SyncStatus.ts @@ -23,12 +23,12 @@ export const SyncStatus: core.serialization.ObjectSchema< isInitialSync: core.serialization.property("is_initial_sync", core.serialization.boolean()), selectiveSyncConfigurationsUsage: core.serialization.property( "selective_sync_configurations_usage", - SelectiveSyncConfigurationsUsageEnum.optional() + SelectiveSyncConfigurationsUsageEnum.optional(), ), }); export declare namespace SyncStatus { - interface Raw { + export interface Raw { model_name: string; model_id: string; last_sync_start?: string | null; diff --git a/src/serialization/resources/filestorage/types/SyncStatusLastSyncResult.ts b/src/serialization/resources/filestorage/types/SyncStatusLastSyncResult.ts index 9a658f6db..c2ac8e9e1 100644 --- a/src/serialization/resources/filestorage/types/SyncStatusLastSyncResult.ts +++ b/src/serialization/resources/filestorage/types/SyncStatusLastSyncResult.ts @@ -13,5 +13,5 @@ export const SyncStatusLastSyncResult: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([LastSyncResultEnum, core.serialization.string()]); export declare namespace SyncStatusLastSyncResult { - type Raw = LastSyncResultEnum.Raw | string; + export type Raw = LastSyncResultEnum.Raw | string; } diff --git a/src/serialization/resources/filestorage/types/TypeEnum.ts b/src/serialization/resources/filestorage/types/TypeEnum.ts index ca936b596..c003c39ee 100644 --- a/src/serialization/resources/filestorage/types/TypeEnum.ts +++ b/src/serialization/resources/filestorage/types/TypeEnum.ts @@ -10,5 +10,5 @@ export const TypeEnum: core.serialization.Schema = core.serialization.undiscriminatedUnion([RemoteResponse, core.serialization.string()]); export declare namespace AsyncPassthroughRetrieveResponse { - type Raw = RemoteResponse.Raw | string; + export 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 1707b04f4..0ab110b18 100644 --- a/src/serialization/resources/hris/resources/bankInfo/types/BankInfoListRequestAccountType.ts +++ b/src/serialization/resources/hris/resources/bankInfo/types/BankInfoListRequestAccountType.ts @@ -12,5 +12,5 @@ export const BankInfoListRequestAccountType: core.serialization.Schema< > = core.serialization.enum_(["CHECKING", "SAVINGS"]); export declare namespace BankInfoListRequestAccountType { - type Raw = "CHECKING" | "SAVINGS"; + export type Raw = "CHECKING" | "SAVINGS"; } diff --git a/src/serialization/resources/hris/resources/bankInfo/types/BankInfoListRequestOrderBy.ts b/src/serialization/resources/hris/resources/bankInfo/types/BankInfoListRequestOrderBy.ts index 74fd69d12..ba2dac7d6 100644 --- a/src/serialization/resources/hris/resources/bankInfo/types/BankInfoListRequestOrderBy.ts +++ b/src/serialization/resources/hris/resources/bankInfo/types/BankInfoListRequestOrderBy.ts @@ -12,5 +12,5 @@ export const BankInfoListRequestOrderBy: core.serialization.Schema< > = core.serialization.enum_(["-remote_created_at", "remote_created_at"]); export declare namespace BankInfoListRequestOrderBy { - type Raw = "-remote_created_at" | "remote_created_at"; + export type Raw = "-remote_created_at" | "remote_created_at"; } diff --git a/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsListRequestExpand.ts b/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsListRequestExpand.ts index 16df78ff4..40d754184 100644 --- a/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsListRequestExpand.ts +++ b/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsListRequestExpand.ts @@ -12,5 +12,5 @@ export const EmployeePayrollRunsListRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["employee", "employee,payroll_run", "payroll_run"]); export declare namespace EmployeePayrollRunsListRequestExpand { - type Raw = "employee" | "employee,payroll_run" | "payroll_run"; + export type Raw = "employee" | "employee,payroll_run" | "payroll_run"; } diff --git a/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsRetrieveRequestExpand.ts b/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsRetrieveRequestExpand.ts index c8b0b1522..ddc868555 100644 --- a/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsRetrieveRequestExpand.ts +++ b/src/serialization/resources/hris/resources/employeePayrollRuns/types/EmployeePayrollRunsRetrieveRequestExpand.ts @@ -12,5 +12,5 @@ export const EmployeePayrollRunsRetrieveRequestExpand: core.serialization.Schema > = core.serialization.enum_(["employee", "employee,payroll_run", "payroll_run"]); export declare namespace EmployeePayrollRunsRetrieveRequestExpand { - type Raw = "employee" | "employee,payroll_run" | "payroll_run"; + export type Raw = "employee" | "employee,payroll_run" | "payroll_run"; } 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 56462ba56..8b6fa92a5 100644 --- a/src/serialization/resources/hris/resources/employees/client/requests/EmployeeEndpointRequest.ts +++ b/src/serialization/resources/hris/resources/employees/client/requests/EmployeeEndpointRequest.ts @@ -15,7 +15,7 @@ export const EmployeeEndpointRequest: core.serialization.Schema< }); export declare namespace EmployeeEndpointRequest { - interface Raw { + export interface 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 1f8391388..a2fa23c95 100644 --- a/src/serialization/resources/hris/resources/employees/client/requests/IgnoreCommonModelRequest.ts +++ b/src/serialization/resources/hris/resources/employees/client/requests/IgnoreCommonModelRequest.ts @@ -16,7 +16,7 @@ export const IgnoreCommonModelRequest: core.serialization.Schema< }); export declare namespace IgnoreCommonModelRequest { - interface Raw { + export interface 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 4bb620dda..f81b6149d 100644 --- a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestEmploymentStatus.ts +++ b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestEmploymentStatus.ts @@ -12,5 +12,5 @@ export const EmployeesListRequestEmploymentStatus: core.serialization.Schema< > = core.serialization.enum_(["ACTIVE", "INACTIVE", "PENDING"]); export declare namespace EmployeesListRequestEmploymentStatus { - type Raw = "ACTIVE" | "INACTIVE" | "PENDING"; + export type Raw = "ACTIVE" | "INACTIVE" | "PENDING"; } diff --git a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestExpand.ts b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestExpand.ts index 31e0c1bff..8f171a206 100644 --- a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestExpand.ts +++ b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestExpand.ts @@ -268,7 +268,7 @@ export const EmployeesListRequestExpand: core.serialization.Schema< ]); export declare namespace EmployeesListRequestExpand { - type Raw = + export type Raw = | "company" | "company,pay_group" | "employments" diff --git a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestRemoteFields.ts b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestRemoteFields.ts index 7b2d4eecc..22515a38b 100644 --- a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestRemoteFields.ts @@ -28,7 +28,7 @@ export const EmployeesListRequestRemoteFields: core.serialization.Schema< ]); export declare namespace EmployeesListRequestRemoteFields { - type Raw = + export type Raw = | "employment_status" | "employment_status,ethnicity" | "employment_status,ethnicity,gender" diff --git a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestShowEnumOrigins.ts index 3affd644a..a10fd41e8 100644 --- a/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/employees/types/EmployeesListRequestShowEnumOrigins.ts @@ -28,7 +28,7 @@ export const EmployeesListRequestShowEnumOrigins: core.serialization.Schema< ]); export declare namespace EmployeesListRequestShowEnumOrigins { - type Raw = + export type Raw = | "employment_status" | "employment_status,ethnicity" | "employment_status,ethnicity,gender" diff --git a/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestExpand.ts b/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestExpand.ts index ea58ce049..134b80685 100644 --- a/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestExpand.ts +++ b/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestExpand.ts @@ -268,7 +268,7 @@ export const EmployeesRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace EmployeesRetrieveRequestExpand { - type Raw = + export type Raw = | "company" | "company,pay_group" | "employments" diff --git a/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestRemoteFields.ts b/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestRemoteFields.ts index d35a644ae..9a00431fa 100644 --- a/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestRemoteFields.ts @@ -28,7 +28,7 @@ export const EmployeesRetrieveRequestRemoteFields: core.serialization.Schema< ]); export declare namespace EmployeesRetrieveRequestRemoteFields { - type Raw = + export type Raw = | "employment_status" | "employment_status,ethnicity" | "employment_status,ethnicity,gender" diff --git a/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestShowEnumOrigins.ts index de3925fc3..12be18323 100644 --- a/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/employees/types/EmployeesRetrieveRequestShowEnumOrigins.ts @@ -28,7 +28,7 @@ export const EmployeesRetrieveRequestShowEnumOrigins: core.serialization.Schema< ]); export declare namespace EmployeesRetrieveRequestShowEnumOrigins { - type Raw = + export type Raw = | "employment_status" | "employment_status,ethnicity" | "employment_status,ethnicity,gender" diff --git a/src/serialization/resources/hris/resources/employees/types/IgnoreCommonModelRequestReason.ts b/src/serialization/resources/hris/resources/employees/types/IgnoreCommonModelRequestReason.ts index bcbed0744..dcdd8a09e 100644 --- a/src/serialization/resources/hris/resources/employees/types/IgnoreCommonModelRequestReason.ts +++ b/src/serialization/resources/hris/resources/employees/types/IgnoreCommonModelRequestReason.ts @@ -13,5 +13,5 @@ export const IgnoreCommonModelRequestReason: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([ReasonEnum, core.serialization.string()]); export declare namespace IgnoreCommonModelRequestReason { - type Raw = ReasonEnum.Raw | string; + export 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 6280fc0eb..f83e2afa2 100644 --- a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestExpand.ts +++ b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestExpand.ts @@ -12,5 +12,5 @@ export const EmploymentsListRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["employee", "employee,pay_group", "pay_group"]); export declare namespace EmploymentsListRequestExpand { - type Raw = "employee" | "employee,pay_group" | "pay_group"; + export type Raw = "employee" | "employee,pay_group" | "pay_group"; } diff --git a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestOrderBy.ts b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestOrderBy.ts index d7a98c989..e2f69acab 100644 --- a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestOrderBy.ts +++ b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestOrderBy.ts @@ -12,5 +12,5 @@ export const EmploymentsListRequestOrderBy: core.serialization.Schema< > = core.serialization.enum_(["-effective_date", "effective_date"]); export declare namespace EmploymentsListRequestOrderBy { - type Raw = "-effective_date" | "effective_date"; + export type Raw = "-effective_date" | "effective_date"; } diff --git a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestRemoteFields.ts b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestRemoteFields.ts index 28ee7fdb8..e35a91a59 100644 --- a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestRemoteFields.ts @@ -28,7 +28,7 @@ export const EmploymentsListRequestRemoteFields: core.serialization.Schema< ]); export declare namespace EmploymentsListRequestRemoteFields { - type Raw = + export type Raw = | "employment_type" | "employment_type,flsa_status" | "employment_type,flsa_status,pay_frequency" diff --git a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestShowEnumOrigins.ts index 0e1013384..c866d158a 100644 --- a/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/employments/types/EmploymentsListRequestShowEnumOrigins.ts @@ -28,7 +28,7 @@ export const EmploymentsListRequestShowEnumOrigins: core.serialization.Schema< ]); export declare namespace EmploymentsListRequestShowEnumOrigins { - type Raw = + export type Raw = | "employment_type" | "employment_type,flsa_status" | "employment_type,flsa_status,pay_frequency" diff --git a/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestExpand.ts b/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestExpand.ts index ac8218724..db96bfdf3 100644 --- a/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestExpand.ts +++ b/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestExpand.ts @@ -12,5 +12,5 @@ export const EmploymentsRetrieveRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["employee", "employee,pay_group", "pay_group"]); export declare namespace EmploymentsRetrieveRequestExpand { - type Raw = "employee" | "employee,pay_group" | "pay_group"; + export type Raw = "employee" | "employee,pay_group" | "pay_group"; } diff --git a/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestRemoteFields.ts b/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestRemoteFields.ts index 3e5893c30..05f72620e 100644 --- a/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestRemoteFields.ts @@ -28,7 +28,7 @@ export const EmploymentsRetrieveRequestRemoteFields: core.serialization.Schema< ]); export declare namespace EmploymentsRetrieveRequestRemoteFields { - type Raw = + export type Raw = | "employment_type" | "employment_type,flsa_status" | "employment_type,flsa_status,pay_frequency" diff --git a/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestShowEnumOrigins.ts index 7cc6a39f2..fca9c6568 100644 --- a/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/employments/types/EmploymentsRetrieveRequestShowEnumOrigins.ts @@ -28,7 +28,7 @@ export const EmploymentsRetrieveRequestShowEnumOrigins: core.serialization.Schem ]); export declare namespace EmploymentsRetrieveRequestShowEnumOrigins { - type Raw = + export type Raw = | "employment_type" | "employment_type,flsa_status" | "employment_type,flsa_status,pay_frequency" 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 886cf042c..c070ff5f7 100644 --- a/src/serialization/resources/hris/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/serialization/resources/hris/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -14,7 +14,7 @@ export const CreateFieldMappingRequest: core.serialization.Schema< targetFieldDescription: core.serialization.property("target_field_description", core.serialization.string()), remoteFieldTraversalPath: core.serialization.property( "remote_field_traversal_path", - core.serialization.list(core.serialization.unknown()) + core.serialization.list(core.serialization.unknown()), ), remoteMethod: core.serialization.property("remote_method", core.serialization.string()), remoteUrlPath: core.serialization.property("remote_url_path", core.serialization.string()), @@ -22,7 +22,7 @@ export const CreateFieldMappingRequest: core.serialization.Schema< }); export declare namespace CreateFieldMappingRequest { - interface Raw { + export interface Raw { target_field_name: string; target_field_description: string; remote_field_traversal_path: unknown[]; 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 77d0fb921..13c92342d 100644 --- a/src/serialization/resources/hris/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts +++ b/src/serialization/resources/hris/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts @@ -12,14 +12,14 @@ export const PatchedEditFieldMappingRequest: core.serialization.Schema< > = core.serialization.object({ remoteFieldTraversalPath: core.serialization.property( "remote_field_traversal_path", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), remoteMethod: core.serialization.property("remote_method", core.serialization.string().optional()), remoteUrlPath: core.serialization.property("remote_url_path", core.serialization.string().optional()), }); export declare namespace PatchedEditFieldMappingRequest { - interface Raw { + export interface Raw { remote_field_traversal_path?: unknown[] | null; remote_method?: string | null; remote_url_path?: string | null; diff --git a/src/serialization/resources/hris/resources/forceResync/client/syncStatusResyncCreate.ts b/src/serialization/resources/hris/resources/forceResync/client/syncStatusResyncCreate.ts index 45adb18cd..c6bded845 100644 --- a/src/serialization/resources/hris/resources/forceResync/client/syncStatusResyncCreate.ts +++ b/src/serialization/resources/hris/resources/forceResync/client/syncStatusResyncCreate.ts @@ -13,5 +13,5 @@ export const Response: core.serialization.Schema< > = core.serialization.list(SyncStatus); export declare namespace Response { - type Raw = SyncStatus.Raw[]; + export 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 b9852c546..ac53021db 100644 --- a/src/serialization/resources/hris/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts +++ b/src/serialization/resources/hris/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts @@ -14,7 +14,7 @@ export const GenerateRemoteKeyRequest: core.serialization.Schema< }); export declare namespace GenerateRemoteKeyRequest { - interface Raw { + export interface Raw { name: string; } } diff --git a/src/serialization/resources/hris/resources/issues/types/IssuesListRequestStatus.ts b/src/serialization/resources/hris/resources/issues/types/IssuesListRequestStatus.ts index 8973a0911..cc31eeea0 100644 --- a/src/serialization/resources/hris/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/serialization/resources/hris/resources/issues/types/IssuesListRequestStatus.ts @@ -12,5 +12,5 @@ export const IssuesListRequestStatus: core.serialization.Schema< > = core.serialization.enum_(["ONGOING", "RESOLVED"]); export declare namespace IssuesListRequestStatus { - type Raw = "ONGOING" | "RESOLVED"; + export type Raw = "ONGOING" | "RESOLVED"; } 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 c25a22863..c3cbf3371 100644 --- a/src/serialization/resources/hris/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/serialization/resources/hris/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -22,32 +22,32 @@ export const EndUserDetailsRequest: core.serialization.Schema< linkExpiryMins: core.serialization.property("link_expiry_mins", core.serialization.number().optional()), shouldCreateMagicLinkUrl: core.serialization.property( "should_create_magic_link_url", - core.serialization.boolean().optional() + core.serialization.boolean().optional(), ), hideAdminMagicLink: core.serialization.property("hide_admin_magic_link", core.serialization.boolean().optional()), commonModels: core.serialization.property( "common_models", - core.serialization.list(CommonModelScopesBodyRequest).optional() + core.serialization.list(CommonModelScopesBodyRequest).optional(), ), categoryCommonModelScopes: core.serialization.property( "category_common_model_scopes", core.serialization .record( core.serialization.string(), - core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional() + core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional(), ) - .optional() + .optional(), ), language: LanguageEnum.optional(), areSyncsDisabled: core.serialization.property("are_syncs_disabled", core.serialization.boolean().optional()), integrationSpecificConfig: core.serialization.property( "integration_specific_config", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace EndUserDetailsRequest { - interface Raw { + export interface Raw { end_user_email_address: string; end_user_organization_name: string; end_user_origin_id: string; diff --git a/src/serialization/resources/hris/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/serialization/resources/hris/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index 788e1b6c4..359deebb3 100644 --- a/src/serialization/resources/hris/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/serialization/resources/hris/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -12,5 +12,5 @@ export const LinkedAccountsListRequestCategory: core.serialization.Schema< > = core.serialization.enum_(["accounting", "ats", "crm", "filestorage", "hris", "mktg", "ticketing"]); export declare namespace LinkedAccountsListRequestCategory { - type Raw = "accounting" | "ats" | "crm" | "filestorage" | "hris" | "mktg" | "ticketing"; + export type Raw = "accounting" | "ats" | "crm" | "filestorage" | "hris" | "mktg" | "ticketing"; } diff --git a/src/serialization/resources/hris/resources/locations/types/LocationsListRequestLocationType.ts b/src/serialization/resources/hris/resources/locations/types/LocationsListRequestLocationType.ts index d12f27350..705d62e69 100644 --- a/src/serialization/resources/hris/resources/locations/types/LocationsListRequestLocationType.ts +++ b/src/serialization/resources/hris/resources/locations/types/LocationsListRequestLocationType.ts @@ -12,5 +12,5 @@ export const LocationsListRequestLocationType: core.serialization.Schema< > = core.serialization.enum_(["HOME", "WORK"]); export declare namespace LocationsListRequestLocationType { - type Raw = "HOME" | "WORK"; + export type Raw = "HOME" | "WORK"; } diff --git a/src/serialization/resources/hris/resources/locations/types/LocationsListRequestRemoteFields.ts b/src/serialization/resources/hris/resources/locations/types/LocationsListRequestRemoteFields.ts index 4401d29ab..af76aab3d 100644 --- a/src/serialization/resources/hris/resources/locations/types/LocationsListRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/locations/types/LocationsListRequestRemoteFields.ts @@ -12,5 +12,5 @@ export const LocationsListRequestRemoteFields: core.serialization.Schema< > = core.serialization.enum_(["country", "country,location_type", "location_type"]); export declare namespace LocationsListRequestRemoteFields { - type Raw = "country" | "country,location_type" | "location_type"; + export type Raw = "country" | "country,location_type" | "location_type"; } diff --git a/src/serialization/resources/hris/resources/locations/types/LocationsListRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/locations/types/LocationsListRequestShowEnumOrigins.ts index c4184f78a..b5dff5356 100644 --- a/src/serialization/resources/hris/resources/locations/types/LocationsListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/locations/types/LocationsListRequestShowEnumOrigins.ts @@ -12,5 +12,5 @@ export const LocationsListRequestShowEnumOrigins: core.serialization.Schema< > = core.serialization.enum_(["country", "country,location_type", "location_type"]); export declare namespace LocationsListRequestShowEnumOrigins { - type Raw = "country" | "country,location_type" | "location_type"; + export type Raw = "country" | "country,location_type" | "location_type"; } diff --git a/src/serialization/resources/hris/resources/locations/types/LocationsRetrieveRequestRemoteFields.ts b/src/serialization/resources/hris/resources/locations/types/LocationsRetrieveRequestRemoteFields.ts index df5687258..359371eb0 100644 --- a/src/serialization/resources/hris/resources/locations/types/LocationsRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/locations/types/LocationsRetrieveRequestRemoteFields.ts @@ -12,5 +12,5 @@ export const LocationsRetrieveRequestRemoteFields: core.serialization.Schema< > = core.serialization.enum_(["country", "country,location_type", "location_type"]); export declare namespace LocationsRetrieveRequestRemoteFields { - type Raw = "country" | "country,location_type" | "location_type"; + export type Raw = "country" | "country,location_type" | "location_type"; } diff --git a/src/serialization/resources/hris/resources/locations/types/LocationsRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/locations/types/LocationsRetrieveRequestShowEnumOrigins.ts index 425fc71be..c86300fde 100644 --- a/src/serialization/resources/hris/resources/locations/types/LocationsRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/locations/types/LocationsRetrieveRequestShowEnumOrigins.ts @@ -12,5 +12,5 @@ export const LocationsRetrieveRequestShowEnumOrigins: core.serialization.Schema< > = core.serialization.enum_(["country", "country,location_type", "location_type"]); export declare namespace LocationsRetrieveRequestShowEnumOrigins { - type Raw = "country" | "country,location_type" | "location_type"; + export type Raw = "country" | "country,location_type" | "location_type"; } diff --git a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRemoteFields.ts b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRemoteFields.ts index 7369e9acc..5291bd72a 100644 --- a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRemoteFields.ts @@ -12,5 +12,5 @@ export const PayrollRunsListRequestRemoteFields: core.serialization.Schema< > = core.serialization.enum_(["run_state", "run_state,run_type", "run_type"]); export declare namespace PayrollRunsListRequestRemoteFields { - type Raw = "run_state" | "run_state,run_type" | "run_type"; + export type Raw = "run_state" | "run_state,run_type" | "run_type"; } diff --git a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRunType.ts b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRunType.ts index 75f1a4eb2..efc93fbf2 100644 --- a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRunType.ts +++ b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestRunType.ts @@ -12,5 +12,5 @@ export const PayrollRunsListRequestRunType: core.serialization.Schema< > = core.serialization.enum_(["CORRECTION", "OFF_CYCLE", "REGULAR", "SIGN_ON_BONUS", "TERMINATION"]); export declare namespace PayrollRunsListRequestRunType { - type Raw = "CORRECTION" | "OFF_CYCLE" | "REGULAR" | "SIGN_ON_BONUS" | "TERMINATION"; + export type Raw = "CORRECTION" | "OFF_CYCLE" | "REGULAR" | "SIGN_ON_BONUS" | "TERMINATION"; } diff --git a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestShowEnumOrigins.ts index 8cecae585..1c0fa8360 100644 --- a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsListRequestShowEnumOrigins.ts @@ -12,5 +12,5 @@ export const PayrollRunsListRequestShowEnumOrigins: core.serialization.Schema< > = core.serialization.enum_(["run_state", "run_state,run_type", "run_type"]); export declare namespace PayrollRunsListRequestShowEnumOrigins { - type Raw = "run_state" | "run_state,run_type" | "run_type"; + export type Raw = "run_state" | "run_state,run_type" | "run_type"; } diff --git a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestRemoteFields.ts b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestRemoteFields.ts index b1da74c89..590d261fb 100644 --- a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestRemoteFields.ts @@ -12,5 +12,5 @@ export const PayrollRunsRetrieveRequestRemoteFields: core.serialization.Schema< > = core.serialization.enum_(["run_state", "run_state,run_type", "run_type"]); export declare namespace PayrollRunsRetrieveRequestRemoteFields { - type Raw = "run_state" | "run_state,run_type" | "run_type"; + export type Raw = "run_state" | "run_state,run_type" | "run_type"; } diff --git a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestShowEnumOrigins.ts index a4d61ef28..07e323e38 100644 --- a/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/payrollRuns/types/PayrollRunsRetrieveRequestShowEnumOrigins.ts @@ -12,5 +12,5 @@ export const PayrollRunsRetrieveRequestShowEnumOrigins: core.serialization.Schem > = core.serialization.enum_(["run_state", "run_state,run_type", "run_type"]); export declare namespace PayrollRunsRetrieveRequestShowEnumOrigins { - type Raw = "run_state" | "run_state,run_type" | "run_type"; + export type Raw = "run_state" | "run_state,run_type" | "run_type"; } 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 7ac7583cb..45561a2df 100644 --- a/src/serialization/resources/hris/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts +++ b/src/serialization/resources/hris/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts @@ -14,7 +14,7 @@ export const RemoteKeyForRegenerationRequest: core.serialization.Schema< }); export declare namespace RemoteKeyForRegenerationRequest { - interface Raw { + export interface Raw { name: string; } } 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 b139a9939..b543c1f02 100644 --- a/src/serialization/resources/hris/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/hris/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -13,12 +13,12 @@ export const LinkedAccountCommonModelScopeDeserializerRequest: core.serializatio > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list(IndividualCommonModelScopeDeserializerRequest) + core.serialization.list(IndividualCommonModelScopeDeserializerRequest), ), }); export declare namespace LinkedAccountCommonModelScopeDeserializerRequest { - interface Raw { + export interface 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 0be489c0c..9bbe2b8a3 100644 --- a/src/serialization/resources/hris/resources/timeOff/client/requests/TimeOffEndpointRequest.ts +++ b/src/serialization/resources/hris/resources/timeOff/client/requests/TimeOffEndpointRequest.ts @@ -15,7 +15,7 @@ export const TimeOffEndpointRequest: core.serialization.Schema< }); export declare namespace TimeOffEndpointRequest { - interface Raw { + export interface 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 2e35f6e5f..a1b84b5cb 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestExpand.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestExpand.ts @@ -12,5 +12,5 @@ export const TimeOffListRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["approver", "employee", "employee,approver"]); export declare namespace TimeOffListRequestExpand { - type Raw = "approver" | "employee" | "employee,approver"; + export type Raw = "approver" | "employee" | "employee,approver"; } diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRemoteFields.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRemoteFields.ts index a2cbc87a8..4f4e59e84 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRemoteFields.ts @@ -20,7 +20,7 @@ export const TimeOffListRequestRemoteFields: core.serialization.Schema< ]); export declare namespace TimeOffListRequestRemoteFields { - type Raw = + export type Raw = | "request_type" | "request_type,status" | "request_type,status,units" diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRequestType.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRequestType.ts index ae161b333..32ca666c7 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRequestType.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestRequestType.ts @@ -12,5 +12,5 @@ export const TimeOffListRequestRequestType: core.serialization.Schema< > = core.serialization.enum_(["BEREAVEMENT", "JURY_DUTY", "PERSONAL", "SICK", "VACATION", "VOLUNTEER"]); export declare namespace TimeOffListRequestRequestType { - type Raw = "BEREAVEMENT" | "JURY_DUTY" | "PERSONAL" | "SICK" | "VACATION" | "VOLUNTEER"; + export type Raw = "BEREAVEMENT" | "JURY_DUTY" | "PERSONAL" | "SICK" | "VACATION" | "VOLUNTEER"; } diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestShowEnumOrigins.ts index 9e0c87fa8..9730e4f8b 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestShowEnumOrigins.ts @@ -20,7 +20,7 @@ export const TimeOffListRequestShowEnumOrigins: core.serialization.Schema< ]); export declare namespace TimeOffListRequestShowEnumOrigins { - type Raw = + export type Raw = | "request_type" | "request_type,status" | "request_type,status,units" diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestStatus.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestStatus.ts index c4b115938..60204a7f8 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestStatus.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffListRequestStatus.ts @@ -12,5 +12,5 @@ export const TimeOffListRequestStatus: core.serialization.Schema< > = core.serialization.enum_(["APPROVED", "CANCELLED", "DECLINED", "DELETED", "REQUESTED"]); export declare namespace TimeOffListRequestStatus { - type Raw = "APPROVED" | "CANCELLED" | "DECLINED" | "DELETED" | "REQUESTED"; + export type Raw = "APPROVED" | "CANCELLED" | "DECLINED" | "DELETED" | "REQUESTED"; } diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestExpand.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestExpand.ts index 5f9b5c705..a09005937 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestExpand.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestExpand.ts @@ -12,5 +12,5 @@ export const TimeOffRetrieveRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["approver", "employee", "employee,approver"]); export declare namespace TimeOffRetrieveRequestExpand { - type Raw = "approver" | "employee" | "employee,approver"; + export type Raw = "approver" | "employee" | "employee,approver"; } diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestRemoteFields.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestRemoteFields.ts index d92323b8c..0a42aa3ae 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestRemoteFields.ts @@ -20,7 +20,7 @@ export const TimeOffRetrieveRequestRemoteFields: core.serialization.Schema< ]); export declare namespace TimeOffRetrieveRequestRemoteFields { - type Raw = + export type Raw = | "request_type" | "request_type,status" | "request_type,status,units" diff --git a/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestShowEnumOrigins.ts index f8fa59ad4..03868a9f3 100644 --- a/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/hris/resources/timeOff/types/TimeOffRetrieveRequestShowEnumOrigins.ts @@ -20,7 +20,7 @@ export const TimeOffRetrieveRequestShowEnumOrigins: core.serialization.Schema< ]); export declare namespace TimeOffRetrieveRequestShowEnumOrigins { - type Raw = + export type Raw = | "request_type" | "request_type,status" | "request_type,status,units" diff --git a/src/serialization/resources/hris/resources/timeOffBalances/types/TimeOffBalancesListRequestPolicyType.ts b/src/serialization/resources/hris/resources/timeOffBalances/types/TimeOffBalancesListRequestPolicyType.ts index 6258dbe59..e251a1a1c 100644 --- a/src/serialization/resources/hris/resources/timeOffBalances/types/TimeOffBalancesListRequestPolicyType.ts +++ b/src/serialization/resources/hris/resources/timeOffBalances/types/TimeOffBalancesListRequestPolicyType.ts @@ -12,5 +12,5 @@ export const TimeOffBalancesListRequestPolicyType: core.serialization.Schema< > = core.serialization.enum_(["BEREAVEMENT", "JURY_DUTY", "PERSONAL", "SICK", "VACATION", "VOLUNTEER"]); export declare namespace TimeOffBalancesListRequestPolicyType { - type Raw = "BEREAVEMENT" | "JURY_DUTY" | "PERSONAL" | "SICK" | "VACATION" | "VOLUNTEER"; + export type Raw = "BEREAVEMENT" | "JURY_DUTY" | "PERSONAL" | "SICK" | "VACATION" | "VOLUNTEER"; } 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 6d7a80878..e54a1e4e3 100644 --- a/src/serialization/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntryEndpointRequest.ts +++ b/src/serialization/resources/hris/resources/timesheetEntries/client/requests/TimesheetEntryEndpointRequest.ts @@ -15,7 +15,7 @@ export const TimesheetEntryEndpointRequest: core.serialization.Schema< }); export declare namespace TimesheetEntryEndpointRequest { - interface Raw { + export interface 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 7bbc4d4b0..9c4736bd0 100644 --- a/src/serialization/resources/hris/resources/timesheetEntries/types/TimesheetEntriesListRequestOrderBy.ts +++ b/src/serialization/resources/hris/resources/timesheetEntries/types/TimesheetEntriesListRequestOrderBy.ts @@ -12,5 +12,5 @@ export const TimesheetEntriesListRequestOrderBy: core.serialization.Schema< > = core.serialization.enum_(["-start_time", "start_time"]); export declare namespace TimesheetEntriesListRequestOrderBy { - type Raw = "-start_time" | "start_time"; + export type Raw = "-start_time" | "start_time"; } diff --git a/src/serialization/resources/hris/resources/webhookReceivers/client/list.ts b/src/serialization/resources/hris/resources/webhookReceivers/client/list.ts index 35bc596ca..5dcbc16fe 100644 --- a/src/serialization/resources/hris/resources/webhookReceivers/client/list.ts +++ b/src/serialization/resources/hris/resources/webhookReceivers/client/list.ts @@ -13,5 +13,5 @@ export const Response: core.serialization.Schema< > = core.serialization.list(WebhookReceiver); export declare namespace Response { - type Raw = WebhookReceiver.Raw[]; + export 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 634033051..676da8b94 100644 --- a/src/serialization/resources/hris/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts +++ b/src/serialization/resources/hris/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts @@ -16,7 +16,7 @@ export const WebhookReceiverRequest: core.serialization.Schema< }); export declare namespace WebhookReceiverRequest { - interface Raw { + export interface Raw { event: string; is_active: boolean; key?: string | null; diff --git a/src/serialization/resources/hris/types/AccountDetails.ts b/src/serialization/resources/hris/types/AccountDetails.ts index d58b9bedd..16f637e92 100644 --- a/src/serialization/resources/hris/types/AccountDetails.ts +++ b/src/serialization/resources/hris/types/AccountDetails.ts @@ -18,7 +18,7 @@ export const AccountDetails: core.serialization.ObjectSchema< endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), endUserOrganizationName: core.serialization.property( "end_user_organization_name", - core.serialization.string().optional() + core.serialization.string().optional(), ), endUserEmailAddress: core.serialization.property("end_user_email_address", core.serialization.string().optional()), status: core.serialization.string().optional(), @@ -29,7 +29,7 @@ export const AccountDetails: core.serialization.ObjectSchema< }); export declare namespace AccountDetails { - interface Raw { + export interface Raw { id?: string | null; integration?: string | null; integration_slug?: string | null; diff --git a/src/serialization/resources/hris/types/AccountDetailsAndActions.ts b/src/serialization/resources/hris/types/AccountDetailsAndActions.ts index 8b3e46a60..67ef9925c 100644 --- a/src/serialization/resources/hris/types/AccountDetailsAndActions.ts +++ b/src/serialization/resources/hris/types/AccountDetailsAndActions.ts @@ -29,7 +29,7 @@ export const AccountDetailsAndActions: core.serialization.ObjectSchema< }); export declare namespace AccountDetailsAndActions { - interface Raw { + export interface Raw { id: string; category?: CategoryEnum.Raw | null; status: AccountDetailsAndActionsStatusEnum.Raw; diff --git a/src/serialization/resources/hris/types/AccountDetailsAndActionsIntegration.ts b/src/serialization/resources/hris/types/AccountDetailsAndActionsIntegration.ts index a2b8ca8f1..6cc8867c6 100644 --- a/src/serialization/resources/hris/types/AccountDetailsAndActionsIntegration.ts +++ b/src/serialization/resources/hris/types/AccountDetailsAndActionsIntegration.ts @@ -21,12 +21,12 @@ 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(ModelOperation).optional() + core.serialization.list(ModelOperation).optional(), ), }); export declare namespace AccountDetailsAndActionsIntegration { - interface Raw { + export interface Raw { name: string; categories: CategoriesEnum.Raw[]; image?: string | null; diff --git a/src/serialization/resources/hris/types/AccountDetailsAndActionsStatusEnum.ts b/src/serialization/resources/hris/types/AccountDetailsAndActionsStatusEnum.ts index db59508bb..4bdff334f 100644 --- a/src/serialization/resources/hris/types/AccountDetailsAndActionsStatusEnum.ts +++ b/src/serialization/resources/hris/types/AccountDetailsAndActionsStatusEnum.ts @@ -12,5 +12,5 @@ export const AccountDetailsAndActionsStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["COMPLETE", "INCOMPLETE", "RELINK_NEEDED", "IDLE"]); export declare namespace AccountDetailsAndActionsStatusEnum { - type Raw = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; + export type Raw = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; } diff --git a/src/serialization/resources/hris/types/AccountIntegration.ts b/src/serialization/resources/hris/types/AccountIntegration.ts index fe4dc5d1f..a55e0d5ec 100644 --- a/src/serialization/resources/hris/types/AccountIntegration.ts +++ b/src/serialization/resources/hris/types/AccountIntegration.ts @@ -20,20 +20,20 @@ export const AccountIntegration: core.serialization.ObjectSchema< slug: core.serialization.string().optional(), apiEndpointsToDocumentationUrls: core.serialization.property( "api_endpoints_to_documentation_urls", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), webhookSetupGuideUrl: core.serialization.property( "webhook_setup_guide_url", - core.serialization.string().optional() + core.serialization.string().optional(), ), categoryBetaStatus: core.serialization.property( "category_beta_status", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace AccountIntegration { - interface Raw { + export interface Raw { name: string; abbreviated_name?: string | null; categories?: CategoriesEnum.Raw[] | null; diff --git a/src/serialization/resources/hris/types/AccountToken.ts b/src/serialization/resources/hris/types/AccountToken.ts index c66c49ed5..06f3b66ef 100644 --- a/src/serialization/resources/hris/types/AccountToken.ts +++ b/src/serialization/resources/hris/types/AccountToken.ts @@ -15,7 +15,7 @@ export const AccountToken: core.serialization.ObjectSchema = core.serialization.enum_(["SAVINGS", "CHECKING"]); export declare namespace AccountTypeEnum { - type Raw = "SAVINGS" | "CHECKING"; + export type Raw = "SAVINGS" | "CHECKING"; } diff --git a/src/serialization/resources/hris/types/AdvancedMetadata.ts b/src/serialization/resources/hris/types/AdvancedMetadata.ts index 19f10604a..91671d103 100644 --- a/src/serialization/resources/hris/types/AdvancedMetadata.ts +++ b/src/serialization/resources/hris/types/AdvancedMetadata.ts @@ -17,12 +17,12 @@ export const AdvancedMetadata: core.serialization.ObjectSchema< isCustom: core.serialization.property("is_custom", core.serialization.boolean().optional()), fieldChoices: core.serialization.property( "field_choices", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace AdvancedMetadata { - interface Raw { + export interface Raw { id: string; display_name?: string | null; description?: string | null; diff --git a/src/serialization/resources/hris/types/AsyncPassthroughReciept.ts b/src/serialization/resources/hris/types/AsyncPassthroughReciept.ts index 4a11f7ebf..8b0ade39c 100644 --- a/src/serialization/resources/hris/types/AsyncPassthroughReciept.ts +++ b/src/serialization/resources/hris/types/AsyncPassthroughReciept.ts @@ -14,7 +14,7 @@ export const AsyncPassthroughReciept: core.serialization.ObjectSchema< }); export declare namespace AsyncPassthroughReciept { - interface Raw { + export interface Raw { async_passthrough_receipt_id: string; } } diff --git a/src/serialization/resources/hris/types/AuditLogEvent.ts b/src/serialization/resources/hris/types/AuditLogEvent.ts index 435cebee4..d88c16861 100644 --- a/src/serialization/resources/hris/types/AuditLogEvent.ts +++ b/src/serialization/resources/hris/types/AuditLogEvent.ts @@ -23,7 +23,7 @@ export const AuditLogEvent: core.serialization.ObjectSchema< }); export declare namespace AuditLogEvent { - interface Raw { + export interface Raw { id?: string | null; user_name?: string | null; user_email?: string | null; diff --git a/src/serialization/resources/hris/types/AuditLogEventEventType.ts b/src/serialization/resources/hris/types/AuditLogEventEventType.ts index b4a52006d..8e57b955a 100644 --- a/src/serialization/resources/hris/types/AuditLogEventEventType.ts +++ b/src/serialization/resources/hris/types/AuditLogEventEventType.ts @@ -13,5 +13,5 @@ export const AuditLogEventEventType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([EventTypeEnum, core.serialization.string()]); export declare namespace AuditLogEventEventType { - type Raw = EventTypeEnum.Raw | string; + export type Raw = EventTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/AuditLogEventRole.ts b/src/serialization/resources/hris/types/AuditLogEventRole.ts index bf89358e1..82342d3ca 100644 --- a/src/serialization/resources/hris/types/AuditLogEventRole.ts +++ b/src/serialization/resources/hris/types/AuditLogEventRole.ts @@ -13,5 +13,5 @@ export const AuditLogEventRole: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([RoleEnum, core.serialization.string()]); export declare namespace AuditLogEventRole { - type Raw = RoleEnum.Raw | string; + export type Raw = RoleEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/AvailableActions.ts b/src/serialization/resources/hris/types/AvailableActions.ts index 5e715a180..04342e23f 100644 --- a/src/serialization/resources/hris/types/AvailableActions.ts +++ b/src/serialization/resources/hris/types/AvailableActions.ts @@ -16,12 +16,12 @@ export const AvailableActions: core.serialization.ObjectSchema< passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization.list(ModelOperation).optional() + core.serialization.list(ModelOperation).optional(), ), }); export declare namespace AvailableActions { - interface Raw { + export interface Raw { integration: AccountIntegration.Raw; passthrough_available: boolean; 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 f5392ff6e..ca5cb0cf7 100644 --- a/src/serialization/resources/hris/types/BankInfo.ts +++ b/src/serialization/resources/hris/types/BankInfo.ts @@ -24,13 +24,13 @@ export const BankInfo: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([AccountTypeEnum, core.serialization.string()]); export declare namespace BankInfoAccountType { - type Raw = AccountTypeEnum.Raw | string; + export type Raw = AccountTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/BankInfoEmployee.ts b/src/serialization/resources/hris/types/BankInfoEmployee.ts index 5d3b35a7b..af0fb63de 100644 --- a/src/serialization/resources/hris/types/BankInfoEmployee.ts +++ b/src/serialization/resources/hris/types/BankInfoEmployee.ts @@ -15,5 +15,5 @@ export const BankInfoEmployee: core.serialization.Schema< ]); export declare namespace BankInfoEmployee { - type Raw = string | serializers.hris.Employee.Raw; + export type Raw = string | serializers.hris.Employee.Raw; } diff --git a/src/serialization/resources/hris/types/Benefit.ts b/src/serialization/resources/hris/types/Benefit.ts index c7865b96f..45e4420ef 100644 --- a/src/serialization/resources/hris/types/Benefit.ts +++ b/src/serialization/resources/hris/types/Benefit.ts @@ -19,11 +19,11 @@ export const Benefit: core.serialization.ObjectSchema = core.serialization.enum_(["MEDICAL", "HEALTH_SAVINGS", "INSURANCE", "RETIREMENT", "OTHER"]); export declare namespace BenefitPlanTypeEnum { - type Raw = "MEDICAL" | "HEALTH_SAVINGS" | "INSURANCE" | "RETIREMENT" | "OTHER"; + export type Raw = "MEDICAL" | "HEALTH_SAVINGS" | "INSURANCE" | "RETIREMENT" | "OTHER"; } diff --git a/src/serialization/resources/hris/types/CategoriesEnum.ts b/src/serialization/resources/hris/types/CategoriesEnum.ts index a48865ec9..7b40881e0 100644 --- a/src/serialization/resources/hris/types/CategoriesEnum.ts +++ b/src/serialization/resources/hris/types/CategoriesEnum.ts @@ -10,5 +10,5 @@ export const CategoriesEnum: core.serialization.Schema = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list(IndividualCommonModelScopeDeserializer) + core.serialization.list(IndividualCommonModelScopeDeserializer), ), }); export declare namespace CommonModelScopeApi { - interface Raw { + export interface Raw { common_models: IndividualCommonModelScopeDeserializer.Raw[]; } } diff --git a/src/serialization/resources/hris/types/CommonModelScopesBodyRequest.ts b/src/serialization/resources/hris/types/CommonModelScopesBodyRequest.ts index 37e5984b6..b2d528123 100644 --- a/src/serialization/resources/hris/types/CommonModelScopesBodyRequest.ts +++ b/src/serialization/resources/hris/types/CommonModelScopesBodyRequest.ts @@ -15,12 +15,12 @@ export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< enabledActions: core.serialization.property("enabled_actions", core.serialization.list(EnabledActionsEnum)), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.string()) + core.serialization.list(core.serialization.string()), ), }); export declare namespace CommonModelScopesBodyRequest { - interface Raw { + export interface Raw { model_id: string; 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 cf4da3f8b..fbd6229d5 100644 --- a/src/serialization/resources/hris/types/Company.ts +++ b/src/serialization/resources/hris/types/Company.ts @@ -19,13 +19,13 @@ export const Company: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([GenderEnum, core.serialization.string()]); export declare namespace DependentGender { - type Raw = GenderEnum.Raw | string; + export type Raw = GenderEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/DependentRelationship.ts b/src/serialization/resources/hris/types/DependentRelationship.ts index 0f02bb560..62addabdf 100644 --- a/src/serialization/resources/hris/types/DependentRelationship.ts +++ b/src/serialization/resources/hris/types/DependentRelationship.ts @@ -13,5 +13,5 @@ export const DependentRelationship: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([RelationshipEnum, core.serialization.string()]); export declare namespace DependentRelationship { - type Raw = RelationshipEnum.Raw | string; + export type Raw = RelationshipEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/Earning.ts b/src/serialization/resources/hris/types/Earning.ts index 9c5c3889a..a7115eb65 100644 --- a/src/serialization/resources/hris/types/Earning.ts +++ b/src/serialization/resources/hris/types/Earning.ts @@ -20,13 +20,13 @@ export const Earning: core.serialization.ObjectSchema = core.serialization.enum_(["SALARY", "REIMBURSEMENT", "OVERTIME", "BONUS"]); export declare namespace EarningTypeEnum { - type Raw = "SALARY" | "REIMBURSEMENT" | "OVERTIME" | "BONUS"; + export type Raw = "SALARY" | "REIMBURSEMENT" | "OVERTIME" | "BONUS"; } diff --git a/src/serialization/resources/hris/types/Employee.ts b/src/serialization/resources/hris/types/Employee.ts index 9add73565..3169e45e1 100644 --- a/src/serialization/resources/hris/types/Employee.ts +++ b/src/serialization/resources/hris/types/Employee.ts @@ -55,18 +55,18 @@ export const Employee: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Company]); export declare namespace EmployeeCompany { - type Raw = string | Company.Raw; + export type Raw = string | Company.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeEmploymentStatus.ts b/src/serialization/resources/hris/types/EmployeeEmploymentStatus.ts index 3cbbcfc9a..d19b41a48 100644 --- a/src/serialization/resources/hris/types/EmployeeEmploymentStatus.ts +++ b/src/serialization/resources/hris/types/EmployeeEmploymentStatus.ts @@ -13,5 +13,5 @@ export const EmployeeEmploymentStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([EmploymentStatusEnum, core.serialization.string()]); export declare namespace EmployeeEmploymentStatus { - type Raw = EmploymentStatusEnum.Raw | string; + export type Raw = EmploymentStatusEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeeEmploymentsItem.ts b/src/serialization/resources/hris/types/EmployeeEmploymentsItem.ts index 169de3404..34abda1a4 100644 --- a/src/serialization/resources/hris/types/EmployeeEmploymentsItem.ts +++ b/src/serialization/resources/hris/types/EmployeeEmploymentsItem.ts @@ -15,5 +15,5 @@ export const EmployeeEmploymentsItem: core.serialization.Schema< ]); export declare namespace EmployeeEmploymentsItem { - type Raw = string | serializers.hris.Employment.Raw; + export type Raw = string | serializers.hris.Employment.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeEthnicity.ts b/src/serialization/resources/hris/types/EmployeeEthnicity.ts index 72cfb4c6f..f207c4303 100644 --- a/src/serialization/resources/hris/types/EmployeeEthnicity.ts +++ b/src/serialization/resources/hris/types/EmployeeEthnicity.ts @@ -13,5 +13,5 @@ export const EmployeeEthnicity: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([EthnicityEnum, core.serialization.string()]); export declare namespace EmployeeEthnicity { - type Raw = EthnicityEnum.Raw | string; + export type Raw = EthnicityEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeeGender.ts b/src/serialization/resources/hris/types/EmployeeGender.ts index 35a2ea18e..269b1baa6 100644 --- a/src/serialization/resources/hris/types/EmployeeGender.ts +++ b/src/serialization/resources/hris/types/EmployeeGender.ts @@ -11,5 +11,5 @@ export const EmployeeGender: core.serialization.Schema = core.serialization.undiscriminatedUnion([core.serialization.string(), Group]); export declare namespace EmployeeGroupsItem { - type Raw = string | Group.Raw; + export type Raw = string | Group.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeHomeLocation.ts b/src/serialization/resources/hris/types/EmployeeHomeLocation.ts index 899080347..c931d0f0e 100644 --- a/src/serialization/resources/hris/types/EmployeeHomeLocation.ts +++ b/src/serialization/resources/hris/types/EmployeeHomeLocation.ts @@ -13,5 +13,5 @@ export const EmployeeHomeLocation: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Location]); export declare namespace EmployeeHomeLocation { - type Raw = string | Location.Raw; + export type Raw = string | Location.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeManager.ts b/src/serialization/resources/hris/types/EmployeeManager.ts index d72f3eb2a..9e056018c 100644 --- a/src/serialization/resources/hris/types/EmployeeManager.ts +++ b/src/serialization/resources/hris/types/EmployeeManager.ts @@ -15,5 +15,5 @@ export const EmployeeManager: core.serialization.Schema< ]); export declare namespace EmployeeManager { - type Raw = string | serializers.hris.Employee.Raw; + export type Raw = string | serializers.hris.Employee.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeMaritalStatus.ts b/src/serialization/resources/hris/types/EmployeeMaritalStatus.ts index e9cf9d88c..40ed876e3 100644 --- a/src/serialization/resources/hris/types/EmployeeMaritalStatus.ts +++ b/src/serialization/resources/hris/types/EmployeeMaritalStatus.ts @@ -13,5 +13,5 @@ export const EmployeeMaritalStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([MaritalStatusEnum, core.serialization.string()]); export declare namespace EmployeeMaritalStatus { - type Raw = MaritalStatusEnum.Raw | string; + export type Raw = MaritalStatusEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeePayGroup.ts b/src/serialization/resources/hris/types/EmployeePayGroup.ts index 514c53f26..9ccc38f8a 100644 --- a/src/serialization/resources/hris/types/EmployeePayGroup.ts +++ b/src/serialization/resources/hris/types/EmployeePayGroup.ts @@ -13,5 +13,5 @@ export const EmployeePayGroup: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PayGroup]); export declare namespace EmployeePayGroup { - type Raw = string | PayGroup.Raw; + export type Raw = string | PayGroup.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeePayrollRun.ts b/src/serialization/resources/hris/types/EmployeePayrollRun.ts index 1d813e7a7..25dfcd74a 100644 --- a/src/serialization/resources/hris/types/EmployeePayrollRun.ts +++ b/src/serialization/resources/hris/types/EmployeePayrollRun.ts @@ -33,13 +33,13 @@ export const EmployeePayrollRun: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace EmployeePayrollRun { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/hris/types/EmployeePayrollRunEmployee.ts b/src/serialization/resources/hris/types/EmployeePayrollRunEmployee.ts index b640eab90..1602f8a69 100644 --- a/src/serialization/resources/hris/types/EmployeePayrollRunEmployee.ts +++ b/src/serialization/resources/hris/types/EmployeePayrollRunEmployee.ts @@ -15,5 +15,5 @@ export const EmployeePayrollRunEmployee: core.serialization.Schema< ]); export declare namespace EmployeePayrollRunEmployee { - type Raw = string | serializers.hris.Employee.Raw; + export type Raw = string | serializers.hris.Employee.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeePayrollRunPayrollRun.ts b/src/serialization/resources/hris/types/EmployeePayrollRunPayrollRun.ts index 26e23dee3..c4e063b6c 100644 --- a/src/serialization/resources/hris/types/EmployeePayrollRunPayrollRun.ts +++ b/src/serialization/resources/hris/types/EmployeePayrollRunPayrollRun.ts @@ -13,5 +13,5 @@ export const EmployeePayrollRunPayrollRun: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PayrollRun]); export declare namespace EmployeePayrollRunPayrollRun { - type Raw = string | PayrollRun.Raw; + export type Raw = string | PayrollRun.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeRequest.ts b/src/serialization/resources/hris/types/EmployeeRequest.ts index a50e5e16e..c64e4d4b9 100644 --- a/src/serialization/resources/hris/types/EmployeeRequest.ts +++ b/src/serialization/resources/hris/types/EmployeeRequest.ts @@ -51,16 +51,16 @@ export const EmployeeRequest: core.serialization.ObjectSchema< avatar: core.serialization.string().optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace EmployeeRequest { - interface Raw { + export interface Raw { employee_number?: string | null; company?: EmployeeRequestCompany.Raw | null; first_name?: string | null; diff --git a/src/serialization/resources/hris/types/EmployeeRequestCompany.ts b/src/serialization/resources/hris/types/EmployeeRequestCompany.ts index bb622e5a8..98d6cc1a4 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestCompany.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestCompany.ts @@ -13,5 +13,5 @@ export const EmployeeRequestCompany: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Company]); export declare namespace EmployeeRequestCompany { - type Raw = string | Company.Raw; + export type Raw = string | Company.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestEmploymentStatus.ts b/src/serialization/resources/hris/types/EmployeeRequestEmploymentStatus.ts index 230a92050..9856dbc72 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestEmploymentStatus.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestEmploymentStatus.ts @@ -13,5 +13,5 @@ export const EmployeeRequestEmploymentStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([EmploymentStatusEnum, core.serialization.string()]); export declare namespace EmployeeRequestEmploymentStatus { - type Raw = EmploymentStatusEnum.Raw | string; + export type Raw = EmploymentStatusEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestEmploymentsItem.ts b/src/serialization/resources/hris/types/EmployeeRequestEmploymentsItem.ts index 9389112ff..54f2efaad 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestEmploymentsItem.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestEmploymentsItem.ts @@ -15,5 +15,5 @@ export const EmployeeRequestEmploymentsItem: core.serialization.Schema< ]); export declare namespace EmployeeRequestEmploymentsItem { - type Raw = string | serializers.hris.Employment.Raw; + export type Raw = string | serializers.hris.Employment.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestEthnicity.ts b/src/serialization/resources/hris/types/EmployeeRequestEthnicity.ts index d44e0f1b6..d447ad4ab 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestEthnicity.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestEthnicity.ts @@ -13,5 +13,5 @@ export const EmployeeRequestEthnicity: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([EthnicityEnum, core.serialization.string()]); export declare namespace EmployeeRequestEthnicity { - type Raw = EthnicityEnum.Raw | string; + export type Raw = EthnicityEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestGender.ts b/src/serialization/resources/hris/types/EmployeeRequestGender.ts index 220dda098..e92880744 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestGender.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestGender.ts @@ -13,5 +13,5 @@ export const EmployeeRequestGender: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([GenderEnum, core.serialization.string()]); export declare namespace EmployeeRequestGender { - type Raw = GenderEnum.Raw | string; + export type Raw = GenderEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestGroupsItem.ts b/src/serialization/resources/hris/types/EmployeeRequestGroupsItem.ts index dc4101b23..f465dd7bd 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestGroupsItem.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestGroupsItem.ts @@ -13,5 +13,5 @@ export const EmployeeRequestGroupsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Group]); export declare namespace EmployeeRequestGroupsItem { - type Raw = string | Group.Raw; + export type Raw = string | Group.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestHomeLocation.ts b/src/serialization/resources/hris/types/EmployeeRequestHomeLocation.ts index 2d218d581..a006b24b4 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestHomeLocation.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestHomeLocation.ts @@ -13,5 +13,5 @@ export const EmployeeRequestHomeLocation: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Location]); export declare namespace EmployeeRequestHomeLocation { - type Raw = string | Location.Raw; + export type Raw = string | Location.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestManager.ts b/src/serialization/resources/hris/types/EmployeeRequestManager.ts index f8d6368e3..291315a69 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestManager.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestManager.ts @@ -15,5 +15,5 @@ export const EmployeeRequestManager: core.serialization.Schema< ]); export declare namespace EmployeeRequestManager { - type Raw = string | serializers.hris.Employee.Raw; + export type Raw = string | serializers.hris.Employee.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestMaritalStatus.ts b/src/serialization/resources/hris/types/EmployeeRequestMaritalStatus.ts index 16b8b6b35..34cc81180 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestMaritalStatus.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestMaritalStatus.ts @@ -13,5 +13,5 @@ export const EmployeeRequestMaritalStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([MaritalStatusEnum, core.serialization.string()]); export declare namespace EmployeeRequestMaritalStatus { - type Raw = MaritalStatusEnum.Raw | string; + export type Raw = MaritalStatusEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestPayGroup.ts b/src/serialization/resources/hris/types/EmployeeRequestPayGroup.ts index 93feb45b2..0b85ccaf2 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestPayGroup.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestPayGroup.ts @@ -13,5 +13,5 @@ export const EmployeeRequestPayGroup: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PayGroup]); export declare namespace EmployeeRequestPayGroup { - type Raw = string | PayGroup.Raw; + export type Raw = string | PayGroup.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestTeam.ts b/src/serialization/resources/hris/types/EmployeeRequestTeam.ts index c2f5520ce..55096edfb 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestTeam.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestTeam.ts @@ -15,5 +15,5 @@ export const EmployeeRequestTeam: core.serialization.Schema< ]); export declare namespace EmployeeRequestTeam { - type Raw = string | serializers.hris.Team.Raw; + export type Raw = string | serializers.hris.Team.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeRequestWorkLocation.ts b/src/serialization/resources/hris/types/EmployeeRequestWorkLocation.ts index 4ffbffd50..0becf5934 100644 --- a/src/serialization/resources/hris/types/EmployeeRequestWorkLocation.ts +++ b/src/serialization/resources/hris/types/EmployeeRequestWorkLocation.ts @@ -13,5 +13,5 @@ export const EmployeeRequestWorkLocation: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Location]); export declare namespace EmployeeRequestWorkLocation { - type Raw = string | Location.Raw; + export type Raw = string | Location.Raw; } diff --git a/src/serialization/resources/hris/types/EmployeeResponse.ts b/src/serialization/resources/hris/types/EmployeeResponse.ts index 9a6378e74..0e24bd6f0 100644 --- a/src/serialization/resources/hris/types/EmployeeResponse.ts +++ b/src/serialization/resources/hris/types/EmployeeResponse.ts @@ -20,7 +20,7 @@ export const EmployeeResponse: core.serialization.ObjectSchema< }); export declare namespace EmployeeResponse { - interface Raw { + export interface Raw { model: serializers.hris.Employee.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/hris/types/EmployeeTeam.ts b/src/serialization/resources/hris/types/EmployeeTeam.ts index b4577ee49..1675a30bc 100644 --- a/src/serialization/resources/hris/types/EmployeeTeam.ts +++ b/src/serialization/resources/hris/types/EmployeeTeam.ts @@ -13,5 +13,5 @@ export const EmployeeTeam: core.serialization.Schema = core.serialization.undiscriminatedUnion([core.serialization.string(), Location]); export declare namespace EmployeeWorkLocation { - type Raw = string | Location.Raw; + export type Raw = string | Location.Raw; } diff --git a/src/serialization/resources/hris/types/EmployerBenefit.ts b/src/serialization/resources/hris/types/EmployerBenefit.ts index 00d8b16e6..e914e7c3f 100644 --- a/src/serialization/resources/hris/types/EmployerBenefit.ts +++ b/src/serialization/resources/hris/types/EmployerBenefit.ts @@ -23,13 +23,13 @@ export const EmployerBenefit: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace EmployerBenefit { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/hris/types/EmployerBenefitBenefitPlanType.ts b/src/serialization/resources/hris/types/EmployerBenefitBenefitPlanType.ts index 244f09398..309851cc0 100644 --- a/src/serialization/resources/hris/types/EmployerBenefitBenefitPlanType.ts +++ b/src/serialization/resources/hris/types/EmployerBenefitBenefitPlanType.ts @@ -13,5 +13,5 @@ export const EmployerBenefitBenefitPlanType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([BenefitPlanTypeEnum, core.serialization.string()]); export declare namespace EmployerBenefitBenefitPlanType { - type Raw = BenefitPlanTypeEnum.Raw | string; + export type Raw = BenefitPlanTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/Employment.ts b/src/serialization/resources/hris/types/Employment.ts index 11b01da9f..d546a7aaa 100644 --- a/src/serialization/resources/hris/types/Employment.ts +++ b/src/serialization/resources/hris/types/Employment.ts @@ -32,13 +32,13 @@ export const Employment: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([EmploymentTypeEnum, core.serialization.string()]); export declare namespace EmploymentEmploymentType { - type Raw = EmploymentTypeEnum.Raw | string; + export type Raw = EmploymentTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmploymentFlsaStatus.ts b/src/serialization/resources/hris/types/EmploymentFlsaStatus.ts index 8db1e9f5b..f5ce75bb3 100644 --- a/src/serialization/resources/hris/types/EmploymentFlsaStatus.ts +++ b/src/serialization/resources/hris/types/EmploymentFlsaStatus.ts @@ -13,5 +13,5 @@ export const EmploymentFlsaStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([FlsaStatusEnum, core.serialization.string()]); export declare namespace EmploymentFlsaStatus { - type Raw = FlsaStatusEnum.Raw | string; + export type Raw = FlsaStatusEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmploymentPayCurrency.ts b/src/serialization/resources/hris/types/EmploymentPayCurrency.ts index bdc9069ba..c993a127b 100644 --- a/src/serialization/resources/hris/types/EmploymentPayCurrency.ts +++ b/src/serialization/resources/hris/types/EmploymentPayCurrency.ts @@ -13,5 +13,5 @@ export const EmploymentPayCurrency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([PayCurrencyEnum, core.serialization.string()]); export declare namespace EmploymentPayCurrency { - type Raw = PayCurrencyEnum.Raw | string; + export type Raw = PayCurrencyEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmploymentPayFrequency.ts b/src/serialization/resources/hris/types/EmploymentPayFrequency.ts index 9da005c7a..3f15ce1f5 100644 --- a/src/serialization/resources/hris/types/EmploymentPayFrequency.ts +++ b/src/serialization/resources/hris/types/EmploymentPayFrequency.ts @@ -13,5 +13,5 @@ export const EmploymentPayFrequency: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([PayFrequencyEnum, core.serialization.string()]); export declare namespace EmploymentPayFrequency { - type Raw = PayFrequencyEnum.Raw | string; + export type Raw = PayFrequencyEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmploymentPayGroup.ts b/src/serialization/resources/hris/types/EmploymentPayGroup.ts index 5b0fbe04d..e96917e72 100644 --- a/src/serialization/resources/hris/types/EmploymentPayGroup.ts +++ b/src/serialization/resources/hris/types/EmploymentPayGroup.ts @@ -13,5 +13,5 @@ export const EmploymentPayGroup: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), PayGroup]); export declare namespace EmploymentPayGroup { - type Raw = string | PayGroup.Raw; + export type Raw = string | PayGroup.Raw; } diff --git a/src/serialization/resources/hris/types/EmploymentPayPeriod.ts b/src/serialization/resources/hris/types/EmploymentPayPeriod.ts index 358caebd9..7ec154662 100644 --- a/src/serialization/resources/hris/types/EmploymentPayPeriod.ts +++ b/src/serialization/resources/hris/types/EmploymentPayPeriod.ts @@ -13,5 +13,5 @@ export const EmploymentPayPeriod: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([PayPeriodEnum, core.serialization.string()]); export declare namespace EmploymentPayPeriod { - type Raw = PayPeriodEnum.Raw | string; + export type Raw = PayPeriodEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/EmploymentStatusEnum.ts b/src/serialization/resources/hris/types/EmploymentStatusEnum.ts index 146a70f18..1224bc31e 100644 --- a/src/serialization/resources/hris/types/EmploymentStatusEnum.ts +++ b/src/serialization/resources/hris/types/EmploymentStatusEnum.ts @@ -12,5 +12,5 @@ export const EmploymentStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["ACTIVE", "PENDING", "INACTIVE"]); export declare namespace EmploymentStatusEnum { - type Raw = "ACTIVE" | "PENDING" | "INACTIVE"; + export type Raw = "ACTIVE" | "PENDING" | "INACTIVE"; } diff --git a/src/serialization/resources/hris/types/EmploymentTypeEnum.ts b/src/serialization/resources/hris/types/EmploymentTypeEnum.ts index ffcc25f32..f3b9e0674 100644 --- a/src/serialization/resources/hris/types/EmploymentTypeEnum.ts +++ b/src/serialization/resources/hris/types/EmploymentTypeEnum.ts @@ -12,5 +12,5 @@ export const EmploymentTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["FULL_TIME", "PART_TIME", "INTERN", "CONTRACTOR", "FREELANCE"]); export declare namespace EmploymentTypeEnum { - type Raw = "FULL_TIME" | "PART_TIME" | "INTERN" | "CONTRACTOR" | "FREELANCE"; + export type Raw = "FULL_TIME" | "PART_TIME" | "INTERN" | "CONTRACTOR" | "FREELANCE"; } diff --git a/src/serialization/resources/hris/types/EnabledActionsEnum.ts b/src/serialization/resources/hris/types/EnabledActionsEnum.ts index c242662a5..ecb7b9964 100644 --- a/src/serialization/resources/hris/types/EnabledActionsEnum.ts +++ b/src/serialization/resources/hris/types/EnabledActionsEnum.ts @@ -12,5 +12,5 @@ export const EnabledActionsEnum: core.serialization.Schema< > = core.serialization.enum_(["READ", "WRITE"]); export declare namespace EnabledActionsEnum { - type Raw = "READ" | "WRITE"; + export type Raw = "READ" | "WRITE"; } diff --git a/src/serialization/resources/hris/types/EncodingEnum.ts b/src/serialization/resources/hris/types/EncodingEnum.ts index d50b717c7..4faa27078 100644 --- a/src/serialization/resources/hris/types/EncodingEnum.ts +++ b/src/serialization/resources/hris/types/EncodingEnum.ts @@ -10,5 +10,5 @@ export const EncodingEnum: core.serialization.Schema | null; remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; diff --git a/src/serialization/resources/hris/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts b/src/serialization/resources/hris/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts index a9d46f7f2..139c44359 100644 --- a/src/serialization/resources/hris/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts +++ b/src/serialization/resources/hris/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts @@ -14,12 +14,12 @@ export const FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: core.serializ urlPath: core.serialization.property("url_path", core.serialization.string().optional()), fieldTraversalPath: core.serialization.property( "field_traversal_path", - core.serialization.list(core.serialization.string()).optional() + core.serialization.list(core.serialization.string()).optional(), ), }); export declare namespace FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { - interface Raw { + export interface Raw { method?: string | null; url_path?: string | null; field_traversal_path?: string[] | null; diff --git a/src/serialization/resources/hris/types/FieldMappingApiInstanceResponse.ts b/src/serialization/resources/hris/types/FieldMappingApiInstanceResponse.ts index df17de1d1..81bd75882 100644 --- a/src/serialization/resources/hris/types/FieldMappingApiInstanceResponse.ts +++ b/src/serialization/resources/hris/types/FieldMappingApiInstanceResponse.ts @@ -14,12 +14,12 @@ export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< benefit: core.serialization.property("Benefit", core.serialization.list(FieldMappingApiInstance).optional()), employerBenefit: core.serialization.property( "EmployerBenefit", - core.serialization.list(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(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()), @@ -29,7 +29,7 @@ export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< timeOff: core.serialization.property("TimeOff", core.serialization.list(FieldMappingApiInstance).optional()), timeOffBalance: core.serialization.property( "TimeOffBalance", - core.serialization.list(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()), @@ -37,12 +37,12 @@ export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< dependent: core.serialization.property("Dependent", core.serialization.list(FieldMappingApiInstance).optional()), timesheetEntry: core.serialization.property( "TimesheetEntry", - core.serialization.list(FieldMappingApiInstance).optional() + core.serialization.list(FieldMappingApiInstance).optional(), ), }); export declare namespace FieldMappingApiInstanceResponse { - interface Raw { + export interface Raw { Benefit?: FieldMappingApiInstance.Raw[] | null; EmployerBenefit?: FieldMappingApiInstance.Raw[] | null; Company?: FieldMappingApiInstance.Raw[] | null; diff --git a/src/serialization/resources/hris/types/FieldMappingApiInstanceTargetField.ts b/src/serialization/resources/hris/types/FieldMappingApiInstanceTargetField.ts index 8fe4c54d0..13614feb2 100644 --- a/src/serialization/resources/hris/types/FieldMappingApiInstanceTargetField.ts +++ b/src/serialization/resources/hris/types/FieldMappingApiInstanceTargetField.ts @@ -16,7 +16,7 @@ export const FieldMappingApiInstanceTargetField: core.serialization.ObjectSchema }); export declare namespace FieldMappingApiInstanceTargetField { - interface Raw { + export interface Raw { name: string; description: string; is_organization_wide: boolean; diff --git a/src/serialization/resources/hris/types/FieldMappingInstanceResponse.ts b/src/serialization/resources/hris/types/FieldMappingInstanceResponse.ts index cd7b62f52..bebc224bb 100644 --- a/src/serialization/resources/hris/types/FieldMappingInstanceResponse.ts +++ b/src/serialization/resources/hris/types/FieldMappingInstanceResponse.ts @@ -21,7 +21,7 @@ export const FieldMappingInstanceResponse: core.serialization.ObjectSchema< }); export declare namespace FieldMappingInstanceResponse { - interface Raw { + export interface Raw { model: FieldMappingApiInstance.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/hris/types/FieldPermissionDeserializer.ts b/src/serialization/resources/hris/types/FieldPermissionDeserializer.ts index f3c00ec20..dd5ea5da8 100644 --- a/src/serialization/resources/hris/types/FieldPermissionDeserializer.ts +++ b/src/serialization/resources/hris/types/FieldPermissionDeserializer.ts @@ -12,16 +12,16 @@ export const FieldPermissionDeserializer: core.serialization.ObjectSchema< > = core.serialization.object({ enabledFields: core.serialization.property( "enabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace FieldPermissionDeserializer { - interface Raw { + export interface Raw { enabled_fields?: unknown[] | null; disabled_fields?: unknown[] | null; } diff --git a/src/serialization/resources/hris/types/FieldPermissionDeserializerRequest.ts b/src/serialization/resources/hris/types/FieldPermissionDeserializerRequest.ts index 5ba579f19..50d4ebc55 100644 --- a/src/serialization/resources/hris/types/FieldPermissionDeserializerRequest.ts +++ b/src/serialization/resources/hris/types/FieldPermissionDeserializerRequest.ts @@ -12,16 +12,16 @@ export const FieldPermissionDeserializerRequest: core.serialization.ObjectSchema > = core.serialization.object({ enabledFields: core.serialization.property( "enabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace FieldPermissionDeserializerRequest { - interface Raw { + export interface Raw { enabled_fields?: unknown[] | null; disabled_fields?: unknown[] | null; } diff --git a/src/serialization/resources/hris/types/FlsaStatusEnum.ts b/src/serialization/resources/hris/types/FlsaStatusEnum.ts index 174e943ff..1e966bb4f 100644 --- a/src/serialization/resources/hris/types/FlsaStatusEnum.ts +++ b/src/serialization/resources/hris/types/FlsaStatusEnum.ts @@ -10,5 +10,5 @@ export const FlsaStatusEnum: core.serialization.Schema | 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 d36c6fccc..bf99a8f3d 100644 --- a/src/serialization/resources/hris/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/hris/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -15,13 +15,13 @@ 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(), ModelPermissionDeserializerRequest).optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializerRequest).optional(), ), fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializerRequest.optional()), }); export declare namespace IndividualCommonModelScopeDeserializerRequest { - interface Raw { + export interface Raw { model_name: string; 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 c77e73160..bb2ef1332 100644 --- a/src/serialization/resources/hris/types/Issue.ts +++ b/src/serialization/resources/hris/types/Issue.ts @@ -14,19 +14,19 @@ export const Issue: core.serialization.ObjectSchema = core.serialization.enum_(["ONGOING", "RESOLVED"]); export declare namespace IssueStatusEnum { - type Raw = "ONGOING" | "RESOLVED"; + export type Raw = "ONGOING" | "RESOLVED"; } diff --git a/src/serialization/resources/hris/types/LanguageEnum.ts b/src/serialization/resources/hris/types/LanguageEnum.ts index 57970fdb9..e1f640a19 100644 --- a/src/serialization/resources/hris/types/LanguageEnum.ts +++ b/src/serialization/resources/hris/types/LanguageEnum.ts @@ -10,5 +10,5 @@ export const LanguageEnum: core.serialization.Schema = core.serialization.enum_(["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"]); export declare namespace LastSyncResultEnum { - type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; + export type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; } diff --git a/src/serialization/resources/hris/types/LinkToken.ts b/src/serialization/resources/hris/types/LinkToken.ts index 9253ed0a9..5c4a12959 100644 --- a/src/serialization/resources/hris/types/LinkToken.ts +++ b/src/serialization/resources/hris/types/LinkToken.ts @@ -14,7 +14,7 @@ export const LinkToken: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([CountryEnum, core.serialization.string()]); export declare namespace LocationCountry { - type Raw = CountryEnum.Raw | string; + export type Raw = CountryEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/LocationLocationType.ts b/src/serialization/resources/hris/types/LocationLocationType.ts index 8da000946..fafba09f6 100644 --- a/src/serialization/resources/hris/types/LocationLocationType.ts +++ b/src/serialization/resources/hris/types/LocationLocationType.ts @@ -13,5 +13,5 @@ export const LocationLocationType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([LocationTypeEnum, core.serialization.string()]); export declare namespace LocationLocationType { - type Raw = LocationTypeEnum.Raw | string; + export type Raw = LocationTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/LocationTypeEnum.ts b/src/serialization/resources/hris/types/LocationTypeEnum.ts index 2102d89d2..55237d8cd 100644 --- a/src/serialization/resources/hris/types/LocationTypeEnum.ts +++ b/src/serialization/resources/hris/types/LocationTypeEnum.ts @@ -12,5 +12,5 @@ export const LocationTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["HOME", "WORK"]); export declare namespace LocationTypeEnum { - type Raw = "HOME" | "WORK"; + export type Raw = "HOME" | "WORK"; } diff --git a/src/serialization/resources/hris/types/MaritalStatusEnum.ts b/src/serialization/resources/hris/types/MaritalStatusEnum.ts index 9f12a5d1f..c73dedad4 100644 --- a/src/serialization/resources/hris/types/MaritalStatusEnum.ts +++ b/src/serialization/resources/hris/types/MaritalStatusEnum.ts @@ -18,7 +18,7 @@ export const MaritalStatusEnum: core.serialization.Schema< ]); export declare namespace MaritalStatusEnum { - type Raw = + export type Raw = | "SINGLE" | "MARRIED_FILING_JOINTLY" | "MARRIED_FILING_SEPARATELY" diff --git a/src/serialization/resources/hris/types/MetaResponse.ts b/src/serialization/resources/hris/types/MetaResponse.ts index 375048b4c..81bee1480 100644 --- a/src/serialization/resources/hris/types/MetaResponse.ts +++ b/src/serialization/resources/hris/types/MetaResponse.ts @@ -11,22 +11,22 @@ export const MetaResponse: core.serialization.ObjectSchema; remote_field_classes?: Record | null; status?: LinkedAccountStatus.Raw | null; diff --git a/src/serialization/resources/hris/types/MethodEnum.ts b/src/serialization/resources/hris/types/MethodEnum.ts index 48f30486b..f933b747e 100644 --- a/src/serialization/resources/hris/types/MethodEnum.ts +++ b/src/serialization/resources/hris/types/MethodEnum.ts @@ -10,5 +10,5 @@ export const MethodEnum: core.serialization.Schema = core.serialization.undiscriminatedUnion([EncodingEnum, core.serialization.string()]); export declare namespace MultipartFormFieldRequestEncoding { - type Raw = EncodingEnum.Raw | string; + export type Raw = EncodingEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/PaginatedAccountDetailsAndActionsList.ts b/src/serialization/resources/hris/types/PaginatedAccountDetailsAndActionsList.ts index e06c240a9..adff0181d 100644 --- a/src/serialization/resources/hris/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/serialization/resources/hris/types/PaginatedAccountDetailsAndActionsList.ts @@ -17,7 +17,7 @@ export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSch }); export declare namespace PaginatedAccountDetailsAndActionsList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: AccountDetailsAndActions.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedAuditLogEventList.ts b/src/serialization/resources/hris/types/PaginatedAuditLogEventList.ts index a33a1a457..928b2019f 100644 --- a/src/serialization/resources/hris/types/PaginatedAuditLogEventList.ts +++ b/src/serialization/resources/hris/types/PaginatedAuditLogEventList.ts @@ -17,7 +17,7 @@ export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< }); export declare namespace PaginatedAuditLogEventList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: AuditLogEvent.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedBankInfoList.ts b/src/serialization/resources/hris/types/PaginatedBankInfoList.ts index 5ecc7d3b1..f2f04510a 100644 --- a/src/serialization/resources/hris/types/PaginatedBankInfoList.ts +++ b/src/serialization/resources/hris/types/PaginatedBankInfoList.ts @@ -17,7 +17,7 @@ export const PaginatedBankInfoList: core.serialization.ObjectSchema< }); export declare namespace PaginatedBankInfoList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: BankInfo.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedBenefitList.ts b/src/serialization/resources/hris/types/PaginatedBenefitList.ts index 0000f3536..5149e5f4a 100644 --- a/src/serialization/resources/hris/types/PaginatedBenefitList.ts +++ b/src/serialization/resources/hris/types/PaginatedBenefitList.ts @@ -17,7 +17,7 @@ export const PaginatedBenefitList: core.serialization.ObjectSchema< }); export declare namespace PaginatedBenefitList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Benefit.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedCompanyList.ts b/src/serialization/resources/hris/types/PaginatedCompanyList.ts index c1d86c587..2ea970822 100644 --- a/src/serialization/resources/hris/types/PaginatedCompanyList.ts +++ b/src/serialization/resources/hris/types/PaginatedCompanyList.ts @@ -17,7 +17,7 @@ export const PaginatedCompanyList: core.serialization.ObjectSchema< }); export declare namespace PaginatedCompanyList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Company.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedDependentList.ts b/src/serialization/resources/hris/types/PaginatedDependentList.ts index 07f233bb3..d353e794b 100644 --- a/src/serialization/resources/hris/types/PaginatedDependentList.ts +++ b/src/serialization/resources/hris/types/PaginatedDependentList.ts @@ -17,7 +17,7 @@ export const PaginatedDependentList: core.serialization.ObjectSchema< }); export declare namespace PaginatedDependentList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Dependent.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedEmployeeList.ts b/src/serialization/resources/hris/types/PaginatedEmployeeList.ts index 2cb387a5e..c7f56e159 100644 --- a/src/serialization/resources/hris/types/PaginatedEmployeeList.ts +++ b/src/serialization/resources/hris/types/PaginatedEmployeeList.ts @@ -16,7 +16,7 @@ export const PaginatedEmployeeList: core.serialization.ObjectSchema< }); export declare namespace PaginatedEmployeeList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: serializers.hris.Employee.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedEmployeePayrollRunList.ts b/src/serialization/resources/hris/types/PaginatedEmployeePayrollRunList.ts index a5e78a4ec..d36e67f69 100644 --- a/src/serialization/resources/hris/types/PaginatedEmployeePayrollRunList.ts +++ b/src/serialization/resources/hris/types/PaginatedEmployeePayrollRunList.ts @@ -17,7 +17,7 @@ export const PaginatedEmployeePayrollRunList: core.serialization.ObjectSchema< }); export declare namespace PaginatedEmployeePayrollRunList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: EmployeePayrollRun.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedEmployerBenefitList.ts b/src/serialization/resources/hris/types/PaginatedEmployerBenefitList.ts index 6708c72b7..e9e88d681 100644 --- a/src/serialization/resources/hris/types/PaginatedEmployerBenefitList.ts +++ b/src/serialization/resources/hris/types/PaginatedEmployerBenefitList.ts @@ -17,7 +17,7 @@ export const PaginatedEmployerBenefitList: core.serialization.ObjectSchema< }); export declare namespace PaginatedEmployerBenefitList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: EmployerBenefit.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedEmploymentList.ts b/src/serialization/resources/hris/types/PaginatedEmploymentList.ts index 8d7e423f1..4387c5363 100644 --- a/src/serialization/resources/hris/types/PaginatedEmploymentList.ts +++ b/src/serialization/resources/hris/types/PaginatedEmploymentList.ts @@ -16,7 +16,7 @@ export const PaginatedEmploymentList: core.serialization.ObjectSchema< }); export declare namespace PaginatedEmploymentList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: serializers.hris.Employment.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedGroupList.ts b/src/serialization/resources/hris/types/PaginatedGroupList.ts index 70729dac8..89715d799 100644 --- a/src/serialization/resources/hris/types/PaginatedGroupList.ts +++ b/src/serialization/resources/hris/types/PaginatedGroupList.ts @@ -17,7 +17,7 @@ export const PaginatedGroupList: core.serialization.ObjectSchema< }); export declare namespace PaginatedGroupList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Group.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedIssueList.ts b/src/serialization/resources/hris/types/PaginatedIssueList.ts index 27d3de805..7fec42e45 100644 --- a/src/serialization/resources/hris/types/PaginatedIssueList.ts +++ b/src/serialization/resources/hris/types/PaginatedIssueList.ts @@ -17,7 +17,7 @@ export const PaginatedIssueList: core.serialization.ObjectSchema< }); export declare namespace PaginatedIssueList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Issue.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedLocationList.ts b/src/serialization/resources/hris/types/PaginatedLocationList.ts index ddee53f8c..9abb7c39f 100644 --- a/src/serialization/resources/hris/types/PaginatedLocationList.ts +++ b/src/serialization/resources/hris/types/PaginatedLocationList.ts @@ -17,7 +17,7 @@ export const PaginatedLocationList: core.serialization.ObjectSchema< }); export declare namespace PaginatedLocationList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Location.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedPayGroupList.ts b/src/serialization/resources/hris/types/PaginatedPayGroupList.ts index f02b09563..1b9ec02f4 100644 --- a/src/serialization/resources/hris/types/PaginatedPayGroupList.ts +++ b/src/serialization/resources/hris/types/PaginatedPayGroupList.ts @@ -17,7 +17,7 @@ export const PaginatedPayGroupList: core.serialization.ObjectSchema< }); export declare namespace PaginatedPayGroupList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: PayGroup.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedPayrollRunList.ts b/src/serialization/resources/hris/types/PaginatedPayrollRunList.ts index a066b4cf8..b16f212e2 100644 --- a/src/serialization/resources/hris/types/PaginatedPayrollRunList.ts +++ b/src/serialization/resources/hris/types/PaginatedPayrollRunList.ts @@ -17,7 +17,7 @@ export const PaginatedPayrollRunList: core.serialization.ObjectSchema< }); export declare namespace PaginatedPayrollRunList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: PayrollRun.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedSyncStatusList.ts b/src/serialization/resources/hris/types/PaginatedSyncStatusList.ts index 9a9c078e8..bb72f29ff 100644 --- a/src/serialization/resources/hris/types/PaginatedSyncStatusList.ts +++ b/src/serialization/resources/hris/types/PaginatedSyncStatusList.ts @@ -17,7 +17,7 @@ export const PaginatedSyncStatusList: core.serialization.ObjectSchema< }); export declare namespace PaginatedSyncStatusList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: SyncStatus.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedTeamList.ts b/src/serialization/resources/hris/types/PaginatedTeamList.ts index c36ac1d90..993047905 100644 --- a/src/serialization/resources/hris/types/PaginatedTeamList.ts +++ b/src/serialization/resources/hris/types/PaginatedTeamList.ts @@ -16,7 +16,7 @@ export const PaginatedTeamList: core.serialization.ObjectSchema< }); export declare namespace PaginatedTeamList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: serializers.hris.Team.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedTimeOffBalanceList.ts b/src/serialization/resources/hris/types/PaginatedTimeOffBalanceList.ts index 7cdd6378e..1813bec84 100644 --- a/src/serialization/resources/hris/types/PaginatedTimeOffBalanceList.ts +++ b/src/serialization/resources/hris/types/PaginatedTimeOffBalanceList.ts @@ -17,7 +17,7 @@ export const PaginatedTimeOffBalanceList: core.serialization.ObjectSchema< }); export declare namespace PaginatedTimeOffBalanceList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: TimeOffBalance.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedTimeOffList.ts b/src/serialization/resources/hris/types/PaginatedTimeOffList.ts index 7be737a63..749cea21a 100644 --- a/src/serialization/resources/hris/types/PaginatedTimeOffList.ts +++ b/src/serialization/resources/hris/types/PaginatedTimeOffList.ts @@ -17,7 +17,7 @@ export const PaginatedTimeOffList: core.serialization.ObjectSchema< }); export declare namespace PaginatedTimeOffList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: TimeOff.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PaginatedTimesheetEntryList.ts b/src/serialization/resources/hris/types/PaginatedTimesheetEntryList.ts index 1c46a1c70..e89d5d593 100644 --- a/src/serialization/resources/hris/types/PaginatedTimesheetEntryList.ts +++ b/src/serialization/resources/hris/types/PaginatedTimesheetEntryList.ts @@ -17,7 +17,7 @@ export const PaginatedTimesheetEntryList: core.serialization.ObjectSchema< }); export declare namespace PaginatedTimesheetEntryList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: TimesheetEntry.Raw[] | null; diff --git a/src/serialization/resources/hris/types/PayCurrencyEnum.ts b/src/serialization/resources/hris/types/PayCurrencyEnum.ts index 5e1a8eb9c..9d8150807 100644 --- a/src/serialization/resources/hris/types/PayCurrencyEnum.ts +++ b/src/serialization/resources/hris/types/PayCurrencyEnum.ts @@ -319,7 +319,7 @@ export const PayCurrencyEnum: core.serialization.Schema< ]); export declare namespace PayCurrencyEnum { - type Raw = + export type Raw = | "XUA" | "AFN" | "AFA" diff --git a/src/serialization/resources/hris/types/PayFrequencyEnum.ts b/src/serialization/resources/hris/types/PayFrequencyEnum.ts index 33d7d1923..4015dde08 100644 --- a/src/serialization/resources/hris/types/PayFrequencyEnum.ts +++ b/src/serialization/resources/hris/types/PayFrequencyEnum.ts @@ -22,7 +22,7 @@ export const PayFrequencyEnum: core.serialization.Schema< ]); export declare namespace PayFrequencyEnum { - type Raw = + export type Raw = | "WEEKLY" | "BIWEEKLY" | "MONTHLY" diff --git a/src/serialization/resources/hris/types/PayGroup.ts b/src/serialization/resources/hris/types/PayGroup.ts index f0e42e7b5..fb1320652 100644 --- a/src/serialization/resources/hris/types/PayGroup.ts +++ b/src/serialization/resources/hris/types/PayGroup.ts @@ -17,13 +17,13 @@ export const PayGroup: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([RunStateEnum, core.serialization.string()]); export declare namespace PayrollRunRunState { - type Raw = RunStateEnum.Raw | string; + export type Raw = RunStateEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/PayrollRunRunType.ts b/src/serialization/resources/hris/types/PayrollRunRunType.ts index 24899ddf0..19d328dd0 100644 --- a/src/serialization/resources/hris/types/PayrollRunRunType.ts +++ b/src/serialization/resources/hris/types/PayrollRunRunType.ts @@ -13,5 +13,5 @@ export const PayrollRunRunType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([RunTypeEnum, core.serialization.string()]); export declare namespace PayrollRunRunType { - type Raw = RunTypeEnum.Raw | string; + export type Raw = RunTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/PolicyTypeEnum.ts b/src/serialization/resources/hris/types/PolicyTypeEnum.ts index 96940f791..f769a4f3a 100644 --- a/src/serialization/resources/hris/types/PolicyTypeEnum.ts +++ b/src/serialization/resources/hris/types/PolicyTypeEnum.ts @@ -10,5 +10,5 @@ export const PolicyTypeEnum: core.serialization.Schema = core.serialization.enum_(["CHILD", "SPOUSE", "DOMESTIC_PARTNER"]); export declare namespace RelationshipEnum { - type Raw = "CHILD" | "SPOUSE" | "DOMESTIC_PARTNER"; + export type Raw = "CHILD" | "SPOUSE" | "DOMESTIC_PARTNER"; } diff --git a/src/serialization/resources/hris/types/RemoteData.ts b/src/serialization/resources/hris/types/RemoteData.ts index 7670a3f9b..722a38c21 100644 --- a/src/serialization/resources/hris/types/RemoteData.ts +++ b/src/serialization/resources/hris/types/RemoteData.ts @@ -13,7 +13,7 @@ export const RemoteData: core.serialization.ObjectSchema; remote_key_name: string; remote_endpoint_info: RemoteEndpointInfo.Raw; diff --git a/src/serialization/resources/hris/types/RemoteFieldApiCoverage.ts b/src/serialization/resources/hris/types/RemoteFieldApiCoverage.ts index a61248f99..beade3df7 100644 --- a/src/serialization/resources/hris/types/RemoteFieldApiCoverage.ts +++ b/src/serialization/resources/hris/types/RemoteFieldApiCoverage.ts @@ -12,5 +12,5 @@ export const RemoteFieldApiCoverage: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.number(), core.serialization.number()]); export declare namespace RemoteFieldApiCoverage { - type Raw = number | number; + export type Raw = number | number; } diff --git a/src/serialization/resources/hris/types/RemoteFieldApiResponse.ts b/src/serialization/resources/hris/types/RemoteFieldApiResponse.ts index 05dffe162..51aff6b21 100644 --- a/src/serialization/resources/hris/types/RemoteFieldApiResponse.ts +++ b/src/serialization/resources/hris/types/RemoteFieldApiResponse.ts @@ -16,7 +16,7 @@ export const RemoteFieldApiResponse: core.serialization.ObjectSchema< company: core.serialization.property("Company", core.serialization.list(RemoteFieldApi).optional()), employeePayrollRun: core.serialization.property( "EmployeePayrollRun", - core.serialization.list(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()), @@ -33,7 +33,7 @@ export const RemoteFieldApiResponse: core.serialization.ObjectSchema< }); export declare namespace RemoteFieldApiResponse { - interface Raw { + export interface Raw { Benefit?: RemoteFieldApi.Raw[] | null; EmployerBenefit?: RemoteFieldApi.Raw[] | null; Company?: RemoteFieldApi.Raw[] | null; diff --git a/src/serialization/resources/hris/types/RemoteKey.ts b/src/serialization/resources/hris/types/RemoteKey.ts index 642e749a8..3771b9f65 100644 --- a/src/serialization/resources/hris/types/RemoteKey.ts +++ b/src/serialization/resources/hris/types/RemoteKey.ts @@ -13,7 +13,7 @@ export const RemoteKey: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([ResponseTypeEnum, core.serialization.string()]); export declare namespace RemoteResponseResponseType { - type Raw = ResponseTypeEnum.Raw | string; + export type Raw = ResponseTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/RequestFormatEnum.ts b/src/serialization/resources/hris/types/RequestFormatEnum.ts index 1bacbeb5a..2d8fc2aa2 100644 --- a/src/serialization/resources/hris/types/RequestFormatEnum.ts +++ b/src/serialization/resources/hris/types/RequestFormatEnum.ts @@ -12,5 +12,5 @@ export const RequestFormatEnum: core.serialization.Schema< > = core.serialization.enum_(["JSON", "XML", "MULTIPART"]); export declare namespace RequestFormatEnum { - type Raw = "JSON" | "XML" | "MULTIPART"; + export type Raw = "JSON" | "XML" | "MULTIPART"; } diff --git a/src/serialization/resources/hris/types/RequestTypeEnum.ts b/src/serialization/resources/hris/types/RequestTypeEnum.ts index ccf8f6887..95772af96 100644 --- a/src/serialization/resources/hris/types/RequestTypeEnum.ts +++ b/src/serialization/resources/hris/types/RequestTypeEnum.ts @@ -12,5 +12,5 @@ export const RequestTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["VACATION", "SICK", "PERSONAL", "JURY_DUTY", "VOLUNTEER", "BEREAVEMENT"]); export declare namespace RequestTypeEnum { - type Raw = "VACATION" | "SICK" | "PERSONAL" | "JURY_DUTY" | "VOLUNTEER" | "BEREAVEMENT"; + export type Raw = "VACATION" | "SICK" | "PERSONAL" | "JURY_DUTY" | "VOLUNTEER" | "BEREAVEMENT"; } diff --git a/src/serialization/resources/hris/types/ResponseTypeEnum.ts b/src/serialization/resources/hris/types/ResponseTypeEnum.ts index c462a0751..92b278935 100644 --- a/src/serialization/resources/hris/types/ResponseTypeEnum.ts +++ b/src/serialization/resources/hris/types/ResponseTypeEnum.ts @@ -12,5 +12,5 @@ export const ResponseTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["JSON", "BASE64_GZIP"]); export declare namespace ResponseTypeEnum { - type Raw = "JSON" | "BASE64_GZIP"; + export type Raw = "JSON" | "BASE64_GZIP"; } diff --git a/src/serialization/resources/hris/types/RoleEnum.ts b/src/serialization/resources/hris/types/RoleEnum.ts index a455c3bfc..f67e068e1 100644 --- a/src/serialization/resources/hris/types/RoleEnum.ts +++ b/src/serialization/resources/hris/types/RoleEnum.ts @@ -10,5 +10,5 @@ export const RoleEnum: core.serialization.Schema = core.serialization.enum_(["IN_NEXT_SYNC", "IN_LAST_SYNC"]); export declare namespace SelectiveSyncConfigurationsUsageEnum { - type Raw = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; + export type Raw = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; } diff --git a/src/serialization/resources/hris/types/StatusFd5Enum.ts b/src/serialization/resources/hris/types/StatusFd5Enum.ts index 6bc391408..685b7a1c8 100644 --- a/src/serialization/resources/hris/types/StatusFd5Enum.ts +++ b/src/serialization/resources/hris/types/StatusFd5Enum.ts @@ -10,5 +10,5 @@ export const StatusFd5Enum: core.serialization.Schema = core.serialization.undiscriminatedUnion([LastSyncResultEnum, core.serialization.string()]); export declare namespace SyncStatusLastSyncResult { - type Raw = LastSyncResultEnum.Raw | string; + export type Raw = LastSyncResultEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/Tax.ts b/src/serialization/resources/hris/types/Tax.ts index 0091bfc27..089da943a 100644 --- a/src/serialization/resources/hris/types/Tax.ts +++ b/src/serialization/resources/hris/types/Tax.ts @@ -20,14 +20,14 @@ export const Tax: core.serialization.ObjectSchema serializers.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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Team { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/hris/types/TeamParentTeam.ts b/src/serialization/resources/hris/types/TeamParentTeam.ts index 4dc97ff6d..fe21a04de 100644 --- a/src/serialization/resources/hris/types/TeamParentTeam.ts +++ b/src/serialization/resources/hris/types/TeamParentTeam.ts @@ -13,5 +13,5 @@ export const TeamParentTeam: core.serialization.Schema = core.serialization.undiscriminatedUnion([PolicyTypeEnum, core.serialization.string()]); export declare namespace TimeOffBalancePolicyType { - type Raw = PolicyTypeEnum.Raw | string; + export type Raw = PolicyTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/TimeOffEmployee.ts b/src/serialization/resources/hris/types/TimeOffEmployee.ts index 944ae5541..36fb410c0 100644 --- a/src/serialization/resources/hris/types/TimeOffEmployee.ts +++ b/src/serialization/resources/hris/types/TimeOffEmployee.ts @@ -15,5 +15,5 @@ export const TimeOffEmployee: core.serialization.Schema< ]); export declare namespace TimeOffEmployee { - type Raw = string | serializers.hris.Employee.Raw; + export type Raw = string | serializers.hris.Employee.Raw; } diff --git a/src/serialization/resources/hris/types/TimeOffRequest.ts b/src/serialization/resources/hris/types/TimeOffRequest.ts index f1fce62ea..aa7e1afdf 100644 --- a/src/serialization/resources/hris/types/TimeOffRequest.ts +++ b/src/serialization/resources/hris/types/TimeOffRequest.ts @@ -26,16 +26,16 @@ export const TimeOffRequest: core.serialization.ObjectSchema< endTime: core.serialization.property("end_time", core.serialization.date().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace TimeOffRequest { - interface Raw { + export interface Raw { employee?: TimeOffRequestEmployee.Raw | null; approver?: TimeOffRequestApprover.Raw | null; status?: TimeOffRequestStatus.Raw | null; diff --git a/src/serialization/resources/hris/types/TimeOffRequestApprover.ts b/src/serialization/resources/hris/types/TimeOffRequestApprover.ts index 66f98d3a2..7972de4e4 100644 --- a/src/serialization/resources/hris/types/TimeOffRequestApprover.ts +++ b/src/serialization/resources/hris/types/TimeOffRequestApprover.ts @@ -15,5 +15,5 @@ export const TimeOffRequestApprover: core.serialization.Schema< ]); export declare namespace TimeOffRequestApprover { - type Raw = string | serializers.hris.Employee.Raw; + export type Raw = string | serializers.hris.Employee.Raw; } diff --git a/src/serialization/resources/hris/types/TimeOffRequestEmployee.ts b/src/serialization/resources/hris/types/TimeOffRequestEmployee.ts index 2d5d7517a..5b41af97a 100644 --- a/src/serialization/resources/hris/types/TimeOffRequestEmployee.ts +++ b/src/serialization/resources/hris/types/TimeOffRequestEmployee.ts @@ -15,5 +15,5 @@ export const TimeOffRequestEmployee: core.serialization.Schema< ]); export declare namespace TimeOffRequestEmployee { - type Raw = string | serializers.hris.Employee.Raw; + export type Raw = string | serializers.hris.Employee.Raw; } diff --git a/src/serialization/resources/hris/types/TimeOffRequestRequestType.ts b/src/serialization/resources/hris/types/TimeOffRequestRequestType.ts index 03038695d..829b68558 100644 --- a/src/serialization/resources/hris/types/TimeOffRequestRequestType.ts +++ b/src/serialization/resources/hris/types/TimeOffRequestRequestType.ts @@ -13,5 +13,5 @@ export const TimeOffRequestRequestType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([RequestTypeEnum, core.serialization.string()]); export declare namespace TimeOffRequestRequestType { - type Raw = RequestTypeEnum.Raw | string; + export type Raw = RequestTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/TimeOffRequestStatus.ts b/src/serialization/resources/hris/types/TimeOffRequestStatus.ts index a95e652ea..8173a57c3 100644 --- a/src/serialization/resources/hris/types/TimeOffRequestStatus.ts +++ b/src/serialization/resources/hris/types/TimeOffRequestStatus.ts @@ -13,5 +13,5 @@ export const TimeOffRequestStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TimeOffStatusEnum, core.serialization.string()]); export declare namespace TimeOffRequestStatus { - type Raw = TimeOffStatusEnum.Raw | string; + export type Raw = TimeOffStatusEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/TimeOffRequestType.ts b/src/serialization/resources/hris/types/TimeOffRequestType.ts index 075ccde86..24aca1460 100644 --- a/src/serialization/resources/hris/types/TimeOffRequestType.ts +++ b/src/serialization/resources/hris/types/TimeOffRequestType.ts @@ -13,5 +13,5 @@ export const TimeOffRequestType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([RequestTypeEnum, core.serialization.string()]); export declare namespace TimeOffRequestType { - type Raw = RequestTypeEnum.Raw | string; + export type Raw = RequestTypeEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/TimeOffRequestUnits.ts b/src/serialization/resources/hris/types/TimeOffRequestUnits.ts index 25a0660f1..63e80aee6 100644 --- a/src/serialization/resources/hris/types/TimeOffRequestUnits.ts +++ b/src/serialization/resources/hris/types/TimeOffRequestUnits.ts @@ -13,5 +13,5 @@ export const TimeOffRequestUnits: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([UnitsEnum, core.serialization.string()]); export declare namespace TimeOffRequestUnits { - type Raw = UnitsEnum.Raw | string; + export type Raw = UnitsEnum.Raw | string; } diff --git a/src/serialization/resources/hris/types/TimeOffResponse.ts b/src/serialization/resources/hris/types/TimeOffResponse.ts index c18dfabaa..bdffed440 100644 --- a/src/serialization/resources/hris/types/TimeOffResponse.ts +++ b/src/serialization/resources/hris/types/TimeOffResponse.ts @@ -21,7 +21,7 @@ export const TimeOffResponse: core.serialization.ObjectSchema< }); export declare namespace TimeOffResponse { - interface Raw { + export interface Raw { model: TimeOff.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/hris/types/TimeOffStatus.ts b/src/serialization/resources/hris/types/TimeOffStatus.ts index 559f3f05a..e5d4e9b21 100644 --- a/src/serialization/resources/hris/types/TimeOffStatus.ts +++ b/src/serialization/resources/hris/types/TimeOffStatus.ts @@ -11,5 +11,5 @@ export const TimeOffStatus: core.serialization.Schema = core.serialization.enum_(["REQUESTED", "APPROVED", "DECLINED", "CANCELLED", "DELETED"]); export declare namespace TimeOffStatusEnum { - type Raw = "REQUESTED" | "APPROVED" | "DECLINED" | "CANCELLED" | "DELETED"; + export type Raw = "REQUESTED" | "APPROVED" | "DECLINED" | "CANCELLED" | "DELETED"; } diff --git a/src/serialization/resources/hris/types/TimeOffUnits.ts b/src/serialization/resources/hris/types/TimeOffUnits.ts index 4dfb6edbb..165fbd37b 100644 --- a/src/serialization/resources/hris/types/TimeOffUnits.ts +++ b/src/serialization/resources/hris/types/TimeOffUnits.ts @@ -11,5 +11,5 @@ export const TimeOffUnits: core.serialization.Schema = core.serialization.undiscriminatedUnion([RemoteResponse, core.serialization.string()]); export declare namespace AsyncPassthroughRetrieveResponse { - type Raw = RemoteResponse.Raw | string; + export 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 df96695e6..40f3f871d 100644 --- a/src/serialization/resources/ticketing/resources/attachments/client/requests/TicketingAttachmentEndpointRequest.ts +++ b/src/serialization/resources/ticketing/resources/attachments/client/requests/TicketingAttachmentEndpointRequest.ts @@ -15,7 +15,7 @@ export const TicketingAttachmentEndpointRequest: core.serialization.Schema< }); export declare namespace TicketingAttachmentEndpointRequest { - interface Raw { + export interface Raw { model: AttachmentRequest.Raw; } } diff --git a/src/serialization/resources/ticketing/resources/collections/types/CollectionsViewersListRequestExpand.ts b/src/serialization/resources/ticketing/resources/collections/types/CollectionsViewersListRequestExpand.ts index 0bde6037d..474b23743 100644 --- a/src/serialization/resources/ticketing/resources/collections/types/CollectionsViewersListRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/collections/types/CollectionsViewersListRequestExpand.ts @@ -12,5 +12,5 @@ export const CollectionsViewersListRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["team", "user", "user,team"]); export declare namespace CollectionsViewersListRequestExpand { - type Raw = "team" | "user" | "user,team"; + export type Raw = "team" | "user" | "user,team"; } 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 f17661dba..6eb16e43b 100644 --- a/src/serialization/resources/ticketing/resources/comments/client/requests/CommentEndpointRequest.ts +++ b/src/serialization/resources/ticketing/resources/comments/client/requests/CommentEndpointRequest.ts @@ -15,7 +15,7 @@ export const CommentEndpointRequest: core.serialization.Schema< }); export declare namespace CommentEndpointRequest { - interface Raw { + export interface 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 2f29d8bdb..443e7757b 100644 --- a/src/serialization/resources/ticketing/resources/comments/types/CommentsListRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/comments/types/CommentsListRequestExpand.ts @@ -20,7 +20,7 @@ export const CommentsListRequestExpand: core.serialization.Schema< ]); export declare namespace CommentsListRequestExpand { - type Raw = + export type Raw = | "contact" | "contact,ticket" | "ticket" diff --git a/src/serialization/resources/ticketing/resources/comments/types/CommentsRetrieveRequestExpand.ts b/src/serialization/resources/ticketing/resources/comments/types/CommentsRetrieveRequestExpand.ts index eb2bae72c..687210814 100644 --- a/src/serialization/resources/ticketing/resources/comments/types/CommentsRetrieveRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/comments/types/CommentsRetrieveRequestExpand.ts @@ -20,7 +20,7 @@ export const CommentsRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace CommentsRetrieveRequestExpand { - type Raw = + export type Raw = | "contact" | "contact,ticket" | "ticket" 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 69097327c..54a93454a 100644 --- a/src/serialization/resources/ticketing/resources/contacts/client/requests/TicketingContactEndpointRequest.ts +++ b/src/serialization/resources/ticketing/resources/contacts/client/requests/TicketingContactEndpointRequest.ts @@ -15,7 +15,7 @@ export const TicketingContactEndpointRequest: core.serialization.Schema< }); export declare namespace TicketingContactEndpointRequest { - interface Raw { + export interface 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 1c6a548df..6f910a880 100644 --- a/src/serialization/resources/ticketing/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts +++ b/src/serialization/resources/ticketing/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -14,7 +14,7 @@ export const CreateFieldMappingRequest: core.serialization.Schema< targetFieldDescription: core.serialization.property("target_field_description", core.serialization.string()), remoteFieldTraversalPath: core.serialization.property( "remote_field_traversal_path", - core.serialization.list(core.serialization.unknown()) + core.serialization.list(core.serialization.unknown()), ), remoteMethod: core.serialization.property("remote_method", core.serialization.string()), remoteUrlPath: core.serialization.property("remote_url_path", core.serialization.string()), @@ -22,7 +22,7 @@ export const CreateFieldMappingRequest: core.serialization.Schema< }); export declare namespace CreateFieldMappingRequest { - interface Raw { + export interface Raw { target_field_name: string; target_field_description: string; remote_field_traversal_path: unknown[]; 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 2d0595264..1115d11b5 100644 --- a/src/serialization/resources/ticketing/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts +++ b/src/serialization/resources/ticketing/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts @@ -12,14 +12,14 @@ export const PatchedEditFieldMappingRequest: core.serialization.Schema< > = core.serialization.object({ remoteFieldTraversalPath: core.serialization.property( "remote_field_traversal_path", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), remoteMethod: core.serialization.property("remote_method", core.serialization.string().optional()), remoteUrlPath: core.serialization.property("remote_url_path", core.serialization.string().optional()), }); export declare namespace PatchedEditFieldMappingRequest { - interface Raw { + export interface Raw { remote_field_traversal_path?: unknown[] | null; remote_method?: string | null; remote_url_path?: string | null; diff --git a/src/serialization/resources/ticketing/resources/forceResync/client/syncStatusResyncCreate.ts b/src/serialization/resources/ticketing/resources/forceResync/client/syncStatusResyncCreate.ts index 02f0e9045..f67d71b4c 100644 --- a/src/serialization/resources/ticketing/resources/forceResync/client/syncStatusResyncCreate.ts +++ b/src/serialization/resources/ticketing/resources/forceResync/client/syncStatusResyncCreate.ts @@ -13,5 +13,5 @@ export const Response: core.serialization.Schema< > = core.serialization.list(SyncStatus); export declare namespace Response { - type Raw = SyncStatus.Raw[]; + export 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 926e7efa0..bc03b7e42 100644 --- a/src/serialization/resources/ticketing/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts +++ b/src/serialization/resources/ticketing/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts @@ -14,7 +14,7 @@ export const GenerateRemoteKeyRequest: core.serialization.Schema< }); export declare namespace GenerateRemoteKeyRequest { - interface Raw { + export interface Raw { name: string; } } diff --git a/src/serialization/resources/ticketing/resources/issues/types/IssuesListRequestStatus.ts b/src/serialization/resources/ticketing/resources/issues/types/IssuesListRequestStatus.ts index 5fe74aa38..dc203073b 100644 --- a/src/serialization/resources/ticketing/resources/issues/types/IssuesListRequestStatus.ts +++ b/src/serialization/resources/ticketing/resources/issues/types/IssuesListRequestStatus.ts @@ -12,5 +12,5 @@ export const IssuesListRequestStatus: core.serialization.Schema< > = core.serialization.enum_(["ONGOING", "RESOLVED"]); export declare namespace IssuesListRequestStatus { - type Raw = "ONGOING" | "RESOLVED"; + export type Raw = "ONGOING" | "RESOLVED"; } 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 41587bffd..1698a0471 100644 --- a/src/serialization/resources/ticketing/resources/linkToken/client/requests/EndUserDetailsRequest.ts +++ b/src/serialization/resources/ticketing/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -22,32 +22,32 @@ export const EndUserDetailsRequest: core.serialization.Schema< linkExpiryMins: core.serialization.property("link_expiry_mins", core.serialization.number().optional()), shouldCreateMagicLinkUrl: core.serialization.property( "should_create_magic_link_url", - core.serialization.boolean().optional() + core.serialization.boolean().optional(), ), hideAdminMagicLink: core.serialization.property("hide_admin_magic_link", core.serialization.boolean().optional()), commonModels: core.serialization.property( "common_models", - core.serialization.list(CommonModelScopesBodyRequest).optional() + core.serialization.list(CommonModelScopesBodyRequest).optional(), ), categoryCommonModelScopes: core.serialization.property( "category_common_model_scopes", core.serialization .record( core.serialization.string(), - core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional() + core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional(), ) - .optional() + .optional(), ), language: LanguageEnum.optional(), areSyncsDisabled: core.serialization.property("are_syncs_disabled", core.serialization.boolean().optional()), integrationSpecificConfig: core.serialization.property( "integration_specific_config", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace EndUserDetailsRequest { - interface Raw { + export interface Raw { end_user_email_address: string; end_user_organization_name: string; end_user_origin_id: string; diff --git a/src/serialization/resources/ticketing/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/serialization/resources/ticketing/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts index c49509a26..ed0c1b43e 100644 --- a/src/serialization/resources/ticketing/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts +++ b/src/serialization/resources/ticketing/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -12,5 +12,5 @@ export const LinkedAccountsListRequestCategory: core.serialization.Schema< > = core.serialization.enum_(["accounting", "ats", "crm", "filestorage", "hris", "mktg", "ticketing"]); export declare namespace LinkedAccountsListRequestCategory { - type Raw = "accounting" | "ats" | "crm" | "filestorage" | "hris" | "mktg" | "ticketing"; + export type Raw = "accounting" | "ats" | "crm" | "filestorage" | "hris" | "mktg" | "ticketing"; } diff --git a/src/serialization/resources/ticketing/resources/projects/types/ProjectsUsersListRequestExpand.ts b/src/serialization/resources/ticketing/resources/projects/types/ProjectsUsersListRequestExpand.ts index a6e9f4195..f6e66d67a 100644 --- a/src/serialization/resources/ticketing/resources/projects/types/ProjectsUsersListRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/projects/types/ProjectsUsersListRequestExpand.ts @@ -12,5 +12,5 @@ export const ProjectsUsersListRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["roles", "teams", "teams,roles"]); export declare namespace ProjectsUsersListRequestExpand { - type Raw = "roles" | "teams" | "teams,roles"; + export type Raw = "roles" | "teams" | "teams,roles"; } 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 4a439af3a..8a97a8497 100644 --- a/src/serialization/resources/ticketing/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts +++ b/src/serialization/resources/ticketing/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts @@ -14,7 +14,7 @@ export const RemoteKeyForRegenerationRequest: core.serialization.Schema< }); export declare namespace RemoteKeyForRegenerationRequest { - interface Raw { + export interface Raw { name: string; } } 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 bce51fde2..da5c6c08a 100644 --- a/src/serialization/resources/ticketing/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/ticketing/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -13,12 +13,12 @@ export const LinkedAccountCommonModelScopeDeserializerRequest: core.serializatio > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list(IndividualCommonModelScopeDeserializerRequest) + core.serialization.list(IndividualCommonModelScopeDeserializerRequest), ), }); export declare namespace LinkedAccountCommonModelScopeDeserializerRequest { - interface Raw { + export interface 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 a077cdaff..b60168e74 100644 --- a/src/serialization/resources/ticketing/resources/tickets/client/requests/PatchedTicketEndpointRequest.ts +++ b/src/serialization/resources/ticketing/resources/tickets/client/requests/PatchedTicketEndpointRequest.ts @@ -15,7 +15,7 @@ export const PatchedTicketEndpointRequest: core.serialization.Schema< }); export declare namespace PatchedTicketEndpointRequest { - interface Raw { + export interface 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 1e202f7d2..8a27369e6 100644 --- a/src/serialization/resources/ticketing/resources/tickets/client/requests/TicketEndpointRequest.ts +++ b/src/serialization/resources/ticketing/resources/tickets/client/requests/TicketEndpointRequest.ts @@ -15,7 +15,7 @@ export const TicketEndpointRequest: core.serialization.Schema< }); export declare namespace TicketEndpointRequest { - interface Raw { + export interface Raw { model: TicketRequest.Raw; } } diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestExpand.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestExpand.ts index 6453550d3..b27727ecd 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestExpand.ts @@ -268,7 +268,7 @@ export const TicketsListRequestExpand: core.serialization.Schema< ]); export declare namespace TicketsListRequestExpand { - type Raw = + export type Raw = | "account" | "account,contact" | "account,contact,creator" diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestPriority.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestPriority.ts index 688e6f2fe..74a61145f 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestPriority.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestPriority.ts @@ -12,5 +12,5 @@ export const TicketsListRequestPriority: core.serialization.Schema< > = core.serialization.enum_(["HIGH", "LOW", "NORMAL", "URGENT"]); export declare namespace TicketsListRequestPriority { - type Raw = "HIGH" | "LOW" | "NORMAL" | "URGENT"; + export type Raw = "HIGH" | "LOW" | "NORMAL" | "URGENT"; } diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestRemoteFields.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestRemoteFields.ts index 00280e0a4..49536567c 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestRemoteFields.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestRemoteFields.ts @@ -20,7 +20,7 @@ export const TicketsListRequestRemoteFields: core.serialization.Schema< ]); export declare namespace TicketsListRequestRemoteFields { - type Raw = + export type Raw = | "priority" | "priority,status" | "priority,status,ticket_type" diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestShowEnumOrigins.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestShowEnumOrigins.ts index 3e9af403d..2627dd7bc 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestShowEnumOrigins.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsListRequestShowEnumOrigins.ts @@ -20,7 +20,7 @@ export const TicketsListRequestShowEnumOrigins: core.serialization.Schema< ]); export declare namespace TicketsListRequestShowEnumOrigins { - type Raw = + export type Raw = | "priority" | "priority,status" | "priority,status,ticket_type" diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestExpand.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestExpand.ts index 77a279dd3..d6bb648be 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestExpand.ts @@ -268,7 +268,7 @@ export const TicketsRetrieveRequestExpand: core.serialization.Schema< ]); export declare namespace TicketsRetrieveRequestExpand { - type Raw = + export type Raw = | "account" | "account,contact" | "account,contact,creator" diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestRemoteFields.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestRemoteFields.ts index b14cafc4e..2f40919de 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestRemoteFields.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestRemoteFields.ts @@ -20,7 +20,7 @@ export const TicketsRetrieveRequestRemoteFields: core.serialization.Schema< ]); export declare namespace TicketsRetrieveRequestRemoteFields { - type Raw = + export type Raw = | "priority" | "priority,status" | "priority,status,ticket_type" diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestShowEnumOrigins.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestShowEnumOrigins.ts index 782aed839..81a40a21a 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestShowEnumOrigins.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsRetrieveRequestShowEnumOrigins.ts @@ -20,7 +20,7 @@ export const TicketsRetrieveRequestShowEnumOrigins: core.serialization.Schema< ]); export declare namespace TicketsRetrieveRequestShowEnumOrigins { - type Raw = + export type Raw = | "priority" | "priority,status" | "priority,status,ticket_type" diff --git a/src/serialization/resources/ticketing/resources/tickets/types/TicketsViewersListRequestExpand.ts b/src/serialization/resources/ticketing/resources/tickets/types/TicketsViewersListRequestExpand.ts index 86fb25683..4b99fc80f 100644 --- a/src/serialization/resources/ticketing/resources/tickets/types/TicketsViewersListRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/tickets/types/TicketsViewersListRequestExpand.ts @@ -12,5 +12,5 @@ export const TicketsViewersListRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["team", "user", "user,team"]); export declare namespace TicketsViewersListRequestExpand { - type Raw = "team" | "user" | "user,team"; + export type Raw = "team" | "user" | "user,team"; } diff --git a/src/serialization/resources/ticketing/resources/users/types/UsersListRequestExpand.ts b/src/serialization/resources/ticketing/resources/users/types/UsersListRequestExpand.ts index f1901b407..932936c41 100644 --- a/src/serialization/resources/ticketing/resources/users/types/UsersListRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/users/types/UsersListRequestExpand.ts @@ -12,5 +12,5 @@ export const UsersListRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["roles", "teams", "teams,roles"]); export declare namespace UsersListRequestExpand { - type Raw = "roles" | "teams" | "teams,roles"; + export type Raw = "roles" | "teams" | "teams,roles"; } diff --git a/src/serialization/resources/ticketing/resources/users/types/UsersRetrieveRequestExpand.ts b/src/serialization/resources/ticketing/resources/users/types/UsersRetrieveRequestExpand.ts index aca8c67ae..0b902853c 100644 --- a/src/serialization/resources/ticketing/resources/users/types/UsersRetrieveRequestExpand.ts +++ b/src/serialization/resources/ticketing/resources/users/types/UsersRetrieveRequestExpand.ts @@ -12,5 +12,5 @@ export const UsersRetrieveRequestExpand: core.serialization.Schema< > = core.serialization.enum_(["roles", "teams", "teams,roles"]); export declare namespace UsersRetrieveRequestExpand { - type Raw = "roles" | "teams" | "teams,roles"; + export type Raw = "roles" | "teams" | "teams,roles"; } diff --git a/src/serialization/resources/ticketing/resources/webhookReceivers/client/list.ts b/src/serialization/resources/ticketing/resources/webhookReceivers/client/list.ts index a0437330d..adadb7837 100644 --- a/src/serialization/resources/ticketing/resources/webhookReceivers/client/list.ts +++ b/src/serialization/resources/ticketing/resources/webhookReceivers/client/list.ts @@ -13,5 +13,5 @@ export const Response: core.serialization.Schema< > = core.serialization.list(WebhookReceiver); export declare namespace Response { - type Raw = WebhookReceiver.Raw[]; + export 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 03ecaaf1c..a1d74cf42 100644 --- a/src/serialization/resources/ticketing/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts +++ b/src/serialization/resources/ticketing/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts @@ -16,7 +16,7 @@ export const WebhookReceiverRequest: core.serialization.Schema< }); export declare namespace WebhookReceiverRequest { - interface Raw { + export interface Raw { event: string; is_active: boolean; key?: string | null; diff --git a/src/serialization/resources/ticketing/types/AccessLevelEnum.ts b/src/serialization/resources/ticketing/types/AccessLevelEnum.ts index 2e64ab0ac..4ebe31a43 100644 --- a/src/serialization/resources/ticketing/types/AccessLevelEnum.ts +++ b/src/serialization/resources/ticketing/types/AccessLevelEnum.ts @@ -12,5 +12,5 @@ export const AccessLevelEnum: core.serialization.Schema< > = core.serialization.enum_(["PRIVATE", "COMPANY", "PUBLIC"]); export declare namespace AccessLevelEnum { - type Raw = "PRIVATE" | "COMPANY" | "PUBLIC"; + export type Raw = "PRIVATE" | "COMPANY" | "PUBLIC"; } diff --git a/src/serialization/resources/ticketing/types/Account.ts b/src/serialization/resources/ticketing/types/Account.ts index 685df479d..835156c4e 100644 --- a/src/serialization/resources/ticketing/types/Account.ts +++ b/src/serialization/resources/ticketing/types/Account.ts @@ -18,13 +18,13 @@ export const Account: core.serialization.ObjectSchema = core.serialization.enum_(["COMPLETE", "INCOMPLETE", "RELINK_NEEDED", "IDLE"]); export declare namespace AccountDetailsAndActionsStatusEnum { - type Raw = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; + export type Raw = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; } diff --git a/src/serialization/resources/ticketing/types/AccountIntegration.ts b/src/serialization/resources/ticketing/types/AccountIntegration.ts index 2d8bfdd3b..a1767af00 100644 --- a/src/serialization/resources/ticketing/types/AccountIntegration.ts +++ b/src/serialization/resources/ticketing/types/AccountIntegration.ts @@ -20,20 +20,20 @@ export const AccountIntegration: core.serialization.ObjectSchema< slug: core.serialization.string().optional(), apiEndpointsToDocumentationUrls: core.serialization.property( "api_endpoints_to_documentation_urls", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), webhookSetupGuideUrl: core.serialization.property( "webhook_setup_guide_url", - core.serialization.string().optional() + core.serialization.string().optional(), ), categoryBetaStatus: core.serialization.property( "category_beta_status", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace AccountIntegration { - interface Raw { + export interface Raw { name: string; abbreviated_name?: string | null; categories?: CategoriesEnum.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/AccountToken.ts b/src/serialization/resources/ticketing/types/AccountToken.ts index c6b783fad..de6f0aaa5 100644 --- a/src/serialization/resources/ticketing/types/AccountToken.ts +++ b/src/serialization/resources/ticketing/types/AccountToken.ts @@ -17,7 +17,7 @@ export const AccountToken: core.serialization.ObjectSchema< }); export declare namespace AccountToken { - interface Raw { + export interface Raw { account_token: string; integration: AccountIntegration.Raw; id: string; diff --git a/src/serialization/resources/ticketing/types/AdvancedMetadata.ts b/src/serialization/resources/ticketing/types/AdvancedMetadata.ts index 3483c475a..b27e6bb58 100644 --- a/src/serialization/resources/ticketing/types/AdvancedMetadata.ts +++ b/src/serialization/resources/ticketing/types/AdvancedMetadata.ts @@ -17,12 +17,12 @@ export const AdvancedMetadata: core.serialization.ObjectSchema< isCustom: core.serialization.property("is_custom", core.serialization.boolean().optional()), fieldChoices: core.serialization.property( "field_choices", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace AdvancedMetadata { - interface Raw { + export interface Raw { id: string; display_name?: string | null; description?: string | null; diff --git a/src/serialization/resources/ticketing/types/AsyncPassthroughReciept.ts b/src/serialization/resources/ticketing/types/AsyncPassthroughReciept.ts index d2c7cb047..6c059b218 100644 --- a/src/serialization/resources/ticketing/types/AsyncPassthroughReciept.ts +++ b/src/serialization/resources/ticketing/types/AsyncPassthroughReciept.ts @@ -14,7 +14,7 @@ export const AsyncPassthroughReciept: core.serialization.ObjectSchema< }); export declare namespace AsyncPassthroughReciept { - interface Raw { + export interface Raw { async_passthrough_receipt_id: string; } } diff --git a/src/serialization/resources/ticketing/types/Attachment.ts b/src/serialization/resources/ticketing/types/Attachment.ts index 2986fd38e..bbbec5a97 100644 --- a/src/serialization/resources/ticketing/types/Attachment.ts +++ b/src/serialization/resources/ticketing/types/Attachment.ts @@ -24,13 +24,13 @@ export const Attachment: core.serialization.ObjectSchema< 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() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Attachment { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/ticketing/types/AttachmentRequest.ts b/src/serialization/resources/ticketing/types/AttachmentRequest.ts index 6cd67d6cd..3a8d86a2d 100644 --- a/src/serialization/resources/ticketing/types/AttachmentRequest.ts +++ b/src/serialization/resources/ticketing/types/AttachmentRequest.ts @@ -18,16 +18,16 @@ export const AttachmentRequest: core.serialization.ObjectSchema< uploadedBy: core.serialization.property("uploaded_by", core.serialization.string().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace AttachmentRequest { - interface Raw { + export interface Raw { file_name?: string | null; ticket?: AttachmentRequestTicket.Raw | null; file_url?: string | null; diff --git a/src/serialization/resources/ticketing/types/AttachmentRequestTicket.ts b/src/serialization/resources/ticketing/types/AttachmentRequestTicket.ts index f85256b79..9c0032074 100644 --- a/src/serialization/resources/ticketing/types/AttachmentRequestTicket.ts +++ b/src/serialization/resources/ticketing/types/AttachmentRequestTicket.ts @@ -15,5 +15,5 @@ export const AttachmentRequestTicket: core.serialization.Schema< ]); export declare namespace AttachmentRequestTicket { - type Raw = string | serializers.ticketing.Ticket.Raw; + export type Raw = string | serializers.ticketing.Ticket.Raw; } diff --git a/src/serialization/resources/ticketing/types/AttachmentTicket.ts b/src/serialization/resources/ticketing/types/AttachmentTicket.ts index f7cd27832..f11cccc56 100644 --- a/src/serialization/resources/ticketing/types/AttachmentTicket.ts +++ b/src/serialization/resources/ticketing/types/AttachmentTicket.ts @@ -15,5 +15,5 @@ export const AttachmentTicket: core.serialization.Schema< ]); export declare namespace AttachmentTicket { - type Raw = string | serializers.ticketing.Ticket.Raw; + export type Raw = string | serializers.ticketing.Ticket.Raw; } diff --git a/src/serialization/resources/ticketing/types/AuditLogEvent.ts b/src/serialization/resources/ticketing/types/AuditLogEvent.ts index 31f66b52c..c7ea45583 100644 --- a/src/serialization/resources/ticketing/types/AuditLogEvent.ts +++ b/src/serialization/resources/ticketing/types/AuditLogEvent.ts @@ -23,7 +23,7 @@ export const AuditLogEvent: core.serialization.ObjectSchema< }); export declare namespace AuditLogEvent { - interface Raw { + export interface Raw { id?: string | null; user_name?: string | null; user_email?: string | null; diff --git a/src/serialization/resources/ticketing/types/AuditLogEventEventType.ts b/src/serialization/resources/ticketing/types/AuditLogEventEventType.ts index cb117a0f4..cfea29def 100644 --- a/src/serialization/resources/ticketing/types/AuditLogEventEventType.ts +++ b/src/serialization/resources/ticketing/types/AuditLogEventEventType.ts @@ -13,5 +13,5 @@ export const AuditLogEventEventType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([EventTypeEnum, core.serialization.string()]); export declare namespace AuditLogEventEventType { - type Raw = EventTypeEnum.Raw | string; + export type Raw = EventTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/AuditLogEventRole.ts b/src/serialization/resources/ticketing/types/AuditLogEventRole.ts index 8a9cc35ec..ae8afb310 100644 --- a/src/serialization/resources/ticketing/types/AuditLogEventRole.ts +++ b/src/serialization/resources/ticketing/types/AuditLogEventRole.ts @@ -13,5 +13,5 @@ export const AuditLogEventRole: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([RoleEnum, core.serialization.string()]); export declare namespace AuditLogEventRole { - type Raw = RoleEnum.Raw | string; + export type Raw = RoleEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/AvailableActions.ts b/src/serialization/resources/ticketing/types/AvailableActions.ts index 29dd7e8f0..41452909d 100644 --- a/src/serialization/resources/ticketing/types/AvailableActions.ts +++ b/src/serialization/resources/ticketing/types/AvailableActions.ts @@ -16,12 +16,12 @@ export const AvailableActions: core.serialization.ObjectSchema< passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), availableModelOperations: core.serialization.property( "available_model_operations", - core.serialization.list(ModelOperation).optional() + core.serialization.list(ModelOperation).optional(), ), }); export declare namespace AvailableActions { - interface Raw { + export interface Raw { integration: AccountIntegration.Raw; passthrough_available: boolean; 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 a65169f35..318f2776e 100644 --- a/src/serialization/resources/ticketing/types/CategoriesEnum.ts +++ b/src/serialization/resources/ticketing/types/CategoriesEnum.ts @@ -12,5 +12,5 @@ export const CategoriesEnum: core.serialization.Schema< > = core.serialization.enum_(["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"]); export declare namespace CategoriesEnum { - type Raw = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; + export type Raw = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; } diff --git a/src/serialization/resources/ticketing/types/CategoryEnum.ts b/src/serialization/resources/ticketing/types/CategoryEnum.ts index 2465d562b..22f613d6a 100644 --- a/src/serialization/resources/ticketing/types/CategoryEnum.ts +++ b/src/serialization/resources/ticketing/types/CategoryEnum.ts @@ -12,5 +12,5 @@ export const CategoryEnum: core.serialization.Schema< > = core.serialization.enum_(["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"]); export declare namespace CategoryEnum { - type Raw = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; + export type Raw = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage"; } diff --git a/src/serialization/resources/ticketing/types/Collection.ts b/src/serialization/resources/ticketing/types/Collection.ts index ab4d3dfc9..63b3d9beb 100644 --- a/src/serialization/resources/ticketing/types/Collection.ts +++ b/src/serialization/resources/ticketing/types/Collection.ts @@ -22,19 +22,19 @@ export const Collection: core.serialization.ObjectSchema< collectionType: core.serialization.property("collection_type", CollectionCollectionType.optional()), parentCollection: core.serialization.property( "parent_collection", - core.serialization.lazy(() => serializers.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", CollectionAccessLevel.optional()), fieldMappings: core.serialization.property( "field_mappings", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), }); export declare namespace Collection { - interface Raw { + export interface Raw { id?: string | null; remote_id?: string | null; created_at?: string | null; diff --git a/src/serialization/resources/ticketing/types/CollectionAccessLevel.ts b/src/serialization/resources/ticketing/types/CollectionAccessLevel.ts index 284d96924..461ece390 100644 --- a/src/serialization/resources/ticketing/types/CollectionAccessLevel.ts +++ b/src/serialization/resources/ticketing/types/CollectionAccessLevel.ts @@ -13,5 +13,5 @@ export const CollectionAccessLevel: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([AccessLevelEnum, core.serialization.string()]); export declare namespace CollectionAccessLevel { - type Raw = AccessLevelEnum.Raw | string; + export type Raw = AccessLevelEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/CollectionCollectionType.ts b/src/serialization/resources/ticketing/types/CollectionCollectionType.ts index 3b2d21d58..22d73060e 100644 --- a/src/serialization/resources/ticketing/types/CollectionCollectionType.ts +++ b/src/serialization/resources/ticketing/types/CollectionCollectionType.ts @@ -13,5 +13,5 @@ export const CollectionCollectionType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([CollectionTypeEnum, core.serialization.string()]); export declare namespace CollectionCollectionType { - type Raw = CollectionTypeEnum.Raw | string; + export type Raw = CollectionTypeEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/CollectionParentCollection.ts b/src/serialization/resources/ticketing/types/CollectionParentCollection.ts index 92e47ce9b..a24bcdf9c 100644 --- a/src/serialization/resources/ticketing/types/CollectionParentCollection.ts +++ b/src/serialization/resources/ticketing/types/CollectionParentCollection.ts @@ -15,5 +15,5 @@ export const CollectionParentCollection: core.serialization.Schema< ]); export declare namespace CollectionParentCollection { - type Raw = string | serializers.ticketing.Collection.Raw; + export type Raw = string | serializers.ticketing.Collection.Raw; } diff --git a/src/serialization/resources/ticketing/types/CollectionTypeEnum.ts b/src/serialization/resources/ticketing/types/CollectionTypeEnum.ts index 4184b2820..d907830a8 100644 --- a/src/serialization/resources/ticketing/types/CollectionTypeEnum.ts +++ b/src/serialization/resources/ticketing/types/CollectionTypeEnum.ts @@ -12,5 +12,5 @@ export const CollectionTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["LIST", "PROJECT"]); export declare namespace CollectionTypeEnum { - type Raw = "LIST" | "PROJECT"; + export type Raw = "LIST" | "PROJECT"; } diff --git a/src/serialization/resources/ticketing/types/Comment.ts b/src/serialization/resources/ticketing/types/Comment.ts index e53fe52f4..42e6bfda1 100644 --- a/src/serialization/resources/ticketing/types/Comment.ts +++ b/src/serialization/resources/ticketing/types/Comment.ts @@ -26,13 +26,13 @@ export const Comment: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace CommentContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/ticketing/types/CommentRequest.ts b/src/serialization/resources/ticketing/types/CommentRequest.ts index eff499dd5..f9eac6832 100644 --- a/src/serialization/resources/ticketing/types/CommentRequest.ts +++ b/src/serialization/resources/ticketing/types/CommentRequest.ts @@ -21,16 +21,16 @@ export const CommentRequest: core.serialization.ObjectSchema< isPrivate: core.serialization.property("is_private", core.serialization.boolean().optional()), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace CommentRequest { - interface Raw { + export interface Raw { user?: CommentRequestUser.Raw | null; contact?: CommentRequestContact.Raw | null; body?: string | null; diff --git a/src/serialization/resources/ticketing/types/CommentRequestContact.ts b/src/serialization/resources/ticketing/types/CommentRequestContact.ts index 1439974f4..d379ff4f1 100644 --- a/src/serialization/resources/ticketing/types/CommentRequestContact.ts +++ b/src/serialization/resources/ticketing/types/CommentRequestContact.ts @@ -13,5 +13,5 @@ export const CommentRequestContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace CommentRequestContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/ticketing/types/CommentRequestTicket.ts b/src/serialization/resources/ticketing/types/CommentRequestTicket.ts index 90b5b1dc1..211d9e209 100644 --- a/src/serialization/resources/ticketing/types/CommentRequestTicket.ts +++ b/src/serialization/resources/ticketing/types/CommentRequestTicket.ts @@ -15,5 +15,5 @@ export const CommentRequestTicket: core.serialization.Schema< ]); export declare namespace CommentRequestTicket { - type Raw = string | serializers.ticketing.Ticket.Raw; + export type Raw = string | serializers.ticketing.Ticket.Raw; } diff --git a/src/serialization/resources/ticketing/types/CommentRequestUser.ts b/src/serialization/resources/ticketing/types/CommentRequestUser.ts index 7fc9fedaa..31dff2ca3 100644 --- a/src/serialization/resources/ticketing/types/CommentRequestUser.ts +++ b/src/serialization/resources/ticketing/types/CommentRequestUser.ts @@ -13,5 +13,5 @@ export const CommentRequestUser: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace CommentRequestUser { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/ticketing/types/CommentResponse.ts b/src/serialization/resources/ticketing/types/CommentResponse.ts index 7ac71b74a..351bf97c1 100644 --- a/src/serialization/resources/ticketing/types/CommentResponse.ts +++ b/src/serialization/resources/ticketing/types/CommentResponse.ts @@ -21,7 +21,7 @@ export const CommentResponse: core.serialization.ObjectSchema< }); export declare namespace CommentResponse { - interface Raw { + export interface Raw { model: Comment.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/ticketing/types/CommentTicket.ts b/src/serialization/resources/ticketing/types/CommentTicket.ts index 1ac220246..5dc44b77a 100644 --- a/src/serialization/resources/ticketing/types/CommentTicket.ts +++ b/src/serialization/resources/ticketing/types/CommentTicket.ts @@ -15,5 +15,5 @@ export const CommentTicket: core.serialization.Schema< ]); export declare namespace CommentTicket { - type Raw = string | serializers.ticketing.Ticket.Raw; + export type Raw = string | serializers.ticketing.Ticket.Raw; } diff --git a/src/serialization/resources/ticketing/types/CommentUser.ts b/src/serialization/resources/ticketing/types/CommentUser.ts index 74792599d..c386125e1 100644 --- a/src/serialization/resources/ticketing/types/CommentUser.ts +++ b/src/serialization/resources/ticketing/types/CommentUser.ts @@ -13,5 +13,5 @@ export const CommentUser: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace CommentUser { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/ticketing/types/CommonModelScopeApi.ts b/src/serialization/resources/ticketing/types/CommonModelScopeApi.ts index 752267e02..1d42e728c 100644 --- a/src/serialization/resources/ticketing/types/CommonModelScopeApi.ts +++ b/src/serialization/resources/ticketing/types/CommonModelScopeApi.ts @@ -13,12 +13,12 @@ export const CommonModelScopeApi: core.serialization.ObjectSchema< > = core.serialization.object({ commonModels: core.serialization.property( "common_models", - core.serialization.list(IndividualCommonModelScopeDeserializer) + core.serialization.list(IndividualCommonModelScopeDeserializer), ), }); export declare namespace CommonModelScopeApi { - interface Raw { + export interface Raw { common_models: IndividualCommonModelScopeDeserializer.Raw[]; } } diff --git a/src/serialization/resources/ticketing/types/CommonModelScopesBodyRequest.ts b/src/serialization/resources/ticketing/types/CommonModelScopesBodyRequest.ts index 9bfcc0fac..67ad6c70b 100644 --- a/src/serialization/resources/ticketing/types/CommonModelScopesBodyRequest.ts +++ b/src/serialization/resources/ticketing/types/CommonModelScopesBodyRequest.ts @@ -15,12 +15,12 @@ export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< enabledActions: core.serialization.property("enabled_actions", core.serialization.list(EnabledActionsEnum)), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.string()) + core.serialization.list(core.serialization.string()), ), }); export declare namespace CommonModelScopesBodyRequest { - interface Raw { + export interface Raw { model_id: string; 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 3646efc16..196dc079c 100644 --- a/src/serialization/resources/ticketing/types/Contact.ts +++ b/src/serialization/resources/ticketing/types/Contact.ts @@ -22,13 +22,13 @@ export const Contact: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ContactAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/ticketing/types/ContactRequest.ts b/src/serialization/resources/ticketing/types/ContactRequest.ts index 431107fcf..96e871fbb 100644 --- a/src/serialization/resources/ticketing/types/ContactRequest.ts +++ b/src/serialization/resources/ticketing/types/ContactRequest.ts @@ -18,16 +18,16 @@ export const ContactRequest: core.serialization.ObjectSchema< account: ContactRequestAccount.optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), }); export declare namespace ContactRequest { - interface Raw { + export interface Raw { name?: string | null; email_address?: string | null; phone_number?: string | null; diff --git a/src/serialization/resources/ticketing/types/ContactRequestAccount.ts b/src/serialization/resources/ticketing/types/ContactRequestAccount.ts index a9e81f1ab..cdc5c15d8 100644 --- a/src/serialization/resources/ticketing/types/ContactRequestAccount.ts +++ b/src/serialization/resources/ticketing/types/ContactRequestAccount.ts @@ -13,5 +13,5 @@ export const ContactRequestAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace ContactRequestAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/ticketing/types/DataPassthroughRequest.ts b/src/serialization/resources/ticketing/types/DataPassthroughRequest.ts index 5016a1651..c0486943a 100644 --- a/src/serialization/resources/ticketing/types/DataPassthroughRequest.ts +++ b/src/serialization/resources/ticketing/types/DataPassthroughRequest.ts @@ -19,7 +19,7 @@ export const DataPassthroughRequest: core.serialization.ObjectSchema< data: core.serialization.string().optional(), multipartFormData: core.serialization.property( "multipart_form_data", - core.serialization.list(MultipartFormFieldRequest).optional() + core.serialization.list(MultipartFormFieldRequest).optional(), ), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), requestFormat: core.serialization.property("request_format", RequestFormatEnum.optional()), @@ -27,7 +27,7 @@ export const DataPassthroughRequest: core.serialization.ObjectSchema< }); export declare namespace DataPassthroughRequest { - interface Raw { + export interface Raw { method: MethodEnum.Raw; path: string; base_url_override?: string | null; diff --git a/src/serialization/resources/ticketing/types/DebugModeLog.ts b/src/serialization/resources/ticketing/types/DebugModeLog.ts index ef2ae5973..6ffea6c03 100644 --- a/src/serialization/resources/ticketing/types/DebugModeLog.ts +++ b/src/serialization/resources/ticketing/types/DebugModeLog.ts @@ -17,7 +17,7 @@ export const DebugModeLog: core.serialization.ObjectSchema< }); export declare namespace DebugModeLog { - interface Raw { + export interface Raw { log_id: string; dashboard_view: string; log_summary: DebugModelLogSummary.Raw; diff --git a/src/serialization/resources/ticketing/types/DebugModelLogSummary.ts b/src/serialization/resources/ticketing/types/DebugModelLogSummary.ts index 0f58e5ca5..284deb2c9 100644 --- a/src/serialization/resources/ticketing/types/DebugModelLogSummary.ts +++ b/src/serialization/resources/ticketing/types/DebugModelLogSummary.ts @@ -16,7 +16,7 @@ export const DebugModelLogSummary: core.serialization.ObjectSchema< }); export declare namespace DebugModelLogSummary { - interface Raw { + export interface Raw { url: string; method: string; status_code: number; diff --git a/src/serialization/resources/ticketing/types/EnabledActionsEnum.ts b/src/serialization/resources/ticketing/types/EnabledActionsEnum.ts index 35ad797a7..3d018c1bc 100644 --- a/src/serialization/resources/ticketing/types/EnabledActionsEnum.ts +++ b/src/serialization/resources/ticketing/types/EnabledActionsEnum.ts @@ -12,5 +12,5 @@ export const EnabledActionsEnum: core.serialization.Schema< > = core.serialization.enum_(["READ", "WRITE"]); export declare namespace EnabledActionsEnum { - type Raw = "READ" | "WRITE"; + export type Raw = "READ" | "WRITE"; } diff --git a/src/serialization/resources/ticketing/types/EncodingEnum.ts b/src/serialization/resources/ticketing/types/EncodingEnum.ts index 8cb47096b..d48184ec5 100644 --- a/src/serialization/resources/ticketing/types/EncodingEnum.ts +++ b/src/serialization/resources/ticketing/types/EncodingEnum.ts @@ -12,5 +12,5 @@ export const EncodingEnum: core.serialization.Schema< > = core.serialization.enum_(["RAW", "BASE64", "GZIP_BASE64"]); export declare namespace EncodingEnum { - type Raw = "RAW" | "BASE64" | "GZIP_BASE64"; + export type Raw = "RAW" | "BASE64" | "GZIP_BASE64"; } diff --git a/src/serialization/resources/ticketing/types/ErrorValidationProblem.ts b/src/serialization/resources/ticketing/types/ErrorValidationProblem.ts index 203ddbcb7..2648315f8 100644 --- a/src/serialization/resources/ticketing/types/ErrorValidationProblem.ts +++ b/src/serialization/resources/ticketing/types/ErrorValidationProblem.ts @@ -18,7 +18,7 @@ export const ErrorValidationProblem: core.serialization.ObjectSchema< }); export declare namespace ErrorValidationProblem { - interface Raw { + export interface Raw { source?: ValidationProblemSource.Raw | null; title: string; detail: string; diff --git a/src/serialization/resources/ticketing/types/EventTypeEnum.ts b/src/serialization/resources/ticketing/types/EventTypeEnum.ts index d5805e8d7..548deed66 100644 --- a/src/serialization/resources/ticketing/types/EventTypeEnum.ts +++ b/src/serialization/resources/ticketing/types/EventTypeEnum.ts @@ -55,7 +55,7 @@ export const EventTypeEnum: core.serialization.Schema< ]); export declare namespace EventTypeEnum { - type Raw = + export type Raw = | "CREATED_REMOTE_PRODUCTION_API_KEY" | "DELETED_REMOTE_PRODUCTION_API_KEY" | "CREATED_TEST_API_KEY" diff --git a/src/serialization/resources/ticketing/types/ExternalTargetFieldApi.ts b/src/serialization/resources/ticketing/types/ExternalTargetFieldApi.ts index 98e931c99..244582c56 100644 --- a/src/serialization/resources/ticketing/types/ExternalTargetFieldApi.ts +++ b/src/serialization/resources/ticketing/types/ExternalTargetFieldApi.ts @@ -16,7 +16,7 @@ export const ExternalTargetFieldApi: core.serialization.ObjectSchema< }); export declare namespace ExternalTargetFieldApi { - interface Raw { + export interface Raw { name?: string | null; description?: string | null; is_mapped?: string | null; diff --git a/src/serialization/resources/ticketing/types/ExternalTargetFieldApiResponse.ts b/src/serialization/resources/ticketing/types/ExternalTargetFieldApiResponse.ts index 18b6f3f8e..75872cbfd 100644 --- a/src/serialization/resources/ticketing/types/ExternalTargetFieldApiResponse.ts +++ b/src/serialization/resources/ticketing/types/ExternalTargetFieldApiResponse.ts @@ -25,7 +25,7 @@ export const ExternalTargetFieldApiResponse: core.serialization.ObjectSchema< }); export declare namespace ExternalTargetFieldApiResponse { - interface Raw { + export interface Raw { Ticket?: ExternalTargetFieldApi.Raw[] | null; Comment?: ExternalTargetFieldApi.Raw[] | null; Project?: ExternalTargetFieldApi.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/FieldFormatEnum.ts b/src/serialization/resources/ticketing/types/FieldFormatEnum.ts index fa2e4436b..6b63a5fe8 100644 --- a/src/serialization/resources/ticketing/types/FieldFormatEnum.ts +++ b/src/serialization/resources/ticketing/types/FieldFormatEnum.ts @@ -12,5 +12,5 @@ export const FieldFormatEnum: core.serialization.Schema< > = core.serialization.enum_(["string", "number", "date", "datetime", "bool", "list"]); export declare namespace FieldFormatEnum { - type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; + export type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; } diff --git a/src/serialization/resources/ticketing/types/FieldMappingApiInstance.ts b/src/serialization/resources/ticketing/types/FieldMappingApiInstance.ts index 38b5eefce..07e5cb8c7 100644 --- a/src/serialization/resources/ticketing/types/FieldMappingApiInstance.ts +++ b/src/serialization/resources/ticketing/types/FieldMappingApiInstance.ts @@ -19,7 +19,7 @@ export const FieldMappingApiInstance: core.serialization.ObjectSchema< }); export declare namespace FieldMappingApiInstance { - interface Raw { + export interface Raw { id?: string | null; is_integration_wide?: boolean | null; target_field?: FieldMappingApiInstanceTargetField.Raw | null; diff --git a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteField.ts b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteField.ts index 6ab106e53..a765f50d2 100644 --- a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteField.ts +++ b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteField.ts @@ -15,12 +15,12 @@ export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), remoteEndpointInfo: core.serialization.property( "remote_endpoint_info", - FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo, ), }); export declare namespace FieldMappingApiInstanceRemoteField { - interface Raw { + export interface Raw { remote_key_name?: string | null; schema?: Record | null; remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; diff --git a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts index 0647c8381..a296b8909 100644 --- a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts +++ b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts @@ -14,12 +14,12 @@ export const FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: core.serializ urlPath: core.serialization.property("url_path", core.serialization.string().optional()), fieldTraversalPath: core.serialization.property( "field_traversal_path", - core.serialization.list(core.serialization.string()).optional() + core.serialization.list(core.serialization.string()).optional(), ), }); export declare namespace FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { - interface Raw { + export interface Raw { method?: string | null; url_path?: string | null; field_traversal_path?: string[] | null; diff --git a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceResponse.ts b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceResponse.ts index 949d6c845..bb99be5be 100644 --- a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceResponse.ts +++ b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceResponse.ts @@ -25,7 +25,7 @@ export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< }); export declare namespace FieldMappingApiInstanceResponse { - interface Raw { + export interface Raw { Ticket?: FieldMappingApiInstance.Raw[] | null; Comment?: FieldMappingApiInstance.Raw[] | null; Project?: FieldMappingApiInstance.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceTargetField.ts b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceTargetField.ts index 5379decd6..b4ffbc13d 100644 --- a/src/serialization/resources/ticketing/types/FieldMappingApiInstanceTargetField.ts +++ b/src/serialization/resources/ticketing/types/FieldMappingApiInstanceTargetField.ts @@ -16,7 +16,7 @@ export const FieldMappingApiInstanceTargetField: core.serialization.ObjectSchema }); export declare namespace FieldMappingApiInstanceTargetField { - interface Raw { + export interface Raw { name: string; description: string; is_organization_wide: boolean; diff --git a/src/serialization/resources/ticketing/types/FieldMappingInstanceResponse.ts b/src/serialization/resources/ticketing/types/FieldMappingInstanceResponse.ts index 700b0c256..8c5a7a9f1 100644 --- a/src/serialization/resources/ticketing/types/FieldMappingInstanceResponse.ts +++ b/src/serialization/resources/ticketing/types/FieldMappingInstanceResponse.ts @@ -21,7 +21,7 @@ export const FieldMappingInstanceResponse: core.serialization.ObjectSchema< }); export declare namespace FieldMappingInstanceResponse { - interface Raw { + export interface Raw { model: FieldMappingApiInstance.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/ticketing/types/FieldPermissionDeserializer.ts b/src/serialization/resources/ticketing/types/FieldPermissionDeserializer.ts index a6d6b01d5..da1d91486 100644 --- a/src/serialization/resources/ticketing/types/FieldPermissionDeserializer.ts +++ b/src/serialization/resources/ticketing/types/FieldPermissionDeserializer.ts @@ -12,16 +12,16 @@ export const FieldPermissionDeserializer: core.serialization.ObjectSchema< > = core.serialization.object({ enabledFields: core.serialization.property( "enabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace FieldPermissionDeserializer { - interface Raw { + export interface Raw { enabled_fields?: unknown[] | null; disabled_fields?: unknown[] | null; } diff --git a/src/serialization/resources/ticketing/types/FieldPermissionDeserializerRequest.ts b/src/serialization/resources/ticketing/types/FieldPermissionDeserializerRequest.ts index 6a0795537..818ece9f2 100644 --- a/src/serialization/resources/ticketing/types/FieldPermissionDeserializerRequest.ts +++ b/src/serialization/resources/ticketing/types/FieldPermissionDeserializerRequest.ts @@ -12,16 +12,16 @@ export const FieldPermissionDeserializerRequest: core.serialization.ObjectSchema > = core.serialization.object({ enabledFields: core.serialization.property( "enabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), disabledFields: core.serialization.property( "disabled_fields", - core.serialization.list(core.serialization.unknown()).optional() + core.serialization.list(core.serialization.unknown()).optional(), ), }); export declare namespace FieldPermissionDeserializerRequest { - interface Raw { + export interface Raw { enabled_fields?: unknown[] | null; disabled_fields?: unknown[] | null; } diff --git a/src/serialization/resources/ticketing/types/FieldTypeEnum.ts b/src/serialization/resources/ticketing/types/FieldTypeEnum.ts index af24bf1e1..931123ba7 100644 --- a/src/serialization/resources/ticketing/types/FieldTypeEnum.ts +++ b/src/serialization/resources/ticketing/types/FieldTypeEnum.ts @@ -12,5 +12,5 @@ export const FieldTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["string", "number", "date", "datetime", "bool", "list"]); export declare namespace FieldTypeEnum { - type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; + export type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; } diff --git a/src/serialization/resources/ticketing/types/IndividualCommonModelScopeDeserializer.ts b/src/serialization/resources/ticketing/types/IndividualCommonModelScopeDeserializer.ts index 7794b3e2d..4dfefabd7 100644 --- a/src/serialization/resources/ticketing/types/IndividualCommonModelScopeDeserializer.ts +++ b/src/serialization/resources/ticketing/types/IndividualCommonModelScopeDeserializer.ts @@ -15,13 +15,13 @@ 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(), ModelPermissionDeserializer).optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializer).optional(), ), fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializer.optional()), }); export declare namespace IndividualCommonModelScopeDeserializer { - interface Raw { + export interface Raw { model_name: string; 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 f5c65fc96..5f964d99c 100644 --- a/src/serialization/resources/ticketing/types/IndividualCommonModelScopeDeserializerRequest.ts +++ b/src/serialization/resources/ticketing/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -15,13 +15,13 @@ 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(), ModelPermissionDeserializerRequest).optional() + core.serialization.record(core.serialization.string(), ModelPermissionDeserializerRequest).optional(), ), fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializerRequest.optional()), }); export declare namespace IndividualCommonModelScopeDeserializerRequest { - interface Raw { + export interface Raw { model_name: string; 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 985ccf8a9..f735905d0 100644 --- a/src/serialization/resources/ticketing/types/Issue.ts +++ b/src/serialization/resources/ticketing/types/Issue.ts @@ -14,19 +14,19 @@ export const Issue: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([IssueStatusEnum, core.serialization.string()]); export declare namespace IssueStatus { - type Raw = IssueStatusEnum.Raw | string; + export type Raw = IssueStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/IssueStatusEnum.ts b/src/serialization/resources/ticketing/types/IssueStatusEnum.ts index 509ca7bd1..02fb8c28b 100644 --- a/src/serialization/resources/ticketing/types/IssueStatusEnum.ts +++ b/src/serialization/resources/ticketing/types/IssueStatusEnum.ts @@ -12,5 +12,5 @@ export const IssueStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["ONGOING", "RESOLVED"]); export declare namespace IssueStatusEnum { - type Raw = "ONGOING" | "RESOLVED"; + export type Raw = "ONGOING" | "RESOLVED"; } diff --git a/src/serialization/resources/ticketing/types/ItemFormatEnum.ts b/src/serialization/resources/ticketing/types/ItemFormatEnum.ts index 412cb61c4..62ff145e5 100644 --- a/src/serialization/resources/ticketing/types/ItemFormatEnum.ts +++ b/src/serialization/resources/ticketing/types/ItemFormatEnum.ts @@ -12,5 +12,5 @@ export const ItemFormatEnum: core.serialization.Schema< > = core.serialization.enum_(["string", "number", "date", "datetime", "bool", "list"]); export declare namespace ItemFormatEnum { - type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; + export type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; } diff --git a/src/serialization/resources/ticketing/types/ItemSchema.ts b/src/serialization/resources/ticketing/types/ItemSchema.ts index c9d7f8719..bb3da1833 100644 --- a/src/serialization/resources/ticketing/types/ItemSchema.ts +++ b/src/serialization/resources/ticketing/types/ItemSchema.ts @@ -16,12 +16,12 @@ export const ItemSchema: core.serialization.ObjectSchema< itemFormat: core.serialization.property("item_format", ItemFormatEnum.optional()), itemChoices: core.serialization.property( "item_choices", - core.serialization.list(core.serialization.string()).optional() + core.serialization.list(core.serialization.string()).optional(), ), }); export declare namespace ItemSchema { - interface Raw { + export interface Raw { 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 860f206d5..4084daf74 100644 --- a/src/serialization/resources/ticketing/types/ItemTypeEnum.ts +++ b/src/serialization/resources/ticketing/types/ItemTypeEnum.ts @@ -12,5 +12,5 @@ export const ItemTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["string", "number", "date", "datetime", "bool", "list"]); export declare namespace ItemTypeEnum { - type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; + export type Raw = "string" | "number" | "date" | "datetime" | "bool" | "list"; } diff --git a/src/serialization/resources/ticketing/types/LanguageEnum.ts b/src/serialization/resources/ticketing/types/LanguageEnum.ts index c5f756b20..f18d473f8 100644 --- a/src/serialization/resources/ticketing/types/LanguageEnum.ts +++ b/src/serialization/resources/ticketing/types/LanguageEnum.ts @@ -12,5 +12,5 @@ export const LanguageEnum: core.serialization.Schema< > = core.serialization.enum_(["en", "de"]); export declare namespace LanguageEnum { - type Raw = "en" | "de"; + export type Raw = "en" | "de"; } diff --git a/src/serialization/resources/ticketing/types/LastSyncResultEnum.ts b/src/serialization/resources/ticketing/types/LastSyncResultEnum.ts index 69c7ae0d3..fe82298d1 100644 --- a/src/serialization/resources/ticketing/types/LastSyncResultEnum.ts +++ b/src/serialization/resources/ticketing/types/LastSyncResultEnum.ts @@ -12,5 +12,5 @@ export const LastSyncResultEnum: core.serialization.Schema< > = core.serialization.enum_(["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"]); export declare namespace LastSyncResultEnum { - type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; + export type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; } diff --git a/src/serialization/resources/ticketing/types/LinkToken.ts b/src/serialization/resources/ticketing/types/LinkToken.ts index f6b2db48c..7456330cf 100644 --- a/src/serialization/resources/ticketing/types/LinkToken.ts +++ b/src/serialization/resources/ticketing/types/LinkToken.ts @@ -16,7 +16,7 @@ export const LinkToken: core.serialization.ObjectSchema< }); export declare namespace LinkToken { - interface Raw { + export interface Raw { link_token: string; integration_name?: string | null; magic_link_url?: string | null; diff --git a/src/serialization/resources/ticketing/types/LinkedAccountStatus.ts b/src/serialization/resources/ticketing/types/LinkedAccountStatus.ts index 346a7776a..9b39cc305 100644 --- a/src/serialization/resources/ticketing/types/LinkedAccountStatus.ts +++ b/src/serialization/resources/ticketing/types/LinkedAccountStatus.ts @@ -15,7 +15,7 @@ export const LinkedAccountStatus: core.serialization.ObjectSchema< }); export declare namespace LinkedAccountStatus { - interface Raw { + export interface Raw { linked_account_status: string; can_make_request: boolean; } diff --git a/src/serialization/resources/ticketing/types/MetaResponse.ts b/src/serialization/resources/ticketing/types/MetaResponse.ts index dfd321594..3dd879907 100644 --- a/src/serialization/resources/ticketing/types/MetaResponse.ts +++ b/src/serialization/resources/ticketing/types/MetaResponse.ts @@ -13,22 +13,22 @@ export const MetaResponse: core.serialization.ObjectSchema< > = core.serialization.object({ requestSchema: core.serialization.property( "request_schema", - core.serialization.record(core.serialization.string(), core.serialization.unknown()) + core.serialization.record(core.serialization.string(), core.serialization.unknown()), ), remoteFieldClasses: core.serialization.property( "remote_field_classes", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), status: LinkedAccountStatus.optional(), hasConditionalParams: core.serialization.property("has_conditional_params", core.serialization.boolean()), hasRequiredLinkedAccountParams: core.serialization.property( "has_required_linked_account_params", - core.serialization.boolean() + core.serialization.boolean(), ), }); export declare namespace MetaResponse { - interface Raw { + export interface Raw { request_schema: Record; remote_field_classes?: Record | null; status?: LinkedAccountStatus.Raw | null; diff --git a/src/serialization/resources/ticketing/types/MethodEnum.ts b/src/serialization/resources/ticketing/types/MethodEnum.ts index 9ee5310fd..a72b9805c 100644 --- a/src/serialization/resources/ticketing/types/MethodEnum.ts +++ b/src/serialization/resources/ticketing/types/MethodEnum.ts @@ -10,5 +10,5 @@ export const MethodEnum: core.serialization.Schema = core.serialization.undiscriminatedUnion([EncodingEnum, core.serialization.string()]); export declare namespace MultipartFormFieldRequestEncoding { - type Raw = EncodingEnum.Raw | string; + export type Raw = EncodingEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.ts b/src/serialization/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.ts index 7370c0c7d..6ab861c70 100644 --- a/src/serialization/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.ts @@ -17,7 +17,7 @@ export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSch }); export declare namespace PaginatedAccountDetailsAndActionsList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: AccountDetailsAndActions.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedAccountList.ts b/src/serialization/resources/ticketing/types/PaginatedAccountList.ts index 6aa67bddd..c133c6081 100644 --- a/src/serialization/resources/ticketing/types/PaginatedAccountList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedAccountList.ts @@ -17,7 +17,7 @@ export const PaginatedAccountList: core.serialization.ObjectSchema< }); export declare namespace PaginatedAccountList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Account.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedAttachmentList.ts b/src/serialization/resources/ticketing/types/PaginatedAttachmentList.ts index bb4b3d2d7..73ad6f330 100644 --- a/src/serialization/resources/ticketing/types/PaginatedAttachmentList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedAttachmentList.ts @@ -16,7 +16,7 @@ export const PaginatedAttachmentList: core.serialization.ObjectSchema< }); export declare namespace PaginatedAttachmentList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: serializers.ticketing.Attachment.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedAuditLogEventList.ts b/src/serialization/resources/ticketing/types/PaginatedAuditLogEventList.ts index a3c9ac7b1..17e19b77a 100644 --- a/src/serialization/resources/ticketing/types/PaginatedAuditLogEventList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedAuditLogEventList.ts @@ -17,7 +17,7 @@ export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< }); export declare namespace PaginatedAuditLogEventList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: AuditLogEvent.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedCollectionList.ts b/src/serialization/resources/ticketing/types/PaginatedCollectionList.ts index d6f35921d..c8f9c968b 100644 --- a/src/serialization/resources/ticketing/types/PaginatedCollectionList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedCollectionList.ts @@ -16,7 +16,7 @@ export const PaginatedCollectionList: core.serialization.ObjectSchema< }); export declare namespace PaginatedCollectionList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: serializers.ticketing.Collection.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedCommentList.ts b/src/serialization/resources/ticketing/types/PaginatedCommentList.ts index 17d48d223..2fa841f52 100644 --- a/src/serialization/resources/ticketing/types/PaginatedCommentList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedCommentList.ts @@ -17,7 +17,7 @@ export const PaginatedCommentList: core.serialization.ObjectSchema< }); export declare namespace PaginatedCommentList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Comment.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedContactList.ts b/src/serialization/resources/ticketing/types/PaginatedContactList.ts index 2abc892ac..d31c84c64 100644 --- a/src/serialization/resources/ticketing/types/PaginatedContactList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedContactList.ts @@ -17,7 +17,7 @@ export const PaginatedContactList: core.serialization.ObjectSchema< }); export declare namespace PaginatedContactList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Contact.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedIssueList.ts b/src/serialization/resources/ticketing/types/PaginatedIssueList.ts index c781af4ae..40176e29a 100644 --- a/src/serialization/resources/ticketing/types/PaginatedIssueList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedIssueList.ts @@ -17,7 +17,7 @@ export const PaginatedIssueList: core.serialization.ObjectSchema< }); export declare namespace PaginatedIssueList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Issue.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedProjectList.ts b/src/serialization/resources/ticketing/types/PaginatedProjectList.ts index 9ba511c80..dfb3543fc 100644 --- a/src/serialization/resources/ticketing/types/PaginatedProjectList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedProjectList.ts @@ -17,7 +17,7 @@ export const PaginatedProjectList: core.serialization.ObjectSchema< }); export declare namespace PaginatedProjectList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Project.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedRemoteFieldClassList.ts b/src/serialization/resources/ticketing/types/PaginatedRemoteFieldClassList.ts index b33281623..99fe91ecf 100644 --- a/src/serialization/resources/ticketing/types/PaginatedRemoteFieldClassList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedRemoteFieldClassList.ts @@ -17,7 +17,7 @@ export const PaginatedRemoteFieldClassList: core.serialization.ObjectSchema< }); export declare namespace PaginatedRemoteFieldClassList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: RemoteFieldClass.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedRoleList.ts b/src/serialization/resources/ticketing/types/PaginatedRoleList.ts index e25b28088..1ca56c488 100644 --- a/src/serialization/resources/ticketing/types/PaginatedRoleList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedRoleList.ts @@ -17,7 +17,7 @@ export const PaginatedRoleList: core.serialization.ObjectSchema< }); export declare namespace PaginatedRoleList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Role.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedSyncStatusList.ts b/src/serialization/resources/ticketing/types/PaginatedSyncStatusList.ts index f0de2089c..376787134 100644 --- a/src/serialization/resources/ticketing/types/PaginatedSyncStatusList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedSyncStatusList.ts @@ -17,7 +17,7 @@ export const PaginatedSyncStatusList: core.serialization.ObjectSchema< }); export declare namespace PaginatedSyncStatusList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: SyncStatus.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedTagList.ts b/src/serialization/resources/ticketing/types/PaginatedTagList.ts index 0b2551363..2a9198a12 100644 --- a/src/serialization/resources/ticketing/types/PaginatedTagList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedTagList.ts @@ -17,7 +17,7 @@ export const PaginatedTagList: core.serialization.ObjectSchema< }); export declare namespace PaginatedTagList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Tag.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedTeamList.ts b/src/serialization/resources/ticketing/types/PaginatedTeamList.ts index 3154fc86b..5c8c8c4d5 100644 --- a/src/serialization/resources/ticketing/types/PaginatedTeamList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedTeamList.ts @@ -17,7 +17,7 @@ export const PaginatedTeamList: core.serialization.ObjectSchema< }); export declare namespace PaginatedTeamList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Team.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedTicketList.ts b/src/serialization/resources/ticketing/types/PaginatedTicketList.ts index aa364f99b..1f9b36678 100644 --- a/src/serialization/resources/ticketing/types/PaginatedTicketList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedTicketList.ts @@ -16,7 +16,7 @@ export const PaginatedTicketList: core.serialization.ObjectSchema< }); export declare namespace PaginatedTicketList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: serializers.ticketing.Ticket.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedUserList.ts b/src/serialization/resources/ticketing/types/PaginatedUserList.ts index 82b8ffec9..75fdeafc5 100644 --- a/src/serialization/resources/ticketing/types/PaginatedUserList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedUserList.ts @@ -17,7 +17,7 @@ export const PaginatedUserList: core.serialization.ObjectSchema< }); export declare namespace PaginatedUserList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: User.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PaginatedViewerList.ts b/src/serialization/resources/ticketing/types/PaginatedViewerList.ts index fa192762a..ef549ded8 100644 --- a/src/serialization/resources/ticketing/types/PaginatedViewerList.ts +++ b/src/serialization/resources/ticketing/types/PaginatedViewerList.ts @@ -17,7 +17,7 @@ export const PaginatedViewerList: core.serialization.ObjectSchema< }); export declare namespace PaginatedViewerList { - interface Raw { + export interface Raw { next?: string | null; previous?: string | null; results?: Viewer.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/PatchedTicketRequest.ts b/src/serialization/resources/ticketing/types/PatchedTicketRequest.ts index 6aa7ab10a..e1bfa1250 100644 --- a/src/serialization/resources/ticketing/types/PatchedTicketRequest.ts +++ b/src/serialization/resources/ticketing/types/PatchedTicketRequest.ts @@ -17,7 +17,7 @@ export const PatchedTicketRequest: core.serialization.ObjectSchema< assignees: core.serialization.list(core.serialization.string().optional()).optional(), assignedTeams: core.serialization.property( "assigned_teams", - core.serialization.list(core.serialization.string().optional()).optional() + core.serialization.list(core.serialization.string().optional()).optional(), ), creator: core.serialization.string().optional(), dueDate: core.serialization.property("due_date", core.serialization.date().optional()), @@ -35,17 +35,17 @@ export const PatchedTicketRequest: core.serialization.ObjectSchema< priority: PatchedTicketRequestPriority.optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace PatchedTicketRequest { - interface Raw { + export interface Raw { name?: string | null; assignees?: (string | null | undefined)[] | null; assigned_teams?: (string | null | undefined)[] | null; diff --git a/src/serialization/resources/ticketing/types/PatchedTicketRequestPriority.ts b/src/serialization/resources/ticketing/types/PatchedTicketRequestPriority.ts index 1c69984ea..823b22f2c 100644 --- a/src/serialization/resources/ticketing/types/PatchedTicketRequestPriority.ts +++ b/src/serialization/resources/ticketing/types/PatchedTicketRequestPriority.ts @@ -13,5 +13,5 @@ export const PatchedTicketRequestPriority: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([PriorityEnum, core.serialization.string()]); export declare namespace PatchedTicketRequestPriority { - type Raw = PriorityEnum.Raw | string; + export type Raw = PriorityEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/PatchedTicketRequestStatus.ts b/src/serialization/resources/ticketing/types/PatchedTicketRequestStatus.ts index e26acef5e..f5f8ecdc0 100644 --- a/src/serialization/resources/ticketing/types/PatchedTicketRequestStatus.ts +++ b/src/serialization/resources/ticketing/types/PatchedTicketRequestStatus.ts @@ -13,5 +13,5 @@ export const PatchedTicketRequestStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TicketStatusEnum, core.serialization.string()]); export declare namespace PatchedTicketRequestStatus { - type Raw = TicketStatusEnum.Raw | string; + export type Raw = TicketStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/PriorityEnum.ts b/src/serialization/resources/ticketing/types/PriorityEnum.ts index cd63c03ca..509450814 100644 --- a/src/serialization/resources/ticketing/types/PriorityEnum.ts +++ b/src/serialization/resources/ticketing/types/PriorityEnum.ts @@ -12,5 +12,5 @@ export const PriorityEnum: core.serialization.Schema< > = core.serialization.enum_(["URGENT", "HIGH", "NORMAL", "LOW"]); export declare namespace PriorityEnum { - type Raw = "URGENT" | "HIGH" | "NORMAL" | "LOW"; + export type Raw = "URGENT" | "HIGH" | "NORMAL" | "LOW"; } diff --git a/src/serialization/resources/ticketing/types/Project.ts b/src/serialization/resources/ticketing/types/Project.ts index 8b6deb44a..bff0cc39a 100644 --- a/src/serialization/resources/ticketing/types/Project.ts +++ b/src/serialization/resources/ticketing/types/Project.ts @@ -18,13 +18,13 @@ export const Project: core.serialization.ObjectSchema; remote_key_name: string; remote_endpoint_info: RemoteEndpointInfo.Raw; diff --git a/src/serialization/resources/ticketing/types/RemoteFieldApiCoverage.ts b/src/serialization/resources/ticketing/types/RemoteFieldApiCoverage.ts index c6fb85821..12c57892e 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldApiCoverage.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldApiCoverage.ts @@ -12,5 +12,5 @@ export const RemoteFieldApiCoverage: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.number(), core.serialization.number()]); export declare namespace RemoteFieldApiCoverage { - type Raw = number | number; + export type Raw = number | number; } diff --git a/src/serialization/resources/ticketing/types/RemoteFieldApiResponse.ts b/src/serialization/resources/ticketing/types/RemoteFieldApiResponse.ts index a8dc58c2e..fddbe1186 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldApiResponse.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldApiResponse.ts @@ -25,7 +25,7 @@ export const RemoteFieldApiResponse: core.serialization.ObjectSchema< }); export declare namespace RemoteFieldApiResponse { - interface Raw { + export interface Raw { Ticket?: RemoteFieldApi.Raw[] | null; Comment?: RemoteFieldApi.Raw[] | null; Project?: RemoteFieldApi.Raw[] | null; diff --git a/src/serialization/resources/ticketing/types/RemoteFieldClass.ts b/src/serialization/resources/ticketing/types/RemoteFieldClass.ts index 7fd079f44..38967a499 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldClass.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldClass.ts @@ -24,13 +24,13 @@ export const RemoteFieldClass: core.serialization.ObjectSchema< fieldFormat: core.serialization.property("field_format", RemoteFieldClassFieldFormat.optional()), fieldChoices: core.serialization.property( "field_choices", - core.serialization.list(RemoteFieldClassFieldChoicesItem).optional() + core.serialization.list(RemoteFieldClassFieldChoicesItem).optional(), ), itemSchema: core.serialization.property("item_schema", ItemSchema.optional()), }); export declare namespace RemoteFieldClass { - interface Raw { + export interface Raw { id?: string | null; display_name?: string | null; remote_key_name?: string | null; diff --git a/src/serialization/resources/ticketing/types/RemoteFieldClassFieldChoicesItem.ts b/src/serialization/resources/ticketing/types/RemoteFieldClassFieldChoicesItem.ts index da50a2658..bcc6d9928 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldClassFieldChoicesItem.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldClassFieldChoicesItem.ts @@ -15,7 +15,7 @@ export const RemoteFieldClassFieldChoicesItem: core.serialization.ObjectSchema< }); export declare namespace RemoteFieldClassFieldChoicesItem { - interface Raw { + export interface Raw { value?: unknown | null; display_name?: string | null; } diff --git a/src/serialization/resources/ticketing/types/RemoteFieldClassFieldFormat.ts b/src/serialization/resources/ticketing/types/RemoteFieldClassFieldFormat.ts index 5ed706755..c658009bd 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldClassFieldFormat.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldClassFieldFormat.ts @@ -13,5 +13,5 @@ export const RemoteFieldClassFieldFormat: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), FieldFormatEnum]); export declare namespace RemoteFieldClassFieldFormat { - type Raw = string | FieldFormatEnum.Raw; + export type Raw = string | FieldFormatEnum.Raw; } diff --git a/src/serialization/resources/ticketing/types/RemoteFieldClassFieldType.ts b/src/serialization/resources/ticketing/types/RemoteFieldClassFieldType.ts index 8172d5ece..ae021ed14 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldClassFieldType.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldClassFieldType.ts @@ -13,5 +13,5 @@ export const RemoteFieldClassFieldType: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), FieldTypeEnum]); export declare namespace RemoteFieldClassFieldType { - type Raw = string | FieldTypeEnum.Raw; + export type Raw = string | FieldTypeEnum.Raw; } diff --git a/src/serialization/resources/ticketing/types/RemoteFieldRemoteFieldClass.ts b/src/serialization/resources/ticketing/types/RemoteFieldRemoteFieldClass.ts index b642bb1de..771e7fb4d 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldRemoteFieldClass.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldRemoteFieldClass.ts @@ -13,5 +13,5 @@ export const RemoteFieldRemoteFieldClass: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteFieldClass]); export declare namespace RemoteFieldRemoteFieldClass { - type Raw = string | RemoteFieldClass.Raw; + export type Raw = string | RemoteFieldClass.Raw; } diff --git a/src/serialization/resources/ticketing/types/RemoteFieldRequest.ts b/src/serialization/resources/ticketing/types/RemoteFieldRequest.ts index 8ff5ee621..c91d49cea 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldRequest.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldRequest.ts @@ -16,7 +16,7 @@ export const RemoteFieldRequest: core.serialization.ObjectSchema< }); export declare namespace RemoteFieldRequest { - interface Raw { + export interface Raw { remote_field_class: RemoteFieldRequestRemoteFieldClass.Raw; value?: unknown | null; } diff --git a/src/serialization/resources/ticketing/types/RemoteFieldRequestRemoteFieldClass.ts b/src/serialization/resources/ticketing/types/RemoteFieldRequestRemoteFieldClass.ts index e27e68fdd..bf1debfbb 100644 --- a/src/serialization/resources/ticketing/types/RemoteFieldRequestRemoteFieldClass.ts +++ b/src/serialization/resources/ticketing/types/RemoteFieldRequestRemoteFieldClass.ts @@ -13,5 +13,5 @@ export const RemoteFieldRequestRemoteFieldClass: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), RemoteFieldClass]); export declare namespace RemoteFieldRequestRemoteFieldClass { - type Raw = string | RemoteFieldClass.Raw; + export type Raw = string | RemoteFieldClass.Raw; } diff --git a/src/serialization/resources/ticketing/types/RemoteKey.ts b/src/serialization/resources/ticketing/types/RemoteKey.ts index 4acf48d6d..aa2908786 100644 --- a/src/serialization/resources/ticketing/types/RemoteKey.ts +++ b/src/serialization/resources/ticketing/types/RemoteKey.ts @@ -15,7 +15,7 @@ export const RemoteKey: core.serialization.ObjectSchema< }); export declare namespace RemoteKey { - interface Raw { + export interface Raw { name: string; key: string; } diff --git a/src/serialization/resources/ticketing/types/RemoteResponse.ts b/src/serialization/resources/ticketing/types/RemoteResponse.ts index 657a03fb7..878baebde 100644 --- a/src/serialization/resources/ticketing/types/RemoteResponse.ts +++ b/src/serialization/resources/ticketing/types/RemoteResponse.ts @@ -17,14 +17,14 @@ export const RemoteResponse: core.serialization.ObjectSchema< response: core.serialization.unknown(), responseHeaders: core.serialization.property( "response_headers", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), responseType: core.serialization.property("response_type", ResponseTypeEnum.optional()), headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), }); export declare namespace RemoteResponse { - interface Raw { + export interface Raw { method: string; path: string; status: number; diff --git a/src/serialization/resources/ticketing/types/RequestFormatEnum.ts b/src/serialization/resources/ticketing/types/RequestFormatEnum.ts index 4a3c99390..4baea850e 100644 --- a/src/serialization/resources/ticketing/types/RequestFormatEnum.ts +++ b/src/serialization/resources/ticketing/types/RequestFormatEnum.ts @@ -12,5 +12,5 @@ export const RequestFormatEnum: core.serialization.Schema< > = core.serialization.enum_(["JSON", "XML", "MULTIPART"]); export declare namespace RequestFormatEnum { - type Raw = "JSON" | "XML" | "MULTIPART"; + export type Raw = "JSON" | "XML" | "MULTIPART"; } diff --git a/src/serialization/resources/ticketing/types/ResponseTypeEnum.ts b/src/serialization/resources/ticketing/types/ResponseTypeEnum.ts index fb300a362..89908a202 100644 --- a/src/serialization/resources/ticketing/types/ResponseTypeEnum.ts +++ b/src/serialization/resources/ticketing/types/ResponseTypeEnum.ts @@ -12,5 +12,5 @@ export const ResponseTypeEnum: core.serialization.Schema< > = core.serialization.enum_(["JSON", "BASE64_GZIP"]); export declare namespace ResponseTypeEnum { - type Raw = "JSON" | "BASE64_GZIP"; + export type Raw = "JSON" | "BASE64_GZIP"; } diff --git a/src/serialization/resources/ticketing/types/Role.ts b/src/serialization/resources/ticketing/types/Role.ts index 35b9fae42..e85058377 100644 --- a/src/serialization/resources/ticketing/types/Role.ts +++ b/src/serialization/resources/ticketing/types/Role.ts @@ -18,19 +18,19 @@ export const Role: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), TicketAccessEnum]); export declare namespace RoleTicketAccess { - type Raw = string | TicketAccessEnum.Raw; + export type Raw = string | TicketAccessEnum.Raw; } diff --git a/src/serialization/resources/ticketing/types/RoleTicketActionsItem.ts b/src/serialization/resources/ticketing/types/RoleTicketActionsItem.ts index aafc96813..2cabd6016 100644 --- a/src/serialization/resources/ticketing/types/RoleTicketActionsItem.ts +++ b/src/serialization/resources/ticketing/types/RoleTicketActionsItem.ts @@ -13,5 +13,5 @@ export const RoleTicketActionsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), TicketActionsEnum]); export declare namespace RoleTicketActionsItem { - type Raw = string | TicketActionsEnum.Raw; + export type Raw = string | TicketActionsEnum.Raw; } diff --git a/src/serialization/resources/ticketing/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/serialization/resources/ticketing/types/SelectiveSyncConfigurationsUsageEnum.ts index 111b26381..cb0dc5c34 100644 --- a/src/serialization/resources/ticketing/types/SelectiveSyncConfigurationsUsageEnum.ts +++ b/src/serialization/resources/ticketing/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -12,5 +12,5 @@ export const SelectiveSyncConfigurationsUsageEnum: core.serialization.Schema< > = core.serialization.enum_(["IN_NEXT_SYNC", "IN_LAST_SYNC"]); export declare namespace SelectiveSyncConfigurationsUsageEnum { - type Raw = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; + export type Raw = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; } diff --git a/src/serialization/resources/ticketing/types/StatusFd5Enum.ts b/src/serialization/resources/ticketing/types/StatusFd5Enum.ts index 7beb42bdd..4f3b6f07c 100644 --- a/src/serialization/resources/ticketing/types/StatusFd5Enum.ts +++ b/src/serialization/resources/ticketing/types/StatusFd5Enum.ts @@ -12,5 +12,5 @@ export const StatusFd5Enum: core.serialization.Schema< > = core.serialization.enum_(["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"]); export declare namespace StatusFd5Enum { - type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; + export type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; } diff --git a/src/serialization/resources/ticketing/types/SyncStatus.ts b/src/serialization/resources/ticketing/types/SyncStatus.ts index fc733e5f1..0436f0659 100644 --- a/src/serialization/resources/ticketing/types/SyncStatus.ts +++ b/src/serialization/resources/ticketing/types/SyncStatus.ts @@ -23,12 +23,12 @@ export const SyncStatus: core.serialization.ObjectSchema< isInitialSync: core.serialization.property("is_initial_sync", core.serialization.boolean()), selectiveSyncConfigurationsUsage: core.serialization.property( "selective_sync_configurations_usage", - SelectiveSyncConfigurationsUsageEnum.optional() + SelectiveSyncConfigurationsUsageEnum.optional(), ), }); export declare namespace SyncStatus { - interface Raw { + export interface Raw { model_name: string; model_id: string; last_sync_start?: string | null; diff --git a/src/serialization/resources/ticketing/types/Tag.ts b/src/serialization/resources/ticketing/types/Tag.ts index 1881b3b50..192f84894 100644 --- a/src/serialization/resources/ticketing/types/Tag.ts +++ b/src/serialization/resources/ticketing/types/Tag.ts @@ -17,13 +17,13 @@ export const Tag: core.serialization.ObjectSchema serializers.ticketing.TicketParentTicket).optional() + core.serialization.lazy(() => serializers.ticketing.TicketParentTicket).optional(), ), attachments: core.serialization .list(core.serialization.lazy(() => serializers.ticketing.TicketAttachmentsItem).optional()) @@ -53,14 +53,14 @@ export const Ticket: core.serialization.ObjectSchema = core.serialization.enum_(["ALL", "ASSIGNED_ONLY", "TEAM_ONLY"]); export declare namespace TicketAccessEnum { - type Raw = "ALL" | "ASSIGNED_ONLY" | "TEAM_ONLY"; + export type Raw = "ALL" | "ASSIGNED_ONLY" | "TEAM_ONLY"; } diff --git a/src/serialization/resources/ticketing/types/TicketAccount.ts b/src/serialization/resources/ticketing/types/TicketAccount.ts index 9e8efa767..4b619e825 100644 --- a/src/serialization/resources/ticketing/types/TicketAccount.ts +++ b/src/serialization/resources/ticketing/types/TicketAccount.ts @@ -13,5 +13,5 @@ export const TicketAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace TicketAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketActionsEnum.ts b/src/serialization/resources/ticketing/types/TicketActionsEnum.ts index b94113ad8..4d695289b 100644 --- a/src/serialization/resources/ticketing/types/TicketActionsEnum.ts +++ b/src/serialization/resources/ticketing/types/TicketActionsEnum.ts @@ -12,5 +12,5 @@ export const TicketActionsEnum: core.serialization.Schema< > = core.serialization.enum_(["VIEW", "CREATE", "EDIT", "DELETE", "CLOSE", "ASSIGN"]); export declare namespace TicketActionsEnum { - type Raw = "VIEW" | "CREATE" | "EDIT" | "DELETE" | "CLOSE" | "ASSIGN"; + export type Raw = "VIEW" | "CREATE" | "EDIT" | "DELETE" | "CLOSE" | "ASSIGN"; } diff --git a/src/serialization/resources/ticketing/types/TicketAssignedTeamsItem.ts b/src/serialization/resources/ticketing/types/TicketAssignedTeamsItem.ts index 92a3b0b76..325bf2891 100644 --- a/src/serialization/resources/ticketing/types/TicketAssignedTeamsItem.ts +++ b/src/serialization/resources/ticketing/types/TicketAssignedTeamsItem.ts @@ -13,5 +13,5 @@ export const TicketAssignedTeamsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Team]); export declare namespace TicketAssignedTeamsItem { - type Raw = string | Team.Raw; + export type Raw = string | Team.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketAssigneesItem.ts b/src/serialization/resources/ticketing/types/TicketAssigneesItem.ts index f5e100b13..31e698185 100644 --- a/src/serialization/resources/ticketing/types/TicketAssigneesItem.ts +++ b/src/serialization/resources/ticketing/types/TicketAssigneesItem.ts @@ -13,5 +13,5 @@ export const TicketAssigneesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace TicketAssigneesItem { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketAttachmentsItem.ts b/src/serialization/resources/ticketing/types/TicketAttachmentsItem.ts index ea49e7e7f..f62638eaa 100644 --- a/src/serialization/resources/ticketing/types/TicketAttachmentsItem.ts +++ b/src/serialization/resources/ticketing/types/TicketAttachmentsItem.ts @@ -15,5 +15,5 @@ export const TicketAttachmentsItem: core.serialization.Schema< ]); export declare namespace TicketAttachmentsItem { - type Raw = string | serializers.ticketing.Attachment.Raw; + export type Raw = string | serializers.ticketing.Attachment.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketCollectionsItem.ts b/src/serialization/resources/ticketing/types/TicketCollectionsItem.ts index 1156e1020..22628858c 100644 --- a/src/serialization/resources/ticketing/types/TicketCollectionsItem.ts +++ b/src/serialization/resources/ticketing/types/TicketCollectionsItem.ts @@ -15,5 +15,5 @@ export const TicketCollectionsItem: core.serialization.Schema< ]); export declare namespace TicketCollectionsItem { - type Raw = string | serializers.ticketing.Collection.Raw; + export type Raw = string | serializers.ticketing.Collection.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketContact.ts b/src/serialization/resources/ticketing/types/TicketContact.ts index 1e8de6a59..453b0812d 100644 --- a/src/serialization/resources/ticketing/types/TicketContact.ts +++ b/src/serialization/resources/ticketing/types/TicketContact.ts @@ -13,5 +13,5 @@ export const TicketContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace TicketContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketCreator.ts b/src/serialization/resources/ticketing/types/TicketCreator.ts index 1ecba8482..b86c0669e 100644 --- a/src/serialization/resources/ticketing/types/TicketCreator.ts +++ b/src/serialization/resources/ticketing/types/TicketCreator.ts @@ -13,5 +13,5 @@ export const TicketCreator: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace TicketCreator { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketParentTicket.ts b/src/serialization/resources/ticketing/types/TicketParentTicket.ts index 907914602..025787c73 100644 --- a/src/serialization/resources/ticketing/types/TicketParentTicket.ts +++ b/src/serialization/resources/ticketing/types/TicketParentTicket.ts @@ -15,5 +15,5 @@ export const TicketParentTicket: core.serialization.Schema< ]); export declare namespace TicketParentTicket { - type Raw = string | serializers.ticketing.Ticket.Raw; + export type Raw = string | serializers.ticketing.Ticket.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketPriority.ts b/src/serialization/resources/ticketing/types/TicketPriority.ts index 62feb769e..0a47b757f 100644 --- a/src/serialization/resources/ticketing/types/TicketPriority.ts +++ b/src/serialization/resources/ticketing/types/TicketPriority.ts @@ -13,5 +13,5 @@ export const TicketPriority: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([PriorityEnum, core.serialization.string()]); export declare namespace TicketPriority { - type Raw = PriorityEnum.Raw | string; + export type Raw = PriorityEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/TicketRequest.ts b/src/serialization/resources/ticketing/types/TicketRequest.ts index 76d0d2cd8..4286b11a4 100644 --- a/src/serialization/resources/ticketing/types/TicketRequest.ts +++ b/src/serialization/resources/ticketing/types/TicketRequest.ts @@ -25,7 +25,7 @@ export const TicketRequest: core.serialization.ObjectSchema< assignees: core.serialization.list(TicketRequestAssigneesItem.optional()).optional(), assignedTeams: core.serialization.property( "assigned_teams", - core.serialization.list(TicketRequestAssignedTeamsItem.optional()).optional() + core.serialization.list(TicketRequestAssignedTeamsItem.optional()).optional(), ), creator: TicketRequestCreator.optional(), dueDate: core.serialization.property("due_date", core.serialization.date().optional()), @@ -44,17 +44,17 @@ export const TicketRequest: core.serialization.ObjectSchema< priority: TicketRequestPriority.optional(), integrationParams: core.serialization.property( "integration_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), linkedAccountParams: core.serialization.property( "linked_account_params", - core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional() + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), ), remoteFields: core.serialization.property("remote_fields", core.serialization.list(RemoteFieldRequest).optional()), }); export declare namespace TicketRequest { - interface Raw { + export interface Raw { name?: string | null; assignees?: (TicketRequestAssigneesItem.Raw | null | undefined)[] | null; assigned_teams?: (TicketRequestAssignedTeamsItem.Raw | null | undefined)[] | null; diff --git a/src/serialization/resources/ticketing/types/TicketRequestAccount.ts b/src/serialization/resources/ticketing/types/TicketRequestAccount.ts index acf3788db..3938e1ad1 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestAccount.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestAccount.ts @@ -13,5 +13,5 @@ export const TicketRequestAccount: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Account]); export declare namespace TicketRequestAccount { - type Raw = string | Account.Raw; + export type Raw = string | Account.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketRequestAssignedTeamsItem.ts b/src/serialization/resources/ticketing/types/TicketRequestAssignedTeamsItem.ts index ce6041846..8b9712bde 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestAssignedTeamsItem.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestAssignedTeamsItem.ts @@ -13,5 +13,5 @@ export const TicketRequestAssignedTeamsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Team]); export declare namespace TicketRequestAssignedTeamsItem { - type Raw = string | Team.Raw; + export type Raw = string | Team.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketRequestAssigneesItem.ts b/src/serialization/resources/ticketing/types/TicketRequestAssigneesItem.ts index db1d099ea..1860c8fe8 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestAssigneesItem.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestAssigneesItem.ts @@ -13,5 +13,5 @@ export const TicketRequestAssigneesItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace TicketRequestAssigneesItem { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketRequestAttachmentsItem.ts b/src/serialization/resources/ticketing/types/TicketRequestAttachmentsItem.ts index f91d714a4..05ec0ca05 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestAttachmentsItem.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestAttachmentsItem.ts @@ -15,5 +15,5 @@ export const TicketRequestAttachmentsItem: core.serialization.Schema< ]); export declare namespace TicketRequestAttachmentsItem { - type Raw = string | serializers.ticketing.Attachment.Raw; + export type Raw = string | serializers.ticketing.Attachment.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketRequestCollectionsItem.ts b/src/serialization/resources/ticketing/types/TicketRequestCollectionsItem.ts index 309d30725..c1900e601 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestCollectionsItem.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestCollectionsItem.ts @@ -15,5 +15,5 @@ export const TicketRequestCollectionsItem: core.serialization.Schema< ]); export declare namespace TicketRequestCollectionsItem { - type Raw = string | serializers.ticketing.Collection.Raw; + export type Raw = string | serializers.ticketing.Collection.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketRequestContact.ts b/src/serialization/resources/ticketing/types/TicketRequestContact.ts index f57bedabf..96e4949fc 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestContact.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestContact.ts @@ -13,5 +13,5 @@ export const TicketRequestContact: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Contact]); export declare namespace TicketRequestContact { - type Raw = string | Contact.Raw; + export type Raw = string | Contact.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketRequestCreator.ts b/src/serialization/resources/ticketing/types/TicketRequestCreator.ts index 9bbe6e695..25c44836d 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestCreator.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestCreator.ts @@ -13,5 +13,5 @@ export const TicketRequestCreator: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); export declare namespace TicketRequestCreator { - type Raw = string | User.Raw; + export type Raw = string | User.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketRequestParentTicket.ts b/src/serialization/resources/ticketing/types/TicketRequestParentTicket.ts index b0be4f9f1..699d14180 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestParentTicket.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestParentTicket.ts @@ -15,5 +15,5 @@ export const TicketRequestParentTicket: core.serialization.Schema< ]); export declare namespace TicketRequestParentTicket { - type Raw = string | serializers.ticketing.Ticket.Raw; + export type Raw = string | serializers.ticketing.Ticket.Raw; } diff --git a/src/serialization/resources/ticketing/types/TicketRequestPriority.ts b/src/serialization/resources/ticketing/types/TicketRequestPriority.ts index 79cd0fa78..4ac3ca13a 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestPriority.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestPriority.ts @@ -13,5 +13,5 @@ export const TicketRequestPriority: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([PriorityEnum, core.serialization.string()]); export declare namespace TicketRequestPriority { - type Raw = PriorityEnum.Raw | string; + export type Raw = PriorityEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/TicketRequestStatus.ts b/src/serialization/resources/ticketing/types/TicketRequestStatus.ts index 37bc724ad..61e2ed249 100644 --- a/src/serialization/resources/ticketing/types/TicketRequestStatus.ts +++ b/src/serialization/resources/ticketing/types/TicketRequestStatus.ts @@ -13,5 +13,5 @@ export const TicketRequestStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TicketStatusEnum, core.serialization.string()]); export declare namespace TicketRequestStatus { - type Raw = TicketStatusEnum.Raw | string; + export type Raw = TicketStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/TicketResponse.ts b/src/serialization/resources/ticketing/types/TicketResponse.ts index af65a156f..965405814 100644 --- a/src/serialization/resources/ticketing/types/TicketResponse.ts +++ b/src/serialization/resources/ticketing/types/TicketResponse.ts @@ -20,7 +20,7 @@ export const TicketResponse: core.serialization.ObjectSchema< }); export declare namespace TicketResponse { - interface Raw { + export interface Raw { model: serializers.ticketing.Ticket.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/ticketing/types/TicketStatus.ts b/src/serialization/resources/ticketing/types/TicketStatus.ts index 9b9543531..7f850349b 100644 --- a/src/serialization/resources/ticketing/types/TicketStatus.ts +++ b/src/serialization/resources/ticketing/types/TicketStatus.ts @@ -13,5 +13,5 @@ export const TicketStatus: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([TicketStatusEnum, core.serialization.string()]); export declare namespace TicketStatus { - type Raw = TicketStatusEnum.Raw | string; + export type Raw = TicketStatusEnum.Raw | string; } diff --git a/src/serialization/resources/ticketing/types/TicketStatusEnum.ts b/src/serialization/resources/ticketing/types/TicketStatusEnum.ts index 531dcc928..e4f761170 100644 --- a/src/serialization/resources/ticketing/types/TicketStatusEnum.ts +++ b/src/serialization/resources/ticketing/types/TicketStatusEnum.ts @@ -12,5 +12,5 @@ export const TicketStatusEnum: core.serialization.Schema< > = core.serialization.enum_(["OPEN", "CLOSED", "IN_PROGRESS", "ON_HOLD"]); export declare namespace TicketStatusEnum { - type Raw = "OPEN" | "CLOSED" | "IN_PROGRESS" | "ON_HOLD"; + export type Raw = "OPEN" | "CLOSED" | "IN_PROGRESS" | "ON_HOLD"; } diff --git a/src/serialization/resources/ticketing/types/TicketingAttachmentResponse.ts b/src/serialization/resources/ticketing/types/TicketingAttachmentResponse.ts index 8e636a0a7..69e453e1f 100644 --- a/src/serialization/resources/ticketing/types/TicketingAttachmentResponse.ts +++ b/src/serialization/resources/ticketing/types/TicketingAttachmentResponse.ts @@ -20,7 +20,7 @@ export const TicketingAttachmentResponse: core.serialization.ObjectSchema< }); export declare namespace TicketingAttachmentResponse { - interface Raw { + export interface Raw { model: serializers.ticketing.Attachment.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/ticketing/types/TicketingContactResponse.ts b/src/serialization/resources/ticketing/types/TicketingContactResponse.ts index d5f7fc728..e70eace50 100644 --- a/src/serialization/resources/ticketing/types/TicketingContactResponse.ts +++ b/src/serialization/resources/ticketing/types/TicketingContactResponse.ts @@ -21,7 +21,7 @@ export const TicketingContactResponse: core.serialization.ObjectSchema< }); export declare namespace TicketingContactResponse { - interface Raw { + export interface Raw { model: Contact.Raw; warnings: WarningValidationProblem.Raw[]; errors: ErrorValidationProblem.Raw[]; diff --git a/src/serialization/resources/ticketing/types/User.ts b/src/serialization/resources/ticketing/types/User.ts index e624b6253..67af6f35e 100644 --- a/src/serialization/resources/ticketing/types/User.ts +++ b/src/serialization/resources/ticketing/types/User.ts @@ -24,13 +24,13 @@ export const User: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([core.serialization.string(), Role]); export declare namespace UserRolesItem { - type Raw = string | Role.Raw; + export type Raw = string | Role.Raw; } diff --git a/src/serialization/resources/ticketing/types/UserTeamsItem.ts b/src/serialization/resources/ticketing/types/UserTeamsItem.ts index 7b457fe6f..d3a68579d 100644 --- a/src/serialization/resources/ticketing/types/UserTeamsItem.ts +++ b/src/serialization/resources/ticketing/types/UserTeamsItem.ts @@ -13,5 +13,5 @@ export const UserTeamsItem: core.serialization.Schema< > = core.serialization.undiscriminatedUnion([core.serialization.string(), Team]); export declare namespace UserTeamsItem { - type Raw = string | Team.Raw; + export type Raw = string | Team.Raw; } diff --git a/src/serialization/resources/ticketing/types/ValidationProblemSource.ts b/src/serialization/resources/ticketing/types/ValidationProblemSource.ts index fb045872e..539ae0a8a 100644 --- a/src/serialization/resources/ticketing/types/ValidationProblemSource.ts +++ b/src/serialization/resources/ticketing/types/ValidationProblemSource.ts @@ -14,7 +14,7 @@ export const ValidationProblemSource: core.serialization.ObjectSchema< }); export declare namespace ValidationProblemSource { - interface Raw { + export interface Raw { pointer: string; } } diff --git a/src/serialization/resources/ticketing/types/Viewer.ts b/src/serialization/resources/ticketing/types/Viewer.ts index f97d4ee14..e66229126 100644 --- a/src/serialization/resources/ticketing/types/Viewer.ts +++ b/src/serialization/resources/ticketing/types/Viewer.ts @@ -19,7 +19,7 @@ export const Viewer: core.serialization.ObjectSchema { BasicAuth.toAuthorizationHeader({ username: "username", password: "password", - }) + }), ).toBe("Basic dXNlcm5hbWU6cGFzc3dvcmQ="); }); }); diff --git a/tests/unit/fetcher/Fetcher.test.ts b/tests/unit/fetcher/Fetcher.test.ts index ff8042175..a32945e94 100644 --- a/tests/unit/fetcher/Fetcher.test.ts +++ b/tests/unit/fetcher/Fetcher.test.ts @@ -1,7 +1,8 @@ import fs from "fs"; -import { Fetcher, fetcherImpl } from "../../../src/core/fetcher/Fetcher"; import { join } from "path"; +import { Fetcher, fetcherImpl } from "../../../src/core/fetcher/Fetcher"; + describe("Test fetcherImpl", () => { it("should handle successful request", async () => { const mockArgs: Fetcher.Args = { @@ -32,7 +33,7 @@ describe("Test fetcherImpl", () => { method: "POST", headers: expect.objectContaining({ "X-Test": "x-test-header" }), body: JSON.stringify({ data: "test" }), - }) + }), ); }); @@ -63,7 +64,7 @@ describe("Test fetcherImpl", () => { method: "POST", headers: expect.objectContaining({ "X-Test": "x-test-header" }), body: expect.any(fs.ReadStream), - }) + }), ); expect(result.ok).toBe(true); if (result.ok) { diff --git a/tests/unit/fetcher/HttpResponsePromise.test.ts b/tests/unit/fetcher/HttpResponsePromise.test.ts new file mode 100644 index 000000000..2216a33e1 --- /dev/null +++ b/tests/unit/fetcher/HttpResponsePromise.test.ts @@ -0,0 +1,143 @@ +import { beforeEach, describe, expect, it, jest } from "@jest/globals"; + +import { HttpResponsePromise } from "../../../src/core/fetcher/HttpResponsePromise"; +import { RawResponse, WithRawResponse } from "../../../src/core/fetcher/RawResponse"; + +describe("HttpResponsePromise", () => { + const mockRawResponse: RawResponse = { + headers: new Headers(), + redirected: false, + status: 200, + statusText: "OK", + type: "basic" as ResponseType, + url: "https://example.com", + }; + const mockData = { id: "123", name: "test" }; + const mockWithRawResponse: WithRawResponse = { + data: mockData, + rawResponse: mockRawResponse, + }; + + describe("fromFunction", () => { + it("should create an HttpResponsePromise from a function", async () => { + const mockFn = jest + .fn<(arg1: string, arg2: string) => Promise>>() + .mockResolvedValue(mockWithRawResponse); + + const responsePromise = HttpResponsePromise.fromFunction(mockFn, "arg1", "arg2"); + + const result = await responsePromise; + expect(result).toEqual(mockData); + expect(mockFn).toHaveBeenCalledWith("arg1", "arg2"); + + const resultWithRawResponse = await responsePromise.withRawResponse(); + expect(resultWithRawResponse).toEqual({ + data: mockData, + rawResponse: mockRawResponse, + }); + }); + }); + + describe("fromPromise", () => { + it("should create an HttpResponsePromise from a promise", async () => { + const promise = Promise.resolve(mockWithRawResponse); + + const responsePromise = HttpResponsePromise.fromPromise(promise); + + const result = await responsePromise; + expect(result).toEqual(mockData); + + const resultWithRawResponse = await responsePromise.withRawResponse(); + expect(resultWithRawResponse).toEqual({ + data: mockData, + rawResponse: mockRawResponse, + }); + }); + }); + + describe("fromExecutor", () => { + it("should create an HttpResponsePromise from an executor function", async () => { + const responsePromise = HttpResponsePromise.fromExecutor((resolve) => { + resolve(mockWithRawResponse); + }); + + const result = await responsePromise; + expect(result).toEqual(mockData); + + const resultWithRawResponse = await responsePromise.withRawResponse(); + expect(resultWithRawResponse).toEqual({ + data: mockData, + rawResponse: mockRawResponse, + }); + }); + }); + + describe("fromResult", () => { + it("should create an HttpResponsePromise from a result", async () => { + const responsePromise = HttpResponsePromise.fromResult(mockWithRawResponse); + + const result = await responsePromise; + expect(result).toEqual(mockData); + + const resultWithRawResponse = await responsePromise.withRawResponse(); + expect(resultWithRawResponse).toEqual({ + data: mockData, + rawResponse: mockRawResponse, + }); + }); + }); + + describe("Promise methods", () => { + let responsePromise: HttpResponsePromise; + + beforeEach(() => { + responsePromise = HttpResponsePromise.fromResult(mockWithRawResponse); + }); + + it("should support then() method", async () => { + const result = await responsePromise.then((data) => ({ + ...data, + modified: true, + })); + + expect(result).toEqual({ + ...mockData, + modified: true, + }); + }); + + it("should support catch() method", async () => { + const errorResponsePromise = HttpResponsePromise.fromExecutor((_, reject) => { + reject(new Error("Test error")); + }); + + const catchSpy = jest.fn(); + await errorResponsePromise.catch(catchSpy); + + expect(catchSpy).toHaveBeenCalled(); + const error = catchSpy.mock.calls[0]?.[0]; + expect(error).toBeInstanceOf(Error); + expect((error as Error).message).toBe("Test error"); + }); + + it("should support finally() method", async () => { + const finallySpy = jest.fn(); + await responsePromise.finally(finallySpy); + + expect(finallySpy).toHaveBeenCalled(); + }); + }); + + describe("withRawResponse", () => { + it("should return both data and raw response", async () => { + const responsePromise = HttpResponsePromise.fromResult(mockWithRawResponse); + + const result = await responsePromise.withRawResponse(); + + expect(result).toEqual({ + data: mockData, + rawResponse: mockRawResponse, + }); + }); + }); +}); diff --git a/tests/unit/fetcher/RawResponse.test.ts b/tests/unit/fetcher/RawResponse.test.ts new file mode 100644 index 000000000..9ccd5e1eb --- /dev/null +++ b/tests/unit/fetcher/RawResponse.test.ts @@ -0,0 +1,34 @@ +import { describe, expect, it } from "@jest/globals"; + +import { toRawResponse } from "../../../src/core/fetcher/RawResponse"; + +describe("RawResponse", () => { + describe("toRawResponse", () => { + it("should convert Response to RawResponse by removing body, bodyUsed, and ok properties", () => { + const mockHeaders = new Headers({ "content-type": "application/json" }); + const mockResponse = { + body: "test body", + bodyUsed: false, + ok: true, + headers: mockHeaders, + redirected: false, + status: 200, + statusText: "OK", + type: "basic" as ResponseType, + url: "https://example.com", + }; + + const result = toRawResponse(mockResponse as unknown as Response); + + expect("body" in result).toBe(false); + expect("bodyUsed" in result).toBe(false); + expect("ok" in result).toBe(false); + expect(result.headers).toBe(mockHeaders); + expect(result.redirected).toBe(false); + expect(result.status).toBe(200); + expect(result.statusText).toBe("OK"); + expect(result.type).toBe("basic"); + expect(result.url).toBe("https://example.com"); + }); + }); +}); diff --git a/tests/unit/fetcher/createRequestUrl.test.ts b/tests/unit/fetcher/createRequestUrl.test.ts index f2cd24b67..486e1e614 100644 --- a/tests/unit/fetcher/createRequestUrl.test.ts +++ b/tests/unit/fetcher/createRequestUrl.test.ts @@ -22,7 +22,7 @@ describe("Test createRequestUrl", () => { 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" + "https://api.example.com?filter%5Bname%5D=John&filter%5Bage%5D=30", ); }); @@ -34,7 +34,7 @@ describe("Test createRequestUrl", () => { object: { key: "value" }, }; expect(createRequestUrl(baseUrl, queryParams)).toBe( - "https://api.example.com?simple=value&array=x&array=y&object%5Bkey%5D=value" + "https://api.example.com?simple=value&array=x&array=y&object%5Bkey%5D=value", ); }); diff --git a/tests/unit/fetcher/makeRequest.test.ts b/tests/unit/fetcher/makeRequest.test.ts index be94ab45f..43ed9d11b 100644 --- a/tests/unit/fetcher/makeRequest.test.ts +++ b/tests/unit/fetcher/makeRequest.test.ts @@ -1,4 +1,3 @@ -import { RUNTIME } from "../../../src/core/runtime"; import { makeRequest } from "../../../src/core/fetcher/makeRequest"; describe("Test makeRequest", () => { @@ -27,7 +26,7 @@ describe("Test makeRequest", () => { headers: mockHeaders, body: mockBody, credentials: undefined, - }) + }), ); expect(calledOptions.signal).toBeDefined(); expect(calledOptions.signal).toBeInstanceOf(AbortSignal); @@ -46,7 +45,7 @@ describe("Test makeRequest", () => { 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 index 6f77f093e..3cdaa40a5 100644 --- a/tests/unit/fetcher/requestWithRetries.test.ts +++ b/tests/unit/fetcher/requestWithRetries.test.ts @@ -1,4 +1,3 @@ -import { RUNTIME } from "../../../src/core/runtime"; import { requestWithRetries } from "../../../src/core/fetcher/requestWithRetries"; describe("requestWithRetries", () => { @@ -23,12 +22,12 @@ describe("requestWithRetries", () => { }); it("should retry on retryable status codes", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { process.nextTick(callback); return null as any; }); - const retryableStatuses = [408, 409, 429, 500, 502]; + const retryableStatuses = [408, 429, 500, 502]; let callCount = 0; mockFetch.mockImplementation(async () => { @@ -47,7 +46,7 @@ describe("requestWithRetries", () => { }); it("should respect maxRetries limit", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { process.nextTick(callback); return null as any; }); @@ -64,7 +63,7 @@ describe("requestWithRetries", () => { }); it("should not retry on success status codes", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { process.nextTick(callback); return null as any; }); @@ -86,7 +85,7 @@ describe("requestWithRetries", () => { }); it("should apply correct exponential backoff with jitter", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { process.nextTick(callback); return null as any; }); @@ -110,7 +109,7 @@ describe("requestWithRetries", () => { }); it("should handle concurrent retries independently", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { process.nextTick(callback); return null as any; }); diff --git a/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts index 1dc9be0cc..172c1c26b 100644 --- a/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts +++ b/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts @@ -159,7 +159,7 @@ describe("Node18UniversalStreamWrapper", () => { expect(data).toEqual({ test: "test" }); }); - it("should allow use with async iteratable stream", async () => { + it("should allow use with async iterable stream", async () => { const rawStream = new ReadableStream({ start(controller) { controller.enqueue(new TextEncoder().encode("test")); diff --git a/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts index 0c99d3b26..19c26668e 100644 --- a/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts +++ b/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts @@ -111,7 +111,7 @@ describe("NodePre18StreamWrapper", () => { expect(data).toEqual({ test: "test" }); }); - it("should allow use with async iteratable stream", async () => { + it("should allow use with async iterable stream", async () => { const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); let data = ""; const stream = new NodePre18StreamWrapper(rawStream); diff --git a/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts index 1d171ce6c..0ea148350 100644 --- a/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts +++ b/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts @@ -134,7 +134,7 @@ describe("UndiciStreamWrapper", () => { expect(data).toEqual({ test: "test" }); }); - it("should allow use with async iteratable stream", async () => { + it("should allow use with async iterable stream", async () => { const rawStream = new ReadableStream({ start(controller) { controller.enqueue(new TextEncoder().encode("test")); diff --git a/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts index 17cf37a2f..8004e9abb 100644 --- a/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts +++ b/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts @@ -1,8 +1,8 @@ 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"; +import { chooseStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/chooseStreamWrapper"; describe("chooseStreamWrapper", () => { beforeEach(() => { diff --git a/tests/unit/fetcher/stream-wrappers/webpack.test.ts b/tests/unit/fetcher/stream-wrappers/webpack.test.ts index 95d93224b..f7537d3cd 100644 --- a/tests/unit/fetcher/stream-wrappers/webpack.test.ts +++ b/tests/unit/fetcher/stream-wrappers/webpack.test.ts @@ -17,7 +17,11 @@ describe("test env compatibility", () => { ], }, resolve: { - extensions: [".tsx", ".ts", ".js"], + extensions: [".tsx", ".ts", ".jsx", ".js"], + extensionAlias: { + ".js": [".ts", ".js"], + ".jsx": [".tsx", ".jsx"], + }, }, }, (err, stats) => { @@ -31,8 +35,8 @@ describe("test env compatibility", () => { } catch (error) { reject(error); } - } + }, ); }); - }, 90_000); + }, 180_000); }); diff --git a/tests/unit/zurg/bigint/bigint.test.ts b/tests/unit/zurg/bigint/bigint.test.ts index cf9935a74..498f143c7 100644 --- a/tests/unit/zurg/bigint/bigint.test.ts +++ b/tests/unit/zurg/bigint/bigint.test.ts @@ -1,23 +1,45 @@ import { bigint } from "../../../../src/core/schemas/builders/bigint"; -import { itSchema } from "../utils/itSchema"; +import { itJson, itParse, 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"), + itSchema("converts between raw bigint and parsed bigint", bigint(), { + raw: BigInt("9007199254740992"), + parsed: BigInt("9007199254740992"), }); - itValidateParse("non-string", bigint(), 42, [ + itParse("converts between raw number and parsed bigint", bigint(), { + raw: 10, + parsed: BigInt("10"), + }); + + itParse("converts between raw number and parsed bigint", bigint(), { + raw: BigInt("10"), + parsed: BigInt("10"), + }); + + itJson("converts raw bigint to parsed bigint", bigint(), { + parsed: BigInt("10"), + raw: BigInt("10"), + }); + + itValidateParse("string", bigint(), "42", [ + { + message: 'Expected bigint | number. Received "42".', + path: [], + }, + ]); + + itValidateJson("number", bigint(), 42, [ { - message: "Expected string. Received 42.", + message: "Expected bigint. Received 42.", path: [], }, ]); - itValidateJson("non-bigint", bigint(), "hello", [ + itValidateJson("string", bigint(), "42", [ { - message: 'Expected bigint. Received "hello".', + message: 'Expected bigint. Received "42".', path: [], }, ]); diff --git a/tests/unit/zurg/enum/enum.test.ts b/tests/unit/zurg/enum/enum.test.ts index ab0df0285..d1707325b 100644 --- a/tests/unit/zurg/enum/enum.test.ts +++ b/tests/unit/zurg/enum/enum.test.ts @@ -25,6 +25,6 @@ describe("enum", () => { message: "Expected string. Received list.", path: [], }, - ] + ], ); }); diff --git a/tests/unit/zurg/lazy/lazy.test.ts b/tests/unit/zurg/lazy/lazy.test.ts index 6906bf4cf..3a5a338d6 100644 --- a/tests/unit/zurg/lazy/lazy.test.ts +++ b/tests/unit/zurg/lazy/lazy.test.ts @@ -29,12 +29,12 @@ describe("lazy", () => { { title: "passes opts through", opts: { unrecognizedObjectKeys: "passthrough" }, - } + }, ); itSchemaIdentity( lazy(() => object({ foo: string() })), - { foo: "hello" } + { foo: "hello" }, ); // eslint-disable-next-line jest/expect-expect diff --git a/tests/unit/zurg/lazy/lazyObject.test.ts b/tests/unit/zurg/lazy/lazyObject.test.ts index 8813cc9fb..9b443671a 100644 --- a/tests/unit/zurg/lazy/lazyObject.test.ts +++ b/tests/unit/zurg/lazy/lazyObject.test.ts @@ -4,7 +4,7 @@ import { itSchemaIdentity } from "../utils/itSchema"; describe("lazy", () => { itSchemaIdentity( lazyObject(() => object({ foo: string() })), - { foo: "hello" } + { foo: "hello" }, ); itSchemaIdentity( @@ -13,6 +13,6 @@ describe("lazy", () => { foo: "hello", bar: 42, }, - { title: "returned schema has object utils" } + { title: "returned schema has object utils" }, ); }); diff --git a/tests/unit/zurg/list/list.test.ts b/tests/unit/zurg/list/list.test.ts index 424ed642d..108789b73 100644 --- a/tests/unit/zurg/list/list.test.ts +++ b/tests/unit/zurg/list/list.test.ts @@ -12,12 +12,12 @@ describe("list", () => { list( object({ helloWorld: property("hello_world", string()), - }) + }), ), { raw: [{ hello_world: "123" }], parsed: [{ helloWorld: "123" }], - } + }, ); itValidate("not a list", list(string()), 42, [ @@ -36,6 +36,6 @@ describe("list", () => { path: ["[0]"], message: "Expected string. Received 42.", }, - ] + ], ); }); diff --git a/tests/unit/zurg/object/extend.test.ts b/tests/unit/zurg/object/extend.test.ts index 54fc8c4eb..109547137 100644 --- a/tests/unit/zurg/object/extend.test.ts +++ b/tests/unit/zurg/object/extend.test.ts @@ -8,7 +8,7 @@ describe("extend", () => { }).extend( object({ bar: stringLiteral("bar"), - }) + }), ), { foo: "", @@ -16,7 +16,7 @@ describe("extend", () => { } as const, { title: "extended properties are included in schema", - } + }, ); itSchemaIdentity( @@ -26,12 +26,12 @@ describe("extend", () => { .extend( object({ bar: stringLiteral("bar"), - }) + }), ) .extend( object({ baz: boolean(), - }) + }), ), { foo: "", @@ -40,7 +40,7 @@ describe("extend", () => { } as const, { title: "extensions can be extended", - } + }, ); itSchema( @@ -52,12 +52,12 @@ describe("extend", () => { }).extend( object({ goodbye: property("goodbye_raw", string()), - }) + }), ), { raw: { item: { hello_world: "yo" }, goodbye_raw: "peace" }, parsed: { item: { helloWorld: "yo" }, goodbye: "peace" }, - } + }, ); itSchema( @@ -67,12 +67,12 @@ describe("extend", () => { }).extend( object({ goodbye: property("goodbye_raw", string()), - }) + }), ), { raw: { item_raw: "hi", goodbye_raw: "peace" }, parsed: { item: "hi", goodbye: "peace" }, - } + }, ); describe("compile", () => { diff --git a/tests/unit/zurg/object/object.test.ts b/tests/unit/zurg/object/object.test.ts index 0acf0e240..a8d9fe0a1 100644 --- a/tests/unit/zurg/object/object.test.ts +++ b/tests/unit/zurg/object/object.test.ts @@ -14,7 +14,7 @@ describe("object", () => { }, { title: "functions as identity when values are primitives and property() isn't used", - } + }, ); itSchema( @@ -26,7 +26,7 @@ describe("object", () => { { raw: { raw_foo: "foo", bar: "bar" }, parsed: { foo: "foo", bar: "bar" }, - } + }, ); itSchema( @@ -37,7 +37,7 @@ describe("object", () => { { raw: {}, parsed: {}, - } + }, ); itSchema( @@ -48,7 +48,7 @@ describe("object", () => { { raw: {}, parsed: {}, - } + }, ); describe("unrecognizedObjectKeys", () => { @@ -75,7 +75,7 @@ describe("object", () => { opts: { unrecognizedObjectKeys: "passthrough", }, - } + }, ); itParse( @@ -98,7 +98,7 @@ describe("object", () => { opts: { unrecognizedObjectKeys: "strip", }, - } + }, ); }); @@ -125,7 +125,7 @@ describe("object", () => { opts: { unrecognizedObjectKeys: "passthrough", }, - } + }, ); itJson( @@ -148,7 +148,7 @@ describe("object", () => { opts: { unrecognizedObjectKeys: "strip", }, - } + }, ); }); }); @@ -176,7 +176,7 @@ describe("object", () => { { raw: { raw_foo: null }, parsed: { foo: undefined }, - } + }, ); describe("parse()", () => { @@ -186,7 +186,7 @@ describe("object", () => { { raw: { raw_foo: null }, parsed: { foo: undefined }, - } + }, ); }); }); @@ -204,7 +204,7 @@ describe("object", () => { path: [], message: 'Missing required key "bar"', }, - ] + ], ); itValidate( @@ -219,7 +219,7 @@ describe("object", () => { path: ["baz"], message: 'Unexpected key "baz"', }, - ] + ], ); itValidate( @@ -234,7 +234,7 @@ describe("object", () => { path: [], message: "Expected object. Received list.", }, - ] + ], ); itValidate( @@ -250,6 +250,6 @@ describe("object", () => { 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 index d87a65feb..efcd83afa 100644 --- a/tests/unit/zurg/object/objectWithoutOptionalProperties.test.ts +++ b/tests/unit/zurg/object/objectWithoutOptionalProperties.test.ts @@ -16,6 +16,6 @@ describe("objectWithoutOptionalProperties", () => { parsed: { foo: "hello", }, - } + }, ); }); diff --git a/tests/unit/zurg/object/passthrough.test.ts b/tests/unit/zurg/object/passthrough.test.ts index 28ce3b1fe..c8770fca1 100644 --- a/tests/unit/zurg/object/passthrough.test.ts +++ b/tests/unit/zurg/object/passthrough.test.ts @@ -35,7 +35,7 @@ describe("passthrough", () => { path: ["foo"], message: "Expected string. Received 123.", }, - ] + ], ); }); @@ -68,7 +68,7 @@ describe("passthrough", () => { path: ["bar"], message: 'Expected "bar". Received "wrong".', }, - ] + ], ); }); diff --git a/tests/unit/zurg/record/record.test.ts b/tests/unit/zurg/record/record.test.ts index 7e4ba39cc..e07f3e7cb 100644 --- a/tests/unit/zurg/record/record.test.ts +++ b/tests/unit/zurg/record/record.test.ts @@ -15,7 +15,7 @@ describe("record", () => { path: [], message: "Expected object. Received list.", }, - ] + ], ); itValidate("invalid key type", record(number(), string()), { hello: "world" }, [ diff --git a/tests/unit/zurg/schema-utils/getSchemaUtils.test.ts b/tests/unit/zurg/schema-utils/getSchemaUtils.test.ts index da10086bc..09d594d07 100644 --- a/tests/unit/zurg/schema-utils/getSchemaUtils.test.ts +++ b/tests/unit/zurg/schema-utils/getSchemaUtils.test.ts @@ -16,7 +16,7 @@ describe("getSchemaUtils", () => { describe("transform()", () => { itSchema( - "transorm and untransform run correctly", + "transform and untransform run correctly", string().transform({ transform: (x) => x + "X", untransform: (x) => (x as string).slice(0, -1), @@ -24,7 +24,7 @@ describe("getSchemaUtils", () => { { raw: "hello", parsed: "helloX", - } + }, ); }); @@ -75,7 +75,7 @@ describe("getSchemaUtils", () => { }, { omitUndefined: true, - } + }, ); expect(value).toEqual({ a: "hello" }); }); diff --git a/tests/unit/zurg/schema.test.ts b/tests/unit/zurg/schema.test.ts index 94089a9a9..13842ff40 100644 --- a/tests/unit/zurg/schema.test.ts +++ b/tests/unit/zurg/schema.test.ts @@ -26,8 +26,8 @@ describe("Schema", () => { dog: object({ value: boolean() }), cat: object({ value: property("raw_cat", number()) }), }), - }) - ) + }), + ), ), d: property("raw_d", boolean()), e: booleanLiteral(true), @@ -73,6 +73,6 @@ describe("Schema", () => { d: false, e: true, }, - } + }, ); }); diff --git a/tests/unit/zurg/set/set.test.ts b/tests/unit/zurg/set/set.test.ts index e17f908c8..53a1652c8 100644 --- a/tests/unit/zurg/set/set.test.ts +++ b/tests/unit/zurg/set/set.test.ts @@ -24,7 +24,7 @@ describe("set", () => { path: [], message: "Expected Set. Received list.", }, - ] + ], ); itValidateParse( @@ -36,7 +36,7 @@ describe("set", () => { path: ["[0]"], message: "Expected string. Received 42.", }, - ] + ], ); itValidateJson("invalid item type", set(string()), new Set([42]), [ diff --git a/tests/unit/zurg/skipValidation.test.ts b/tests/unit/zurg/skipValidation.test.ts index 5dc88096a..328355594 100644 --- a/tests/unit/zurg/skipValidation.test.ts +++ b/tests/unit/zurg/skipValidation.test.ts @@ -1,5 +1,4 @@ /* eslint-disable no-console */ - import { boolean, number, object, property, string, undiscriminatedUnion } from "../../../src/core/schemas/builders"; describe("skipValidation", () => { @@ -23,7 +22,7 @@ describe("skipValidation", () => { }, { skipValidation: true, - } + }, ); expect(parsed).toEqual({ diff --git a/tests/unit/zurg/undiscriminated-union/undiscriminatedUnion.test.ts b/tests/unit/zurg/undiscriminated-union/undiscriminatedUnion.test.ts index 0e6643337..e0ddb21b4 100644 --- a/tests/unit/zurg/undiscriminated-union/undiscriminatedUnion.test.ts +++ b/tests/unit/zurg/undiscriminated-union/undiscriminatedUnion.test.ts @@ -14,7 +14,7 @@ describe("undiscriminatedUnion", () => { { raw: { hello_world: "foo " }, parsed: { helloWorld: "foo " }, - } + }, ); it("Returns errors for all variants", async () => { diff --git a/tests/unit/zurg/union/union.test.ts b/tests/unit/zurg/union/union.test.ts index 790184603..1f5d7a8fa 100644 --- a/tests/unit/zurg/union/union.test.ts +++ b/tests/unit/zurg/union/union.test.ts @@ -13,7 +13,7 @@ describe("union", () => { }), }), { type: "lion", meows: true }, - { title: "doesn't transform discriminant when it's a string" } + { title: "doesn't transform discriminant when it's a string" }, ); itSchema( @@ -25,7 +25,7 @@ describe("union", () => { { raw: { _type: "lion", meows: true }, parsed: { type: "lion", meows: true }, - } + }, ); describe("allowUnrecognizedUnionMembers", () => { @@ -43,7 +43,7 @@ describe("union", () => { opts: { allowUnrecognizedUnionMembers: true, }, - } + }, ); }); @@ -76,7 +76,7 @@ describe("union", () => { path: [], message: "Expected object. Received list.", }, - ] + ], ); itValidate( @@ -91,7 +91,7 @@ describe("union", () => { path: [], message: 'Missing discriminant ("type")', }, - ] + ], ); itValidate( @@ -108,6 +108,6 @@ describe("union", () => { path: ["type"], message: 'Expected enum. Received "bear".', }, - ] + ], ); }); diff --git a/tests/unit/zurg/utils/itSchema.ts b/tests/unit/zurg/utils/itSchema.ts index 67b6c9281..82a538878 100644 --- a/tests/unit/zurg/utils/itSchema.ts +++ b/tests/unit/zurg/utils/itSchema.ts @@ -4,7 +4,7 @@ import { Schema, SchemaOptions } from "../../../../src/core/schemas/Schema"; export function itSchemaIdentity( schema: Schema, value: T, - { title = "functions as identity", opts }: { title?: string; opts?: SchemaOptions } = {} + { title = "functions as identity", opts }: { title?: string; opts?: SchemaOptions } = {}, ): void { itSchema(title, schema, { raw: value, parsed: value, opts }); } @@ -22,7 +22,7 @@ export function itSchema( parsed: Parsed; opts?: SchemaOptions; only?: boolean; - } + }, ): void { // eslint-disable-next-line jest/valid-title (only ? describe.only : describe)(title, () => { @@ -42,7 +42,7 @@ export function itParse( raw: Raw; parsed: Parsed; opts?: SchemaOptions; - } + }, ): void { // eslint-disable-next-line jest/valid-title it(title, () => { @@ -65,7 +65,7 @@ export function itJson( raw: Raw; parsed: Parsed; opts?: SchemaOptions; - } + }, ): void { // eslint-disable-next-line jest/valid-title it(title, () => { diff --git a/tests/unit/zurg/utils/itValidate.ts b/tests/unit/zurg/utils/itValidate.ts index 75b2c08b0..ead1ca70b 100644 --- a/tests/unit/zurg/utils/itValidate.ts +++ b/tests/unit/zurg/utils/itValidate.ts @@ -6,7 +6,7 @@ export function itValidate( schema: Schema, input: unknown, errors: ValidationError[], - opts?: SchemaOptions + opts?: SchemaOptions, ): void { // eslint-disable-next-line jest/valid-title describe("parse()", () => { @@ -22,7 +22,7 @@ export function itValidateParse( schema: Schema, raw: unknown, errors: ValidationError[], - opts?: SchemaOptions + opts?: SchemaOptions, ): void { describe("parse", () => { // eslint-disable-next-line jest/valid-title @@ -41,7 +41,7 @@ export function itValidateJson( schema: Schema, parsed: unknown, errors: ValidationError[], - opts?: SchemaOptions + opts?: SchemaOptions, ): void { describe("json", () => { // eslint-disable-next-line jest/valid-title diff --git a/tsconfig.json b/tsconfig.json index 538c94fe0..1ec87dd77 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,14 +3,14 @@ "extendedDiagnostics": true, "strict": true, "target": "ES6", - "module": "CommonJS", "moduleResolution": "node", "esModuleInterop": true, "skipLibCheck": true, "declaration": true, "outDir": "dist", "rootDir": "src", - "baseUrl": "src" + "baseUrl": "src", + "module": "CommonJS" }, "include": ["src"], "exclude": [] diff --git a/yarn.lock b/yarn.lock index 3f64427fc..bf3126fff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,7 +19,7 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/compat-data@^7.26.5": +"@babel/compat-data@^7.26.8": version "7.26.8" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.8.tgz#821c1d35641c355284d4a870b8a4a7b0c141e367" integrity sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ== @@ -45,23 +45,23 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.26.10", "@babel/generator@^7.7.2": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.10.tgz#a60d9de49caca16744e6340c3658dfef6138c3f7" - integrity sha512-rRHT8siFIXQrAYOYqZQVsAr8vJ+cBNqcVAY6m5V8/4QqzaPl+zDBe6cLEPRDuNOUf3ww8RfJVlOyQMoSI+5Ang== +"@babel/generator@^7.26.10", "@babel/generator@^7.27.0", "@babel/generator@^7.7.2": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.27.0.tgz#764382b5392e5b9aff93cadb190d0745866cbc2c" + integrity sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw== dependencies: - "@babel/parser" "^7.26.10" - "@babel/types" "^7.26.10" + "@babel/parser" "^7.27.0" + "@babel/types" "^7.27.0" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" "@babel/helper-compilation-targets@^7.26.5": - version "7.26.5" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz#75d92bb8d8d51301c0d49e52a65c9a7fe94514d8" - integrity sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.0.tgz#de0c753b1cd1d9ab55d473c5a5cf7170f0a81880" + integrity sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA== dependencies: - "@babel/compat-data" "^7.26.5" + "@babel/compat-data" "^7.26.8" "@babel/helper-validator-option" "^7.25.9" browserslist "^4.24.0" lru-cache "^5.1.1" @@ -105,19 +105,19 @@ integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== "@babel/helpers@^7.26.10": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.10.tgz#6baea3cd62ec2d0c1068778d63cb1314f6637384" - integrity sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.27.0.tgz#53d156098defa8243eab0f32fa17589075a1b808" + integrity sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg== dependencies: - "@babel/template" "^7.26.9" - "@babel/types" "^7.26.10" + "@babel/template" "^7.27.0" + "@babel/types" "^7.27.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.26.10", "@babel/parser@^7.26.9": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.10.tgz#e9bdb82f14b97df6569b0b038edd436839c57749" - integrity sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.26.10", "@babel/parser@^7.27.0": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.27.0.tgz#3d7d6ee268e41d2600091cbd4e145ffee85a44ec" + integrity sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg== dependencies: - "@babel/types" "^7.26.10" + "@babel/types" "^7.27.0" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -238,32 +238,32 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" -"@babel/template@^7.26.9", "@babel/template@^7.3.3": - version "7.26.9" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.26.9.tgz#4577ad3ddf43d194528cff4e1fa6b232fa609bb2" - integrity sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA== +"@babel/template@^7.26.9", "@babel/template@^7.27.0", "@babel/template@^7.3.3": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.0.tgz#b253e5406cc1df1c57dcd18f11760c2dbf40c0b4" + integrity sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA== dependencies: "@babel/code-frame" "^7.26.2" - "@babel/parser" "^7.26.9" - "@babel/types" "^7.26.9" + "@babel/parser" "^7.27.0" + "@babel/types" "^7.27.0" "@babel/traverse@^7.25.9", "@babel/traverse@^7.26.10": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.10.tgz#43cca33d76005dbaa93024fae536cc1946a4c380" - integrity sha512-k8NuDrxr0WrPH5Aupqb2LCVURP/S0vBEn5mK6iH+GIYob66U5EtoZvcdudR2jQ4cmTwhEwW1DLB+Yyas9zjF6A== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.27.0.tgz#11d7e644779e166c0442f9a07274d02cd91d4a70" + integrity sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA== dependencies: "@babel/code-frame" "^7.26.2" - "@babel/generator" "^7.26.10" - "@babel/parser" "^7.26.10" - "@babel/template" "^7.26.9" - "@babel/types" "^7.26.10" + "@babel/generator" "^7.27.0" + "@babel/parser" "^7.27.0" + "@babel/template" "^7.27.0" + "@babel/types" "^7.27.0" 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.10", "@babel/types@^7.26.9", "@babel/types@^7.3.3": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.10.tgz#396382f6335bd4feb65741eacfc808218f859259" - integrity sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.10", "@babel/types@^7.27.0", "@babel/types@^7.3.3": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.27.0.tgz#ef9acb6b06c3173f6632d993ecb6d4ae470b4559" + integrity sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg== dependencies: "@babel/helper-string-parser" "^7.25.9" "@babel/helper-validator-identifier" "^7.25.9" @@ -557,9 +557,9 @@ "@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== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.27.0.tgz#b5819294c51179957afaec341442f9341e4108a9" + integrity sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg== dependencies: "@babel/types" "^7.0.0" @@ -572,9 +572,9 @@ "@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== + version "7.20.7" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.7.tgz#968cdc2366ec3da159f61166428ee40f370e56c2" + integrity sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng== dependencies: "@babel/types" "^7.20.7" @@ -595,9 +595,9 @@ "@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== + version "1.0.7" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.7.tgz#4158d3105276773d5b7695cd4834b1722e4f37a8" + integrity sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ== "@types/graceful-fs@^4.1.3": version "4.1.9" @@ -625,10 +625,10 @@ 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== +"@types/jest@^29.5.14": + version "29.5.14" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.14.tgz#2b910912fa1d6856cadcd0c1f95af7df1d6049e5" + integrity sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ== dependencies: expect "^29.0.0" pretty-format "^29.0.0" @@ -647,32 +647,34 @@ 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" - integrity sha512-bQVlnMLFJ2d35DkPNjEPmd9ueO/rh5EiaZt2bhqiSarPjZIuIV6bPQVqcrEyvNo+AfTrRGVazle1tl597w3gfA== +"@types/node-fetch@^2.6.12": + version "2.6.12" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.12.tgz#8ab5c3ef8330f13100a7479e2cd56d3386830a03" + integrity sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA== dependencies: "@types/node" "*" form-data "^4.0.0" "@types/node@*": - version "22.13.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.10.tgz#df9ea358c5ed991266becc3109dc2dc9125d77e4" - integrity sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw== + version "22.14.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.14.1.tgz#53b54585cec81c21eee3697521e31312d6ca1e6f" + integrity sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw== dependencies: - undici-types "~6.20.0" + undici-types "~6.21.0" -"@types/node@17.0.33": - version "17.0.33" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.33.tgz#3c1879b276dc63e73030bb91165e62a4509cd506" - integrity sha512-miWq2m2FiQZmaHfdZNcbpp9PuXg34W5JZ5CrJ/BaS70VuhoJENBEQybeiYSaPBRNq6KQGnjfEnc/F3PN++D+XQ== +"@types/node@^18.19.70": + version "18.19.86" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.86.tgz#a7e1785289c343155578b9d84a0e3e924deb948b" + integrity sha512-fifKayi175wLyKyc5qUfyENhQ1dCNI1UNjp653d8kuYcPQN5JhX3dGuP/XmvPTg/xRBn1VTLpbmi+H/Mr7tLfQ== + dependencies: + undici-types "~5.26.4" -"@types/qs@6.9.8": - version "6.9.8" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.8.tgz#f2a7de3c107b89b441e071d5472e6b726b4adf45" - integrity sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg== +"@types/qs@^6.9.17": + version "6.9.18" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.18.tgz#877292caa91f7c1b213032b34626505b746624c2" + integrity sha512-kK7dgTYDyGqS+e2Q4aK9X3D7q234CIZ1Bv0q/7Z5IwRDoADNU81xXJK/YVyLbLTZCoIwUoDoffFeF+p/eIklAA== -"@types/readable-stream@^4.0.15": +"@types/readable-stream@^4.0.18": 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== @@ -940,6 +942,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +async@^3.2.3: + version "3.2.6" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" + integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -1026,6 +1033,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" @@ -1043,7 +1057,7 @@ browserslist@^4.24.0: node-releases "^2.0.19" update-browserslist-db "^1.1.1" -bs-logger@0.x: +bs-logger@^0.2.6: version "0.2.6" resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== @@ -1102,11 +1116,11 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001688: - version "1.0.30001704" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001704.tgz#6644fe909d924ac3a7125e8a0ab6af95b1f32990" - integrity sha512-+L2IgBbV6gXB4ETf0keSvLr7JUrRVbIaB/lrQ1+z8mRcQiisG5k+lG6O4n6Y5q6f5EuNfaYXKgymucphlEXQew== + version "1.0.30001713" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001713.tgz#6b33a8857e6c7dcb41a0caa2dd0f0489c823a52d" + integrity sha512-wCIWIg+A4Xr7NfhTuHdX+/FKh3+Op3LBbSp2N5Pfx6T/LhdQy3GTyoTg48BReaW/MyMNZAkTadsBtai3ldWK0Q== -chalk@^4.0.0, chalk@^4.1.0: +chalk@^4.0.0, chalk@^4.0.2, 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== @@ -1288,10 +1302,17 @@ dunder-proto@^1.0.1: es-errors "^1.3.0" gopd "^1.2.0" +ejs@^3.1.10: + version "3.1.10" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" + integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA== + dependencies: + jake "^10.8.5" + electron-to-chromium@^1.5.73: - version "1.5.117" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.117.tgz#7739799f513285630c4388721310af5fda480f79" - integrity sha512-G4+CYIJBiQ72N0gi868tmG4WsD8bwLE9XytBdfgXO5zdlTlvOP2ABzWYILYxCIHmsbm2HjBSgm/E/H/QfcnIyQ== + version "1.5.137" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.137.tgz#53a7fef3ea9f7eb5fcf704454050ff930c43ed92" + integrity sha512-/QSJaU2JyIuTbbABAo/crOs+SuAZLS+fVVS10PVrIT9hrRkmZl8Hb0xPSkKRUUWHQtYzXHpQUW3Dy5hwMzGZkA== emittery@^0.13.1: version "0.13.1" @@ -1474,6 +1495,13 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" +filelist@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" + integrity sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q== + dependencies: + minimatch "^5.0.1" + fill-range@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" @@ -1786,6 +1814,16 @@ istanbul-reports@^3.1.3: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" +jake@^10.8.5: + version "10.9.2" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.2.tgz#6ae487e6a69afec3a5e167628996b59f35ae2b7f" + integrity sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA== + dependencies: + async "^3.2.3" + chalk "^4.0.2" + filelist "^1.0.4" + minimatch "^3.1.2" + 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" @@ -1894,7 +1932,7 @@ jest-each@^29.7.0: jest-util "^29.7.0" pretty-format "^29.7.0" -jest-environment-jsdom@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== @@ -2157,7 +2195,7 @@ jest-worker@^29.7.0: merge-stream "^2.0.0" supports-color "^8.0.0" -jest@29.7.0: +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== @@ -2167,10 +2205,10 @@ jest@29.7.0: import-local "^3.0.2" jest-cli "^29.7.0" -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== +js-base64@3.7.7: + version "3.7.7" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.7.tgz#e51b84bf78fbf5702b9541e2cb7bfcb893b43e79" + integrity sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw== js-tokens@^4.0.0: version "4.0.0" @@ -2264,7 +2302,7 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -lodash.memoize@4.x: +lodash.memoize@^4.1.2: 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== @@ -2283,7 +2321,7 @@ make-dir@^4.0.0: dependencies: semver "^7.5.3" -make-error@1.x: +make-error@^1.3.6: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== @@ -2330,13 +2368,20 @@ mimic-fn@^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: +minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: 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" +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" @@ -2352,7 +2397,7 @@ neo-async@^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: +node-fetch@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -2382,9 +2427,9 @@ npm-run-path@^4.0.1: path-key "^3.0.0" nwsapi@^2.2.2: - version "2.2.18" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.18.tgz#3c4d7927e1ef4d042d319438ecfda6cd81b7ee41" - integrity sha512-p1TRH/edngVEHVbwqWnxUViEmq5znDvyB+Sik5cmuLpGOIfDf/39zLiq3swPF8Vakqn+gvNiOQAZu8djYlQILA== + version "2.2.20" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.20.tgz#22e53253c61e7b0e7e93cef42c891154bcca11ef" + integrity sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA== object-inspect@^1.13.3: version "1.13.4" @@ -2479,9 +2524,9 @@ picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: 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== + version "4.0.7" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" + integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== pkg-dir@^4.2.0: version "4.2.0" @@ -2490,10 +2535,10 @@ pkg-dir@^4.2.0: 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== +prettier@^3.4.2: + version "3.5.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.5.3.tgz#4fc2ce0d657e7a02e602549f053b239cb7dfe1b5" + integrity sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw== pretty-format@^29.0.0, pretty-format@^29.7.0: version "29.7.0" @@ -2534,12 +2579,12 @@ pure-rand@^6.0.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" - integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== +qs@^6.13.1: + version "6.14.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.14.0.tgz#c63fa40680d2c5c941412a0e899c89af60c0a930" + integrity sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w== dependencies: - side-channel "^1.0.4" + side-channel "^1.1.0" querystringify@^2.1.1: version "2.2.0" @@ -2647,7 +2692,7 @@ semver@^6.3.0, semver@^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: +semver@^7.3.4, semver@^7.5.3, semver@^7.5.4, semver@^7.7.1: version "7.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f" integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA== @@ -2700,7 +2745,7 @@ side-channel-weakmap@^1.0.2: object-inspect "^1.13.3" side-channel-map "^1.0.1" -side-channel@^1.0.4: +side-channel@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== @@ -2903,21 +2948,23 @@ tr46@~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== +ts-jest@^29.1.1: + version "29.3.2" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.3.2.tgz#0576cdf0a507f811fe73dcd16d135ce89f8156cb" + integrity sha512-bJJkrWc6PjFVz5g2DGCNUo8z7oFEYaz1xP1NpeDU7KNLMWPpEyV8Chbpkn8xjzgRDpQhnGMyvyldoL7h8JXyug== dependencies: - bs-logger "0.x" - fast-json-stable-stringify "2.x" + bs-logger "^0.2.6" + ejs "^3.1.10" + fast-json-stable-stringify "^2.1.0" 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" + lodash.memoize "^4.1.2" + make-error "^1.3.6" + semver "^7.7.1" + type-fest "^4.39.1" + yargs-parser "^21.1.1" -ts-loader@^9.3.1: +ts-loader@^9.5.1: version "9.5.2" resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.2.tgz#1f3d7f4bb709b487aaa260e8f19b301635d08020" integrity sha512-Qo4piXvOTWcMGIgRiuFa6nHNm+54HbYaZCKqc9eeZCLRy3XqafQgwX2F7mofrbJG3g7EEb+lkiR+z2Lic2s3Zw== @@ -2938,15 +2985,25 @@ type-fest@^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== +type-fest@^4.39.1: + version "4.39.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.39.1.tgz#7521f6944e279abaf79cf60cfbc4823f4858083e" + integrity sha512-uW9qzd66uyHYxwyVBYiwS4Oi0qZyUqwjU+Oevr6ZogYiXt99EOYtwvzMSLw1c3lYo2HzJsep/NB23iEVEgjG/w== + +typescript@~5.7.2: + version "5.7.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e" + integrity sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw== + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -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== +undici-types@~6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== universalify@^0.2.0: version "0.2.0" @@ -3020,10 +3077,10 @@ webpack-sources@^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.98.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.98.0.tgz#44ae19a8f2ba97537978246072fb89d10d1fbd17" - integrity sha512-UFynvx+gM44Gv9qFgj0acCQK2VE1CtdfwFdimkapco3hlPCJ/zeq73n2yVKimVbtm+TnApIugGhLJnkU6gjYXA== +webpack@^5.97.1: + version "5.99.5" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.99.5.tgz#86e3b3a5a03377ea5da271c929934003f5ac5dd8" + integrity sha512-q+vHBa6H9qwBLUlHL4Y7L0L1/LlyBKZtS9FHNCQmtayxjI5RKC9yD8gpvLeqGv5lCQp1Re04yi0MF40pf30Pvg== dependencies: "@types/eslint-scope" "^3.7.7" "@types/estree" "^1.0.6" @@ -3131,7 +3188,7 @@ yallist@^3.0.2: 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: +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==